148 lines
9.9 KiB
Markdown
148 lines
9.9 KiB
Markdown
# First playable gadget implementation
|
||
|
||
Historical first slice. [Invisible continuation](invisible-implementation.md)
|
||
supersedes its unimplemented Invisible/shared energy-warning items; other limits
|
||
below remain scoped to the recorded2026-10-27 implementation.
|
||
|
||
2026-10-27. User-directed gameplay continuation; collision checkpoint35a2a66/
|
||
0272f7b remains parked. This implements the original gadget screen and the combined
|
||
shrink-ray/jetpack device, with a bounded3SOL target consumer. It does not complete
|
||
the other seven special gadget modes, enemy combat/AI or original runtime comparison.
|
||
|
||
## Evidence and state ownership
|
||
|
||
The independent reports retain hashes, preferred VAs, mapped file offsets,
|
||
structures, callers, resource identities, REA Evidence and provider limitations:
|
||
|
||
- [Controls](gadget-controls.md):425870 keys/latch,425EF0/425B20 panel ownership,
|
||
427370 selection, exact rectangles/availability and eight practice destinations.
|
||
- [Assets](gadget-assets.md):54 exact screens.omt canvases; original tile labels,
|
||
models, morphs and sound resources. Blue c tiles are unused by recovered group0.
|
||
- [Primary fire](shrink-ray.md):426030/426E40 continuous scan, owned item3/raw
|
||
mode−1, energy−dt, strict target/obstruction gates,42AC10 callback and owned beam.
|
||
- [Heading](shrink-heading.md): original quantized heading;15 copied-DLL numeric
|
||
references and65,540 bin/quadrant cases match managed code, fingerprint24e64f91.
|
||
- [Targets](shrink-targets.md): actual3SOL constructor/load, radius90/factor1,
|
||
WALK/SHRINK clips, nonloop endpoint, authored/reset versus previous dynamic mode.
|
||
- [Blending](gadget-blending.md): source half opacity and blend enum conversion;
|
||
opaque/alpha/additive rendering implementation and explicit depth-write policy.
|
||
- [Review](gadgets-review.md): independent code/evidence review; missing ordinary
|
||
+10 callback corrected, eligibility defaults and remaining limits recorded.
|
||
|
||
Menu display item3 and equipped-mode word are separate. Selecting SHRINK RAY
|
||
closes the panel, cleans old special mode and leaves normal raw mode−1; item3
|
||
ownership also gates jetpack. SceneInventory.SelectedGadget remains the port's
|
||
display/request index; PlayerSceneBinding normalizes3 to raw mode−1. Existing
|
||
retained route state remains bounded to default device display−1/3.
|
||
|
||
## Implemented behavior
|
||
|
||
GadgetScreen/GadgetMenuOverlay use the original640×480 background, owned idle/
|
||
hover tiles and buttons, with uniform centered widescreen scale and inverse
|
||
pointer mapping. Tab/Space shares a held-key latch. First Tab unequips a special
|
||
mode, next opens. Escape/Return closes; mouse or Enter/Ctrl/jump buttons activates.
|
||
Arrows steer the pointer through the recovered accumulated80×dt offsets. Raw0/4
|
||
cannot hit; raw3 suppresses green hover. Current route0/1/4 rendering is recovered;
|
||
inherited raw2/3 idle visibility uses a declared owned-white port fallback.
|
||
|
||
Practice arm/choose loads the selected original tutorial directly, independently
|
||
of the pickup's Yes/No prompt. It rejects VR01..08 and SCENE>=500; runtime practice/
|
||
Return slots are not serialized in TSK. Selection observers see the panel closed.
|
||
Input capture clears held movement/jump/fire and preserves Space cutscene skip
|
||
when the panel cannot open. New SFX requests use the source panel gate; music
|
||
continues. Pausing all port gameplay/morph timers during the panel is broader than
|
||
the recovered body-enable/game168 leaves, and remains an explicit modern policy.
|
||
|
||
LabSimulation invokes gadget input in its existing fresh/retained input phase.
|
||
Grounded fire clears controller speed before movement apply and selects original
|
||
SHOOT. The ordinary FALL branch hides/stops the ray. Ray ownership requires
|
||
inventory(0,3)==1/raw mode−1; invalid ownership clicks117 once until release.
|
||
Held ordinary ray uses looping SFX0, spendsdt energy even without a hit and is
|
||
energy-exempt in VR01..08. Existing powered jump/fire remains independent.
|
||
|
||
ShrinkRay implements the continuous registry-order multi-target scan: body and
|
||
shrink-enable flags, not already shrunk, strict1500 distance, strict Y−150/+60,
|
||
strict quantized heading within yaw±5 with no added seam wrapping, and no accepted
|
||
source47C210 static-wall hit. The caller currently supplies only original3SOL
|
||
soldiers in LV1B/VR04/LEV1; only VR04 actually contains those actors.
|
||
|
||
Each ordinary hit requests SHRINK, sets mode5, timer30 and shrunk flag, awards10
|
||
through SceneInteractions and then writes the reaction marker. Score persists in
|
||
original-format snapshots. Already-shrunk targets do not receive repeated awards.
|
||
LIBBYPLANT/C3DDINO quest branches remain outside this3SOL consumer. Timer updates
|
||
preserve the source >0 decrement/<0 expiry edge, including exact-zero retention.
|
||
Expiry restores authored/reset AIState (VR04=2), not the pre-hit dynamic mode,
|
||
clears the marker and selects looping WALK/speed200.
|
||
|
||
Original soldier WALK/SHRINK geometry uses soldatak's matching original UV topology;
|
||
walk/shrink ASE files contain no UVs. Source SHRINK holds its last authored frame
|
||
(55.1186 high), without invented uniform scaling. The transition preserves frame
|
||
ordinal; exact within-frame clock preservation remains open. Source roots and
|
||
units are retained. Soldier body settling uses the existing provisional NPC
|
||
support/wall adapter with recovered90/1, not a claim of complete enemy physics.
|
||
|
||
The owned RAY mesh follows the captured player root/upright Euler without invented
|
||
muzzle offsets, lifetime or cooldown. Three source textures switch at the recovered
|
||
float-accumulator >double0.1 boundary, discarding overshoot. Source alpha0.5 is
|
||
applied once, not as geometric scale. Additive SrcAlpha/One is the chosen recovered
|
||
graphics branch; the source graphics-option predicate is still open. Generic alpha
|
||
SrcAlpha/OneMinusSrcAlpha is also implemented. Blended world depth-write disabled
|
||
and inherited cutout behavior are explicit rendering policies, not full legacy
|
||
material-state recovery. Opaque defaults and UI ordering are regression checked.
|
||
|
||
## Verification
|
||
|
||
Full scripts/test.sh passes157 Python checks,2 HUD tests, all managed suites,
|
||
29 game GPU completions and17 isolated Vulkan blend/readback checks with zero
|
||
enabled validation errors. Fifteen gadget groups cover menu/state/viewport,
|
||
source target gates, phase clock, held/release/energy/sound, authored morph hold,
|
||
score callback order and TSK persistence. Heading covers the65,540 original-DLL
|
||
references separately.539 original files remain unchanged.
|
||
|
||
Final source close-before-selection and authored-mode corrections pass the
|
||
complete final suite in integration-final.log; the latter distinguishes pre-hit
|
||
dynamic7 from restored authored2. No old numeric body/controller result changed.
|
||
|
||
Native Linux GTX1070/private Xvfb passes gadget-menu input at1920×1080 and ray
|
||
input at1280×720, with zero validation errors. Menu24 frames verify shared
|
||
Tab/Space edge, pause, Escape, select without leaking fire, Practice, Return and
|
||
stable root. Ray90 frames hits an actual VR04 yoke1 once, holds its authored small
|
||
pose, cycles all three textures and retains VR energy20.
|
||
Final source replay logs are native/menu-final.log and native/shrink-final.log.
|
||
|
||
The ray smoke explicitly moves the player near an actual authored soldier after
|
||
body settling. It does not invent/relocate targets or claim input navigation to
|
||
their high platforms, patrol/combat AI, or original visual parity. Saved mesh
|
||
height is a port animation observation; GPU readbacks verify rendered output and
|
||
material behavior. Logs/readbacks are in artifacts/gadget-implementation/ and
|
||
artifacts/gadget-blending/. Windows cross-publish/native runtime remain distinct.
|
||
|
||
Both distribution packages identify clean source7b5230c (source_dirty=no).
|
||
Publication succeeds for linux-x64 and win-x64; NU1900 records unavailable package
|
||
vulnerability metadata. Resource checks find54 menu canvases and soldier/VR
|
||
soldier/ray/SHOOT manifests in both packages. Standalone Linux from /tmp passes
|
||
the1920×1080 menu and90-frame VR04 ray fixtures in package-menu.log/package-ray.log;
|
||
release validation layers are unavailable. All539 original hashes verify again
|
||
after packaging. Preserved baseline packages remain untouched. Native Windows
|
||
gadget behavior is not agent-verified.
|
||
|
||
## Remaining work
|
||
|
||
| System | Recovered contract | Current port / remaining boundary |
|
||
| --- | --- | --- |
|
||
| Selection | Group0, eight cards, display3 versus raw−1, close before select | Implemented; inherited raw2/3 art visibility is a declared fallback |
|
||
| Practice | Selected item→VR01..08, disabled in tutorials/SCENE>=500 | Implemented through existing departure/RETURN state |
|
||
| Primary ray | Owned item3==1, continuous held scan, FALL interruption | Implemented in first-route scenes; full Euler/retained owned-effect lifecycle open |
|
||
| Energy/audio | Energy−dt, VR exemption, loop0, invalid117, warning80/182 | Scalar/loop/invalid implemented; warning latch and broader sound lifecycle open |
|
||
| Soldier hit | Strict target gates, SHRINK/mode5/timer30, +10 then marker | Actual VR04 3SOL implemented; later eligibility setters/AI and special quest classes open |
|
||
| Restore/animation | Strict-negative expiry, authored AI mode, WALK200, nonloop SHRINK | Implemented; exact fractional morph clock and full NPC physics remain provisional |
|
||
| Rendering | Original mesh/textures, opacity.5, two blend branches | Tested additive choice; graphics-option predicate/full material state open |
|
||
| Timing/ownership | Body enable and SFX gate on menu, original input phase | Existing phase bridge used; full-panel pause is modern policy, complete scheduler open |
|
||
|
||
Other gadget effects/equip cleanup, full soldier AI/reaction consumers and
|
||
dynamic collision; score popup and other quest targets; low/empty energy audio
|
||
latches; owned-ray retention across loads; exact full-Euler/render root and morph
|
||
phase; complete menu/music/software-clock lifecycle; original whole-game and
|
||
native Windows verification. These are bounded follow-ups, not reasons to replace
|
||
recovered source rules with invented cooldowns, damage, colliders or uniform shrink.
|