Fixed the Encore mode invert wipe.

Explanation: NearestColor takes UINT8 inputs, but is being provided a number in the range of 1 to 256(!!) - which means very dark channels were looping back around to 0.

This error might exist in public branches too, because I don't think Encore's wipes would have been changed internally without us knowing.
This commit is contained in:
toaster 2021-02-13 12:04:57 +00:00
parent c594d5063f
commit b91a9928c6

View file

@ -1517,9 +1517,9 @@ void V_EncoreInvertScreen(void)
for (; buf < deststop; ++buf)
{
*buf = NearestColor(
256 - pLocalPalette[*buf].s.red,
256 - pLocalPalette[*buf].s.green,
256 - pLocalPalette[*buf].s.blue
255 - pLocalPalette[*buf].s.red,
255 - pLocalPalette[*buf].s.green,
255 - pLocalPalette[*buf].s.blue
);
}
}