feat(ui): port retail creature appraisal presentation
Render assessed creatures through the shared private viewport with retail heading, bounding-box camera, and light. Build the exact authored nine-row stat list and resolve creature names from the retail EnumMapper while keeping remaining font/sequencer adaptations explicit. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
f1a7912160
commit
7eaa68a5f4
26 changed files with 2780 additions and 237 deletions
|
|
@ -11,7 +11,7 @@ internal interface IPrivatePortalViewport
|
|||
void Draw(int width, int height);
|
||||
}
|
||||
|
||||
internal interface IPrivatePaperdollFrame
|
||||
internal interface IPrivateEntityViewportFrame
|
||||
{
|
||||
void Render();
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ internal sealed class PrivatePresentationRenderer : IPrivatePresentationFramePha
|
|||
{
|
||||
private readonly IPrivatePortalViewport _portal;
|
||||
private readonly IRenderFrameFoundationSource _foundation;
|
||||
private readonly IPrivatePaperdollFrame? _paperdoll;
|
||||
private readonly IPrivateEntityViewportFrame? _entityViewports;
|
||||
private readonly IRetainedGameplayUiFrame? _gameplayUi;
|
||||
private readonly IDevToolsFrameLifecycle? _devTools;
|
||||
private readonly IPrivateFrameScreenshot? _screenshots;
|
||||
|
|
@ -43,7 +43,7 @@ internal sealed class PrivatePresentationRenderer : IPrivatePresentationFramePha
|
|||
public PrivatePresentationRenderer(
|
||||
IPrivatePortalViewport portal,
|
||||
IRenderFrameFoundationSource foundation,
|
||||
IPrivatePaperdollFrame? paperdoll,
|
||||
IPrivateEntityViewportFrame? entityViewports,
|
||||
IRetainedGameplayUiFrame? gameplayUi,
|
||||
IDevToolsFrameLifecycle? devTools,
|
||||
IPrivateFrameScreenshot? screenshots)
|
||||
|
|
@ -51,7 +51,7 @@ internal sealed class PrivatePresentationRenderer : IPrivatePresentationFramePha
|
|||
_portal = portal ?? throw new ArgumentNullException(nameof(portal));
|
||||
_foundation = foundation
|
||||
?? throw new ArgumentNullException(nameof(foundation));
|
||||
_paperdoll = paperdoll;
|
||||
_entityViewports = entityViewports;
|
||||
_gameplayUi = gameplayUi;
|
||||
_devTools = devTools;
|
||||
_screenshots = screenshots;
|
||||
|
|
@ -68,7 +68,7 @@ internal sealed class PrivatePresentationRenderer : IPrivatePresentationFramePha
|
|||
bool portalViewportVisible =
|
||||
_foundation.Foundation.PortalViewportVisible;
|
||||
_portal.Draw(input.ViewportWidth, input.ViewportHeight);
|
||||
_paperdoll?.Render();
|
||||
_entityViewports?.Render();
|
||||
_gameplayUi?.Render(
|
||||
input.DeltaSeconds,
|
||||
input.ViewportWidth,
|
||||
|
|
@ -86,6 +86,30 @@ internal sealed class PrivatePresentationRenderer : IPrivatePresentationFramePha
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ordered private creature-view presentation. Retail renders each visible
|
||||
/// <c>CreatureMode</c> before the retained 2-D tree that displays its texture.
|
||||
/// </summary>
|
||||
internal sealed class PrivateEntityViewportFrameGroup :
|
||||
IPrivateEntityViewportFrame
|
||||
{
|
||||
private readonly IPrivateEntityViewportFrame[] _frames;
|
||||
|
||||
public PrivateEntityViewportFrameGroup(
|
||||
params IPrivateEntityViewportFrame?[] frames)
|
||||
{
|
||||
_frames = frames.Where(static frame => frame is not null)
|
||||
.Cast<IPrivateEntityViewportFrame>()
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
public void Render()
|
||||
{
|
||||
foreach (IPrivateEntityViewportFrame frame in _frames)
|
||||
frame.Render();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Typed portal viewport adapter over the canonical teleport owner.</summary>
|
||||
internal sealed class LocalPlayerPortalViewport : IPrivatePortalViewport
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue