From f794b9ee52293cefd6ac73fdf0d2a01c5388f057 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 31 Jan 2008 18:22:44 +0000 Subject: modular system works now --- src/core/core.cc | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src/core/core.cc') 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 -- cgit v1.2.3