wip move to new uniffi language binding
This commit is contained in:
parent
f7a5d8f823
commit
53cbdd8440
30 changed files with 211 additions and 187 deletions
|
@ -1,4 +1,3 @@
|
|||
using ServicePoint;
|
||||
using TanksServer.GameLogic;
|
||||
|
||||
namespace TanksServer.Graphics;
|
||||
|
@ -9,24 +8,24 @@ internal sealed class DrawMapStep(MapService map) : IDrawStep
|
|||
|
||||
private static void Draw(GamePixelGrid pixels, Map map)
|
||||
{
|
||||
for (ushort y = 0; y < MapService.PixelsPerColumn; y++)
|
||||
for (ushort x = 0; x < MapService.PixelsPerRow; x++)
|
||||
{
|
||||
if (!map.IsWall(x, y))
|
||||
continue;
|
||||
for (ulong y = 0; y < MapService.PixelsPerColumn; y++)
|
||||
for (ulong x = 0; x < MapService.PixelsPerRow; x++)
|
||||
{
|
||||
if (!map.IsWall(x, y))
|
||||
continue;
|
||||
|
||||
pixels[x, y].EntityType = GamePixelEntityType.Wall;
|
||||
}
|
||||
pixels[x, y].EntityType = GamePixelEntityType.Wall;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Draw(Bitmap pixels, Map map)
|
||||
{
|
||||
for (ushort y = 0; y < MapService.PixelsPerColumn; y++)
|
||||
for (ushort x = 0; x < MapService.PixelsPerRow; x++)
|
||||
{
|
||||
if (!map.IsWall(x, y))
|
||||
continue;
|
||||
pixels[x, y] = true;
|
||||
}
|
||||
for (ulong y = 0; y < MapService.PixelsPerColumn; y++)
|
||||
for (ulong x = 0; x < MapService.PixelsPerRow; x++)
|
||||
{
|
||||
if (!map.IsWall(x, y))
|
||||
continue;
|
||||
pixels.Set(x, y, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue