SIMD-accelerated gas mixtures. (SIMD atmos) (#2479)
* SIMD atmos * Moles will always be a multiple of four. * Component dependencies for grid atmos. * Let's optimize allocations while we're at it! * Inline this * A bunch of atmos optimizations * Fix crimes against atmos * Microsoft moment * Remove nuget.config * do not reference Robust.UnitTests in Content.Benchmarks as it's unneeded. * Revert "Remove nuget.config" This reverts commit 872604ae6a51365af4075bb23687bd005befd8ac. * Gas overlay optimization and fixes * Lattice is now spess * minor atmos tweaks
This commit is contained in:
committed by
GitHub
parent
89f72c4cb2
commit
b18ee3ec49
@@ -11,9 +11,9 @@ namespace Content.Shared.GameObjects.EntitySystems.Atmos
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
private readonly GasPrototype[] GasPrototypes = new GasPrototype[Atmospherics.TotalNumberOfGases];
|
||||
protected readonly GasPrototype[] GasPrototypes = new GasPrototype[Atmospherics.TotalNumberOfGases];
|
||||
|
||||
private readonly SpriteSpecifier[] GasOverlays = new SpriteSpecifier[Atmospherics.TotalNumberOfGases];
|
||||
private readonly SpriteSpecifier[] _gasOverlays = new SpriteSpecifier[Atmospherics.TotalNumberOfGases];
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -25,10 +25,10 @@ namespace Content.Shared.GameObjects.EntitySystems.Atmos
|
||||
GasPrototypes[i] = gasPrototype;
|
||||
|
||||
if(string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayTexture))
|
||||
GasOverlays[i] = new SpriteSpecifier.Texture(new ResourcePath(gasPrototype.GasOverlayTexture));
|
||||
_gasOverlays[i] = new SpriteSpecifier.Texture(new ResourcePath(gasPrototype.GasOverlayTexture));
|
||||
|
||||
if(!string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayState))
|
||||
GasOverlays[i] = new SpriteSpecifier.Rsi(new ResourcePath(gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState);
|
||||
_gasOverlays[i] = new SpriteSpecifier.Rsi(new ResourcePath(gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,6 @@ namespace Content.Shared.GameObjects.EntitySystems.Atmos
|
||||
|
||||
public IEnumerable<GasPrototype> Gases => GasPrototypes;
|
||||
|
||||
public SpriteSpecifier GetOverlay(int overlayId) => GasOverlays[overlayId];
|
||||
public SpriteSpecifier GetOverlay(int overlayId) => _gasOverlays[overlayId];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user