summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-07-16 00:30:14 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-07-16 00:30:14 +0000
commitc6b206ab5601108dbc917f78077612d6d935c7be (patch)
tree7a0bb3e818960e0fd4da92b105eee03a5cd96ee3
parent3839ff35294ec2fba40603595f09fd98cb9f2709 (diff)
downloadMana-c6b206ab5601108dbc917f78077612d6d935c7be.tar.gz
Mana-c6b206ab5601108dbc917f78077612d6d935c7be.tar.bz2
Mana-c6b206ab5601108dbc917f78077612d6d935c7be.tar.xz
Mana-c6b206ab5601108dbc917f78077612d6d935c7be.zip
Now we don't use the char *homeDir anymore.
-rw-r--r--src/engine.cpp2
-rw-r--r--src/main.h1
-rw-r--r--src/resources/buddylist.cpp2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index f0902bb0..7181ac80 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -159,7 +159,7 @@ Engine::Engine():
// Create dialogs
chatWindow = new ChatWindow(
- std::string(homeDir) + std::string("chatlog.txt"));
+ config.getValue("homeDir", "") + std::string("chatlog.txt"));
statusWindow = new StatusWindow();
buyDialog = new BuyDialog();
sellDialog = new SellDialog();
diff --git a/src/main.h b/src/main.h
index dcee297a..a6af43fe 100644
--- a/src/main.h
+++ b/src/main.h
@@ -71,7 +71,6 @@ extern unsigned char state;
extern Sound sound;
extern int screenW, screenH, bitDepth, displayFlags;
extern bool useOpenGL;
-extern char *homeDir;
extern Configuration config;
#endif
diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp
index 9f11b5f7..a227ec71 100644
--- a/src/resources/buddylist.cpp
+++ b/src/resources/buddylist.cpp
@@ -29,7 +29,7 @@
BuddyList::BuddyList()
{
// Find saved buddy list file
- filename = new std::string(std::string(homeDir) + "buddy.txt");
+ filename = new std::string(std::string(config.getValue("homeDir", "") + "buddy.txt"));
// Load buddy from file
loadFile();