X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgame.h;h=803a83edfadffe958ef29d7583a08c31be897738;hb=6c09449079539d50434036cd85f0e59ed84ed4e0;hp=fe992bbbf28ad0b67a07e526cc6cd2454167ac56;hpb=66ced32fc5b65a423594befbc9824f8e776be210;p=nothing.git diff --git a/src/game.h b/src/game.h index fe992bbb..803a83ed 100644 --- a/src/game.h +++ b/src/game.h @@ -1,24 +1,31 @@ #ifndef GAME_H_ #define GAME_H_ -#include -#include "./sound_medium.h" +#include -typedef struct game_t game_t; +#include "game/sound_samples.h" +#include "ebisp/expr.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, float 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); + +struct EvalResult +game_send(Game *game, Gc *gc, struct Scope *scope, struct Expr path); #endif // GAME_H_