diff options
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 73974edc..2175096d 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -72,58 +72,6 @@ Spriteset *npcset; Spriteset *weaponset; -int get_x_offset(Being *being) -{ - int offset = 0; - char direction = being->direction; - - if (being->action == Being::WALK) - { - if (direction != Being::NORTH && direction != Being::SOUTH) - { - offset = (get_elapsed_time(being->walk_time) * 32) / being->speed; - if (offset > 32) offset = 32; - - if (direction == Being::WEST || direction == Being::NW || - direction == Being::SW) { - offset = -offset; - offset += 32; - } - else { - offset -= 32; - } - } - } - - return offset; -} - -int get_y_offset(Being *being) -{ - int offset = 0; - char direction = being->direction; - - if (being->action == Being::WALK) - { - if (direction != Being::EAST && direction != Being::WEST) - { - offset = (get_elapsed_time(being->walk_time) * 32) / being->speed; - if (offset > 32) offset = 32; - - if (direction == Being::NORTH || direction == Being::NW || - direction == Being::NE) { - offset = -offset; - offset += 32; - } - else { - offset -= 32; - } - } - } - - return offset; -} - Engine::Engine(): mCurrentMap(NULL) { @@ -295,8 +243,6 @@ void Engine::draw() int mouseTileX = mouseX / 32 + camera_x; int mouseTileY = mouseY / 32 + camera_y; - sort(); - frame++; // Draw tiles and sprites |