Message-Id: <199710130605.TAA20407@fep1-orange.clear.net.nz> From: "Jamie Love" To: Subject: Fw: ALLEGRO: datafiles and palette manipulations Date: Tue, 14 Oct 1997 06:55:45 +1300 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Precedence: bulk ---------- > From: Vic > 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