Support more than one bucket for given entity type
This commit is contained in:
parent
a61a54b43f
commit
4d35bc2a1b
2 changed files with 44 additions and 11 deletions
|
|
@ -59,6 +59,8 @@ unittest
|
|||
|
||||
void update(ref TestComp test, ref TestComp2 test2)//ref TestComp comp)
|
||||
{
|
||||
assert( cast(ptrdiff_t)&test % TestComp.alignof == 0 );
|
||||
assert( cast(ptrdiff_t)&test2 % TestComp2.alignof == 0 );
|
||||
import std.stdio;
|
||||
writeln("Jakis tekst! ",test.b);
|
||||
test.a+=1000;
|
||||
|
|
@ -106,8 +108,7 @@ unittest
|
|||
EntityTemplate* tmpl = gEM.allocateTemplate(ids);
|
||||
*cast(EntityID*)tmpl.entity_data.ptr = EntityID(1,1);
|
||||
|
||||
gEM.addEntity(tmpl);
|
||||
gEM.addEntity(tmpl);
|
||||
foreach(i; 0..1_000_000)gEM.addEntity(tmpl);
|
||||
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+24)) == EntityID(1,1));
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+48)) == EntityID(1,1));
|
||||
|
|
@ -117,6 +118,5 @@ unittest
|
|||
|
||||
import std.stdio;
|
||||
writeln((cast(uint*)tmpl.info.first_block)[0..48]);
|
||||
|
||||
gEM.freeTemplate(tmpl);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue