Refactor and enhance codebase for maintainability
Refactored and reorganized the codebase to improve readability, performance, and maintainability. Introduced new interfaces and structs for better resource management, updated project configuration files, and refactored shader and graphics pipeline management. Improved error handling, code formatting, and removed unused code and namespaces. Updated DLL references and method signatures for consistency and maintainability.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Ghost.Core;
|
||||
using Ghost.Entities.Components;
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Collections;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
namespace Ghost.Entities;
|
||||
|
||||
public delegate void ForEach<T0>(ref T0 t0Component);
|
||||
public delegate void ForEach<T0, T1>(ref T0 t0Component,ref T1 t1Component);
|
||||
public delegate void ForEach<T0, T1, T2>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5, T6>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component,ref T6 t6Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5, T6, T7>(ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component,ref T6 t6Component,ref T7 t7Component);
|
||||
public delegate void ForEach<T0, T1>(ref T0 t0Component, ref T1 t1Component);
|
||||
public delegate void ForEach<T0, T1, T2>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5, T6>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component, ref T6 t6Component);
|
||||
public delegate void ForEach<T0, T1, T2, T3, T4, T5, T6, T7>(ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component, ref T6 t6Component, ref T7 t7Component);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ public readonly struct QueryItem<T0>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ public readonly struct QueryItem<T0, T1>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,9 +86,9 @@ public readonly struct QueryItem<T0, T1, T2>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,10 +122,10 @@ public readonly struct QueryItem<T0, T1, T2, T3>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c3 = new (ref _pool3.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,11 +162,11 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c3 = new (ref _pool3.GetRef(_entity));
|
||||
c4 = new (ref _pool4.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,12 +206,12 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c3 = new (ref _pool3.GetRef(_entity));
|
||||
c4 = new (ref _pool4.GetRef(_entity));
|
||||
c5 = new (ref _pool5.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,13 +254,13 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5, T6>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c3 = new (ref _pool3.GetRef(_entity));
|
||||
c4 = new (ref _pool4.GetRef(_entity));
|
||||
c5 = new (ref _pool5.GetRef(_entity));
|
||||
c6 = new (ref _pool6.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
c6 = new(ref _pool6.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,14 +306,14 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5, T6, T7>
|
||||
{
|
||||
entity = _entity;
|
||||
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c1 = new (ref _pool1.GetRef(_entity));
|
||||
c2 = new (ref _pool2.GetRef(_entity));
|
||||
c3 = new (ref _pool3.GetRef(_entity));
|
||||
c4 = new (ref _pool4.GetRef(_entity));
|
||||
c5 = new (ref _pool5.GetRef(_entity));
|
||||
c6 = new (ref _pool6.GetRef(_entity));
|
||||
c7 = new (ref _pool7.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
c6 = new(ref _pool6.GetRef(_entity));
|
||||
c7 = new(ref _pool7.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0> QueryFilter<T0>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0> QueryFilter<T0>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0)))
|
||||
@@ -50,7 +50,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1> QueryFilter<T0, T1>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1> QueryFilter<T0, T1>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1)))
|
||||
@@ -79,7 +79,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2> QueryFilter<T0, T1, T2>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2> QueryFilter<T0, T1, T2>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2)))
|
||||
@@ -108,7 +108,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2, T3> QueryFilter<T0, T1, T2, T3>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2, T3> QueryFilter<T0, T1, T2, T3>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData where T3 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2) && _componentStorage.TryGetPool<T3>(out var pool3)))
|
||||
@@ -137,7 +137,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4> QueryFilter<T0, T1, T2, T3, T4>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4> QueryFilter<T0, T1, T2, T3, T4>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData where T3 : unmanaged, IComponentData where T4 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2) && _componentStorage.TryGetPool<T3>(out var pool3) && _componentStorage.TryGetPool<T4>(out var pool4)))
|
||||
@@ -166,7 +166,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5> QueryFilter<T0, T1, T2, T3, T4, T5>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5> QueryFilter<T0, T1, T2, T3, T4, T5>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData where T3 : unmanaged, IComponentData where T4 : unmanaged, IComponentData where T5 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2) && _componentStorage.TryGetPool<T3>(out var pool3) && _componentStorage.TryGetPool<T4>(out var pool4) && _componentStorage.TryGetPool<T5>(out var pool5)))
|
||||
@@ -195,7 +195,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5, T6> QueryFilter<T0, T1, T2, T3, T4, T5, T6>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5, T6> QueryFilter<T0, T1, T2, T3, T4, T5, T6>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData where T3 : unmanaged, IComponentData where T4 : unmanaged, IComponentData where T5 : unmanaged, IComponentData where T6 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2) && _componentStorage.TryGetPool<T3>(out var pool3) && _componentStorage.TryGetPool<T4>(out var pool4) && _componentStorage.TryGetPool<T5>(out var pool5) && _componentStorage.TryGetPool<T6>(out var pool6)))
|
||||
@@ -224,7 +224,7 @@ public partial class World
|
||||
pool0.Count);
|
||||
}
|
||||
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5, T6, T7> QueryFilter<T0, T1, T2, T3, T4, T5, T6, T7>(ref readonly QueryFilter filter)
|
||||
public QueryEnumerable<T0, T1, T2, T3, T4, T5, T6, T7> QueryFilter<T0, T1, T2, T3, T4, T5, T6, T7>(ref readonly QueryFilter filter)
|
||||
where T0 : unmanaged, IComponentData where T1 : unmanaged, IComponentData where T2 : unmanaged, IComponentData where T3 : unmanaged, IComponentData where T4 : unmanaged, IComponentData where T5 : unmanaged, IComponentData where T6 : unmanaged, IComponentData where T7 : unmanaged, IComponentData
|
||||
{
|
||||
if (!(_componentStorage.TryGetPool<T0>(out var pool0) && _componentStorage.TryGetPool<T1>(out var pool1) && _componentStorage.TryGetPool<T2>(out var pool2) && _componentStorage.TryGetPool<T3>(out var pool3) && _componentStorage.TryGetPool<T4>(out var pool4) && _componentStorage.TryGetPool<T5>(out var pool5) && _componentStorage.TryGetPool<T6>(out var pool6) && _componentStorage.TryGetPool<T7>(out var pool7)))
|
||||
|
||||
Reference in New Issue
Block a user