From 8a8ed6d3fa7059dbb2a95072bbae4bf4618349a0 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Thu, 21 Aug 2025 20:07:04 +0300 Subject: Work on animation subsystem - Also incomplete refactor of inline functions --- src/physics.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/physics.c') 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); -- cgit v1.2.3