Message-ID: <388863A7.BC1629C8@tiscalinet.it> Date: Fri, 21 Jan 2000 14:48:23 +0100 From: Night Walker X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Fast Palette changing: I DID IT!! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com I did it! I succesfully drew a 8bpp bitmap on a 16bpp screen twice, each with a different palette, just changing value to pallete_color. I replaced in GRAPHICS.C: //===================== int pallete_color[256]; //===================== with: //====================================== int __nw_palette_array[256]; int *pallete_color = __nw_palette_array; //====================================== and in SPRITE16.S, SPRITE24.S and SPRITE32.S i deleted the "$" before _pallete_color. Then, i recompiled ALLEGRO. In my program, i created 2 int arrays, and filled them with set_palette(). I made pallete_color to point the first array, and drew the bitmap. I made pallete_color to point the second array, and drew again the bitmap near the first. The effect I got was the same obtained with calling set_palette() before drawing the bitmap each time. Thanx to Shawn Hargreaves and Damian Yerrick for the feedback. Night Walker.