wip move to new uniffi language binding

This commit is contained in:
Vinzenz Schroeter 2024-11-12 18:27:04 +01:00
parent f7a5d8f823
commit 53cbdd8440
30 changed files with 211 additions and 187 deletions

View file

@ -20,7 +20,7 @@ internal sealed class GeneratePixelsTickStep(
public async ValueTask TickAsync(TimeSpan _)
{
Draw(_gamePixelGrid, _observerPixelGrid);
if (_observerPixelGrid.Data.SequenceEqual(_lastObserverPixelGrid.Data))
if (_observerPixelGrid.Equals(_lastObserverPixelGrid))
return;
await _consumers.Select(c => c.OnFrameDoneAsync(_gamePixelGrid, _observerPixelGrid))
@ -37,12 +37,12 @@ internal sealed class GeneratePixelsTickStep(
step.Draw(gamePixelGrid);
observerPixelGrid.Fill(false);
for (var y = 0; y < MapService.PixelsPerColumn; y++)
for (var x = 0; x < MapService.PixelsPerRow; x++)
{
if (gamePixelGrid[x, y].EntityType.HasValue)
observerPixelGrid[(ushort)x, (ushort)y] = true;
}
for (ulong y = 0; y < MapService.PixelsPerColumn; y++)
for (ulong x = 0; x < MapService.PixelsPerRow; x++)
{
if (gamePixelGrid[x, y].EntityType.HasValue)
observerPixelGrid.Set(x, y, true);
}
}
public void Dispose()