mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
go back to my clever code (with the bug fixed this time:P). Hey, if it's
still broken, we can always revert it again ;) (NOT!)
This commit is contained in:
parent
168d3aa308
commit
7f9e5755fb
1 changed files with 23 additions and 10 deletions
|
@ -61,8 +61,10 @@ Skin_Set_Translate (int top, int bottom, void *_dest)
|
|||
top = bound (0, top, 13) << 4;
|
||||
bottom = bound (0, bottom, 13) << 4;
|
||||
|
||||
if (VID_Is8bit ()) { // 8bit texture upload
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (top < 128) // the artists made some backwards ranges. sigh.
|
||||
// the artists made some backwards ranges. sigh.
|
||||
if (top < 128)
|
||||
translate[TOP_RANGE + i] = top + i;
|
||||
else
|
||||
translate[TOP_RANGE + i] = top + 15 - i;
|
||||
|
@ -72,9 +74,20 @@ Skin_Set_Translate (int top, int bottom, void *_dest)
|
|||
else
|
||||
translate[BOTTOM_RANGE + i] = bottom + 15 - i;
|
||||
}
|
||||
if (!VID_Is8bit()) { // 32 bit upload, the norm.
|
||||
for (i = 0; i < 256; i++)
|
||||
translate32[i] = d_8to24table[translate[i]];
|
||||
} else {
|
||||
if (top < 128)
|
||||
memcpy (translate32 + TOP_RANGE, d_8to24table + top,
|
||||
16 * sizeof (unsigned int));
|
||||
else
|
||||
for (i = 0; i < 16; i++)
|
||||
translate32[TOP_RANGE + i] = d_8to24table[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] = d_8to24table[bottom + 15 - i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue