]> git.lizzy.rs Git - nothing.git/blob - src/game/level/solid.h
(#553) Remove labels->enabled
[nothing.git] / src / game / level / solid.h
1 #ifndef SOLID_H_
2 #define SOLID_H_
3
4 #include "math/rect.h"
5
6 typedef enum Solid_tag {
7     SOLID_PLATFORMS = 0,
8     SOLID_RIGID_RECT,
9     SOLID_PLAYER
10 } Solid_tag;
11
12 typedef struct Solid_ref {
13     Solid_tag tag;
14     void *ptr;
15 } Solid_ref;
16
17 /** \brief Answers what sides of the rectangular object the solid entity touches
18  */
19 void solid_touches_rect_sides(Solid_ref solid,
20                               Rect object,
21                               int sides[RECT_SIDE_N]);
22
23 /** \brief Applies a force vector to the solid body
24  */
25 void solid_apply_force(Solid_ref solid,
26                        Vec force);
27
28 void solid_collide_with_solid(Solid_ref solid,
29                               Solid_ref other_solid);
30
31 #endif  // SOLID_H_