summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn <bjorn@horst-dieter.(none)>2009-04-12 19:04:20 +0200
committerBjørn <bjorn@horst-dieter.(none)>2009-04-12 19:06:38 +0200
commit9f5b89189f00c959882f86067634a512e6970614 (patch)
tree8964803d49528d35585f1fb26f8f22e3c7353a52 /src/main.cpp
parenta6998fbdfaf84aa1920564d97e3421ed28c9a893 (diff)
downloadmana-9f5b89189f00c959882f86067634a512e6970614.tar.gz
mana-9f5b89189f00c959882f86067634a512e6970614.tar.bz2
mana-9f5b89189f00c959882f86067634a512e6970614.tar.xz
mana-9f5b89189f00c959882f86067634a512e6970614.zip
Moved client version string creation to preprocessor
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a42e8b82..667e7456 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -164,20 +164,6 @@ Graphics *graphics;
unsigned char state;
std::string errorMessage;
-namespace Main {
-#ifdef PACKAGE_VERSION
-#ifdef TMWSERV_SUPPORT
-const std::string version = strprintf("v%s (tmwserv)", PACKAGE_VERSION);
-#else
-const std::string version = strprintf("v%s (eAthena)", PACKAGE_VERSION);
-#endif
-#else
-const std::string version = _("Unknown Version");
-#endif
-}
-
-Desktop *desktop;
-
Sound sound;
Music *bgm;
@@ -593,12 +579,7 @@ static void printHelp()
static void printVersion()
{
-#ifdef PACKAGE_VERSION
- std::cout << _("The Mana World version ") << Main::version << std::endl;
-#else
- std::cout << _("The Mana World version ") << Main::version <<
- _("(local build?)") << std::endl;
-#endif
+ std::cout << _("The Mana World ") << FULL_VERSION << std::endl;
}
static void parseOptions(int argc, char *argv[], Options &options)
@@ -910,7 +891,7 @@ int main(int argc, char *argv[])
logger->setLogFile(homeDir + std::string("/tmw.log"));
// Log the tmw version
- logger->log("The Mana World %s", Main::version.c_str());
+ logger->log("The Mana World %s", FULL_VERSION);
initConfiguration(options);
logger->setLogToStandardOut(config.getValue("logToStandardOut", 0));
@@ -928,7 +909,7 @@ int main(int argc, char *argv[])
setupWindow = new Setup;
gcn::Container *top = static_cast<gcn::Container*>(gui->getTop());
- desktop = new Desktop;
+ Desktop *desktop = new Desktop;
top->add(desktop);
ProgressBar *progressBar = new ProgressBar(0.0f, 100, 20, 168, 116, 31);
gcn::Label *progressLabel = new Label;
@@ -1563,8 +1544,6 @@ int main(int argc, char *argv[])
}
delete guiPalette;
- top->remove(desktop);
- delete desktop;
logger->log("Quitting");
exitEngine();