aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: 4fc9bc2d40bebda6e016c3c3a636aab78e0a6ed8 (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
38
39
40
#include <raylib.h>
#include "texture_sys.h"
#include "shader_sys.h"
#include "script_sys.h"

#include "controller.h"
#include "rand_sys.h"

int main()
{
	InitWindow(640, 480, "Gunner Engine");
	
	SetTargetFPS(60);
	
	rand_seed();
	
	init_tex_sys();
	init_shader_sys();
	init_script_sys();
	
	while(!WindowShouldClose()){
		float dt = GetFrameTime();
		poll_rumble(dt);
		
		update_textures();
		update_shaders();
		
		ClearBackground(WHITE);
		BeginDrawing();
			update_script();
		EndDrawing();
	}
	
	deinit_script_sys();
	unload_active_textures();
	unload_active_shaders();
	
	CloseWindow();
	return 0;
}