engine/wii/video.c
/**
 * Sets the palette used in 8-bit color mode.  The Wii supports indexed-color
 * textures, so this function updates the texture lookup table (colormap) with
 * the new palette.<br />
 * The palette is sent to this function as an array of 768 bytes.  Each color is
 * 3 bytes: red, then green, then blue.
 * @param pal the new palette
 */
Sets the palette used in 8-bit color mode.  The Wii supports indexed-color
textures, so this function updates the texture lookup table (colormap) with
the new palette.
The palette is sent to this function as an array of 768 bytes.  Each color is
3 bytes: red, then green, then blue.
@param pal the new palette
Sets the palette used in 8 - bit color mode . The Wii supports indexed - color textures so this function updates the texture lookup table ( colormap ) with the new palette . The palette is sent to this function as an array of 768 bytes . Each color is 3 bytes : red then green then blue . @param pal the new palette
void vga_setpalette(unsigned char* pal)
{
	int i;
	for(i=0;i<256;i++)
	{
		palette[i] = (pal[0]>>3<<11) | (pal[1]>>2<<5) | (pal[2]>>3);
		pal+=3;
	}
	DCFlushRange(palette, sizeof(palette));
	GX_LoadTlut(&tlut, GX_TLUT0);
}
void vga_setpalette ( unsigned char * pal ) { int i ; for ( i = 0 ; i < 256 ; i ++ ) { palette [ i ] = ( pal [ 0 ] >> 3 << 11 ) | ( pal [ 1 ] >> 2 << 5 ) | ( pal [ 2 ] >> 3 ) ; pal += 3 ; } DCFlushRange ( palette , sizeof ( palette ) ) ; GX_LoadTlut ( & tlut , GX_TLUT0 ) ; }
Sets the palette used in 8-bit color mode.
Sets the palette used in 8 - bit color mode .
// upload the palette data to the Flipper