www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/05/13:56:53

From: eglebbk AT phys DOT uva DOT nl (Evert Glebbeek)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using (page-flipping) to speed up a program
Date: Wed, 05 Jul 2000 16:14:10 GMT
Organization: Physics student, University of Amsterdam
Lines: 43
Distribution: world
Message-ID: <39635adf.1264089@news.wins.uva.nl>
References: <395e61e0_2 AT spamkiller DOT newsfeeds DOT com> <395fcb12_1 AT spamkiller DOT newsfeeds DOT com> <39622a8e DOT 1248934 AT news DOT wins DOT uva DOT nl> <39626821_2 AT spamkiller DOT newsfeeds DOT com>
NNTP-Posting-Host: stol-117-226.uva.studentennet.nl
X-Trace: info.wins.uva.nl 962813584 3427 145.98.117.226 (5 Jul 2000 16:13:04 GMT)
X-Complaints-To: usenet AT science DOT uva DOT nl
NNTP-Posting-Date: Wed, 5 Jul 2000 16:13:04 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019