Mail Archives: djgpp/2000/07/05/13:56:53
Newsgroup: comp.os.msdos.djgpp
From: "23yrold3yrold" <cbarry AT pangea DOT ca>
On Tue, 4 Jul 2000 09:41:27 -0500
>The zip is alleg312, which I just downloaded, so it should be fairly recent.
It's the latest `full version' release; but my advise would be to get
the latest WIP instead.
>Originally I use AUTODETECT, but I'm unsure whether MODEX is my only option.
>I need 16-bit, but the way Allegro's docs read, triple-buffering is Mode-X
>exclusive. The only commands necessary to do triple-buffering it seems are
>request_scroll() and poll_scroll(), don't they work in other modes?
IIRC, triple buffering requires hardware support. The VGA provides
hardware support in Mode-X, but not all SVGA cards provide hardware
support for VESA modes (mine doesn't, for instance). Using VB/AF
drivers may solve this, I haven't tested it.
In general though, you shouldn't rely on triple-buffering to work in
VESA modes.
You could make your program so it can run in VESA if the hardware
supports it or in Mode-X if not. This may require a little work, but
it will increase the chance of your game working for more people.
>> >ship = get_rle_sprite(load_bitmap("Ship.bmp", pal));
>> You still have the memory leak.
>
>I tried to fix it, how should I do it?
Do something like
BITMAP *bmp;
...
bmp = load_bitmap("ship.bmp", pal);
ship = get_rle_sprite (bmp);
destroy_bitmap (bmp);
<jump to 2nd message>
>Triple-buffering seems to be the best way in terms of animation and
>speed,
For a scroller, I think you're right. I know you don't want to use
Mode-X, but it has hardware support for scrolling just in this manner.
>main question is whether triple-buffering is possible outside of Mode-X (I
>want 640 x 480 w/ 16-bit color.).?
Yes, but see my other remarks above.
Regards,
Evert Glebbeek.
- Raw text -