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