blob: a5168cd823080f91fa601269282ec6e3c3f0593a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// physics.h
#ifndef PHYSICS_H
#define PHYSICS_H
#include <raylib.h>
#include <time.h>
#include "common.h"
void init_physics(object_t* world, uint32_t max_objs);
void update_physics(object_t* world, uint32_t objs_count, float gravity, float dt);
void apply_force(object_t* obj, Vector2 force);
void add_object(object_t* world, uint32_t* count, shape_t type, Vector2 pos);
void clear_all_physics(object_t* world, uint32_t* count);
void push_pos(object_t* world, uint32_t count, Vector2 pos, float radius, float strength);
#endif // PHYSICS_H
|