mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Fix out by one in infinite scroll
This commit is contained in:
parent
75320ed3e0
commit
7ebebb2942
|
@ -330,7 +330,7 @@ impl<'a> InfiniteScrolledMap<'a> {
|
||||||
new_tile_x
|
new_tile_x
|
||||||
} else {
|
} else {
|
||||||
// moving to the right, so need to update the right most position
|
// moving to the right, so need to update the right most position
|
||||||
new_tile_x + 30 // TODO is this correct?
|
new_tile_x + 31 // TODO is this correct?
|
||||||
};
|
};
|
||||||
|
|
||||||
Rect::new(
|
Rect::new(
|
||||||
|
@ -355,7 +355,7 @@ impl<'a> InfiniteScrolledMap<'a> {
|
||||||
new_tile_y
|
new_tile_y
|
||||||
} else {
|
} else {
|
||||||
// moving down so need to update the bottom
|
// moving down so need to update the bottom
|
||||||
new_tile_y + 20 // TODO is this correct?
|
new_tile_y + 21 // TODO is this correct?
|
||||||
};
|
};
|
||||||
|
|
||||||
Rect::new(
|
Rect::new(
|
||||||
|
|
Loading…
Reference in a new issue