Date: Tue, 13 Oct 1998 22:40:04 +0100 (BST) From: George Foot To: djgpp AT delorie DOT com Subject: Re: using a bitmap's palette In-Reply-To: <6vu5jd$m2k$1@news.us.world.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Mon, 12 Oct 1998, Aaron wrote: > How can I set the palette in Allegro to use the palette from a 256 color > Windows bitmap file? BITMAP *bitmap; PALETTE the_palette; ... bitmap = load_bitmap ("file.bmp", the_palette); set_palette (the_palette); Look up `set_palette' and `load_bitmap' in the documentation for more information. Note that you really ought to check that `load_bitmap' does not return NULL -- I left this out for brevity. In addition, special things need to be considered if you're loading a bitmap of a different colour depth to the screen. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html