diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/assets.h | 15 | ||||
-rw-r--r-- | include/game.h | 17 |
2 files changed, 27 insertions, 5 deletions
diff --git a/include/assets.h b/include/assets.h index e2d76b7..61b198e 100644 --- a/include/assets.h +++ b/include/assets.h @@ -2,5 +2,18 @@ #include <raylib.h> +typedef enum AssetType { + Texture_Asset +} AssetType; + +typedef struct Asset { + AssetType type; + const char* name; + const char* filePath; + + Texture2D texture; +} Asset; + void LoadAssets(); -Texture2D GetTexture(const char* name); +Asset* GetMatchingAssetWithType(const char* targetName, AssetType targetType); +void UnloadAssets(); 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 |