-changed README
-license changed to BSD (maybe temporary) -added configurations to dub.json -initial ECS implementation (WIP): -Manager, System, Entity, Component -registering components -registering systems -calling update
This commit is contained in:
parent
8285bde71d
commit
6217aec6be
10 changed files with 265 additions and 11 deletions
|
|
@ -23,19 +23,26 @@ struct EntityAllocator
|
|||
BucketArray[] arrays;
|
||||
Bucket* lastEmptyBucket;
|
||||
|
||||
void initBucketArray(ref BucketArray bArr)
|
||||
Bucket* initBucketArray(ref BucketArray bArr)
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void allocateBucketArray()
|
||||
{
|
||||
auto bucketArray = new BucketArray();
|
||||
assert(bucketArray.buckets[0].ptr % bucketSize == 0) arrays ~= bucketArray;
|
||||
//auto bucketArray = new BucketArray();
|
||||
BucketArray bucketArray;
|
||||
assert(cast(uint)bucketArray.buckets[0].memory.ptr % bucketSize == 0);
|
||||
arrays ~= bucketArray;
|
||||
Bucket* lasBucket = initBucketArray(bucketArray);
|
||||
lastEmptyBucket = lasBucket;
|
||||
}
|
||||
|
||||
void allocateBucket()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ubyte[] getMemory()
|
||||
{
|
||||
if (lastEmptyBucket is null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue