added SDL_ttf boilerplate code

git-svn-id: svn://anubis/anaglym/trunk@155 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-11-05 13:27:33 +00:00
parent 830f633c16
commit e8c5c7c5e4
3 changed files with 10 additions and 1 deletions

View File

@ -16,6 +16,8 @@
#include <math.h> /* fabs() */
#include <GL/gl.h>
#include <GL/glu.h>
#include "SDL.h"
#include "SDL_ttf.h"
using namespace std;
#define AG_EVENT_PREFIX "__ag_event_"

View File

@ -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)

View File

@ -3,6 +3,7 @@
#include "anaglym.h"
#include "Engine.h"
#include "SDL.h"
#include "SDL_ttf.h"
#include <stdlib.h> /* exit(), srand() */
#include <iostream>
#include <string>
@ -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;
}