diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-05 20:44:36 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-05 20:44:36 +0000 |
commit | a51deebd87036ceb87c77a20117977d077b771e3 (patch) | |
tree | 71217d051fe77b562cd92508fe9edb3da6b7cc7a /src/client/client.cc | |
parent | 8ee5d47d7e1336eb69064ca31e27bbfa7d86b51e (diff) |
fixed cvar, added cvars r_width r_height r_fullscreen, added function r_restart
Diffstat (limited to 'src/client/client.cc')
-rw-r--r-- | src/client/client.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/client.cc b/src/client/client.cc index ba1c0bc..993e849 100644 --- a/src/client/client.cc +++ b/src/client/client.cc @@ -44,6 +44,14 @@ public: Client app; +//--- engine functions -------------------------------------------- + +extern "C" void func_r_restart(std::stringstream &args) +{ + video::shutdown(); + video::init(); +} + //--- public ------------------------------------------------------ game::Game game; @@ -73,6 +81,9 @@ void Client::init() // initialize core core::Application::init(); + // initialize SDL, but do not initialize any subsystems + SDL_Init(0); + // Initialize the video subsystem if (!client::video::init()) quit(1); @@ -82,6 +93,9 @@ void Client::init() // initialize input input::init(); + + // add engine functions + core::func::add("r_restart", func_r_restart); } void Client::run() @@ -119,6 +133,9 @@ void Client::shutdown() con_print << "Shutting down client..." << std::endl; console::flush(); + // remove engine functions + core::func::remove("r_restart"); + console::shutdown(); console::flush(); |