From c05e188ef6a4b715848f9f0b401351a43c80168d Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Wed, 30 Jul 2025 23:33:22 +0300 Subject: Small Refactor --- include/game.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include/game.h') diff --git a/include/game.h b/include/game.h index 1039ad5..eb6da29 100644 --- a/include/game.h +++ b/include/game.h @@ -49,11 +49,8 @@ typedef struct Entity { typedef struct Game { bool paused; - Entity entities[MAX_ENTITY_COUNT]; - - Texture2D background; - float backgroundPosition; + #ifdef BEATEMUP_DEBUG //Debug information bool enableDebugOverlay; @@ -66,3 +63,15 @@ void AddWall(float xpos, float ypos, float width, float height); void InitGame(); void UpdateGame(float deltaTime); void DrawGame(); + +static inline bool EntityAllocated(const Entity* e) { + return (e->flags & ENTITY_ALLOCATED); +} + +static inline bool SameEntity(const Entity* a, const Entity* b) { + return a->id == b->id; +} + +#ifdef BEATEMUP_DEBUG +void DebugHighlights(const Entity* e); +#endif -- cgit v1.2.3