mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-18 08:24:17 +00:00
All that's happened to position is that numbers have been added to it. So it can't be negative, given that it wasn't before. So a regular modulo will do.
This commit is contained in:
parent
c8e595d9aa
commit
6381e4e1b0
@ -595,7 +595,7 @@ void TIA::draw_player(Player &player, CollisionType collision_identity, const in
|
|||||||
{
|
{
|
||||||
position += (motion ^ 8);
|
position += (motion ^ 8);
|
||||||
is_moving_[position_identity] = false;
|
is_moving_[position_identity] = false;
|
||||||
position = (position + 160)%160;
|
position %= 160;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for initial trigger; player.position is guaranteed to be less than 160 so this is easy
|
// check for initial trigger; player.position is guaranteed to be less than 160 so this is easy
|
||||||
|
Loading…
Reference in New Issue
Block a user