Posts: 294
Threads: 9
Joined: Oct 2002
How does one do double buffering / page flipping in FB in text mode screen 0?
Not implemented yet? Just curious, cause hi-res graphics are evil :p.
Posts: 1,439
Threads: 15
Joined: Apr 2003
I don't think multiple pages are supported by the Win32 console API. If you write DOS-specific code, you could use _farpokeb() etc. from the DJGPP libc to write directly to the memory mapped area for the display (0x8B00:0000) and use outporb() to set the page, but I don't see why you don't just use gfxlib's print and multiple pages.
(Don't write non-portable code PLEASE.... )
Posts: 294
Threads: 9
Joined: Oct 2002
im thinking i might just write to an array, and print that to the screen or something. That at least will be portable heh.
Posts: 133
Threads: 19
Joined: Jan 2005
Quote:im thinking i might just write to an array, and print that to the screen or something. That at least will be portable heh.
Sure you want to do that?
Just updating what has changed is best for textmode, IMO
color=red]Look at you, Hacker. A pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?" - Shodan, AI at Citadel Station orbiting Earth[/color]
Posts: 3
Threads: 0
Joined: Apr 2005
Yah I think I'm tryin to do the same thing as this guy except not in the dosbox and just in SCREEN 1 mode. Whee so I'm drawing a lil map with letters like nethack and I need to move a letter and oh crap surely I dont CLS and then redraw the entire thing right? So lets say I just:
print "12345"
print "67890"
Now I wanna change that 7 to a 0 because I hate 7.
So surely I don't:
CLS
print "12345"
print "60890"
That wouldnt make sense nooooo that's kraziness...so how would I overwrite just the 7 without clearing it and redoing it all?
I was also thinking I could write the damned map to a file each time the character moves and then use the seek and blah blah file functions to change it within the file then cls and load the file but that sounds krazi too doesn't it?
retarded quotes are retarded"
Posts: 1,439
Threads: 15
Joined: Apr 2003
Code:
Locate 2, 2
Print "0";
Posts: 3
Threads: 0
Joined: Apr 2005
Thanks a lot. And its right there in the manual. Grrr.
retarded quotes are retarded"