118 lines
7.7 KiB
Markdown
118 lines
7.7 KiB
Markdown
# First gadget integration review
|
||
|
||
Review of `SceneGadgets`, `ShrinkRay`, `LabSimulation`, `ShrinkRayVisuals`,
|
||
`ShrinkSoldierVisuals` and their `Program` wiring against
|
||
[shrink-ray.md](shrink-ray.md), [shrink-heading.md](shrink-heading.md) and
|
||
[shrink-targets.md](shrink-targets.md). This is a read-only source/evidence review,
|
||
not new gameplay runtime verification. It records the snapshot before the
|
||
primary's review fixes; subsequent implementation/tests must mark fixes verified.
|
||
Update during review: the primary added `ScoreAwarded`→`ChangeScore` wiring and
|
||
the source hit marker. Reading the updated code confirms ordinary +10 reaches
|
||
the score/save owner and the marker is set after the event; build/runtime checks
|
||
belong to the primary. The initial finding remains below as the reason for that fix.
|
||
|
||
## Directly evidenced callback omission
|
||
|
||
**Resolved: the initial implementation omitted the original +10 score callback.**
|
||
The initial `SceneGadgets.Input` applied `ShrinkSoldier.Shrink()` and incremented a diagnostic
|
||
hit counter without awarding persistent `SceneInteractions.Score`. Primary now
|
||
awards/persists10 and sets the reaction marker after the score event; its managed
|
||
test verifies ordering and the original-format save round-trip. Original
|
||
`42AC10..42ADB5` (raw `2AC10..2ADB5`, same guarded source identity as the ray
|
||
report) performs action/mode/timer/flag writes, then branches on the target's
|
||
ObjectTag at interface+3A0:
|
||
|
||
| Tag comparison / address | Recovered effect |
|
||
| --- | --- |
|
||
| `LIBBYPLANT`, 42AC84–42AC9B | Find `C3DLIBBY`; if found, award 100, mode 0, write 160 to complete6C4, set two action strings to WALK, and change SCENE 250→255 if currently 250. |
|
||
| `C3DDINO`, 42AD3F–42AD7E | If task DINO <10, set DINO=10 and award 300; otherwise return without those effects. |
|
||
| Every other tag, 42AD81–42ADA1 | Award 10 through42ADC0; write target complete94C/interface88C=1.0. |
|
||
|
||
`42ADC0..42ADF9` (raw `2ADC0..2ADF9`) adds with signed 32 arithmetic, clamps
|
||
negative total to 0, and for positive awards records the amount at 4F83C4 with
|
||
1.2s at 4F83C8. Existing score/save ownership belongs to `SceneInteractions`;
|
||
the shrink hit diagnostic is not a substitute. Preserve the reaction field as
|
||
an explicitly identified dependency of the still-unported enemy base/AI update;
|
||
its complete consumer semantics have not been recovered by this review.
|
||
|
||
Read-only GAM parsing confirms first-route scope:
|
||
|
||
- `level1b.gam` (lab): zero 3SOL actors.
|
||
- `VR04.gam`: three 3SOL, tags `yoke1`, `C3DYOKIANSOLDIER`, `yoke2`.
|
||
- `Level1.gam` (outside): zero 3SOL actors.
|
||
|
||
Thus all currently supported real target hits use the ordinary +10 branch,
|
||
including VR04. The callback has **no VR score exemption**. Do not apply the
|
||
energy exemption to score, invent a generic quest/objective update, or award
|
||
the special branches for every enemy of a matching class. Earlier vague
|
||
Humphrey descriptions do not identify this branch: the exact shipped string is
|
||
`C3DLIBBY` at4EF710. The apparent SE9 call at 42AC17 reaches `472970`, whose body
|
||
is `C3`/return; it is not evidence for another hit sound.
|
||
|
||
The primary's regression now checks the +10 save effect once per accepted
|
||
unshrunk target, simultaneous targets and later re-shrink after restoration,
|
||
while VR energy stays unchanged. The reaction-field consumers and unsupported
|
||
quest classes remain named limits rather than inferred combat behavior.
|
||
|
||
## Confirmed source alignment
|
||
|
||
- Owned item 3 must equal 1; equipped mode is −1 even when UI display item 3 is
|
||
highlighted. There is no positive-energy gate or projectile cadence in the scan.
|
||
- The scan is continuous while held. Current strict root height, distance<1500,
|
||
quantized original heading, no added heading seam wrap, geometry-query rejection
|
||
and multiple-hit behavior agree with the bounded source contract.
|
||
- The corrected FALL logic is sound: at 42692A an absent loop branches to426937;
|
||
`strcmp(FALL)==0` at 426948 skips the scan. With a loop present, equality at
|
||
42695F falls through stopping its handle, setting−1 and hiding the beam at
|
||
426963..426989. Other airborne actions can start/retain the loop and scan.
|
||
The port correctly blocks FALL, not all airborne poses, and reserves SHOOT for
|
||
grounded fire. Source speed608 is zeroed before this branch, including air.
|
||
- Beam position/yaw are captured when firing and rendered from that snapshot;
|
||
they should not be replaced with the player's later render-frame root. Source
|
||
copies root and full Euler at 426EF1/426F47, with no caller muzzle offset.
|
||
- Texture phases 0/1/2 use a float timer compared strictly with double0.1, advance
|
||
at most once and discard overshoot. Opacity .5 and additive drawing implement the
|
||
known global509A13=false branch. Conventional alpha is the other recovered
|
||
branch; the original settings/hardware choice is unresolved, so additive is
|
||
an explicit port policy, not a universally recovered default.
|
||
- Soldier geometry uses original WALK/SHRINK topology, actual GAM roots and an
|
||
authored nonlooping shrink morph. False selector preserves a clamped frame
|
||
ordinal; modern within-frame clock is explicitly approximate. There is no
|
||
invented uniform scale. Strict-negative expiry, WALK restart and restored
|
||
speed 200 follow the source. Radius 90/factor 1 are source defaults; reuse of the
|
||
existing scene-physics adapter remains provisional collision behavior.
|
||
|
||
## Material bounded differences and next checks
|
||
|
||
1. **Energy audio:** direct subtraction/clamp in `SceneGadgets.Input` matches the
|
||
scalar part of42A920, but omits its empty-crossing SFX80 and low-energy SFX182
|
||
latch/hysteresis (<19 to set, >20 to clear). VR04 masks this omission through
|
||
its energy exemption. Share the energy-adjust lifecycle before claiming source
|
||
fidelity outside VR04; do not add an unsupported energy>0 firing restriction.
|
||
2. **Full Euler:** the effect and wall endpoint use only yaw. Source copies all
|
||
Euler components. This is bounded by the present upright controlled-player
|
||
model; source pitch/roll behavior and generic Euler normalization remain a
|
||
dependency. Preserve full snapshots when that orientation model is implemented.
|
||
3. **Eligibility:** both source defaults are now confirmed. Generic constructor
|
||
46FDDF (raw 6FDDF) pushes 1, then46FDE3 calls471030. That setter writes authored
|
||
+16 at471037 and dispatches slot 214 at47103A; soldier game vtable4C19C4+214
|
||
contains471A00, whose471A04 writes live interface13E. Yokian constructor44A94F
|
||
(raw 4A94F) writes complete958/interface898=true;44A905 clears shrunk. Actual
|
||
soldier constructor44BF32 calls shared44A730; loader44C0B0 does not override
|
||
these flags. This agrees with the prior guarded body-composition finding
|
||
integration210/live13E=true. The current default-true candidates cover these
|
||
initialized actors under the no-AI boundary, but do not mirror later setters.
|
||
Actual VR04 GAM CanMove1 is the separate animated-object58C field; do not
|
||
equate it, generic `Actor.Active`, or visibility to the source body/shrink gates.
|
||
4. **Scope/ordering:** soldier AI, shared enemy reaction-field consumers, full
|
||
registry scheduling and hidden-owned-effect initialization remain outside this
|
||
first interaction. The modern step order is an implementation partial order;
|
||
standalone or rendered smoke success does not verify the original game's
|
||
complete update order. A native Windows walkthrough still needs hold/release,
|
||
jumping/FALL interruption, a wall-blocked target and 30s restoration checks.
|
||
|
||
No additional runtime changes were made by this review. Existing complete REA
|
||
Evidence/source guards are reused; unavailable source42AC10 decompilation was
|
||
not retried. Exact callback branches above were cross-checked against the guarded
|
||
original instruction range and source string bytes.
|