aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-08-05 21:35:55 +0200
committerJulian T <julian@jtle.dk>2021-08-05 21:35:55 +0200
commit4056de0cfea80e37dac50ce1efaaad6fcb481fb0 (patch)
tree93c5c1d0b9750fa448d9a19a3e2c346f1b2af3c1
parent32b0e0c95be2dde797c4094ee14d986445510f88 (diff)
Fix bug when rendining on square images
-rw-r--r--src/render/coordinator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/coordinator.rs b/src/render/coordinator.rs
index e2f825b..4b68115 100644
--- a/src/render/coordinator.rs
+++ b/src/render/coordinator.rs
@@ -52,7 +52,7 @@ impl Tiler {
}
// Convert the tile to xy in tilemap
- let tile = Vector2i::new_xy(self.next_tile / self.tilemap_size.x, self.next_tile % self.tilemap_size.x);
+ let tile = Vector2i::new_xy(self.next_tile % self.tilemap_size.x, self.next_tile / self.tilemap_size.x);
let tile_index = self.next_tile;
self.next_tile += 1;