initial commit
[vrtris] / src / game.c
1 #include <assert.h>
2 #include "opengl.h"
3 #include "game.h"
4 #include "opt.h"
5
6 int game_init(int argc, char **argv)
7 {
8         if(init_opengl() == -1) {
9                 return -1;
10         }
11
12         if(init_options(argc, argv, "vrtris.conf") == -1) {
13                 return -1;
14         }
15
16         return 0;
17 }
18
19 void game_cleanup()
20 {
21 }
22
23 void game_display()
24 {
25         glClear(GL_COLOR_BUFFER_BIT);
26
27         game_swap_buffers();
28         assert(glGetError() == GL_NO_ERROR);
29 }
30
31 void game_reshape(int x, int y)
32 {
33 }
34
35 void game_keyboard(int key, int pressed)
36 {
37 }
38
39 void game_mouse_button(int bn, int pressed, int x, int y)
40 {
41 }
42
43 void game_mouse_motion(int x, int y)
44 {
45 }
46
47 void game_mouse_delta(int dx, int dy)
48 {
49 }
50
51 void game_mouse_wheel(int dir)
52 {
53 }
54
55
56 void game_gamepad_axis(int axis, float val)
57 {
58 }
59
60 void game_gamepad_button(int bn, int pressed)
61 {
62 }