]> git.lizzy.rs Git - nothing.git/blob - src/game.h
2c0e236be2c08596eae1e84c6fc3e2c86de0b7ce
[nothing.git] / src / game.h
1 #ifndef GAME_H_
2 #define GAME_H_
3
4 #include <SDL2/SDL.h>
5 #include "./game/sound_medium.h"
6
7 typedef struct game_t game_t;
8
9 game_t *create_game(const char *platforms_file_path,
10                     sound_medium_t *sound_medium);
11 void destroy_game(game_t *game);
12
13 int game_render(const game_t *game, SDL_Renderer *renderer);
14 int game_sound(game_t *game);
15 int game_update(game_t *game, float delta_time);
16
17 int game_event(game_t *game, const SDL_Event *event);
18 int game_input(game_t *game,
19                const Uint8 *const keyboard_state,
20                SDL_Joystick *the_stick_of_joy);
21
22 int game_over_check(const game_t *game);
23
24 #endif  // GAME_H_