game.h (1057B)
1 2 #ifndef PA_GAME_H 3 #define PA_GAME_H 4 5 #include "vbo.h" 6 #include "entity.h" 7 #include "fbo.h" 8 #include "input.h" 9 #include "model.h" 10 #include "node.h" 11 #include "orbit.h" 12 #include "shader.h" 13 #include "skybox.h" 14 #include "terrain.h" 15 #include "texture.h" 16 #include "ui.h" 17 #include "gpu.h" 18 19 #define PLAYER_HEIGHT 1.73 20 21 /* 22 * Global data used by our render callback: 23 * NOTE: just for testing right now 24 */ 25 26 struct user_settings { 27 float mouse_sens; 28 }; 29 30 struct game { 31 SDL_Window *window; 32 int counter; 33 int seed; 34 int quit; 35 int wireframe; 36 int width, height; 37 float dt; 38 u64 frame; 39 struct user_settings user_settings; 40 struct ui ui; 41 struct input input; 42 struct gpu gpu; 43 }; 44 45 void game_init(struct game *game, int width, int height); 46 void quit_game(struct game *game); 47 void should_update(struct game *game); 48 bool was_key_pressed_this_frame(struct game *game, int scancode); 49 bool was_button_pressed_this_frame(struct game *game, SDL_GameControllerButton button); 50 int is_free_camera(struct game *game); 51 52 #endif /* PA_GAME_H */