mirror of
https://github.com/kwsch/NHSE.git
synced 2026-10-01 14:26:38 -05:00
Move gene value check
negligible speed ++ lul
This commit is contained in:
@@ -102,6 +102,8 @@ private static void DrawDirectionals(int[] data, ItemLayer layer, int w, int x0,
|
||||
tile = layer.GetTile(x - tile.ExtensionX, y - tile.ExtensionY);
|
||||
}
|
||||
var geneValue = ((uint)tile.Genes >> (geneIndex * 2)) & 3;
|
||||
if (geneValue == 0)
|
||||
continue;
|
||||
DrawGene(data, (x - x0) * scale, (y - y0) * scale, scale, w, geneValue, geneIndex);
|
||||
}
|
||||
}
|
||||
@@ -110,8 +112,6 @@ private static void DrawDirectionals(int[] data, ItemLayer layer, int w, int x0,
|
||||
|
||||
private static void DrawGene(int[] data, int x0, int y0, int scale, int w, uint geneValue, int geneIndex)
|
||||
{
|
||||
if (geneValue == 0)
|
||||
return;
|
||||
|
||||
var c = ShiftToGeneCoordinate(ref x0, ref y0, scale, geneIndex);
|
||||
FillSquare(data, x0, y0, scale / 2, w, c, geneValue == 3 ? 1 : 2);
|
||||
|
||||
Reference in New Issue
Block a user