added SDL_ttf boilerplate code
git-svn-id: svn://anubis/anaglym/trunk@155 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
830f633c16
commit
e8c5c7c5e4
@ -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_"
|
||||
|
2
Makefile
2
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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user