This commit is contained in:
Henrik Rydgard
2013-01-21 19:19:41 +01:00
parent 2f0cf82f72
commit b30ab91379
+6 -6
View File
@@ -277,23 +277,23 @@ void VertexDecoder::Step_Color8888Morph() const
void VertexDecoder::Step_NormalS8() const
{
s8 *normal = (s8 *)(decoded_ + decFmt.nrmoff);
u8 xor = 0;
u8 xorval = 0;
if (gstate.reversenormals & 1)
xor = 0xFF; // Using xor instead of - to handle -128
xorval = 0xFF; // Using xor instead of - to handle -128
const s8 *sv = (const s8*)(ptr_ + nrmoff);
for (int j = 0; j < 3; j++)
normal[j] = sv[j] ^ xor;
normal[j] = sv[j] ^ xorval;
}
void VertexDecoder::Step_NormalS16() const
{
s16 *normal = (s16 *)(decoded_ + decFmt.nrmoff);
u16 xor = 0;
u16 xorval = 0;
if (gstate.reversenormals & 1)
xor = 0xFFFF;
xorval = 0xFFFF;
const s16 *sv = (const s16*)(ptr_ + nrmoff);
for (int j = 0; j < 3; j++)
normal[j] = sv[j] ^ xor;
normal[j] = sv[j] ^ xorval;
}
void VertexDecoder::Step_NormalFloat() const