aboutsummaryrefslogtreecommitdiff
path: root/world.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-06 15:50:31 +1000
committerquou <quou@disroot.org>2023-05-06 15:50:31 +1000
commitec51d32ea0a30c138e690f637f38d83c086e02b9 (patch)
tree95570a567cc34ef5255a845391178d8649cd56a4 /world.c
parent9e28af25b8fb5c9474ccbec2bd4dff26f1871075 (diff)
Add the main mechanic.
Diffstat (limited to 'world.c')
-rw-r--r--world.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/world.c b/world.c
index 39673d4..4995351 100644
--- a/world.c
+++ b/world.c
@@ -29,12 +29,15 @@ Entity new_entity(World* world) {
world->bitmask[e] = 0;
+ world->gmemory--;
+
return e;
}
void destroy_entity(World* world, Entity e) {
world->recycle_bin[world->recycle_bin_count++] = e;
world->bitmask[e] = 0;
+ world->gmemory++;
}
void add_components(World* world, Entity e, CType bits) {