summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-23 01:05:12 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-23 01:05:12 +0000
commited73ad0514e018de2351c4d9223a56d61a8c1289 (patch)
tree2e5b150e4f12504b26e131a411fdfb1d4bbce237 /src/game.cpp
parentde79e6a226f7f832ad0a442bc86865dd3aa81a4c (diff)
downloadmana-client-ed73ad0514e018de2351c4d9223a56d61a8c1289.tar.gz
mana-client-ed73ad0514e018de2351c4d9223a56d61a8c1289.tar.bz2
mana-client-ed73ad0514e018de2351c4d9223a56d61a8c1289.tar.xz
mana-client-ed73ad0514e018de2351c4d9223a56d61a8c1289.zip
Maps are now loaded through the resource manager.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp42
1 files changed, 11 insertions, 31 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 60db563d..6927ee18 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -65,8 +65,8 @@ ConfirmDialog *exitConfirm = NULL;
Being *target = NULL;
-#define EMOTION_TIME 150
-#define MAX_TIME 10000
+const int EMOTION_TIME = 150; /**< Duration of emotion icon */
+const int MAX_TIME = 10000;
/**
* Listener used for handling death message.
@@ -369,34 +369,14 @@ void do_input()
{
switch (player_node->direction)
{
- case NORTH:
- y--;
- break;
- case SOUTH:
- y++;
- break;
- case WEST:
- x--;
- break;
- case EAST:
- x++;
- break;
- case NW:
- x--;
- y--;
- break;
- case NE:
- x++;
- y--;
- break;
- case SW:
- x--;
- y++;
- break;
- case SE:
- x++;
- y++;
- break;
+ case NORTH: y--; break;
+ case SOUTH: y++; break;
+ case WEST: x--; break;
+ case EAST: x++; break;
+ case NW: x--; y--; break;
+ case NE: x++; y--; break;
+ case SW: x--; y++; break;
+ case SE: x++; y++; break;
}
id = find_floor_item_by_cor(x, y);
WFIFOW(0) = net_w_value(0x009f);
@@ -1071,7 +1051,7 @@ void do_parse()
// Warp
case 0x0091:
memset(map_path, '\0', 480);
- strcat(map_path, TMW_DATADIR "data/maps/");
+ strcat(map_path, "maps/");
strncat(map_path, RFIFOP(2), 497 - strlen(map_path));
logger->log("Warping to %s (%d, %d)",
map_path, RFIFOW(18), RFIFOW(20));