diff options
Diffstat (limited to 'lib/engine.cc')
-rw-r--r-- | lib/engine.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/engine.cc b/lib/engine.cc index ac813f9..c30b1d9 100644 --- a/lib/engine.cc +++ b/lib/engine.cc @@ -1,6 +1,15 @@ +#include <SDL.h> +#include <Input.h> #include "engine.h" +#include "glfont.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef _ #define _(x) x +#endif bool mogltk::engine::inited = false, mogltk::engine::postsetuped = false; bool mogltk::engine::appactive = false, mogltk::engine::cursorvisible = false, mogltk::engine::quitrequest = false; @@ -13,7 +22,7 @@ Uint32 mogltk::engine::curticks; int mogltk::engine::setup() throw(GeneralException) { if (inited) { - printm(M_WARNING, "mogltk::engine::setup() called twice, ignoring second call.\n"); + printm(M_WARNING, _("mogltk::engine::setup() called twice, ignoring second call.\n")); return -1; } if (SDL_Init(0) < 0) { @@ -22,13 +31,15 @@ int mogltk::engine::setup() throw(GeneralException) { atexit(SDL_Quit); inited = true; + + mogltk::SystemFont = new mogltk::font(&Input("font.bin")); return 0; } int mogltk::engine::postsetup() throw(GeneralException) { if (postsetuped) { - printm(M_WARNING, "mogltk::engine::postsetup() called twice, ignoring second call.\n"); + printm(M_WARNING, _("mogltk::engine::postsetup() called twice, ignoring second call.\n")); return -1; } @@ -124,6 +135,8 @@ void mogltk::engine::pollevents() { frames = 0; curticks = ticks; } + } else { + curfps = -1; } while(true) { |