mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-02 12:41:40 +00:00
Fixed error on the translate code for 32 bit uploads.
Will try and be clever with it next time.
This commit is contained in:
parent
e955df08d1
commit
a8077b4cbc
1 changed files with 11 additions and 26 deletions
|
@ -50,7 +50,6 @@ Skin_Set_Translate (player_info_t *player)
|
||||||
top = bound (0, player->topcolor, 13) * 16;
|
top = bound (0, player->topcolor, 13) * 16;
|
||||||
bottom = bound (0, player->bottomcolor, 13) * 16;
|
bottom = bound (0, player->bottomcolor, 13) * 16;
|
||||||
|
|
||||||
if (VID_Is8bit ()) { // 8bit texture upload
|
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
if (top < 128) // the artists made some backwards
|
if (top < 128) // the artists made some backwards
|
||||||
// ranges. sigh.
|
// ranges. sigh.
|
||||||
|
@ -63,23 +62,9 @@ Skin_Set_Translate (player_info_t *player)
|
||||||
else
|
else
|
||||||
translate[BOTTOM_RANGE + i] = bottom + 15 - i;
|
translate[BOTTOM_RANGE + i] = bottom + 15 - i;
|
||||||
}
|
}
|
||||||
} else {
|
if (!VID_Is8bit()) { // 32 bit upload, the norm.
|
||||||
if (top < 128) // the artists made some backwards
|
for (i = 0; i < 256; i++)
|
||||||
// ranges. sigh.
|
translate32[i] = d_8to24table[translate[i]];
|
||||||
memcpy (translate32 + TOP_RANGE, d_8to24table + top,
|
|
||||||
|
|
||||||
16 * sizeof (unsigned int));
|
|
||||||
else
|
|
||||||
for (i = 0; i < 16; i++)
|
|
||||||
translate32[TOP_RANGE + i] = top + 15 - i;
|
|
||||||
|
|
||||||
if (bottom < 128)
|
|
||||||
memcpy (translate32 + BOTTOM_RANGE, d_8to24table + bottom,
|
|
||||||
16 * sizeof (unsigned int));
|
|
||||||
|
|
||||||
else
|
|
||||||
for (i = 0; i < 16; i++)
|
|
||||||
translate32[BOTTOM_RANGE + i] = bottom + 15 - i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue