Re-add X-flip on image (NS-mirror) with natural order arrangement

The user wants:
- Natural order arrangement (canvasX = perp + ...): east (1102)
  on left, west (1098) on right
- X-mirrored image (NS-mirror): within each tile, the image east
  appears on the left of the tile (natural map orientation)

Combined state:
- canvasX = (perp + halfPerp + 0.5) * 256: natural order
- drawImage with negative width: X-flip (NS-mirror)
- All labels in normal orientation (no mirrorLabel)

This matches the user's description: 'die anordnung passt' (arrangement
correct) and 'der x-flip ist immer noch falsch' (image was still
mirrored, now correctly mirrored).
This commit is contained in:
Richard Zink committed 2026-10-08 09:53:56 +02:00
1 parent 20ac76e0b1
commit f79e27665c
1 file changed
+7 -6
+7 -6
View File
@@ -351,12 +351,13 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) {
// the corridor orientation (east tiles have their image east // the corridor orientation (east tiles have their image east
// on the left of the drawn area, west tiles on the right). // on the left of the drawn area, west tiles on the right).
// Labels are drawn separately in normal orientation, so the // Labels are drawn separately in normal orientation, so the
// Draw image with normal orientation (no X-flip). The // X-flip the image (NS-mirror). The arrangement uses the
// X-swap arrangement (canvasX = -perp + ...) already places // natural order (canvasX = perp + ...) so east tiles are on
// east tiles on the right of the screen, so the X coordinates // the LEFT of the screen. The image X-flip makes image east
// read naturally left to right when scanning the corridor. // appear on the right of each east tile (the natural map
groundCtx.drawImage(img, canvasX, canvasY, // orientation).
GROUND_TILE_SIZE, GROUND_TILE_SIZE); groundCtx.drawImage(img, canvasX + GROUND_TILE_SIZE, canvasY,
-GROUND_TILE_SIZE, GROUND_TILE_SIZE);
groundLoadedTiles[tileX + '_' + tileY] = true; groundLoadedTiles[tileX + '_' + tileY] = true;
// Thin border so the user can see where one tile ends and the // Thin border so the user can see where one tile ends and the