diff options
Diffstat (limited to 'graphics/src')
| -rw-r--r-- | graphics/src/render.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs index 762827c..fe8ff92 100644 --- a/graphics/src/render.rs +++ b/graphics/src/render.rs @@ -102,6 +102,8 @@ const ATLAS_FLOOR: (u16, u16) = (1, 0); const ATLAS_STAIR: (u16, u16) = (2, 0); const ATLAS_WALL_TOP: (u16, u16) = (3, 0); const ATLAS_WALL_EDGE: (u16, u16) = (0, 1); +const ATLAS_CHEST_CLOSED: (u16, u16) = (0, 3); +const ATLAS_CHEST_OPEN: (u16, u16) = (1, 3); // UI atlas.bmp textures const ATLAS_INV_CONTAINER: (u16, u16) = (1, 1); @@ -115,7 +117,7 @@ const ATLAS_FLOOR_EXT3: (u16, u16) = (2, 2); const ATLAS_FLOOR_EXT4: (u16, u16) = (3, 2); // Misc atlas.bmp textures -const ATLAS_ERROR: (u16, u16) = (3, 3); +//const ATLAS_ERROR: (u16, u16) = (3, 3); /// Full source rec for any texture const FULL_SOURCE_REC: Rectangle = rect! { @@ -401,7 +403,8 @@ impl Renderer { Tile::Wall => ATLAS_WALL_SIDE, Tile::Room | Tile::Hallway => ATLAS_FLOOR, Tile::Stairs => ATLAS_STAIR, - Tile::Chest(_) => ATLAS_ERROR, + Tile::Chest(Some(_)) => ATLAS_CHEST_CLOSED, + Tile::Chest(None) => ATLAS_CHEST_OPEN, }; rt.draw_atlas( &self.textures.atlas, |