This commit is contained in:
Christoph Oelckers 2019-10-07 00:14:41 +02:00
parent 7713860b63
commit 620897ecdd

View file

@ -242,8 +242,8 @@ void GLInstance::SetPalswap(int index)
{ {
float v1 = index * renderState.PalswapSize[0]; float v1 = index * renderState.PalswapSize[0];
float v2 = floorf(v1); float v2 = floorf(v1);
renderState.PalswapPos[0] = renderState.PalswapPos[0] - renderState.PalswapPos[1] + (0.5f / PALSWAP_TEXTURE_SIZE); renderState.PalswapPos[0] = v1 - v2 + (0.5f / PALSWAP_TEXTURE_SIZE);
renderState.PalswapPos[1] = renderState.PalswapPos[1] * renderState.PalswapSize[1] + (0.5f / PALSWAP_TEXTURE_SIZE); renderState.PalswapPos[1] = v2 * renderState.PalswapSize[1] + (0.5f / PALSWAP_TEXTURE_SIZE);
} }