TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: CRAIG HART
from: TOM ST DENIS
date: 1997-06-16 07:29:00
subject: Re: Two Probs

CH> Drawing the sprite in different colours is quite trivial. First, assign n
CH> colours to the sprite. Then, decide how many coloursets you need. call 
this
CH> you need n times x palette entries - set this aside and make each set of
CH> palette entries the coloursets you need.
CH> when you draw your sprite, add (n*colour) to the value of each pixel 
before
CH> drawing it. colour 0 is best set as the orignial colour of the sprite. 
voil
I thought about that... I could even to a  32-bit add to do 4pixels at once 
like adding 0F0F0F0F (if i had 16-colors per table...)  i only need to tables 
anyways!  Thanks!
CH> Limitations: the palette entries must be consecutive. It takes more math 
th
CH> storing 8 different coloured sprites, so it's slower. You can't do it if 
yo
CH> are using a mode that doesn't use the palette (aka highcolour).
Well I am designing it in 320x240x256 mode X!
Thanks for the help.  I wanted to see how another programmer would do it...
TTYL
--- GEcho 1.00
---------------
* Origin: 872's Home Bbs (613)831-3390 (1:163/133)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.