1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +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:
Thomas Harte 2017-02-11 13:34:36 -05:00
parent c8e595d9aa
commit 6381e4e1b0

View File

@ -595,7 +595,7 @@ void TIA::draw_player(Player &player, CollisionType collision_identity, const in
{
position += (motion ^ 8);
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