aboutsummaryrefslogtreecommitdiff
path: root/client/src/world/map.rs
diff options
context:
space:
mode:
authormetamuffin <yvchraiqi@protonmail.com>2022-06-09 16:01:55 +0200
committermetamuffin <yvchraiqi@protonmail.com>2022-06-09 16:01:55 +0200
commitc1b5937b64649904689fea8da2c06e0b66ae8332 (patch)
tree458e7a8b5e6489e26e58ffbb134fd40c7f04dd5e /client/src/world/map.rs
parent024a73e9575980b40c93d5f60c0e4e3f8e54187c (diff)
downloadtwclient-c1b5937b64649904689fea8da2c06e0b66ae8332.tar
twclient-c1b5937b64649904689fea8da2c06e0b66ae8332.tar.bz2
twclient-c1b5937b64649904689fea8da2c06e0b66ae8332.tar.zst
asdfss
Diffstat (limited to 'client/src/world/map.rs')
-rw-r--r--client/src/world/map.rs19
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) => {