Skip to content

Commit

Permalink
Some cleanup of summer garden example code [3]
Browse files Browse the repository at this point in the history
  • Loading branch information
madwareru committed Aug 14, 2021
1 parent dcae8f5 commit 606358c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/summer_garden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,7 @@ impl WangTilemap {
let mut y = start_y + 4.0 * node.draw_scale;
let dy = node.tile_height as f32 * node.draw_scale;

let mut idx = 0;

for _ in 0..node.h {
for idx in (0..node.h*node.w).step_by(node.w) {
for i in 0..node.w {
let corner_tree = node.corner_tree_data[idx + i];
let x = start_x + (node.tile_width * i) as f32 * node.draw_scale;
Expand All @@ -571,8 +569,6 @@ impl WangTilemap {
);
}
}

idx += node.w;
y += dy;
}
}
Expand Down

0 comments on commit 606358c

Please sign in to comment.