summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-26 00:04:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-26 00:04:45 +0000
commit8b0e30d3798cd5bdce2c3a34a3c384e90dceac99 (patch)
tree3fdca13a0cc138ed65b72de8cd3747cc79916818 /src/main.cpp
parenta31ba215a3043ebd62d415a7d855a531239fb630 (diff)
downloadmana-client-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.gz
mana-client-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.bz2
mana-client-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.xz
mana-client-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.zip
Changed keyboard control to integrate better with mouse walk, changed location
of packet.list and chatlog.txt and removed name from player chat "balloon".
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5c62700f..0037e4f4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -66,6 +66,7 @@ char map_name[16];
unsigned char state;
unsigned char screen_mode;
char *dir = NULL;
+char *homeDir = NULL;
int displayFlags, screenW, screenH, bitDepth;
bool useOpenGL = false;
@@ -120,11 +121,15 @@ void init_engine()
dir = new char[400];
strcpy(dir, "");
+ homeDir = new char[256];
#ifndef __USE_UNIX98
// WIN32 and others
strcpy(dir, "config.xml");
+
+ // In Windows and other systems we currently store data next to executable.
+ strcpy(homeDir, "");
#else
- // UNIX
+ // In UNIX we store data in ~/.manaworld/
char *userHome;
char *name = getlogin();
passwd *pass;
@@ -152,6 +157,8 @@ void init_engine()
exit(1);
}
sprintf(dir, "%s/.manaworld/config.xml", userHome);
+
+ //strcpy(homeDir, "%s/.manaworld/", userHome);
#endif
// Checking if the configuration file exists... otherwise creates it with
@@ -177,18 +184,9 @@ void init_engine()
config.setValue("screen", 0);
config.setValue("sound", 1);
config.setValue("guialpha", 0.8f);
-#ifdef __USE_UNIX98
- char *chatlogFilename = new char[400];
- sprintf(chatlogFilename, "%s/.manaworld/chatlog.txt", userHome);
- config.setValue("chatlog", chatlogFilename);
- delete chatlogFilename;
-#else
- config.setValue("chatlog", "chatlog.txt");
-#endif
config.setValue("remember", 1);
config.setValue("sfxVolume", 100);
config.setValue("musicVolume", 60);
-
config.write(dir);
}
}