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 <math.h> /* fabs() */
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
#include "SDL.h"
|
||||||
|
#include "SDL_ttf.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define AG_EVENT_PREFIX "__ag_event_"
|
#define AG_EVENT_PREFIX "__ag_event_"
|
||||||
|
2
Makefile
2
Makefile
@ -24,7 +24,7 @@ LUALIBS := -llua5.1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
SDLINCLUDE := $(shell sdl-config --cflags)
|
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)
|
ODEINCLUDE := $(shell ode-config --cflags)
|
||||||
ODELIBS := $(shell ode-config --libs)
|
ODELIBS := $(shell ode-config --libs)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "anaglym.h"
|
#include "anaglym.h"
|
||||||
#include "Engine.h"
|
#include "Engine.h"
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
#include "SDL_ttf.h"
|
||||||
#include <stdlib.h> /* exit(), srand() */
|
#include <stdlib.h> /* exit(), srand() */
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -73,6 +74,11 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
Video video;
|
Video video;
|
||||||
video.start(width, height, fullscreen, grab_input);
|
video.start(width, height, fullscreen, grab_input);
|
||||||
|
if (TTF_Init() != 0)
|
||||||
|
{
|
||||||
|
cerr << "TTF_Init() error" << endl;
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
|
||||||
dInitODE();
|
dInitODE();
|
||||||
g_engine = new Engine(argv[0], video);
|
g_engine = new Engine(argv[0], video);
|
||||||
@ -81,6 +87,7 @@ int main(int argc, char * argv[])
|
|||||||
delete g_engine;
|
delete g_engine;
|
||||||
video.stop();
|
video.stop();
|
||||||
dCloseODE();
|
dCloseODE();
|
||||||
|
TTF_Quit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user