- Fixed: R_CreatePlayerTranslation() only initialized the first truecolor

palette entry.


SVN r1795 (trunk)
This commit is contained in:
Randy Heit 2009-09-05 03:55:29 +00:00
commit f27b7209e8
4 changed files with 63 additions and 57 deletions

View file

@ -816,18 +816,18 @@ static void R_CreatePlayerTranslation (float h, float s, float v, FPlayerSkin *s
// the current one.
if (skin->othergame)
{
memcpy (table->Remap, OtherGameSkinRemap, 256);
memcpy (table->Palette, OtherGameSkinPalette, sizeof(table->Palette));
memcpy (table->Remap, OtherGameSkinRemap, table->NumEntries);
memcpy (table->Palette, OtherGameSkinPalette, sizeof(*table->Palette) * table->NumEntries);
}
else
{
for (i = 0; i < 256; ++i)
for (i = 0; i < table->NumEntries; ++i)
{
table->Remap[i] = i;
}
memcpy(table->Palette, GPalette.BaseColors, sizeof(table->Palette));
memcpy(table->Palette, GPalette.BaseColors, sizeof(*table->Palette) * table->NumEntries);
}
for (i = 1; i < 256; ++i)
for (i = 1; i < table->NumEntries; ++i)
{
table->Palette[i].a = 255;
}