mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
Merge branch 'main' into dev
This commit is contained in:
commit
44ef6418af
@ -10,7 +10,7 @@
|
|||||||
<RootNamespace>DCFApixels.DragonECS</RootNamespace>
|
<RootNamespace>DCFApixels.DragonECS</RootNamespace>
|
||||||
|
|
||||||
<Title>DragonECS</Title>
|
<Title>DragonECS</Title>
|
||||||
<Version>0.8.63</Version>
|
<Version>0.8.64</Version>
|
||||||
<Authors>DCFApixels</Authors>
|
<Authors>DCFApixels</Authors>
|
||||||
<Description>ECS Framework for Game Engines with C# and .Net Platform</Description>
|
<Description>ECS Framework for Game Engines with C# and .Net Platform</Description>
|
||||||
<Copyright>DCFApixels</Copyright>
|
<Copyright>DCFApixels</Copyright>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"displayName": "DragonECS",
|
"displayName": "DragonECS",
|
||||||
"description": "C# Entity Component System Framework",
|
"description": "C# Entity Component System Framework",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"version": "0.8.63",
|
"version": "0.8.64",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DCFApixels/DragonECS.git"
|
"url": "https://github.com/DCFApixels/DragonECS.git"
|
||||||
|
@ -952,6 +952,8 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
if (itemsCount <= 0) { return 0; }
|
if (itemsCount <= 0) { return 0; }
|
||||||
|
|
||||||
|
const int LO_CHANK_HALF = 65535;
|
||||||
|
const int HI_CHANK_HALF = -65536;
|
||||||
const int COMPONENT_MASK_CHUNK_SIZE_HALF = COMPONENT_MASK_CHUNK_SIZE / 2;
|
const int COMPONENT_MASK_CHUNK_SIZE_HALF = COMPONENT_MASK_CHUNK_SIZE / 2;
|
||||||
// проверка на itemsCount <= 0 не обяательна, алгоритм не ломается,
|
// проверка на itemsCount <= 0 не обяательна, алгоритм не ломается,
|
||||||
// только впустую отрабатыват по всем чанкам,
|
// только впустую отрабатыват по всем чанкам,
|
||||||
@ -971,7 +973,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((chunk & 0x0000FFFF) != 0)
|
if ((chunk & LO_CHANK_HALF) != 0)
|
||||||
{
|
{
|
||||||
bit = 0x0000_0001;
|
bit = 0x0000_0001;
|
||||||
while (bit < 0x0001_0000)
|
while (bit < 0x0001_0000)
|
||||||
@ -991,7 +993,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
poolIndex += COMPONENT_MASK_CHUNK_SIZE_HALF;
|
poolIndex += COMPONENT_MASK_CHUNK_SIZE_HALF;
|
||||||
}
|
}
|
||||||
if ((chunk & -0x7FFF0000) != 0)
|
if ((chunk & HI_CHANK_HALF) != 0)
|
||||||
{
|
{
|
||||||
bit = 0x0001_0000;
|
bit = 0x0001_0000;
|
||||||
while (bit != 0x0000_0000)
|
while (bit != 0x0000_0000)
|
||||||
@ -1018,6 +1020,8 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
private unsafe void GetComponentTypeIDsFor_Internal(int entityID, int* componentIDs, int itemsCount)
|
private unsafe void GetComponentTypeIDsFor_Internal(int entityID, int* componentIDs, int itemsCount)
|
||||||
{
|
{
|
||||||
|
const int LO_CHANK_HALF = 65535;
|
||||||
|
const int HI_CHANK_HALF = -65536;
|
||||||
const int COMPONENT_MASK_CHUNK_SIZE_HALF = COMPONENT_MASK_CHUNK_SIZE / 2;
|
const int COMPONENT_MASK_CHUNK_SIZE_HALF = COMPONENT_MASK_CHUNK_SIZE / 2;
|
||||||
// проверка на itemsCount <= 0 не обяательна, алгоритм не ломается,
|
// проверка на itemsCount <= 0 не обяательна, алгоритм не ломается,
|
||||||
// только впустую отрабатыват по всем чанкам,
|
// только впустую отрабатыват по всем чанкам,
|
||||||
@ -1036,7 +1040,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((chunk & 0x0000FFFF) != 0)
|
if ((chunk & LO_CHANK_HALF) != 0)
|
||||||
{
|
{
|
||||||
bit = 0x0000_0001;
|
bit = 0x0000_0001;
|
||||||
while (bit < 0x0001_0000)
|
while (bit < 0x0001_0000)
|
||||||
@ -1057,7 +1061,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
poolIndex += COMPONENT_MASK_CHUNK_SIZE_HALF;
|
poolIndex += COMPONENT_MASK_CHUNK_SIZE_HALF;
|
||||||
}
|
}
|
||||||
if ((chunk & -0x7FFF0000) != 0)
|
if ((chunk & HI_CHANK_HALF) != 0)
|
||||||
{
|
{
|
||||||
bit = 0x0001_0000;
|
bit = 0x0001_0000;
|
||||||
while (bit != 0x0000_0000)
|
while (bit != 0x0000_0000)
|
||||||
|
Loading…
Reference in New Issue
Block a user