From 13c82acad49fe26a3343e488777b20f3cba89234 Mon Sep 17 00:00:00 2001 From: Mergul Date: Fri, 25 Sep 2020 10:50:11 +0200 Subject: [PATCH] -removed some unused code --- demos/.gitignore | 3 ++- source/bubel/ecs/manager.d | 37 ------------------------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/demos/.gitignore b/demos/.gitignore index 974bbb2..d74e2b0 100644 --- a/demos/.gitignore +++ b/demos/.gitignore @@ -15,4 +15,5 @@ !emscripten_shell.html !emscripten_multi_shell.html !compile_android.py -.dub \ No newline at end of file +.dub +Android \ No newline at end of file diff --git a/source/bubel/ecs/manager.d b/source/bubel/ecs/manager.d index 8ef4a20..1514cbc 100644 --- a/source/bubel/ecs/manager.d +++ b/source/bubel/ecs/manager.d @@ -2542,43 +2542,6 @@ export struct EntityManager */ export Entity* addEntity(EntityTemplate* tmpl) { - /*EntityInfo* info = tmpl.info; - - ushort index = 0; - EntitiesBlock* block; - do - { - block = findBlockWithFreeSpaceMT(info); - index = block.added_count.atomicOp!"+="(1); - } - while (block.entities_count + index > info.max_entities); - - uint id = (block.entities_count + index - 1); //block.added_count); - - void* data_begin = block.dataBegin(); - void* start = data_begin + EntityID.sizeof * id; - - foreach (comp; info.components) - { - memcpy(cast(void*) block + info.deltas[comp] + components[comp].size * id, - tmpl.entity_data.ptr + info.tmpl_deltas[comp], components[comp].size); - - if (components[comp].create_callback) - { - components[comp].create_callback( - cast(void*) block + info.deltas[comp] + id * components[comp].size); - } - - } - - if (index == 1) - threads[threadID].infosToUpdate.add(block); - - Entity* entity = cast(Entity*) start; - entity.id = id_manager.getNewID(); - id_manager.update(*entity); //entity.updateID(); - - return entity;*/ return addEntity(tmpl, null); }