Wintermute Engine Forum

Wintermute Engine => Bug reports => Topic started by: metamorphium on December 10, 2013, 02:24:53 PM

Title: Bug in CWmeUtils::MakeRGBA
Post by: metamorphium on December 10, 2013, 02:24:53 PM
Proper method should look like this:

Code: [Select]
//////////////////////////////////////////////////////////////////////////
// packs RGBA values into a single DWORD number
unsigned long CWmeUtils::MakeRGBA(unsigned char R, unsigned char G, unsigned char B, unsigned char A)
{
return (unsigned long)((((A)&0xff)<<24)|(((B)&0xff)<<16)|(((G)&0xff)<<8)|((R)&0xff));
}