delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/03/12:11:37

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE35E3783@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: select_palette: why it doesn't work?
Date: Wed, 3 Mar 1999 17:11:03 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Matteo Sasso writes:
> The problem is that even if I loaded the palette from a datafile and
> selected it using the select_palette functions, bitmaps' colours aren't
> right!

My guess would be that your graphics are actually being converted to
truecolor format while you load them in, and not when you come to
display them at all. Check your set_color_conversion() settings.

>  select_palette(*(PALETTE *)tilefile[bks].dat);
>  select_palette((RGB *)tilefile[bks].dat);
>  select_palette(tilefile[bks].dat);
> but NONE of these worked! (is any of them correct? which is the most
> "fair"?)

They all do the same thing, but I'd use the last one because it is 
less typing, unless you are coding in C++ in which case you have to
use the middle one.


	Shawn Hargreaves.



- Raw text -


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