diff --git a/Engine.cc b/Engine.cc index 79a2b2e..c45d082 100644 --- a/Engine.cc +++ b/Engine.cc @@ -16,6 +16,8 @@ #include /* fabs() */ #include #include +#include "SDL.h" +#include "SDL_ttf.h" using namespace std; #define AG_EVENT_PREFIX "__ag_event_" diff --git a/Makefile b/Makefile index 7ea69cd..0291900 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ LUALIBS := -llua5.1 endif SDLINCLUDE := $(shell sdl-config --cflags) -SDLLIBS := $(shell sdl-config --libs) -lSDL_image +SDLLIBS := $(shell sdl-config --libs) -lSDL_image -lSDL_ttf ODEINCLUDE := $(shell ode-config --cflags) ODELIBS := $(shell ode-config --libs) diff --git a/anaglym.cc b/anaglym.cc index 620631b..16c94b9 100644 --- a/anaglym.cc +++ b/anaglym.cc @@ -3,6 +3,7 @@ #include "anaglym.h" #include "Engine.h" #include "SDL.h" +#include "SDL_ttf.h" #include /* exit(), srand() */ #include #include @@ -73,6 +74,11 @@ int main(int argc, char * argv[]) Video video; video.start(width, height, fullscreen, grab_input); + if (TTF_Init() != 0) + { + cerr << "TTF_Init() error" << endl; + exit(3); + } dInitODE(); g_engine = new Engine(argv[0], video); @@ -81,6 +87,7 @@ int main(int argc, char * argv[]) delete g_engine; video.stop(); dCloseODE(); + TTF_Quit(); return 0; }