Now the ship can flawlessly cross the doomed 0/320 barrier

This commit is contained in:
Rohmer Maxime
2024-06-14 09:34:54 +02:00
parent d3a38c9516
commit 79ab2c4ed7
8 changed files with 52 additions and 49 deletions
+4 -1
View File
@@ -142,7 +142,10 @@ void RefreshPlayer(Point vector){
Point bigPos = {0,0};
bigPos.X = min(player.Hitbox.Position.X, player.Hitbox.Position.X - vector.X);
bigPos.Y = min(player.Hitbox.Position.Y, player.Hitbox.Position.Y - vector.Y);
bigPos.Y = bigPos.Y % SCREEN_SIZE.Height;
if(bigPos.Y < 0)
bigPos.Y = SCREEN_SIZE.Height + bigPos.Y;
//bigPos.Y = bigPos.Y % SCREEN_SIZE.Height;
Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox);
}