Skip to content

Commit 10013bb

Browse files
author
tom
committed
Fix grille board_composed: limitee aux iles 3x3, plus de mosaique.
1 parent 07faa44 commit 10013bb

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

godot/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Format des entrées : `AAAA-MM-JJ HH:MM:SS` (heure locale, fuseau du commit Git
4141

4242
**Commit** : `60d0422``Design plateau: fond #2b2d4a, iles teintees Unity, surbrillances propres.`
4343

44+
### Fix grille mosaïque
45+
46+
- `_draw_grid` limitée aux **zones île** (bounding box 3×3) — plus de grille globale 23 px sur tout le plateau qui créait un effet de répétition ×8 après upscale Godot.
47+
4448
---
4549

4650
## 2026-05-25 (nuit) — Surbrillances déplacements alignées sur les tuiles
-799 Bytes
Loading

godot/tools/compose_board_from_tiles.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,28 @@ def _draw_central_cross(draw: ImageDraw.ImageDraw) -> None:
9393
draw.rectangle((140 - c, 23, 140 + c, 257), fill=COULOIR_GREY)
9494

9595

96+
ISLAND_BOXES = {
97+
"Plains": (46, 46, 124, 124),
98+
"Ice": (156, 46, 234, 124),
99+
"Jungle": (46, 156, 124, 234),
100+
"Desert": (156, 156, 234, 234),
101+
}
102+
TILE_STEP = 26
103+
104+
96105
def _draw_grid(draw: ImageDraw.ImageDraw) -> None:
97-
"""Grille fine pour rappeler la structure Unity."""
98-
for i in range(0, W + 1, 23):
99-
draw.line((i, 0, i, H), fill=GRID_LINE, width=1)
100-
draw.line((0, i, W, i), fill=GRID_LINE, width=1)
106+
"""Grille 3×3 uniquement à l'intérieur de chaque île (comme Unity)."""
107+
for x0, y0, x1, y1 in ISLAND_BOXES.values():
108+
cx = (x0 + x1) // 2
109+
cy = (y0 + y1) // 2
110+
for col in range(-1, 2):
111+
lx = cx + col * TILE_STEP
112+
if x0 <= lx <= x1:
113+
draw.line((lx, y0, lx, y1), fill=GRID_LINE, width=1)
114+
for row in range(-1, 2):
115+
ly = cy + row * TILE_STEP
116+
if y0 <= ly <= y1:
117+
draw.line((x0, ly, x1, ly), fill=GRID_LINE, width=1)
101118

102119

103120
def main() -> None:

0 commit comments

Comments
 (0)