diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-27 23:02:00 +0000 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-27 23:02:00 +0000 |
commit | 9d69ea0b61b8c9147997874a7226f1abe99c4ed7 (patch) | |
tree | c8852446585ed8003ddca25c5422f7258eeeec8a | |
parent | d6d9743cd32f967efe9e66fa47513d13e315e0b8 (diff) |
Level: Don't use MARCUS_WIDTH constant when we can calculate it dynamically
-rw-r--r-- | Level.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -100,7 +100,7 @@ void Level::draw(Screen *screen) { screen->blit(player.getX(), player.getY(), player.image, player.getClip()); // Scroll level - if (player.getX() == 0 || player.getX() >= SCREEN_WIDTH - MARCUS_WIDTH - MOVE_AMOUNT) { + if (player.getX() == 0 || player.getX() >= SCREEN_WIDTH - player.getClip()->w - MOVE_AMOUNT) { if (player.getXVel() < 0 || player.getXVel() > 0) cameraX -= player.getXVel(); } |