summaryrefslogtreecommitdiff
path: root/Level.cpp
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2010-11-26 16:42:18 +0000
committerLuke Bratch <l_bratch@yahoo.co.uk>2010-11-26 16:42:18 +0000
commit63418dfa8adac1f9eee3c8357b54454d0bc0b0d5 (patch)
treec5e095691aa1ece32dfdb04482c484dc27835e3f /Level.cpp
parent7e046277d6a04e006d9653eda0a2b0990a454c2d (diff)
Use a constant for the player's left/right move amount
Diffstat (limited to 'Level.cpp')
-rw-r--r--Level.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Level.cpp b/Level.cpp
index 7da0bf4..0cecd50 100644
--- a/Level.cpp
+++ b/Level.cpp
@@ -82,7 +82,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 - 10) {
+ if (player.getX() == 0 || player.getX() >= SCREEN_WIDTH - MARCUS_WIDTH - MOVE_AMOUNT) {
if (player.getXVel() < 0 || player.getXVel() > 0)
cameraX -= player.getXVel();
}