Figured out what was up. I didn't quite understand my original array!

(cherry picked from commit c2edd6224d)
This commit is contained in:
toasterbabe 2017-04-18 23:38:38 +01:00 committed by James R
parent f5ecb1b9c9
commit a82e5ee916

View file

@ -107,20 +107,20 @@ static boolean InitCube(void)
{
{
{0.0, 0.0, 0.0}, // black corner
{1.0, 0.0, 0.0} // red corner
{0.0, 0.0, 1.0} // blue corner
},
{
{0.0, 1.0, 0.0}, // green corner
{1.0, 1.0, 0.0} // yellow corner
{0.0, 1.0, 0.0}, // greem corner
{0.0, 1.0, 1.0} // cyan corner
}
},
{
{
{0.0, 0.0, 1.0}, // blue corner
{1.0, 0.0, 0.0}, // red corner
{1.0, 0.0, 1.0} // magenta corner
},
{
{0.0, 1.0, 1.0}, // cyan corner
{1.0, 1.0, 0.0}, // yellow corner
{1.0, 1.0, 1.0} // white corner
}
}
@ -251,15 +251,9 @@ static void LoadPalette(const char *lumpname)
}
#undef dowork
/*
I don't know what I messed up such that red takes index 2 and blue takes index 0.
It should be the other way around, but I've just got this working after spending
hours on it and I'm not going to look a gift ho(rse/t)fix in the mouth.
toast 18/04/17
*/
pLocalPalette[i].s.red = (UINT8)(working[0][2]);
pLocalPalette[i].s.red = (UINT8)(working[0][0]);
pLocalPalette[i].s.green = (UINT8)(working[0][1]);
pLocalPalette[i].s.blue = (UINT8)(working[0][0]);
pLocalPalette[i].s.blue = (UINT8)(working[0][2]);
}
}
}