summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-03-24 19:56:46 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-03-24 19:56:46 +0000
commit0259c8d56cb54d7b058cdeff4d27d7fd371c07f1 (patch)
tree50104744515060ec31945c43b730e7c343edff86
parent439b263b9d23ee2065d2ba9d86ebfd6d2b75b976 (diff)
downloadmana-client-0259c8d56cb54d7b058cdeff4d27d7fd371c07f1.tar.gz
mana-client-0259c8d56cb54d7b058cdeff4d27d7fd371c07f1.tar.bz2
mana-client-0259c8d56cb54d7b058cdeff4d27d7fd371c07f1.tar.xz
mana-client-0259c8d56cb54d7b058cdeff4d27d7fd371c07f1.zip
Should fix the last commit
-rw-r--r--src/game.cpp11
-rw-r--r--src/gui/char_select.cpp7
2 files changed, 16 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 15c730f1..2506406e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -37,6 +37,7 @@
#include "gui/stats.h"
#include "gui/ok_dialog.h"
#include "net/protocol.h"
+#include "resources/mapreader.h"
#include <SDL.h>
#include <sstream>
@@ -124,7 +125,15 @@ void game() {
void do_init()
{
+ //tiledMap = Map::load(map_path);
+ //std::string path(map_path);
+
+ /*std::string pathDir = path.substr(0, path.rfind(".") + 1);
+ pathDir.insert(pathDir.size(), "tmx.gz");*/
+
tiledMap = Map::load(map_path);
+ std::cout << map_path << std::endl;
+
if (!tiledMap) {
error("Could not find map file");
}
@@ -796,7 +805,7 @@ void do_parse() {
// Warp
case 0x0091:
memset(map_path, '\0', 480);
- strcat(map_path, "./data/map/");
+ strcat(map_path, "./core/maps/");
strncat(map_path, RFIFOP(2), 497 - strlen(map_path));
log("Warping to %s (%d, %d)\n",
map_path, RFIFOW(18), RFIFOW(20));
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 4e31a769..431297e9 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -27,6 +27,7 @@
#include "ok_dialog.h"
#include "../graphics.h"
#include "../net/protocol.h"
+#include "../resources/resourcemanager.h"
#include <sstream>
#define NR_HAIR_STYLES 4
@@ -102,6 +103,10 @@ CharSelectDialog::CharSelectDialog():
selectButton->requestFocus();
setLocationRelativeTo(getParent());
+
+ ResourceManager *resman = ResourceManager::getInstance();
+ login_wallpaper = resman->getImage(
+ "core/graphics/images/char_wallpaper.png");
}
CharSelectDialog::~CharSelectDialog()
@@ -217,7 +222,7 @@ void CharSelectDialog::serverCharSelect()
}
char_ID = RFIFOL(2);
memset(map_path, '\0', 480);
- strcat(map_path, "./core/maps/");
+ strcat(map_path, "./data/map/");
strncat(map_path, RFIFOP(6), 479 - strlen(map_path));
map_address = RFIFOL(22);
map_port = RFIFOW(26);