From aa0fe8457cfff9c47c0c9fa4a1c86a79c7cbf9c5 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 27 Jul 2024 14:01:16 +1000 Subject: add a pool insert function. move RenderEnt to use handles --- src/std/mem.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/std/mem.c') diff --git a/src/std/mem.c b/src/std/mem.c index 4a4454a..a537330 100644 --- a/src/std/mem.c +++ b/src/std/mem.c @@ -126,3 +126,10 @@ void void_pool_dealloc(void_pool* pool, u32 raw_handle) { pool->count--; } + +u32 void_pool_insert(void_pool* pool, void* item) { + u32 raw_handle; + void* item_dest = void_pool_alloc(pool, &raw_handle); + memcpy(item_dest, item, pool->entry_size); + return raw_handle; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2