summaryrefslogtreecommitdiff
path: root/lib/engine.cc
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-14 02:05:15 +0000
committerpixel <pixel>2003-03-14 02:05:15 +0000
commitff05e0d8437c50e86229a79b99c8f1ae0ffe773f (patch)
tree4b53d22ecd227fb8ba9e0c653106774f9a99a27f /lib/engine.cc
parentc9437871835f2472e40a9051704b4e20f48ed067 (diff)
Creating shapes
Diffstat (limited to 'lib/engine.cc')
-rw-r--r--lib/engine.cc17
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) {