mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-24 11:35:41 -05:00
Visually indicate dropped items instead of placed items
This commit is contained in:
@@ -84,12 +84,32 @@ private static void DrawDirectionals(int[] data, FieldItemLayer layer, int w, in
|
||||
continue;
|
||||
if (tile.IsBuried)
|
||||
DrawX(data, (x - x0) * scale, (y - y0) * scale, scale, w);
|
||||
else if (tile.IsDropped)
|
||||
DrawPlus(data, (x - x0) * scale, (y - y0) * scale, scale, w);
|
||||
else if (tile.IsExtension)
|
||||
DrawDirectional(data, tile, (x - x0) * scale, (y - y0) * scale, scale, w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawPlus(int[] data, int x0, int y0, int scale, int w)
|
||||
{
|
||||
var x0y0 = (w * y0) + x0;
|
||||
var s2 = scale / 2;
|
||||
var ws2 = w * s2;
|
||||
|
||||
var v0 = x0y0 + s2;
|
||||
var h0 = x0y0 + ws2;
|
||||
|
||||
for (int x = scale / 4; x <= 3 * (scale / 4); x++)
|
||||
{
|
||||
var vert = v0 + (w * x);
|
||||
data[vert] ^= 0x808080;
|
||||
var hori = h0 + x;
|
||||
data[hori] ^= 0x808080;
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawX(int[] data, int x0, int y0, int scale, int w)
|
||||
{
|
||||
var opposite = scale - 1;
|
||||
|
||||
Reference in New Issue
Block a user