feat(chargen): Campaign CC slice CC5 — Summary page, Finish flow, RandomizeCharacter port

Fills TS-82's Summary placeholder with a faithful port of gmCGSummaryPage
(name field with NameInputFilter + the retail commit-on-focus-lost/submit
dispatch + the >32-char ID_CharGen_NameTooLong reject-and-revert path, the
REAL three-row-template listbox confirmed against the installed EoR dat
before writing any page code, and Summary's own independent gmCG3DView
preview instance wired through a second ChargenPreviewController pair
mirroring the Appearance page's exact composition shape).

Ports CharGenState::RandomizeCharacter and its six sub-primitives into
RuntimeCharacterCreationState — not approximated: the RandInt/RollDice
semantics are independently confirmed from both the decompiled RNG bodies
and the CharGenStateVtbl union struct in acclient.h. Three consumers:
the chargen screen's open-roll (retiring AP-214's honest-blank deviation
and reproducing the Appearance page's gender-flip-on-init quirk), the
Summary page's Random button (behind the retail randomize-warning
confirm), and the Appearance page's Random button (narrowing AP-212 to
just Heritage/Profession/Town's still-approximated rolls and Skills'
still-unported RandomizeSkills).

Wires the Finish button (previously ghosted) with retail's NoName/
CreditWarning dialog pair, adds the F12 amendment's HeritageOrGenderUnset
local refusal to TryBeginFinish (register AP-223) as a defensive backstop
now that the screen-open roll normally makes it unreachable, and wires
the four ID_Character_Err_* rejection dialogs for the 0xF643 response
codes CC3 already parsed but nothing displayed.

Register: TS-82 retired, AP-214 retired, AP-212 narrowed, AP-223/224/225
filed (heritage/gender Finish refusal, Summary's two-bucket skill-list
narrowing, the 32-vs-33 name-length threshold reconciliation).

Runtime 1722/0 (was 1713), App 5240/3 skips (was 5223/3), Headless 166/0
unchanged, full solution Release build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-16 00:01:07 +02:00
parent 6114b2dda2
commit 34e3a534be
22 changed files with 2217 additions and 79 deletions

View file

@ -78,6 +78,19 @@ internal sealed class RetailChargenPreviewPageVisibility : IChargenPreviewPageVi
public bool IsVisible => _runtime.IsChargenPreviewPageVisible;
}
/// <summary>Campaign CC slice CC5: the Summary page's own visibility gate —
/// same shape as <see cref="RetailChargenPreviewPageVisibility"/>, reading
/// <c>RetailUiRuntime.IsSummaryPreviewPageVisible</c> instead.</summary>
internal sealed class RetailSummaryPreviewPageVisibility : IChargenPreviewPageVisibility
{
private readonly AcDream.App.UI.RetailUiRuntime _runtime;
public RetailSummaryPreviewPageVisibility(AcDream.App.UI.RetailUiRuntime runtime) =>
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
public bool IsVisible => _runtime.IsSummaryPreviewPageVisible;
}
/// <summary>Retained-UI visibility + texture publication, mirroring
/// <c>RetailPaperdollFrameView</c>.</summary>
internal sealed class RetailChargenPreviewFrameView : IChargenPreviewFrameView

View file

@ -434,6 +434,10 @@ public sealed class GameWindow :
// viewports above.
private AcDream.App.Rendering.ChargenPreviewRenderer? _chargenPreviewRenderer;
private AcDream.App.Rendering.ChargenPreviewController? _chargenPreviewController;
// Campaign CC slice CC5: the Summary page's own gmCG3DView instance —
// a SEPARATE renderer/controller pair from the Appearance preview above.
private AcDream.App.Rendering.ChargenPreviewRenderer? _summaryPreviewRenderer;
private AcDream.App.Rendering.ChargenPreviewController? _summaryPreviewController;
// Phase D.2b Task 9 — plugin UI registrations buffered before OnLoad; drained in OnLoad.
private readonly AcDream.App.Plugins.BufferedUiRegistry? _uiRegistry;
private AcDream.App.Plugins.GraphicalPluginSession? _pluginSession;
@ -1123,6 +1127,8 @@ public sealed class GameWindow :
_creatureAppraisalFramePresenter = result.CreatureAppraisalPresenter;
_chargenPreviewRenderer = result.ChargenPreviewRenderer;
_chargenPreviewController = result.ChargenPreviewController;
_summaryPreviewRenderer = result.SummaryPreviewRenderer;
_summaryPreviewController = result.SummaryPreviewController;
_envCellFrustum = result.EnvCellFrustum;
_envCellRenderer = result.EnvCellRenderer;
_landblockPresentationPipeline = result.LandblockPipeline;
@ -1770,6 +1776,8 @@ public sealed class GameWindow :
_creatureAppraisalViewportRenderer,
_chargenPreviewRenderer,
_chargenPreviewController,
_summaryPreviewRenderer,
_summaryPreviewController,
_wbDrawDispatcher,
_envCellRenderer,
_portalDepthMask,

View file

@ -114,6 +114,14 @@ internal sealed record RenderShutdownRoots(
CreatureAppraisalViewportRenderer? CreatureAppraisal,
ChargenPreviewRenderer? ChargenPreview,
ChargenPreviewController? ChargenPreviewController,
// Campaign CC slice CC5: the Summary page's OWN gmCG3DView instance —
// same guard/shutdown shape as the Appearance-page preview above (a
// SEPARATE renderer/controller pair, not a shared one — retail's own
// gmCGSummaryPage::InitializePage @0x0047bbf0 constructs its own
// gmCG3DView, confirmed a distinct instance from the Appearance page's
// during the CC6b-MOUNT review).
ChargenPreviewRenderer? SummaryPreview,
ChargenPreviewController? SummaryPreviewController,
WbDrawDispatcher? DrawDispatcher,
EnvCellRenderer? EnvironmentCells,
PortalDepthMaskRenderer? PortalDepthMask,
@ -493,6 +501,8 @@ internal static class GameWindowShutdownManifest
() => render.CreatureAppraisal?.Dispose()),
Hard("chargen preview control", () => render.ChargenPreviewController?.Dispose()),
Hard("chargen preview viewport", () => render.ChargenPreview?.Dispose()),
Hard("summary preview control", () => render.SummaryPreviewController?.Dispose()),
Hard("summary preview viewport", () => render.SummaryPreview?.Dispose()),
Hard("mesh draw dispatcher", () => render.DrawDispatcher?.Dispose()),
Hard("environment cells", () => render.EnvironmentCells?.Dispose()),
Hard("portal depth mask", () => render.PortalDepthMask?.Dispose()),