-removed some unittest and unused code
This commit is contained in:
parent
204ce9dc79
commit
dec0582398
3 changed files with 3 additions and 306 deletions
|
|
@ -1720,7 +1720,6 @@ class EntityManager
|
|||
{
|
||||
block.entities_count = block.type_info.max_entities;
|
||||
}
|
||||
//block.added_count = 0;
|
||||
block.added_count.atomicStore(cast(ushort) 0);
|
||||
}
|
||||
thread.blocks_to_update.clear();
|
||||
|
|
@ -1742,11 +1741,9 @@ class EntityManager
|
|||
void updateEvents() nothrow @nogc
|
||||
{
|
||||
bool empty = true;
|
||||
//uint index = event_manager.
|
||||
while(1)
|
||||
{
|
||||
event_manager.swapCurrent();
|
||||
//event_manager.clearEvents();
|
||||
uint current_index;
|
||||
if(event_manager.current_index == 0)current_index = cast(uint)threads.length;
|
||||
else current_index = 0;
|
||||
|
|
@ -1763,7 +1760,6 @@ class EntityManager
|
|||
call_data.event = event_pointer;
|
||||
foreach(j;0..block.count)
|
||||
{
|
||||
//void* event_pointer = cast(void*)block + event.data_offset;
|
||||
EntityID entity_id = *cast(EntityID*)event_pointer;
|
||||
Entity* entity = id_manager.getEntityPointer(entity_id);
|
||||
call_data.block = getMetaData(entity);
|
||||
|
|
@ -1786,9 +1782,7 @@ class EntityManager
|
|||
}
|
||||
if(empty)break;
|
||||
empty = true;
|
||||
//event_manager.clearEvents();
|
||||
}
|
||||
//event_manager.swapCurrent();
|
||||
}
|
||||
|
||||
export void commit()
|
||||
|
|
@ -1831,8 +1825,6 @@ class EntityManager
|
|||
}
|
||||
|
||||
commit();
|
||||
|
||||
//event_manager.clearEvents();
|
||||
}
|
||||
|
||||
private void getThreadID() nothrow @nogc
|
||||
|
|
@ -1938,15 +1930,6 @@ class EntityManager
|
|||
qsort(pass.system_callers.array.ptr, pass.system_callers.length,
|
||||
(SystemCaller*).sizeof, &compareSystems);
|
||||
|
||||
/*static struct CallerData
|
||||
{
|
||||
uint id;
|
||||
//bool
|
||||
}*/
|
||||
|
||||
/*caller_data = (cast(SystemCaller**) alloca((SystemCaller*).sizeof * pass.system_callers.length))[0
|
||||
.. pass.system_callers.length];*/
|
||||
|
||||
foreach (uint i, caller; pass.system_callers)
|
||||
caller.job_group.id = i;
|
||||
|
||||
|
|
@ -1955,17 +1938,6 @@ class EntityManager
|
|||
index = 0;
|
||||
foreach (uint i, caller; pass.system_callers)
|
||||
{
|
||||
/*
|
||||
if(priority == int.min)priority = caller.system.priority;
|
||||
if(priority != caller.system.priority)
|
||||
{
|
||||
foreach(caller2;pass.system_callers[beg..i])
|
||||
{
|
||||
|
||||
}
|
||||
priority = caller.system.priority;
|
||||
beg = i;
|
||||
}*/
|
||||
index = 0;
|
||||
foreach (ex; caller.exclusion)
|
||||
{
|
||||
|
|
@ -2083,10 +2055,6 @@ class EntityManager
|
|||
EntitiesBlock* first_block;
|
||||
///pointer to last block
|
||||
EntitiesBlock* last_block;
|
||||
///array of CallData. Contain data for System calls.
|
||||
//Vector!(CallData) callers;
|
||||
|
||||
///Mutex used to managing block new alloction
|
||||
}
|
||||
|
||||
/************************************************************************************************************************
|
||||
|
|
@ -2229,14 +2197,8 @@ class EntityManager
|
|||
|
||||
bool register_state = false;
|
||||
|
||||
//Vector!(SystemCaller*) system_callers;
|
||||
|
||||
alias SytemFuncType = void function(ref EntityManager.CallData data) nothrow @nogc;
|
||||
|
||||
//alias sendSelfEvent = instance.event_manager.sendSelfEvent;
|
||||
|
||||
//alias event_manager this;
|
||||
|
||||
///Single page size. Must be power of two.
|
||||
enum page_size = 32768; //4096;
|
||||
///Number of pages in block.
|
||||
|
|
@ -2246,11 +2208,6 @@ class EntityManager
|
|||
BlockAllocator /*!(page_size, pages_in_block)*/ allocator;
|
||||
|
||||
EventManager event_manager;
|
||||
//mixin EventManagerCode;
|
||||
|
||||
//Vector!EntityID entities_to_remove;
|
||||
//Vector!(EntitiesBlock*) blocks_to_update;
|
||||
//Vector!ubyte change_entities_list;
|
||||
|
||||
void delegate(JobGroup jobs) m_dispatch_jobs;
|
||||
uint delegate() m_thread_id_func;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue