Fix texture mapping

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-09-02 19:56:46 +02:00
parent 903c514514
commit c2e427e301
+2 -3
View File
@@ -862,8 +862,7 @@ void drawRays3D()
if (shade == 1) // North-south walls (PI -> (2 * PI))
{
textureX = (int)(rayX / 2.0) % 32;
textureX = (int)rayX % mapSize;
if (rayAngle < PI) // South walls
{
@@ -872,7 +871,7 @@ void drawRays3D()
}
else // East-west walls (PI2 -> PI3)
{
textureX = (int)(rayY / 2.0) % 32;
textureX = (int)rayY % mapSize;
if (rayAngle > PI2 || rayAngle < PI3) // West
{
textureX = 31 - textureX;