Restructure tile size usage

This commit is contained in:
gamer147
2026-04-09 08:07:25 -04:00
parent 6b46d1c274
commit e356078a9f
10 changed files with 57 additions and 42 deletions

View File

@@ -4,7 +4,6 @@ extends Node2D
## Renders a fog/cave texture over every tile inside the map's bounding rect
## that is not part of any room. Future: drive visibility from map state.
const TILE_SIZE := 100.0
## Fog tile region in aux_terrain.BMP
const FOG_RECT := Rect2(53, 53, 100, 100)
@@ -23,14 +22,14 @@ func draw_fog_for_layout(map_layout: MapLayout) -> void:
var tile := Vector2i(x, y)
if map_layout.is_tile_valid(tile):
continue
_fog_tiles.append(Vector2(tile) * TILE_SIZE)
_fog_tiles.append(Vector2(tile) * BattleMapHelper.TILE_SIZE)
queue_redraw()
func _draw() -> void:
if not atlas_texture:
return
var dest_size := Vector2(TILE_SIZE, TILE_SIZE)
var dest_size := Vector2(BattleMapHelper.TILE_SIZE, BattleMapHelper.TILE_SIZE)
for pos in _fog_tiles:
draw_texture_rect_region(
atlas_texture,