]> git.lizzy.rs Git - nothing.git/blobdiff - src/game.h
(#427) Fix svg2rects failure on newlines in labels
[nothing.git] / src / game.h
index 5237702dcb90e1a627e62bf2acbf6f1a3d8c1ddd..b6c2f19aacedfa2b4bc4c390a77059662b9479a0 100644 (file)
@@ -1,20 +1,27 @@
 #ifndef GAME_H_
 #define GAME_H_
 
-typedef struct game_t game_t;
-typedef struct SDL_Renderer SDL_Renderer;
+#include <SDL2/SDL.h>
 
-game_t *create_game(const char *platforms_file_path);
-void destroy_game(game_t *game);
+#include "game/sound_samples.h"
 
-int game_render(const game_t *game, SDL_Renderer *renderer);
-int game_update(game_t *game, Uint32 delta_time);
+typedef struct Game Game;
 
-int game_event(game_t *game, const SDL_Event *event);
-int game_input(game_t *game,
+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_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 is_game_over(const game_t *game);
+int game_over_check(const Game *game);
 
 #endif  // GAME_H_