diff options
| author | Audrey L Fuller <alf9310@g.rit.edu> | 2025-11-10 05:43:43 +0000 |
|---|---|---|
| committer | Audrey L Fuller <alf9310@g.rit.edu> | 2025-11-10 05:43:43 +0000 |
| commit | c502c670f22bb3d109c6bbe5ac5c2d443ffce114 (patch) | |
| tree | 9cb3c4305b1a714552c37ef6cdd9d3a585840422 /graphics | |
| parent | oops (diff) | |
| parent | Merge branch 'main' into 'dungeon_generation' (diff) | |
| download | DungeonCrawl-c502c670f22bb3d109c6bbe5ac5c2d443ffce114.tar.gz DungeonCrawl-c502c670f22bb3d109c6bbe5ac5c2d443ffce114.tar.bz2 DungeonCrawl-c502c670f22bb3d109c6bbe5ac5c2d443ffce114.zip | |
Merge branch 'dungeon_generation' into 'main'
Dungeon Generation
See merge request psr2251/project/DungeonCrawl!2
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/src/render.rs | 9 |
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); |