blob: 3dc9e27c95ab6713df32474f848011efb3328fe7 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 | #include "video.h"
#include "scene.h"
#include "gl.h"
#include <SDL_image.h>
int main(int argc, char **argv) {
	video::width = 1280;
	video::height = 720;
	video::init();
	IMG_Init(IMG_INIT_PNG | IMG_INIT_JPG);
#ifdef WIN32
	win32_gl_init();
#endif
	Scene *scene = new Scene();
	SDL_ShowCursor(SDL_DISABLE);
	SDL_WarpMouse(video::width/2, video::height/2);
	scene->last_time = SDL_GetTicks();
	scene->update();
	std::cout << "foo" << std::endl;
	while(scene->running) {
		scene->events();
		scene->render();
		SDL_Delay(1);
	}
	delete scene;
	video::free();
	return 0;
}
 |