Fixed color palette and player starting location

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-13 17:05:15 +01:00
parent 464a22e1f3
commit 0c3ca1c090
5 changed files with 207 additions and 119 deletions

View File

@@ -165,7 +165,15 @@ class RaycasterPainter extends CustomPainter {
// 1. PERFECT TEXTURE MAPPING
// Wolf3D stores textures in pairs. Even = N/S (Light), Odd = E/W (Dark).
int texNum = ((hitWallId - 1) * 2).clamp(0, textures.length - 2);
if (side == 1) texNum += 1; // Instantly use the native dark texture!
if (hitWallId >= 90) {
texNum = 98; // 98 is the canonical index for the Wood Door in VSWAP
// Optional: Doors don't usually have a dark E/W variant, so we don't add +1 for side
} else {
// Standard wall texture pairing
texNum = ((hitWallId - 1) * 2).clamp(0, textures.length - 2);
if (side == 1) texNum += 1;
}
int texX = (wallX * 64).toInt().clamp(0, 63);