delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/22/18:31:35

From: Larry Threewitt <lensman AT interaccess DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fade routine
Date: Mon, 20 Oct 1997 08:35:29 -0500
Organization: InterAccess Co., Chicago's Full Service Internet Provider
Lines: 48
Message-ID: <344B5E21.EBAA8A31@hotmail.com>
References: <343D1F26 DOT B4EBB976 AT ostrabo DOT uddevalla DOT se> <3444CC19 DOT 61E7 AT boat DOT bt DOT com>
NNTP-Posting-Host: d106.vn1.interaccess.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Simon Churchill wrote:

> Andreas Björk wrote:
> >
> > I have tried to write a lot of diffrent fade routines for mode 13 in
> > DJGPP.
> > but none of them have worked properly. Is there anyone who have a
> > working fade routine?
> >
> > Please help me with this..
>
> Have You remembered that the palette is only 18bit colour not 24bit
>
> ie rgb vals go from 0 - 0x63 and not 0 - 0xff  ???????

>Andreas Bj=F6rk wrote:
>>=20
>> I have tried to write a lot of diffrent fade routines for mode 13 in
>> DJGPP.
>> but none of them have worked properly. Is there anyone who have a
>> working fade routine?
>>=20
>> Please help me with this..
>
>Have You remembered that the palette is only 18bit colour not 24bit
>
>ie rgb vals go from 0 - 0x63 and not 0 - 0xff  ???????
>


If the palette can have a total of 2^18 different colors, isn't the value
I write to the screen just an index into that array of palette entries,
especially in mode 0x13?  The palette is limited to 2^18, or 262,000+,
different colors because of the way the DAC converts the values.  The DAC
can only convert six bits at a time and converts each color successively.
I could be wrong, but if you're not using allegro, I believe all you need
to do is change the value of the palette and update.  i.e., save current
palette, decrease the values in the palette one at a time until zero, load
new screen and reset palette.  Actually, now *_I_* want to know how this
is done...  I thought I had a handle on this...


Thanks,

John Patton
gimli21 AT hotmail DOT com


- Raw text -


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