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

@ -30,16 +30,16 @@ internal sealed class DrawPowerUpsStep(MapEntityManager entityManager) : IDrawSt
private static void DrawPowerUp(GamePixelGrid pixels, Sprite sprite, PixelPosition position)
{
for (byte dy = 0; dy < MapService.TileSize; dy++)
for (byte dx = 0; dx < MapService.TileSize; dx++)
{
var pixelState = sprite[dx, dy];
if (!pixelState.HasValue)
continue;
for (byte dx = 0; dx < MapService.TileSize; dx++)
{
var pixelState = sprite[dx, dy];
if (!pixelState.HasValue)
continue;
var (x, y) = position.GetPixelRelative(dx, dy);
pixels[x, y].EntityType = pixelState.Value
? GamePixelEntityType.PowerUp
: null;
}
var (x, y) = position.GetPixelRelative(dx, dy);
pixels[x, y].EntityType = pixelState.Value
? GamePixelEntityType.PowerUp
: null;
}
}
}