5 #include <SDL2/SDL_mixer.h>
7 #include "game/camera.h"
8 #include "game/level/platforms.h"
9 #include "game/level/player.h"
10 #include "sound_samples.h"
12 typedef struct Game Game;
13 typedef struct Level Level;
15 Level *create_level_from_file(const char *file_name, Game *game);
16 void destroy_level(Level *level);
18 int level_render(const Level *level, Camera *camera);
20 int level_sound(Level *level, Sound_samples *sound_samples);
21 int level_update(Level *level, float delta_time);
23 int level_event(Level *level, const SDL_Event *event);
24 int level_input(Level *level,
25 const Uint8 *const keyboard_state,
26 SDL_Joystick *the_stick_of_joy);
27 int level_enter_camera_event(Level *level, Camera *camera);
29 int level_reload_preserve_player(Level *level,
30 const char *file_name,
33 Rigid_rect *level_rigid_rect(Level *level,
34 const char *rigid_rect_id);
36 void level_toggle_debug_mode(Level *level);
37 void level_toggle_pause_mode(Level *level);
39 void level_hide_goal(Level *level, const char *goal_id);
40 void level_show_goal(Level *level, const char *goal_id);
42 void level_hide_label(Level *level, const char *label_id);