Restructure tile size usage
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user