]> git.lizzy.rs Git - nothing.git/blob - src/game/level.h
Merge pull request #538 from tsoding/524
[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 Level Level;
13
14 Level *create_level_from_file(const char *file_name);
15 void destroy_level(Level *level);
16
17 int level_render(const Level *level, Camera *camera);
18
19 int level_sound(Level *level, Sound_samples *sound_samples);
20 int level_update(Level *level, float delta_time);
21
22 int level_event(Level *level, const SDL_Event *event);
23 int level_input(Level *level,
24                 const Uint8 *const keyboard_state,
25                 SDL_Joystick *the_stick_of_joy);
26 int level_enter_camera_event(Level *level,
27                              const Camera *camera);
28
29 int level_reload_preserve_player(Level *level,
30                                  const char *file_name);
31
32 Rigid_rect *level_rigid_rect(Level *level,
33                              const char *rigid_rect_id);
34
35 void level_toggle_debug_mode(Level *level);
36 void level_toggle_pause_mode(Level *level);
37
38 void level_hide_goal(Level *level, const char *goal_id);
39 void level_show_goal(Level *level, const char *goal_id);
40
41 long int level_player_jump_count(Level *level);
42
43 #endif  // LEVEL_H_