Ejemplo n.º 1
0
//color comes in format BARG in 16 bits
//BARG -> AABBGGRR
__forceinline void _SetCol4444(u16 val)
{
	u32 col = (val & 0xF0);             // col  = 000000R0;
	col |=    (val & 0xF ) << 12;       // col |= 0000G000;
	col |= (((u32)val) & 0xF000) << 8;  // col |= 00B00000;
	col |= (((u32)val) & 0x0F00) << 20; // col |= A0000000;
	col |= col >> 4;                    // col =  A0B0G0R0 | 0A0B0G0R;
	_SetCol(col);
}
Ejemplo n.º 2
0
//color comes in format BARG in 16 bits
//BARG -> AABBGGRR
__forceinline void _SetCol4444(VertexLoader* loader, u16 val_)
{
	u32 col, val = val_;
	col  =  val & 0x00F0;        // col  = 000000R0;
	col |= (val & 0x000F) << 12; // col |= 0000G000;
	col |= (val & 0xF000) << 8;  // col |= 00B00000;
	col |= (val & 0x0F00) << 20; // col |= A0000000;
	col |= col >> 4;             // col  = A0B0G0R0 | 0A0B0G0R;
	_SetCol(loader, col);
}