www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/25/10:45:37

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: fade_out()
Date: 24 Jan 1998 13:20:59 GMT
Organization: Oxford University, England
Lines: 26
Message-ID: <6acprr$8ka$3@news.ox.ac.uk>
References: <6ac7q0$j2c$1 AT herald DOT Mines DOT EDU>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 24 Jan 1998 08:12:48 GMT in comp.os.msdos.djgpp Jean-Luc Romano <jromano AT slate DOT Mines DOT EDU> wrote:

: Dear All,

:    When programming in C using DJGPP and the Allegro graphics 
: library, the fade_out() routine only seems to work once.

:    The second fade_out() routine will only work if the first
: fade_out() routine has been commented out.

Allegro doesn't know what palette the graphics card set up when you
changed video mode, so it leaves its internal table as it was before
the mode change -- i.e. black for all colours (after the fade_out).
So, when it gets to the second fade_out, it fades black into black,
which results in an immediate jump to black right at the start of the
fade.

In general it's best not to rely on the palette the graphics card sets
for you on a mode change -- different cards use different palettes.
You can probably rely on the first 16 colours being `normal', but in
any case it's best to set explicitly any colours you want to use.  If
you do this, Allegro will know what you've set them to and the
fade_out will work properly again.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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