]> git.lizzy.rs Git - nothing.git/blob - src/game/level.h
(#608) Introduce (send) function
[nothing.git] / src / game / level.h
1 #ifndef LEVEL_H_
2 #define LEVEL_H_
3
4 #include <SDL2/SDL.h>
5 #include <SDL2/SDL_mixer.h>
6
7 #include "game/camera.h"
8 #include "game/level/platforms.h"
9 #include "game/level/player.h"
10 #include "sound_samples.h"
11
12 typedef struct Game Game;
13 typedef struct Level Level;
14
15 Level *create_level_from_file(const char *file_name, Game *game);
16 void destroy_level(Level *level);
17
18 int level_render(const Level *level, Camera *camera);
19
20 int level_sound(Level *level, Sound_samples *sound_samples);
21 int level_update(Level *level, float delta_time);
22
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);
28
29 int level_reload_preserve_player(Level *level,
30                                  const char *file_name,
31                                  Game *game);
32
33 Rigid_rect *level_rigid_rect(Level *level,
34                              const char *rigid_rect_id);
35
36 void level_toggle_debug_mode(Level *level);
37 void level_toggle_pause_mode(Level *level);
38
39 void level_hide_goal(Level *level, const char *goal_id);
40 void level_show_goal(Level *level, const char *goal_id);
41
42 void level_hide_label(Level *level, const char *label_id);
43
44 #endif  // LEVEL_H_