X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgame.h;h=b6c2f19aacedfa2b4bc4c390a77059662b9479a0;hb=da5eeca6aa746051679abe89398500cc52ecd5e7;hp=9ea94adc62b1cfe756e80483e4d9d11ff6d522da;hpb=407309d92d2018a3bee2e458f2faeffb61ee8ebe;p=nothing.git diff --git a/src/game.h b/src/game.h index 9ea94adc..b6c2f19a 100644 --- a/src/game.h +++ b/src/game.h @@ -2,23 +2,26 @@ #define GAME_H_ #include -#include "./sound_medium.h" -typedef struct game_t game_t; +#include "game/sound_samples.h" -game_t *create_game(const char *platforms_file_path, - sound_medium_t *sound_medium); -void destroy_game(game_t *game); +typedef struct Game Game; -int game_render(const game_t *game, SDL_Renderer *renderer); -int game_sound(game_t *game); -int game_update(game_t *game, Uint32 delta_time); +Game *create_game(const char *platforms_file_path, + const char *sound_sample_files[], + size_t sound_sample_files_count, + SDL_Renderer *renderer); +void destroy_game(Game *game); -int game_event(game_t *game, const SDL_Event *event); -int game_input(game_t *game, +int game_render(const Game *game); +int game_sound(Game *game); +int game_update(Game *game, float delta_time); + +int game_event(Game *game, const SDL_Event *event); +int game_input(Game *game, const Uint8 *const keyboard_state, SDL_Joystick *the_stick_of_joy); -int game_over_check(const game_t *game); +int game_over_check(const Game *game); #endif // GAME_H_