Skip to content

Commit

Permalink
Fixes #38 - flip the y on amethyst tile render
Browse files Browse the repository at this point in the history
  • Loading branch information
thebracket committed Jan 4, 2020
1 parent a474dd1 commit d45c00d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hal/amethyst_be/mainloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ impl SimpleState for RltkGemBridge {
.iter()
.for_each(|coord| {
if let Some(fg) = map.get_mut(&coord) {
let idx = ((coord.y * size.0) + coord.x) as usize;
let flipped_y = (size.1-1) - coord.y;
let idx = ((flipped_y * size.0) + coord.x) as usize;
if idx < concrete.tiles.len() {
let tile = &concrete.tiles[idx];
fg.glyph = tile.glyph as usize;
Expand Down

0 comments on commit d45c00d

Please sign in to comment.