summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authoralf9310 <alf9310@rit.edu>2025-11-09 17:37:23 -0500
committeralf9310 <alf9310@rit.edu>2025-11-09 17:37:23 -0500
commit096ff7a891c350da000f18f01ffb4a1f9cde0899 (patch)
tree50132ffbfb2f5572ce4e52c0c06cc4abbb3508c8 /graphics
parentdungeon_generation: added stair generation and fixed room center vs rabdom po... (diff)
downloadDungeonCrawl-096ff7a891c350da000f18f01ffb4a1f9cde0899.tar.gz
DungeonCrawl-096ff7a891c350da000f18f01ffb4a1f9cde0899.tar.bz2
DungeonCrawl-096ff7a891c350da000f18f01ffb4a1f9cde0899.zip
dungeon_generation: added Hallway vs Room tiles
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/render.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs
index 0fee7b5..7e9a74b 100644
--- a/graphics/src/render.rs
+++ b/graphics/src/render.rs
@@ -380,8 +380,10 @@ impl Renderer {
let tile = floor.get(pos);
let idx = match tile {
Tile::Wall => ATLAS_WALL_SIDE,
- Tile::Air if (x + y) % 2 == 0 => ATLAS_FLOOR_FULL,
- Tile::Air if (x + y) % 2 == 1 => ATLAS_FLOOR_EMPTY,
+ Tile::Room if (x + y) % 2 == 0 => ATLAS_FLOOR_FULL,
+ Tile::Room if (x + y) % 2 == 1 => ATLAS_FLOOR_EMPTY,
+ Tile::Hallway if (x + y) % 2 == 0 => ATLAS_FLOOR_FULL,
+ Tile::Hallway if (x + y) % 2 == 1 => ATLAS_FLOOR_EMPTY,
_ => ATLAS_ERROR,
};
rt.draw_atlas(
@@ -408,7 +410,8 @@ impl Renderer {
let tile = floor.get(pos);
let color = match tile {
Tile::Wall => Color::DARKGRAY,
- Tile::Air => Color::GRAY,
+ Tile::Room => Color::GRAY,
+ Tile::Hallway => Color::LIGHTGRAY,
Tile::Stairs => Color::WHITE,
};
rt.draw_pixel(x.into(), y.into(), color);