From 9d69ea0b61b8c9147997874a7226f1abe99c4ed7 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 27 Nov 2010 23:02:00 +0000 Subject: Level: Don't use MARCUS_WIDTH constant when we can calculate it dynamically --- Level.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Level.cpp b/Level.cpp index 1f2b739..c4da3b2 100644 --- a/Level.cpp +++ b/Level.cpp @@ -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(); } -- cgit v1.2.3