X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgame%2Flevel%2Fboxes.h;h=207d1278906c76e6c9f6444cc9c99fcbd65daf55;hb=dc356739e8d0bc20bf62c2ca034d1b1122e4aea4;hp=62e0a91ada1e739284db557bee6b0e4a790447b0;hpb=04c009743683f9271c6a076bb894ba7d9e4cd07d;p=nothing.git diff --git a/src/game/level/boxes.h b/src/game/level/boxes.h index 62e0a91a..207d1278 100644 --- a/src/game/level/boxes.h +++ b/src/game/level/boxes.h @@ -4,30 +4,25 @@ #include "game/camera.h" #include "game/level/platforms.h" #include "lava.h" +#include "ebisp/expr.h" -typedef struct boxes_t boxes_t; -typedef struct player_t player_t; +typedef struct Boxes Boxes; +typedef struct Player Player; +typedef struct Physical_world Physical_world; +typedef struct LineStream LineStream; -boxes_t *create_boxes_from_stream(FILE *stream); -void destroy_boxes(boxes_t *boxes); +Boxes *create_boxes_from_line_stream(LineStream *line_stream, RigidBodies *rigid_bodies); +void destroy_boxes(Boxes *boxes); -solid_ref_t boxes_as_solid(boxes_t *boxes); +int boxes_render(Boxes *boxes, Camera *camera); +int boxes_update(Boxes *boxes, float delta_time); -int boxes_render(boxes_t *boxes, camera_t *camera); -int boxes_update(boxes_t *boxes, float delta_time); -void boxes_touches_rect_sides(const boxes_t *boxes, - rect_t object, - int sides[RECT_SIDE_N]); +void boxes_float_in_lava(Boxes *boxes, Lava *lava); -void boxes_collide_with_solid(boxes_t *boxes, - solid_ref_t solid); -void boxes_collide_with_lava(boxes_t *boxes, - lava_t *lava); -void boxes_take_impact_from_player(boxes_t *boxes, - player_t *player); +int boxes_add_to_physical_world(const Boxes *boxes, + Physical_world *Physical_world); -/** \brief Implements solid_apply_force */ -void boxes_apply_force(boxes_t *boxes, - vec_t force); +struct EvalResult +boxes_send(Boxes *boxes, Gc *gc, struct Scope *scope, struct Expr path); #endif // BOXES_H_