summaryrefslogtreecommitdiffstats
path: root/src/control/MapContext.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 00:58:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 00:58:27 +0200
commitc3e32345e53650a1c231f4e1a41d40c97955b893 (patch)
tree93b22aedbe355173510a04eafec9f14d7c4c3e0f /src/control/MapContext.cpp
parent8b4ca336ce68cc17573115dd07eb1bfc6521b298 (diff)
downloadrpgedit-c3e32345e53650a1c231f4e1a41d40c97955b893.tar
rpgedit-c3e32345e53650a1c231f4e1a41d40c97955b893.zip
Collision rework
Diffstat (limited to 'src/control/MapContext.cpp')
-rw-r--r--src/control/MapContext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/control/MapContext.cpp b/src/control/MapContext.cpp
index aa246a9..f5d4c05 100644
--- a/src/control/MapContext.cpp
+++ b/src/control/MapContext.cpp
@@ -62,32 +62,32 @@ void MapContext::movePlayer(Model::Direction dir, uint64_t time) {
void MapContext::movePlayerContinue(uint64_t time) {
if (inputHandler->isKeyPressed(SDL_SCANCODE_UP))
- movePlayer(Model::NORTH, time);
+ movePlayer(Model::Direction::NORTH, time);
else if (inputHandler->isKeyPressed(SDL_SCANCODE_RIGHT))
- movePlayer(Model::EAST, time);
+ movePlayer(Model::Direction::EAST, time);
else if (inputHandler->isKeyPressed(SDL_SCANCODE_DOWN))
- movePlayer(Model::SOUTH, time);
+ movePlayer(Model::Direction::SOUTH, time);
else if (inputHandler->isKeyPressed(SDL_SCANCODE_LEFT))
- movePlayer(Model::WEST, time);
+ movePlayer(Model::Direction::WEST, time);
}
void MapContext::keyPressed(uint16_t key, uint64_t time) {
switch (key) {
case SDL_SCANCODE_UP:
- movePlayer(Model::NORTH, time);
+ movePlayer(Model::Direction::NORTH, time);
break;
case SDL_SCANCODE_RIGHT:
- movePlayer(Model::EAST, time);
+ movePlayer(Model::Direction::EAST, time);
break;
case SDL_SCANCODE_DOWN:
- movePlayer(Model::SOUTH, time);
+ movePlayer(Model::Direction::SOUTH, time);
break;
case SDL_SCANCODE_LEFT:
- movePlayer(Model::WEST, time);
+ movePlayer(Model::Direction::WEST, time);
}
}