feat(ui): port retail jump power bar
Import gmFloatyPowerBarUI LayoutDesc 0x21000072, teach the meter factory its stateful single-image shape, and project the movement-owned retail jump charge through a focused retained controller. Preserve authored resize constraints and state-managed visibility, with named-decomp pseudocode plus controller, movement, and production-DAT conformance coverage. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
27619b2328
commit
db03b4bda8
18 changed files with 3045 additions and 10 deletions
|
|
@ -18,6 +18,13 @@ public readonly record struct MovementInput(
|
|||
float MouseDeltaX = 0f,
|
||||
bool Jump = false);
|
||||
|
||||
/// <summary>
|
||||
/// Read-only presentation snapshot of retail's pending jump build. The movement
|
||||
/// controller remains the sole owner of charge timing; retained UI only projects
|
||||
/// this state into <c>gmPowerbarUI</c>.
|
||||
/// </summary>
|
||||
public readonly record struct JumpChargeSnapshot(bool IsCharging, float Power);
|
||||
|
||||
/// <summary>
|
||||
/// Result of a single frame's movement update.
|
||||
///
|
||||
|
|
@ -165,6 +172,13 @@ public sealed class PlayerMovementController
|
|||
// Jump charge state.
|
||||
private bool _jumpCharging;
|
||||
private float _jumpExtent;
|
||||
|
||||
/// <summary>
|
||||
/// Current retail jump-powerbar state. Power is always zero when no jump is
|
||||
/// pending and otherwise lies in [0,1].
|
||||
/// </summary>
|
||||
public JumpChargeSnapshot JumpCharge
|
||||
=> new(_jumpCharging, _jumpCharging ? _jumpExtent : 0f);
|
||||
// Matching v11.4186 x86 resolves GetPowerBarLevel's collapsed x87
|
||||
// operands: ATTACK_POWERUP_TIME=1.0 s, DUAL_WIELD_POWERUP_TIME=0.8 s.
|
||||
// Jump uses the same shared powerbar function, so its normal fill rate is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue