summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-11 08:58:32 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-11 08:58:52 -0600
commit14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a (patch)
treeda62e5694614e55df1c1a0fc5d5676ac7415daa6 /src/main.cpp
parent78cab005ab427e64ccdf8ba8f6ca7d4c6f6bd4b4 (diff)
downloadmana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.gz
mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.bz2
mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.tar.xz
mana-14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a.zip
Remove more support #ifdefs
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 913b7ae9..5bd82e33 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -974,7 +974,7 @@ int main(int argc, char *argv[])
#ifdef TMWSERV_SUPPORT
Net::initialize();
- new TmwServ::GeneralHandler; // Currently registers itself
+ new TmwServ::GeneralHandler; // Currently doesn't need registration
#else
Network *network = new Network;
EAthena::GeneralHandler *generalHandler = new EAthena::GeneralHandler;
@@ -1029,25 +1029,10 @@ int main(int argc, char *argv[])
guiInput->pushInput(event);
}
-#ifdef TMWSERV_SUPPORT
- Net::flush();
-#else
- network->flush();
- network->dispatchMessages();
-#endif
+ Net::getGeneralHandler()->flushNetwork();
gui->logic();
-#ifdef EATHENA_SUPPORT
- if (network->getState() == Network::NET_ERROR)
- {
- state = STATE_ERROR;
-
- if (!network->getError().empty())
- errorMessage = network->getError();
- else
- errorMessage = _("Got disconnected from server!");
- }
-#endif
+ Net::getGeneralHandler()->tick();
if (progressBar->isVisible())
{
@@ -1595,9 +1580,7 @@ int main(int argc, char *argv[])
delete guiPalette;
-#ifdef EATHENA_SUPPORT
- delete network;
-#endif
+ //delete Net::getGeneralHandler();
logger->log("Quitting");
exitEngine();