From 11f44e36d5f02f8309fc463f9a2c6cd81b42c3ce Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 7 Dec 2002 00:42:14 +0000 Subject: Whoups --- lib/engine.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/engine.cc (limited to 'lib/engine.cc') diff --git a/lib/engine.cc b/lib/engine.cc new file mode 100644 index 0000000..919fcb4 --- /dev/null +++ b/lib/engine.cc @@ -0,0 +1,23 @@ +#include +#include "engine.h" + +int mogltk::engine::inited = 0; + +int mogltk::engine::setup() throw(GeneralException) { + if (inited) { + printm(M_WARNING, "mogltk::engine::startup() called twice, ignoring second call.\n"); + return -1; + } + if (SDL_Init(0) < 0) { + throw GeneralException(_("Unable to start SDL base system")); + } + atexit(SDL_Quit); + + inited = 1; + + return 0; +} + +int mogltk::engine::GetInited() { + return inited; +} -- cgit v1.2.3