blob: b1fef9752684ffd28c52f4e3adb4923c0bac6966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// physics.h
#ifndef PHYSICS_H
#define PHYSICS_H
#include <raylib.h>
#include "common.h"
typedef struct {
shape_t type;
Vec2d pos;
Vec2d vel;
Vec2d acc;
float width;
float height;
Color color;
} object_t;
typedef sturct {
object_t* object_arr;
u16 object_count;
size_t capacity;
} world_t;
void register_new_object(world_t* world, u32 object_x, u32 object_y);
void delete_object(world_t* world);
void clear_scene(world_t* world);
#endif // PHYSICS_H
|