diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/src/main.cpp b/src/main.cpp index b933742a..6866093f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -190,7 +190,7 @@ void setUpdatesDir() if (updateHost.empty()) { updateHost = - config.getValue("updatehost", "http://www.aethyra.org/updates"); + config.getValue("updatehost", "http://updates.themanaworld.org/"); } // Remove any trailing slash at the end of the update host @@ -262,18 +262,18 @@ void setUpdatesDir() */ void init_engine(const Options &options) { - homeDir = std::string(PHYSFS_getUserDir()) + "/.aethyra"; + homeDir = std::string(PHYSFS_getUserDir()) + "/.tmw"; #if defined WIN32 if (!CreateDirectory(homeDir.c_str(), 0) && GetLastError() != ERROR_ALREADY_EXISTS) #elif defined __APPLE__ - // Use Application Directory instead of .aethyra + // Use Application Directory instead of .tmw homeDir = std::string(PHYSFS_getUserDir()) + - "/Library/Application Support/Aethyra"; + "/Library/Application Support/The Mana World"; if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) && (errno != EEXIST)) #else - // Checking if /home/user/.Aethyra folder exists. + // Checking if /home/user/.tmw folder exists. if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) && (errno != EEXIST)) #endif @@ -285,12 +285,12 @@ void init_engine(const Options &options) } // Set log file - logger->setLogFile(homeDir + std::string("/aethyra.log")); + logger->setLogFile(homeDir + std::string("/tmw.log")); #ifdef PACKAGE_VERSION - logger->log(_("Starting Aethyra Version %s"), PACKAGE_VERSION); + logger->log(_("Starting The Mana World Version %s"), PACKAGE_VERSION); #else - logger->log(_("Starting Aethyra - Version not defined")); + logger->log(_("Starting The Mana World - Version not defined")); #endif // Initialize SDL @@ -335,12 +335,12 @@ void init_engine(const Options &options) strncat(path, "/data", PATH_MAX - 1); resman->addToSearchPath(path, true); #else - resman->addToSearchPath(AETHYRA_DATADIR "data", true); + resman->addToSearchPath(TMW_DATADIR "data", true); #endif // Fill configuration with defaults logger->log(_("Initializing configuration...")); - config.setValue("host", "www.aethyra.org"); + config.setValue("host", "www.themanaworld.org"); config.setValue("port", 21001); config.setValue("hwaccel", 0); #if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL @@ -355,34 +355,34 @@ void init_engine(const Options &options) config.setValue("sfxVolume", 100); config.setValue("musicVolume", 60); config.setValue("fpslimit", 0); - config.setValue("updatehost", "http://www.aethyra.org/updates"); + config.setValue("updatehost", "http://updates.themanaworld.org"); config.setValue("customcursor", 1); config.setValue("ChatLogLength", 128); // Checking if the configuration file exists... otherwise creates it with // default options ! - FILE *aethyraFile = 0; + FILE *configFile = 0; std::string configPath = options.configPath; if (configPath.empty()) configPath = homeDir + "/config.xml"; - aethyraFile = fopen(configPath.c_str(), "r"); + configFile = fopen(configPath.c_str(), "r"); // If we can't read it, it doesn't exist ! - if (aethyraFile == NULL) { + if (configFile == NULL) { // We reopen the file in write mode and we create it - aethyraFile = fopen(configPath.c_str(), "wt"); + configFile = fopen(configPath.c_str(), "wt"); } - if (aethyraFile == NULL) { + if (configFile == NULL) { std::cout << "Can't create " << configPath << ". " "Using Defaults." << std::endl; } else { - fclose(aethyraFile); + fclose(configFile); config.init(configPath); } - SDL_WM_SetCaption("Aethyra", NULL); + SDL_WM_SetCaption("The Mana World", NULL); #ifdef WIN32 static SDL_SysWMinfo pInfo; SDL_GetWMInfo(&pInfo); @@ -392,7 +392,7 @@ void init_engine(const Options &options) SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); } #else - SDL_Surface *icon = IMG_Load(AETHYRA_DATADIR "data/icons/aethyra.png"); + SDL_Surface *icon = IMG_Load(TMW_DATADIR "data/icons/tmw.png"); if (icon) { SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); @@ -495,7 +495,7 @@ void exit_engine() void printHelp() { std::cout - << _("aethyra") << std::endl << std::endl + << _("tmw") << std::endl << std::endl << _("Options: ") << std::endl << _(" -C --configfile : Configuration file to use") << std::endl << _(" -d --data : Directory to load game data from") << std::endl @@ -512,11 +512,10 @@ void printHelp() void printVersion() { #ifdef PACKAGE_VERSION - std::cout << _("Aethyra version ") << PACKAGE_VERSION << - std::endl; + std::cout << _("The Mana World version ") << PACKAGE_VERSION << std::endl; #else - std::cout << _("Aethyra version ") << - _("(local build?, PACKAGE_VERSION is not defined)") << std::endl; + std::cout << _("The Mana World version ") << + _"(local build?, PACKAGE_VERSION is not defined)") << std::endl; #endif } @@ -742,9 +741,9 @@ int main(int argc, char *argv[]) putenv(("LANG=" + std::string(_nl_locale_name_default())).c_str()); #endif setlocale(LC_MESSAGES, ""); - bindtextdomain("aethyra", LOCALEDIR); - bind_textdomain_codeset("aethyra", "UTF-8"); - textdomain("aethyra"); + bindtextdomain("tmw", LOCALEDIR); + bind_textdomain_codeset("tmw", "UTF-8"); + textdomain("tmw"); #endif // Initialize libxml2 and check for potential ABI mismatches between @@ -799,8 +798,8 @@ int main(int argc, char *argv[]) if (!options.password.empty()) { loginData.password = options.password; } - loginData.hostname = config.getValue("host", "www.aethyra.org"); - loginData.port = (short)config.getValue("port", 21001); + loginData.hostname = config.getValue("host", "server.themanaworld.org"); + loginData.port = (short)config.getValue("port", 6901); loginData.remember = config.getValue("remember", 0); loginData.registerLogin = false; @@ -873,7 +872,7 @@ int main(int argc, char *argv[]) if (graphics->getWidth() > login_wallpaper->getWidth() || graphics->getHeight() > login_wallpaper->getHeight()) { - graphics->setColor(gcn::Color(255, 255, 255)); + graphics->setColor(gcn::Color(64, 64, 64)); graphics->fillRectangle(gcn::Rectangle( 0, 0, graphics->getWidth(), graphics->getHeight())); } @@ -987,8 +986,8 @@ int main(int argc, char *argv[]) case CHAR_SELECT_STATE: logger->log("State: CHAR_SELECT"); currentDialog = new CharSelectDialog(network, &charInfo, - (loginData.sex == 0) ? - GENDER_FEMALE : GENDER_MALE); + (loginData.sex == 0) ? + GENDER_FEMALE : GENDER_MALE); positionDialog(currentDialog, screenWidth, screenHeight); if (((CharSelectDialog*) currentDialog)-> |