minimap mostly done
This commit is contained in:
parent
20ef4d6fa7
commit
25257e1517
2 changed files with 13 additions and 4 deletions
|
|
@ -74,7 +74,7 @@ public class MinimapConfig
|
|||
|
||||
// Wall detection: target #A2AEE5 (blue-lavender structure lines)
|
||||
// HSV(115, 75, 229) — blue hue, low-medium saturation, bright
|
||||
public Scalar WallLoHSV { get; set; } = new(100, 25, 190);
|
||||
public Scalar WallLoHSV { get; set; } = new(110, 25, 190);
|
||||
public Scalar WallHiHSV { get; set; } = new(136, 120, 255);
|
||||
|
||||
// Connected components: minimum area to keep (kills speckle)
|
||||
|
|
|
|||
|
|
@ -241,11 +241,21 @@ public class WorldMap : IDisposable
|
|||
dstRoi.Set(row, col, (byte)MapCell.Explored); // lost confidence → demote
|
||||
}
|
||||
|
||||
// Mark fog on canvas: only overwrite Unknown (fog is soft data)
|
||||
// Mark fog on canvas: only in a ring between ExploredRadius and ExploredRadius+5
|
||||
var fogInner2 = _config.ExploredRadius * _config.ExploredRadius;
|
||||
var fogOuter = _config.ExploredRadius + 5;
|
||||
var fogOuter2 = fogOuter * fogOuter;
|
||||
|
||||
for (var row = 0; row < h; row++)
|
||||
for (var col = 0; col < w; col++)
|
||||
{
|
||||
if (srcRoi.At<byte>(row, col) != (byte)MapCell.Fog) continue;
|
||||
|
||||
var fx = srcX + col - halfSize;
|
||||
var fy = srcY + row - halfSize;
|
||||
var dist2 = fx * fx + fy * fy;
|
||||
if (dist2 < fogInner2 || dist2 > fogOuter2) continue;
|
||||
|
||||
if (dstRoi.At<byte>(row, col) == (byte)MapCell.Unknown)
|
||||
dstRoi.Set(row, col, (byte)MapCell.Fog);
|
||||
}
|
||||
|
|
@ -392,8 +402,7 @@ public class WorldMap : IDisposable
|
|||
colored.Set(r, c, new Vec3b(104, 64, 31));
|
||||
else if (v == (byte)MapCell.Wall)
|
||||
colored.Set(r, c, new Vec3b(26, 45, 61));
|
||||
else if (v == (byte)MapCell.Fog)
|
||||
colored.Set(r, c, new Vec3b(180, 140, 70)); // light blue
|
||||
// Fog not rendered — too noisy from spell effects bleeding through overlay
|
||||
}
|
||||
|
||||
var px = cx - x0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue