]> git.lizzy.rs Git - nothing.git/blob - src/game/level.h
(#278) Implement ProtoRect
[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 #include "ebisp/expr.h"
12
13 typedef struct Broadcast Broadcast;
14 typedef struct Level Level;
15
16 Level *create_level_from_file(const char *file_name, Broadcast *broadcast);
17 void destroy_level(Level *level);
18
19 int level_render(const Level *level, Camera *camera);
20
21 int level_sound(Level *level, Sound_samples *sound_samples);
22 int level_update(Level *level, float delta_time);
23
24 int level_event(Level *level, const SDL_Event *event, const Camera *camera);
25 int level_input(Level *level,
26                 const Uint8 *const keyboard_state,
27                 SDL_Joystick *the_stick_of_joy);
28 int level_enter_camera_event(Level *level, Camera *camera);
29
30 int level_reload_preserve_player(Level *level,
31                                  Broadcast *broadcast);
32
33 void level_toggle_debug_mode(Level *level);
34 void level_toggle_pause_mode(Level *level);
35
36 struct EvalResult level_send(Level *level, Gc *gc, struct Scope *scope, struct Expr path);
37
38 #endif  // LEVEL_H_