www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/16:30:39

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help: Flic Palette in Allegro
Date: Wed, 1 Apr 1998 19:55:30 +0100
Organization: None
Message-ID: <3lSazEAi2oI1EwoZ@talula.demon.co.uk>
References: <3 DOT 0 DOT 5 DOT 32 DOT 19980330175544 DOT 007e1320 AT pop DOT iquest DOT net>
<35203D66 DOT 991B872C AT sprynet DOT com> <3521161E DOT 3131 AT plinet DOT com>
<35217510 DOT B6BF3C54 AT sprynet DOT com> <352254A8 DOT 6F78 AT plinet DOT com>
<35228997 DOT 51780F5D AT sprynet DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 27
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ishpeck writes:
>Well, it runs pretty fast already. In fact,
>it runs too fast.  I want it a bit slower
>than it is... 

It's easy to change the speed of a FLIC: this is just a byte in the file
header. For example the DTA program comes with a utility called flispeed
for doing exactly this...

>How would I got about writing a rutine that
>converts the palette of the bitmap and 
>rewrites it?

This could be done either by setting up a color mapping table for
converting one palette to to the other and then using the
draw_lit_sprite() routine, or by copying to a truecolor memory bitmap
and then reducing this back to 256 colors after selecting the new
palette. Both of those methods will be very inefficient and quite
complex to code, though: I think it would save you a lot of time if you
can simply change your graphics so that they are all using the same
palette (any decent paint program will have options to do this, and
there are several utilities on the Allegro website which may help).


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa

- Raw text -


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