diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-26 16:42:18 +0000 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-26 16:42:18 +0000 |
commit | 63418dfa8adac1f9eee3c8357b54454d0bc0b0d5 (patch) | |
tree | c5e095691aa1ece32dfdb04482c484dc27835e3f /main.cpp | |
parent | 7e046277d6a04e006d9653eda0a2b0990a454c2d (diff) |
Use a constant for the player's left/right move amount
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } } |