diff options
author | nathansmithsmith <nathansmith7@mailfence.com> | 2023-09-12 21:53:32 -0600 |
---|---|---|
committer | nathansmithsmith <nathansmith7@mailfence.com> | 2023-09-12 21:53:32 -0600 |
commit | 7d4d948dfa92416c802229b1c444a44785ee2a0c (patch) | |
tree | 129fcf7141640ec8b3c7647de174755d04858ce2 /src/world.h | |
parent | c759231e1e8570ffe5fdda2f1eb5d011b1c6a29f (diff) |
Guided missile worky worky
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/world.h b/src/world.h index 9e36dc7..d714649 100644 --- a/src/world.h +++ b/src/world.h @@ -18,6 +18,9 @@ typedef struct World { EntityId * vacantIds; size_t vacantIdsCount; + Entity * entitiesToAdd; + size_t entitiesToAddCount; + // Used for making fingerprints for entities. EntityFingerprint currentFingerprint; } World; @@ -32,6 +35,10 @@ Entity * getEntityFromWorld(World world, EntityId id); EntityId addEntityToWorld(World * world, Entity entity); KfError removeEntityFromWorld(World * world, EntityId id); +// Entities can't be added to world during update loop so we schedule the mother fuckers. +KfError scheduleEntityToAdd(World * world, Entity entity); +KfError handleScheduledEntities(World * world); + void updateWorld(World * world, Game * game); void drawWorld(World * world, Game * game); |