delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/17/17:30:43

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ALLEGRO: Fast Palette Changing
Organization: Pin Eight Software <http://pineight.8m.com/>
Message-ID: <7b278sciid0malj5q0rd3qiqbuk1o5gh7m@4ax.com>
References: <38834DB9 DOT C92B4DC8 AT tiscalinet DOT it>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 33
X-Trace: /bV2//ld6Y7Ayk2U13BssebO2HyQYnVap3hpt7EKXndk609XknT87yIe6zC4VaJUykD+lVAv1Oyj!9KWw9z1pgxBKnNbp9jntiUlBFFjjpzBsRYkxQUtt+ATzMujZiw9Jj1RZvLOQPOPa4DBw3fskrw==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Mon, 17 Jan 2000 21:33:23 GMT
Distribution: world
Date: Mon, 17 Jan 2000 21:33:23 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Night Walker <night DOT walker AT tiscalinet DOT it> wrote in message
<38834DB9 DOT C92B4DC8 AT tiscalinet DOT it>...
>I must switch between palette tables quite fast: i must draw 8bpp
>RLE_SPRITE on a truecolor screen, and each sprite has different palette.

Or you could cache them in memory as truecolor before you draw them.
That would be faster.

>I messed around with Allegro SRC but I found set_pallete() quite
>confusing.
>Passing entire arrays (the PALLETE type) by value as function parameters
>is not slow/unefficent? or are they automatically passed by reference?
>There is a way to simply redirect a pointer to a PALLETE table, thus
>changing palette with only an assignement "="?
>This will let me use blender maps/funx for transparency?
>How can I learn to use them (about this topic  ALLEGRO.TXT is not very
>clear for a newbie)

PALETTE is defined as an array of RGB.
Functions that take a PALETTE actually take RGB *, which can be
accessed much the same way.

PALETTE pal;

// fill the palette somehow, then
set_palette(pal);

-- 
Damian Yerrick  http://yerricde.tripod.com/
View full sig at http://www.rose-hulman.edu/~yerricde/sig.html
Comment on story ideas at http://home1.gte.net/frodo/quickjot.html

And yes, I have set my attribute line to emulate Outhouse Express.

- Raw text -


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