summaryrefslogtreecommitdiff
path: root/src/tile.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-06-26 05:50:34 -0500
committertom barrett <spalf0@gmail.com>2019-06-26 05:50:34 -0500
commit53b4ccdcc6cdac3b02480a97a2ec30439114ff6c (patch)
treee7925bfd55c15c68b13301301bd12a6d092e43c4 /src/tile.rs
parent15b4ade5a357a791cf3ffa86cfe78b5f7ae270c9 (diff)
now can parse tile properties
Diffstat (limited to 'src/tile.rs')
-rw-r--r--src/tile.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tile.rs b/src/tile.rs
index 5667b92..dc9987c 100644
--- a/src/tile.rs
+++ b/src/tile.rs
@@ -27,15 +27,15 @@ impl Tile {
};
let (source, rotation) = match (flip_d, flip_h, flip_v) {
- (true, true, true) => (Tile::flip(tileset.tiles[id]), convert_angle_to_rad(90.0)),
- (true, true, false) => (tileset.tiles[id], convert_angle_to_rad(90.0)),
- (true, false, true) => (tileset.tiles[id], convert_angle_to_rad(270.0)),
+ (true, true, true) => (Tile::flip(tileset.get(id)), convert_angle_to_rad(90.0)),
+ (true, true, false) => (tileset.get(id), convert_angle_to_rad(90.0)),
+ (true, false, true) => (tileset.get(id), convert_angle_to_rad(270.0)),
//(true, false, false) => (),
- (false, true, true) => (tileset.tiles[id], convert_angle_to_rad(180.0)),
- (false, true, false) => (Tile::flip(tileset.tiles[id]), 0.0),
+ (false, true, true) => (tileset.get(id), convert_angle_to_rad(180.0)),
+ (false, true, false) => (Tile::flip(tileset.get(id)), 0.0),
//(false, false, true) => (),
//(false, false, false) => (),
- _ => (tileset.tiles[id], 0.0),
+ _ => (tileset.get(id), 0.0),
};
let x = i as f32 % width as f32;