diff options
author | BoredGuy <osome3717@gmail.com> | 2025-08-21 20:07:04 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-08-21 20:07:04 +0300 |
commit | 8a8ed6d3fa7059dbb2a95072bbae4bf4618349a0 (patch) | |
tree | 5f1383eb3983b2bfc73680322a4bf0b68abbf770 /src/physics.c | |
parent | 251be1ac2d808dfd0fca5c0eb37398357ca7bb20 (diff) |
Work on animation subsystem
- Also incomplete refactor of inline functions
Diffstat (limited to 'src/physics.c')
-rw-r--r-- | src/physics.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/physics.c b/src/physics.c index 51e80f5..bc93a29 100644 --- a/src/physics.c +++ b/src/physics.c @@ -1,20 +1,9 @@ #include "physics.h" #include "game.h" +#include "utils.h" extern Game game; -static inline bool PhysicsEnabled(const Entity* e) { - return EntityAllocated(e) && (e->flags & ENTITY_PHYSICS_ACTIVE); -} - -static inline Rectangle GetPhysicsColliderGlobal(const Entity* e) { - Rectangle physicsColliderGlobal = e->physicsCollider; - physicsColliderGlobal.x += e->position.x; - physicsColliderGlobal.y += e->position.y; - - return physicsColliderGlobal; -} - void MoveAndSlide(Entity* e, float deltaTime) { Vector2 velocity = e->velocity; Rectangle physicsCollider = GetPhysicsColliderGlobal(e); |