summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 16:27:05 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 16:27:05 +0000
commit2327c5a7c3b054e52b69286da906f8e5c4432d1c (patch)
tree28a566d4d54b8c046b18f18c1fb592c31f83f5dd /src/engine.cpp
parentff4d98eeee5a5a799039549c6df885a5208b792f (diff)
downloadmana-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.gz
mana-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.bz2
mana-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.xz
mana-2327c5a7c3b054e52b69286da906f8e5c4432d1c.zip
Fixed player names overlapping other players and more cleanups.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp54
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