Mail Archives: djgpp/2001/05/11/22:00:11
"Cody" <cody1 AT ktsnet DOT com> writes:
> How would I in DJGPP do the following:? I have browsed the allegro game
> library but got nothing out of it (wayyyy too much code). I can do the
If you use allegro, you can just call its functions, and don't need to
know how it works inside. I found the manual and example programs
quite sufficient to figure out how to use it.
> following in 16-bit does apps, but DJGPP's 32-bit protected mode poses a
> problem. Links to the code or just replies with the code would certainly be
> appreciated.
>
> 1. get into different video modes (320x200 w/ 256 colors and more, 320x240
> w/ 256 colors and more, 640x480 w/ 256 colors and more, etc.)?
__dpmi_int
> 2. put a pixel in those modes (any difference in them...?)?
_farpokeb(_dos_ds, 0xa0000 + offset, color)
> 3. get back into 80x25 text mode?
__dpmi_int
> I'm unfamiliar with at&t style asm (plus I'm <beginner at intel style asm),
> and even if I knew at&t style asm I wouldn't be able to do it since I think
> 32-bit protected mode getting into graphics are different than what I have
> to do with turbo c++. I hope that the putpixel routine is the fastest that
> you know of, because that's the only one that really needs a lot of speed.
Actually, if your algorithm depends on putpixel being fast, it's in
trouble. You should draw your image to a buffer somewhere and blit it
into video memory (dosmemput is helpful here).
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -