Further fixed the setEntry method to make it Endian safe

svn-id: r48404
This commit is contained in:
Paul Gilbert 2010-03-26 10:21:08 +00:00
parent 02b1e3278a
commit 5d85ad0759

View File

@ -768,7 +768,11 @@ void Palette::grabPalette(byte *colors, uint start, uint num) {
}
void Palette::setEntry(uint index, uint8 r, uint8 g, uint8 b) {
uint32 c = (r << 16) | (g << 8) | b;
RGB8 c;
c.r = r;
c.g = g;
c.b = b;
c.u = 0;
g_system->setPalette((const byte *)&c, index, 1);
}