diff options
-rw-r--r-- | Level.cpp | 5 | ||||
-rw-r--r-- | intensemarcus.h | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -39,8 +39,13 @@ void Level::changeLevel(int levelNo) { } void Level::move() { + // Apply gravity + player.incYVel(GRAVITY); + // Player movements player.setX(player.getX() + player.getXVel()); + player.setY(player.getY() + player.getYVel()); + player.orient(); } diff --git a/intensemarcus.h b/intensemarcus.h index 45bc78c..8386411 100644 --- a/intensemarcus.h +++ b/intensemarcus.h @@ -15,6 +15,7 @@ const int ORIENT_FRONT = 0; const int ORIENT_BACK = 1; const int ORIENT_RIGHT = 2; const int ORIENT_LEFT = 3; +const int GRAVITY = 3; SDL_Surface *loadImage(std::string filename); |