update servicepoint to branch with better codegen
This commit is contained in:
parent
4fad4612b7
commit
416c8f2165
5 changed files with 24 additions and 10 deletions
|
@ -7,12 +7,12 @@ namespace TanksServer.Graphics;
|
|||
internal sealed class GeneratePixelsTickStep(
|
||||
IEnumerable<IDrawStep> drawSteps,
|
||||
IEnumerable<IFrameConsumer> consumers
|
||||
) : ITickStep
|
||||
) : ITickStep, IDisposable
|
||||
{
|
||||
private GamePixelGrid _lastGamePixelGrid = new(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
private Bitmap _lastObserverPixelGrid = Bitmap.New(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
private Bitmap _lastObserverPixelGrid = new(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
private GamePixelGrid _gamePixelGrid = new(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
private Bitmap _observerPixelGrid = Bitmap.New(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
private Bitmap _observerPixelGrid = new(MapService.PixelsPerRow, MapService.PixelsPerColumn);
|
||||
|
||||
private readonly List<IDrawStep> _drawSteps = drawSteps.ToList();
|
||||
private readonly List<IFrameConsumer> _consumers = consumers.ToList();
|
||||
|
@ -44,4 +44,10 @@ internal sealed class GeneratePixelsTickStep(
|
|||
observerPixelGrid[(ushort)x, (ushort)y] = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_lastObserverPixelGrid.Dispose();
|
||||
_observerPixelGrid.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue