diff options
Diffstat (limited to 'client/src/world/map.rs')
-rw-r--r-- | client/src/world/map.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/client/src/world/map.rs b/client/src/world/map.rs index fcc24c0..c72bfa9 100644 --- a/client/src/world/map.rs +++ b/client/src/world/map.rs @@ -12,8 +12,10 @@ use std::{ pub use mapfile::format; pub use mapfile::{ format::Tile, - reader::{self, Color, LayerTilemapType}, + reader::{self, Color as BadColor, LayerTilemapType}, }; + +use super::helper::Color; pub const TILE_NUM: u32 = 16; pub struct Layer { @@ -77,7 +79,12 @@ impl Map { }; let tiles = map.layer_tiles(tilemap.tiles(normal.data)).unwrap(); layers.push(Layer { - color: normal.color, + color: Color { + r: normal.color.red, + g: normal.color.green, + b: normal.color.blue, + a: normal.color.alpha, + }, image: normal.image, kind: tilemap.type_, tiles, @@ -94,10 +101,10 @@ impl Map { None => Array2::from_elem( (1, 1), Color { - alpha: 255, - red: 255, - blue: 255, - green: 0, + a: 255, + r: 255, + g: 0, + b: 255, }, ), Some(image_idx) => { |