test
This commit is contained in:
parent
152c74fa15
commit
5e1b5c2a48
10 changed files with 211 additions and 150 deletions
|
|
@ -198,6 +198,7 @@ public sealed class D2dOverlay
|
|||
ShowHudDebug: _bot.Store.Settings.ShowHudDebug,
|
||||
ShowLootDebug: showLoot,
|
||||
LootLabels: _bot.LootDebugDetector.Latest,
|
||||
FightPosition: _bot.BossRunExecutor.FightPosition,
|
||||
Fps: fps,
|
||||
Timing: timing);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public record OverlayState(
|
|||
bool ShowHudDebug,
|
||||
bool ShowLootDebug,
|
||||
IReadOnlyList<LootLabel> LootLabels,
|
||||
(double X, double Y)? FightPosition,
|
||||
double Fps,
|
||||
RenderTiming? Timing);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,18 @@ internal sealed class D2dEnemyBoxLayer : ID2dOverlayLayer, IDisposable
|
|||
|
||||
rt.DrawTextLayout(new System.Numerics.Vector2(labelX, labelY), layout, ctx.Cyan);
|
||||
}
|
||||
|
||||
// Fight position — red circle on screen where the fight area is
|
||||
if (state.FightPosition is var (fx, fy))
|
||||
{
|
||||
const double worldToScreen = 835.0 / 97.0; // inverse of screenToWorld
|
||||
const int screenCx = 1280, screenCy = 720;
|
||||
var wp = state.NavPosition;
|
||||
var sx = (float)(screenCx + (fx - wp.X) * worldToScreen);
|
||||
var sy = (float)(screenCy + (fy - wp.Y) * worldToScreen);
|
||||
var ellipse = new Ellipse(new System.Numerics.Vector2(sx, sy), 40f, 40f);
|
||||
rt.DrawEllipse(ellipse, ctx.Red, 3f);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue