Basic update, multithreading emplate support, fixed
-Added possibility to add entity form template + components to replace template data -basic tests for new functionality -small performance improvement for events -added ComponentRef structure which contain data pointer and component ID -now events are called before entities removing
This commit is contained in:
parent
3d98b0ee5e
commit
15cd57dbcb
6 changed files with 137 additions and 20 deletions
|
|
@ -40,10 +40,9 @@ package struct EventManager
|
|||
if(block is null)
|
||||
{
|
||||
event_block_alloc_mutex.lock();
|
||||
scope (exit)
|
||||
event_block_alloc_mutex.unlock();
|
||||
|
||||
block = cast(EventBlock*) allocator.getBlock();
|
||||
event_block_alloc_mutex.unlock();
|
||||
|
||||
*block = EventBlock();
|
||||
data.first_blocks[block_id] = block;
|
||||
data.blocks[block_id] = block;
|
||||
|
|
@ -52,10 +51,9 @@ package struct EventManager
|
|||
if(block.count >= data.max_events)
|
||||
{
|
||||
event_block_alloc_mutex.lock();
|
||||
scope (exit)
|
||||
event_block_alloc_mutex.unlock();
|
||||
|
||||
EventBlock* new_block = cast(EventBlock*) allocator.getBlock();
|
||||
event_block_alloc_mutex.unlock();
|
||||
|
||||
*new_block = EventBlock();
|
||||
block.next = new_block;
|
||||
block = new_block;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue