| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: VP question |
-=> Quoting Darin Mcbride to George Roberts <=-
GR> I have a unit that I wrote that I use in our BBS software, Nexus,
GR> that handles the windowing. I use the MEM command to change the
GR> colors on the screen for shading, and for putting saved windows
GR> back on the screen. I am getting the video segment and then doing a:
GR> mem[vidseg:(160*(x-1)+2*(x2))+1]:=8;
GR> type of thing... however, VP uses 32-bit flat memory... any idea
GR> how I'm supposed to change this so that I can access specific
GR> parts of the video memory in console apps? Any help would be
GR> appreciated... thanks!
Gee and I thought I answerred your question (perhaps I should have read it
first ).
I suppose my previous screencap, screenrestore code will come in handy
anyway (although it doesn't address all of what you want).
It would seem that you're looking for one or all of the three
following vio calls.
VioWrtNAttr (to change the attribute at given location(s))
VioWrtNChar (to place character(s) on screen)
VioWrtNCell (to place a "word" (character with attribute) to screen)
for example to put a "B" in the 3rd row of the 5th column (keeping in mind
that the VIO starts rows and columns at 0 and not 1) (no example for
VioWrtNAttr since I've never seen a need to change "just" the attribute
(although it would be handy for shadows of boxes etc.))
uses os2base,crt;
var
putthis:word;
begin
putthis:=66+(256*textattr); {or putthis:=ord('B')+(256*textattr);}
VioWrtNCell(putthis,1,2,4,0);
{ ^^^^^^^ ^ ^ ^ ^
| | | | VIO handle
| | | Column (0 based)}
| | Row (0 based)}
| Repeat how many times?
Word value of (attribute*256) + (char value)}
end.
or
uses os2base;
var
putthis:char;
begin
putthis:=66; {or putthis:=ord('B');}
VioWrtNChar(putthis,1,2,4,0);
{ ^^^^^^^ ^ ^ ^ ^
| | | | VIO handle
| | | Column (0 based)}
| | Row (0 based)}
| Repeat how many times?
byte value of (char value)}
end.
Dave...
... THD ProScan support on the web, http://www.naples.net/~nfn03274
~~~ TGWave v1.12+
--- GEcho 1.11+
* Origin: fks Online! * Ontario, Canada * (905)820-7273 * (1:259/423)SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 259/423 400 99 250/99 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.