refactor: Add BitMask256 utility for 256-bit bitmask operations (#2300)
### Summary - Create BitMask256 struct with scalar operations (benchmarks showed AVX2 vectorization provides no benefit for this size) - Refactor Map.cs to use BitMask256 for full Z range support (-128 to 127) - Remove SectorSpawnCache struct, use BitMask256 directly in manager - Update tests to use BitMask256 directly - Remove unused test assertions for old 64-bit behavior
This commit is contained in:
parent
d3b43f6f0e
commit
598223703f
7 changed files with 482 additions and 261 deletions
|
|
@ -21,8 +21,6 @@ public class CanFitItemTests
|
|||
Skip.If(!ServerFixture.TileDataLoaded, "TileData not loaded - client files required");
|
||||
}
|
||||
|
||||
#region Basic Validation Tests
|
||||
|
||||
[Fact]
|
||||
public void CanFitItem_InternalMapReturnsFalse()
|
||||
{
|
||||
|
|
@ -42,10 +40,6 @@ public class CanFitItemTests
|
|||
Assert.False(map.CanFitItem(100, map.Height + 1, 0, 1));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Land Surface Tests
|
||||
|
||||
private const int TestLandX = 1500;
|
||||
private const int TestLandY = 1600;
|
||||
|
||||
|
|
@ -72,10 +66,6 @@ public class CanFitItemTests
|
|||
Assert.False(result, "No surface 50 units above land");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Surface + Impassable Tests (Tables, Furniture)
|
||||
|
||||
[SkippableFact]
|
||||
public void CanFitItem_SurfaceImpassableMultiIsValidSurface()
|
||||
{
|
||||
|
|
@ -145,10 +135,6 @@ public class CanFitItemTests
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region World Item Surface Tests
|
||||
|
||||
[SkippableFact]
|
||||
public void CanFitItem_NonMovableWorldItemSurfaceWorks()
|
||||
{
|
||||
|
|
@ -215,10 +201,6 @@ public class CanFitItemTests
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Blocking Tests
|
||||
|
||||
[SkippableFact]
|
||||
public void CanFitItem_ImpassableTileBlocksPlacement()
|
||||
{
|
||||
|
|
@ -278,10 +260,6 @@ public class CanFitItemTests
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helper Methods and Classes
|
||||
|
||||
private TestMulti CreateSurfaceImpassableMulti(Map map, Point3D location, int surfaceZ)
|
||||
{
|
||||
// Use SurfaceImpassableTileId - a tile that has both Surface and Impassable flags
|
||||
|
|
@ -322,6 +300,4 @@ public class CanFitItemTests
|
|||
|
||||
public override MultiComponentList Components => _components;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue