]> git.lizzy.rs Git - nothing.git/blob - src/game.h
Merge pull request #613 from tsoding/608
[nothing.git] / src / game.h
1 #ifndef GAME_H_
2 #define GAME_H_
3
4 #include <SDL2/SDL.h>
5
6 #include "game/sound_samples.h"
7 #include "ebisp/expr.h"
8
9 typedef struct Game Game;
10
11 Game *create_game(const char *platforms_file_path,
12                     const char *sound_sample_files[],
13                     size_t sound_sample_files_count,
14                     SDL_Renderer *renderer);
15 void destroy_game(Game *game);
16
17 int game_render(const Game *game);
18 int game_sound(Game *game);
19 int game_update(Game *game, float delta_time);
20
21 int game_event(Game *game, const SDL_Event *event);
22 int game_input(Game *game,
23                const Uint8 *const keyboard_state,
24                SDL_Joystick *the_stick_of_joy);
25
26 int game_over_check(const Game *game);
27
28 struct EvalResult
29 game_send(Game *game, Gc *gc, struct Scope *scope, struct Expr path);
30
31 #endif  // GAME_H_