diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-07-31 05:26:08 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-07-31 05:26:08 +0000 |
commit | 18b778662388e98e90b13f28f28a83911ee96e95 (patch) | |
tree | 5e16ba5adc9cdc3d4f84769e0a4e93ff7155c7a0 /src/main.cpp | |
parent | d593cb2395ddc144844297ea12122c12e60d3bba (diff) | |
download | manaserv-18b778662388e98e90b13f28f28a83911ee96e95.tar.gz manaserv-18b778662388e98e90b13f28f28a83911ee96e95.tar.bz2 manaserv-18b778662388e98e90b13f28f28a83911ee96e95.tar.xz manaserv-18b778662388e98e90b13f28f28a83911ee96e95.zip |
Added beginnings of game core logic and state.
Fixed a few problems with SQL queries using different SQL DB backends.
I forget everything else.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp index ff939e12..30b547f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,7 @@ #include "chathandler.h" #include "storage.h" #include "configuration.h" +#include "state.h" #include "skill.h" @@ -178,17 +179,6 @@ void deinitialize() /** - * Update game world - */ -void updateWorld() -{ -#ifdef SCRIPT_SUPPORT - script->update(); -#endif -} - - -/** * Main function, initializes and runs server. */ int main(int argc, char *argv[]) @@ -238,6 +228,10 @@ int main(int argc, char *argv[]) store.open(); // + // create state machine + State &state = State::instance(); + // + SDL_Event event; while (running) { @@ -253,7 +247,7 @@ int main(int argc, char *argv[]) // - Handle all messages that are in the message queue // - Update all active objects/beings - updateWorld(); + state.update(*connectionHandler.get()); } else if (event.type == SDL_QUIT) { running = false; |