]> git.lizzy.rs Git - nothing.git/blobdiff - src/game/level.h
(#824) Introduce UndoHistory
[nothing.git] / src / game / level.h
index efe495bf6ede6f514e5367f294a9d993361bcda0..cfa41a7857e768c4a466627a1315579bc176c3e8 100644 (file)
@@ -1,36 +1,36 @@
 #ifndef LEVEL_H_
 #define LEVEL_H_
 
-#include <SDL2/SDL.h>
-#include <SDL2/SDL_mixer.h>
+#include <SDL.h>
 
 #include "game/camera.h"
 #include "game/level/platforms.h"
 #include "game/level/player.h"
 #include "sound_samples.h"
+#include "ebisp/expr.h"
 
-typedef struct level_t level_t;
+typedef struct Broadcast Broadcast;
+typedef struct Level Level;
+typedef struct LevelEditor LevelEditor;
 
-level_t *create_level_from_file(const char *file_name);
-void destroy_level(level_t *level);
+Level *create_level_from_level_editor(const LevelEditor *level_editor,
+                                      Broadcast *broadcast);
+void destroy_level(Level *level);
 
-int level_render(const level_t *level, camera_t *camera);
+int level_render(const Level *level, Camera *camera);
 
-int level_sound(level_t *level, sound_samples_t *sound_samples);
-int level_update(level_t *level, float delta_time);
+int level_sound(Level *level, Sound_samples *sound_samples);
+int level_update(Level *level, float delta_time);
 
-int level_event(level_t *level, const SDL_Event *event);
-int level_input(level_t *level,
+int level_event(Level *level, const SDL_Event *event);
+int level_input(Level *level,
                 const Uint8 *const keyboard_state,
                 SDL_Joystick *the_stick_of_joy);
-// TODO: level_enter_camera_event allows rendering in non *_render functions
-int level_enter_camera_event(level_t *level,
-                             camera_t *camera);
+int level_enter_camera_event(Level *level, Camera *camera);
 
-int level_reload_preserve_player(level_t *level,
-                                 const char *file_name);
+void level_toggle_debug_mode(Level *level);
+void level_toggle_pause_mode(Level *level);
 
-void level_toggle_debug_mode(level_t *level);
-void level_toggle_pause_mode(level_t *level);
+struct EvalResult level_send(Level *level, Gc *gc, struct Scope *scope, struct Expr path);
 
 #endif  // LEVEL_H_