Mail Archives: djgpp/1997/10/13/02:07:16
----------
> From: Vic <tudor AT cam DOT org>
> To: djgpp AT delorie DOT com
> Subject: ALLEGRO: datafiles and palette manipulations
> Date: Wednesday, October 08, 1997 01:54
>
> hi. I'm doin this stupid pacman clone and ,if you know the game, at the
> point where the dude gets invulnerable, the ghosts will change colors,
> right? How do I do this in allegro? cause the palette is in a datafile,
> and I say something like set_palette(dat[PALETA].dat). What I want is
> something simmilar to pal[103].r=100 or something like that. Anyone?
> TIA,
I presume that you are using 8bpp (ie 256 colour mode).
to access the palette use the following line:
((RGB *)dat[PALETA].dat)[x].r = 100;
where x is the index into the array.
I havn't tested this but it should work.
J Love
- Raw text -