added sdl module
git-svn-id: svn://anubis/anaglym/trunk@14 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
7424521468
commit
99d01b9f26
@ -1,5 +1,6 @@
|
||||
|
||||
#include "ag.h"
|
||||
#include "sdl.h"
|
||||
#include <lua.hpp>
|
||||
#include <stdlib.h> /* exit() */
|
||||
#include <iostream>
|
||||
@ -38,6 +39,8 @@ int main(int argc, char * argv[])
|
||||
usage();
|
||||
}
|
||||
|
||||
video_init();
|
||||
|
||||
lua_State * L = lua_open();
|
||||
|
||||
register_libraries(L);
|
||||
|
12
sdl.cc
Normal file
12
sdl.cc
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
#include "sdl.h"
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
void video_init()
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER))
|
||||
{
|
||||
cerr << "SDL_Init() returned error!" << endl;
|
||||
exit(3);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user