diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-03-11 23:16:49 +0100 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-03-11 23:16:49 +0100 |
| commit | d3a1bb552e9efc4e516841158aaaea3d8ab9202d (patch) | |
| tree | 16957aab86a6fdfd6c6aae0873babe359bf386a9 /include/entity.h | |
| parent | 9fb384552cb0a036a5978dfc40cddbbe2d29727c (diff) | |
refactor(entity): replace EntityManager with typed Entities struct
Diffstat (limited to 'include/entity.h')
| -rw-r--r-- | include/entity.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/include/entity.h b/include/entity.h deleted file mode 100644 index 60467ab..0000000 --- a/include/entity.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef ENTITY_H -#define ENTITY_H - -#include "raylib.h" -#include "raytmx.h" - -#include "player.h" -#include "map_manager.h" - -typedef struct Enemy { - Vector2 position; - Rectangle bounds; - uint32_t gid; - int health; - bool active; -} Enemy; - -typedef struct Static { - Vector2 position; - Rectangle bounds; - uint32_t gid; - bool active; -} Static; - -typedef struct Collectible { - Vector2 position; - Rectangle bounds; - uint32_t gid; - bool active; - int tileX; - int tileY; -} Collectible; - -typedef struct Movable { - Vector2 position; - Rectangle bounds; - uint32_t gid; - bool active; -} Movable; - -typedef struct EntityManager { - Enemy *enemies; - int enemiesCount; - - Collectible *collectibles; - int collectiblesCount; - - Static *statics; - int staticsCount; - - Movable *movables; - int movablesCount; -} EntityManager; - -EntityManager InitEntityManager(uint32_t capacity); -void SpawnEntitiesFromMap(EntityManager *mgr, TmxMap *map); -void UpdateEntities(EntityManager *mgr, Player *player, MapManager *mapMgr); -void DrawEntities(EntityManager *mgr, TmxMap *map); -void UnloadEntityManager(EntityManager *mgr); - -#endif // ENTITY_H |
