Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-01-31 18:22:44 +0000
committerStijn Buys <ingar@osirion.org>2008-01-31 18:22:44 +0000
commitf794b9ee52293cefd6ac73fdf0d2a01c5388f057 (patch)
tree2838d7ee11ae49e2e519ad604ba41f7071fb8288 /src/core/core.cc
parent1ddff2045848da5136e9e8131e335ac7626b8f68 (diff)
modular system works now
Diffstat (limited to 'src/core/core.cc')
-rw-r--r--src/core/core.cc26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/core/core.cc b/src/core/core.cc
index b576ba5..0a4ed60 100644
--- a/src/core/core.cc
+++ b/src/core/core.cc
@@ -12,23 +12,39 @@
namespace core
{
-/// initialize the core
-void init() {
+void init()
+{
+ con_debug << "Initializing core..." << std::endl;
+
common::init();
filesystem::init();
+
+ if (::core::Game::instance())
+ ::core::Game::instance()->init();
+ else
+ con_warn << "No game module found!" << std::endl;
- con_debug << "Initializing core..." << std::endl;
}
-/// shutdown the core
-void shutdown() {
+void shutdown()
+{
con_debug << "Shutting down core..." << std::endl;
+ if (::core::Game::instance())
+ ::core::Game::instance()->shutdown();
+ else
+ con_warn << "No game module found!" << std::endl;
+
filesystem::shutdown();
common::shutdown();
}
+void frame(float sec)
+{
+ if (::core::Game::instance())
+ ::core::Game::instance()->frame(sec);
}
+} //namespace core