engine.h (1056B)
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 engine { 31 SDL_Window *window; 32 int counter; 33 int seed; 34 int quit; 35 int width, height; 36 float dt; 37 u64 frame; 38 struct user_settings user_settings; 39 struct ui ui; 40 struct input input; 41 struct gpu gpu; 42 }; 43 44 void init_engine(struct engine *game, int width, int height); 45 void quit_engine(struct engine *game); 46 void should_update(struct engine *game); 47 bool was_key_pressed_this_frame(struct engine *game, int scancode); 48 bool was_button_pressed_this_frame(struct engine *game, SDL_GameControllerButton button); 49 int is_free_camera(struct engine *game); 50 51 #endif /* PA_GAME_H */