summaryrefslogtreecommitdiff
path: root/main.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 /main.cpp
parent7e046277d6a04e006d9653eda0a2b0990a454c2d (diff)
Use a constant for the player's left/right move amount
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index 81e5896..4b22a5d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -37,10 +37,10 @@ int main(int argc, char* args[]) {
// Adjust player velocity
switch (event.key.keysym.sym) {
case SDLK_LEFT:
- level.player.incXVel(-10);
+ level.player.incXVel(-MOVE_AMOUNT);
break;
case SDLK_RIGHT:
- level.player.incXVel(10);
+ level.player.incXVel(MOVE_AMOUNT);
break;
case SDLK_UP:
level.player.jump();
@@ -50,10 +50,10 @@ int main(int argc, char* args[]) {
// Adjust player velocity
switch (event.key.keysym.sym) {
case SDLK_LEFT:
- level.player.incXVel(10);
+ level.player.incXVel(MOVE_AMOUNT);
break;
case SDLK_RIGHT:
- level.player.incXVel(-10);
+ level.player.incXVel(-MOVE_AMOUNT);
break;
}
}