daily update on 20230724 by nitload youmu, bigM128map added
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -25,5 +27,12 @@ namespace StgSharp
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
internal static void InitM128map(Pool target)
|
||||
{
|
||||
M128Map map = new M128Map();
|
||||
TimeLine.GetCurrentPool()._m128mapContainer.Add(map);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -17,5 +18,34 @@ namespace StgSharp
|
||||
/**/
|
||||
}
|
||||
|
||||
internal static M128Map GetAvailabem128map()
|
||||
{
|
||||
Pool p = TimeLine.GetCurrentPool();
|
||||
M128Map lastMap = p._m128mapContainer.Tail;
|
||||
|
||||
if (lastMap.isFull)
|
||||
{
|
||||
lastMap = new M128Map();
|
||||
p._m128mapContainer.Add(lastMap);
|
||||
}
|
||||
|
||||
return lastMap;
|
||||
}
|
||||
|
||||
internal static long GetAvailableM128ptr()
|
||||
{
|
||||
Pool p = TimeLine.GetCurrentPool();
|
||||
M128Map lastMap = p._m128mapContainer.Tail;
|
||||
|
||||
if (lastMap.isFull)
|
||||
{
|
||||
lastMap = new M128Map();
|
||||
p._m128mapContainer.Add(lastMap);
|
||||
}
|
||||
long ptr = lastMap.RegistManagedM128Ptr();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace StgSharp.Control
|
||||
{
|
||||
public static void Point(Point p)
|
||||
{
|
||||
TimeLine._currentPool._pointContainer.Remove(p);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace StgSharp.Control
|
||||
{
|
||||
public static class TimeLine
|
||||
{
|
||||
public const long version = 10;
|
||||
|
||||
[AllowNull]
|
||||
internal static Pool _currentPool = default;
|
||||
internal static LinkedList<Pool> allPool = new LinkedList<Pool>();
|
||||
|
||||
Reference in New Issue
Block a user