optimizations
This commit is contained in:
parent
419e2eb4a4
commit
d124f2c288
44 changed files with 1663 additions and 639 deletions
|
|
@ -36,6 +36,12 @@ public sealed class D2dRenderContext : IDisposable
|
|||
public ID2D1SolidColorBrush DebugTextBrush { get; private set; } = null!;
|
||||
public ID2D1SolidColorBrush TimingBrush { get; private set; } = null!;
|
||||
public ID2D1SolidColorBrush DebugBgBrush { get; private set; } = null!;
|
||||
public ID2D1SolidColorBrush ProfilerBrush { get; private set; } = null!;
|
||||
|
||||
// Rarity brushes for entity labels
|
||||
public ID2D1SolidColorBrush MagicBrush { get; private set; } = null!;
|
||||
public ID2D1SolidColorBrush RareBrush { get; private set; } = null!;
|
||||
public ID2D1SolidColorBrush UniqueBrush { get; private set; } = null!;
|
||||
|
||||
// Text formats
|
||||
public IDWriteTextFormat LabelFormat { get; } // 12pt — enemy labels
|
||||
|
|
@ -93,6 +99,10 @@ public sealed class D2dRenderContext : IDisposable
|
|||
DebugTextBrush = RenderTarget.CreateSolidColorBrush(new Color4(80 / 255f, 1f, 80 / 255f, 1f));
|
||||
TimingBrush = RenderTarget.CreateSolidColorBrush(new Color4(1f, 200 / 255f, 80 / 255f, 1f));
|
||||
DebugBgBrush = RenderTarget.CreateSolidColorBrush(new Color4(0f, 0f, 0f, 160 / 255f));
|
||||
ProfilerBrush = RenderTarget.CreateSolidColorBrush(new Color4(180 / 255f, 140 / 255f, 1f, 1f)); // light purple
|
||||
MagicBrush = RenderTarget.CreateSolidColorBrush(new Color4(0.4f, 0.53f, 1f, 1f)); // #6688FF
|
||||
RareBrush = RenderTarget.CreateSolidColorBrush(new Color4(1f, 0.93f, 0.34f, 1f)); // #FFEE57
|
||||
UniqueBrush = RenderTarget.CreateSolidColorBrush(new Color4(1f, 0.55f, 0f, 1f)); // #FF8C00
|
||||
}
|
||||
|
||||
private void DisposeBrushes()
|
||||
|
|
@ -111,6 +121,10 @@ public sealed class D2dRenderContext : IDisposable
|
|||
DebugTextBrush?.Dispose();
|
||||
TimingBrush?.Dispose();
|
||||
DebugBgBrush?.Dispose();
|
||||
ProfilerBrush?.Dispose();
|
||||
MagicBrush?.Dispose();
|
||||
RareBrush?.Dispose();
|
||||
UniqueBrush?.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue