diff --git a/src/resources/map.rs b/src/resources/map.rs index e196fe7..d561306 100644 --- a/src/resources/map.rs +++ b/src/resources/map.rs @@ -15,6 +15,7 @@ pub struct Map { tile_content: Vec>, border_fg: RGB, border_bg: RGB, + gem_color: RGB, } impl BaseMap for Map {} @@ -39,6 +40,7 @@ impl Map { tile_content: vec![None; MAP_SIZE], border_fg: RGB::named(vga::get_by_index(rng.range(8, 15))), border_bg: RGB::named(vga::get_by_index(rng.range(1, 7) as usize)), + gem_color: RGB::named(vga::get_by_index(rng.range(1, 15))), } } @@ -204,7 +206,11 @@ impl Map { ctx.set( x + MAP_X, y + MAP_Y, - data.color_fg, + if *tile == TileType::Gem { + self.gem_color + } else { + RGB::named(data.color_fg) + }, data.color_bg, data.glyph, );