Fix lab cutscene control, landing steering, clipping and objective timeout
This commit is contained in:
1 parent
976e677019
commit
ca08c468ba
33 files changed
+871
-64
No files matched your search
@@ -46,8 +46,9 @@ velocityXZ = forward(yaw)*speed + right(yaw)*sideSpeed
|
||||
|
||||
Source friction is0.8. Air sideSpeed lacks the additional ground dt factor;
|
||||
ground437CDx uses (turnRate*(1-friction)*speed/45+keyboardSide)*dt instead.
|
||||
The port now preserves the shared turn-rate field through landing and clears it
|
||||
on scene reset. Air input's destination yaw is current yaw (439E2B), so the ground
|
||||
Correction:437B9E..437BAC clears the shared turn field on grounded/released
|
||||
input. Its receiver is the game interface, so interface+614 is complete+6D4.
|
||||
The port now clears it at this boundary and on scene reset. Air input's destination yaw is current yaw (439E2B), so the ground
|
||||
keyboard target offset does not override its direct yaw update.
|
||||
|
||||
AirSteering.cs translates this keyboard subset. LabSimulation calls it while
|
||||
@@ -83,3 +84,18 @@ with identical403.88 powered travel and grounded position. Linux reports zero
|
||||
validation errors; Wine validation is disabled. Logs: artifacts/package-jetpack-steering.log
|
||||
and artifacts/windows-jetpack-steering-package/wine.log. Native Windows remains
|
||||
unverified by the agent. All539 original hashes still match.
|
||||
|
||||
|
||||
## Ground-turn cancellation correction
|
||||
|
||||
User feedback after the first air-input fix identified intermittent slow turning
|
||||
with all jump buttons. The previous integration incorrectly retained TurnRate
|
||||
on the ground: an air turn of-30 could cancel most of the opposing+37deg/sec
|
||||
walking turn. The original outer reset437B9E..437BAC clears jump state, mode and
|
||||
interface+614 (complete+6D4). The port now performs that grounded/released-jump
|
||||
reset before ground steering. A17th movement group reproduces opposing air turns
|
||||
landing into left/right ground input and requires the full source turn rate.
|
||||
A third source-byte regression guards all20 reset bytes and pointer displacement.
|
||||
All five SDL bindings (left/right Shift, Insert, keypad0, right mouse) also pass
|
||||
identical300-frame powered steering replays, each403.88 travel. No button-specific
|
||||
turn multiplier is introduced. Original global update phase order remains open.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Original geometry clipping overrides
|
||||
|
||||
User testing reported a visible distance clipping plane during gameplay which
|
||||
disappears in orbit inspection. The port selected10000 only forLV1B and3200 for
|
||||
every other level.3200 is the OMediaLayer constructor default, not the original
|
||||
gameplay setting for those levels. The following static recovery reads original
|
||||
Neutron.exe only; original-game visual comparison remains separate.
|
||||
|
||||
Neutron.exe SHA-256: f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8.
|
||||
EXE text file offsets equal VA minus0x400000 in these ranges.
|
||||
|
||||
## Original setup and decisive regression
|
||||
|
||||
OMediaLayer ctor DLL1004D340 initializes near20, far3200, FOV0xAAA OMT angle
|
||||
units (59.9853515625 degrees). Game geometry layers are globals509A30/509A3C;
|
||||
their far field is+0xC0. Original level complete-object RTTI/vtables identify
|
||||
initializer virtualB4, whose stores below override those constructor values.
|
||||
The near20 and FOV are retained. Sky layer509A38 has its own1000000 far plane;
|
||||
this helper does not introduce missing sky rendering or sky-specific states.
|
||||
|
||||
Outside LEV1 initializer450580 writes float28000 at45086F to geometry layer
|
||||
509A3C. VR04 initializer456AD0 writes50000 at456C04/456C4A to both geometry
|
||||
layers. A gameplay3200 far plane therefore clips valid original terrain and
|
||||
props in both scenes. Orbit used scene-size-derived far=radius*20 and masked
|
||||
the wrong gameplay range rather than correcting the scene setting.
|
||||
|
||||
Original level1 geometry spansX[-11080.31,34316.65],Y[-546.06,19685.04],
|
||||
Z[-18442.92,26509.07]; VR04 spansX[-6273.61,4535.86],Y[-2.03,7815.47],
|
||||
Z[-7364.04,2746.19]. Geometry bounds corroborate the impact but are not used
|
||||
as a substitute for the recovered original clipping values.
|
||||
|
||||
## Recovered initial geometry-layer far limits
|
||||
|
||||
All35 registered level initializers were inspected. This includes3B/E records
|
||||
without establishing their normal-gameplay use. Values are world units. An
|
||||
unwritten layer retains its constructor3200.
|
||||
|
||||
| Original class / GAM code | Initializer VA | Layer509A30 far | Layer509A3C far | Store VAs |
|
||||
| --- | --- | --- | --- | --- |
|
||||
|CLevel01AGame / LV1A|0x44f0e0|5000|5000|0x44f210, 0x44f256|
|
||||
|CLevel01BGame / LV1B|0x44f4b0|10000|10000|0x44f5a5, 0x44f5b1|
|
||||
|CLevel01CGame / LV1C|0x44f7e0|10000|10000|0x44f896, 0x44f8a2|
|
||||
|CLevel01DGame / LV1D|0x44fb00|120000|120000|0x44fc35, 0x44fc41|
|
||||
|CLevel01EGame / LV1E|0x44fe30|120000|120000|0x44ff65, 0x44ff71|
|
||||
|CLevel01FGame / LV1F|0x450160|15000|15000|0x4502da, 0x4502f2|
|
||||
|CLevel01Game / LEV1|0x450580|3200|28000|0x45086f|
|
||||
|CLevel02AGame / LV2A|0x450ab0|3200|3500|0x450c21|
|
||||
|CLevel02BGame / LV2B|0x450e30|50000|50000|0x45112d, 0x451173|
|
||||
|CLevel02Game / LEV2|0x4513e0|3200|50000|0x4516b2|
|
||||
|CLevel03AGame / LV3A|0x451890|3200|80000|0x451a3e|
|
||||
|CLevel03BGame / LV3B|0x451c50|40000|40000|0x451e06, 0x451e29|
|
||||
|CLevel03CGame / LV3C|0x452030|40000|40000|0x4521e6, 0x452209|
|
||||
|CLevel03DGame / LV3D|0x452410|40000|40000|0x4525c6, 0x4525e9|
|
||||
|CLevel03EGame / LV3E|0x4527f0|40000|40000|0x4529a6, 0x4529c9|
|
||||
|CLevel03Game / LEV3|0x452c20|40000|40000|0x452dd7, 0x452dfa|
|
||||
|CLevel04AGame / LV4A|0x453060|10000|10000|0x45320a, 0x45322d|
|
||||
|CLevel04BGame / LV4B|0x4534c0|7200|7200|0x4535bd, 0x45364c|
|
||||
|CLevel04CGame / LV4C|0x453b10|30000|30000|0x453dfb, 0x453e1e|
|
||||
|CLevel04DGame / LV4D|0x454070|10000|10000|0x45421a, 0x45423d|
|
||||
|CLevel04Game / LEV4|0x4544a0|30000|30000|0x4546d6, 0x4546f9|
|
||||
|CLevel05AGame / LV5A|0x454960|16000|16000|0x454a94, 0x454ad6|
|
||||
|CLevel05BGame / LV5B|0x454ce0|16000|16000|0x454e14, 0x454e56|
|
||||
|CLevel05Game / LEV5|0x4550b0|12000|12000|0x455242, 0x455288|
|
||||
|CLevel06AGame / LV6A|0x4554e0|4000|4000|0x455614, 0x455656|
|
||||
|CLevel06Game / LEV6|0x4558b0|4000|4000|0x4559e4, 0x455a26|
|
||||
|CLevel07Game / LEV7|0x455c80|10000|10000|0x455dff, 0x455e41|
|
||||
|CLevelVR01 / VR01|0x456050|50000|50000|0x456184, 0x4561ca|
|
||||
|CLevelVR02 / VR02|0x4563d0|50000|50000|0x456504, 0x45654a|
|
||||
|CLevelVR03 / VR03|0x456750|50000|50000|0x456884, 0x4568ca|
|
||||
|CLevelVR04 / VR04|0x456ad0|50000|50000|0x456c04, 0x456c4a|
|
||||
|CLevelVR05 / VR05|0x456e50|50000|50000|0x456f84, 0x456fca|
|
||||
|CLevelVR06 / VR06|0x4571d0|50000|50000|0x457304, 0x45734a|
|
||||
|CLevelVR07 / VR07|0x457550|50000|50000|0x457684, 0x4576ca|
|
||||
|CLevelVR08 / VR08|0x4578d0|50000|50000|0x457a04, 0x457a4a|
|
||||
|
||||
## Implementation boundary
|
||||
|
||||
Application/SceneProjection.cs supplies FarPlane(code) and CreateGameplay(code,
|
||||
aspect). CreateGameplay returns the original positive-Z,0..1 depth perspective;
|
||||
the existing caller applies Vulkan viewport Y flip. Code lookup is case-insensitive.
|
||||
Unknown/model-only contexts retain the original generic3200 default.
|
||||
|
||||
The current port merges both geometry layers into one draw collection. Where the
|
||||
original layers differ, it uses their larger far limit. That is an explicit port
|
||||
policy which prevents truncating the layer with the longer original range; exact
|
||||
per-layer clipping/masks still require recovered render-layer assignments.
|
||||
|
||||
LV4B is a known dynamic exception: initial7200 is stored4535BD/45364C. Task
|
||||
callback453690 sets flag+530 when task value1; update4536C0 then animates far
|
||||
using12000+19000*timer at453780..453792/453811..453829, finally setting22000
|
||||
at45388A..45389E. The standalone helper returns the initial7200 only; task-
|
||||
driven fog/color/clip animation is not implemented by this static mapping.
|
||||
|
||||
## Verification
|
||||
|
||||
ProjectionTests guard exact original outside and VR04 layer-store instructions,
|
||||
map every supplied GAM code, check depth0/1 endpoints for all ranges, preserve
|
||||
generic fallback and reject invalid aspect ratios. A real outside source camera
|
||||
and source geometry regression counts vertices which fit the original28000
|
||||
frustum but were cut by the old3200 far plane:3844 vertices are recovered in
|
||||
the real LEV1/level1 source view. All three managed groups pass.
|
||||
Runtime GPU/readback integration
|
||||
belongs to primary; these checks do not by themselves establish rendered fidelity.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Carl's lab conversation control handoff
|
||||
|
||||
User testing found Jimmy remained controllable during the lab's ending Carl
|
||||
conversation. Static original evidence: LV1B neutron1a is a five-shot3MCA with
|
||||
PlayerControlled=JIM1 and NextTrigger=carlwalk. The earlier interpreter applied
|
||||
PlayerControlled at activation, prematurely granting the saved completion target.
|
||||
|
||||
Original MCA activation431280 chooses the first valid CameraTarget. When an
|
||||
actor currently owns control,431502..43159E performs actor preparation, then
|
||||
43159E..4315A7 calls game virtual118(NULL). The original game setter475A40 simply
|
||||
assigns global controlled entity5099E4. The multi-camera completion4311F0..431228
|
||||
reads PlayerControlled and applies its none/NULL/named-target semantics at the end.
|
||||
JIM1 in neutron1a therefore restores Jimmy after the conversation, not before it.
|
||||
|
||||
SceneDirector.StartMulti no longer applies the completion field. Each valid MCA
|
||||
shot clears ControlledTag, and FinishMulti retains the recovered restoration.
|
||||
Program's existing simulation gate therefore suppresses walking/turning/jumping
|
||||
throughout the conversation. Camera, actor/patrol and dialogue clocks continue;
|
||||
Escape/Space skips while preserving authored follow-up actions.
|
||||
|
||||
DirectorTests now execute the real neutron1a with natural and skipped completion,
|
||||
assert control is absent through every active shot, restored afterward, and guard
|
||||
the exact original43159E instruction sequence. Interaction tests retain the
|
||||
pre-dialogue score150/SCENE60 side effects. A60-frame headless runtime check
|
||||
(--smoke-carl-cutscene) holds move/turn/jump requests and records zero simulation
|
||||
steps with active neutron1a and zero Vulkan validation errors. This source/contact
|
||||
smoke does not replace live navigation or original-game comparison.
|
||||
|
||||
The user separately confirms lab -> tutorial -> lab -> outside is reachable in
|
||||
their tested build. Platform and exact checkpoint-return-position fidelity were
|
||||
not specified by that report; do not infer complete native-platform/original
|
||||
fidelity from transition reachability alone.
|
||||
@@ -0,0 +1,107 @@
|
||||
# Objective pad timeout, slide and O key
|
||||
|
||||
Read-only Neutron.exe recovery plus managed regression checks. Original text VAs
|
||||
below correspond to file offsets VA-0x400000. This fixes the earlier stationary
|
||||
HUD approximation; original-game/runtime visual comparison remains separate.
|
||||
|
||||
## Timer and phases
|
||||
|
||||
Objective selector4F8194 is distinct from animation timer4F8188.406F50 ignores
|
||||
nonpositive selectors; for a positive selector it clears44 flags, stores selector,
|
||||
resets timer0 at406F76 and enables the selected flag. Initial UI4018A8 and Jimmy
|
||||
PostLoad423EC6 set timer20, so merely loading a saved positive selector does not
|
||||
prove that its popup should initially appear.
|
||||
|
||||
4043D9 checks current controlled entity5099E4 againstNULL. Only a non-null entity
|
||||
advances the timer by elapsed seconds at4043E5..4043F1 and invokes407070 through
|
||||
virtual4D0. No controlled entity takes40447A..4044BD, hiding objective art and
|
||||
leaving the timer unchanged. The test is for any controlled entity, not necessarily
|
||||
Jimmy; cutscene control policy must be supplied separately by the caller.
|
||||
|
||||
407070 uses these phases (source floats retain their original widths):
|
||||
|
||||
| Timer t | Pad | Objective art/digit | Pad vertical offset from stationary layout |
|
||||
| --- | --- | --- | --- |
|
||||
| t<0.7 | Visible | Hidden | (1-t*1.4285714626312256f)*100 |
|
||||
| 0.7<=t<7 | Visible | Visible |0|
|
||||
|7<=t<8.7 | Visible | Hidden |(t-7)*1.4285714626312256f*100|
|
||||
|t>=8.7 | Hidden | Hidden |No draw|
|
||||
|
||||
Entry threshold0.7 is48D974; reciprocal scale is48D970; distance100 is48D96C.
|
||||
Stationary end is signed integer7 at4EC498. Exit draw window ends at7+1.7f,
|
||||
with1.7 at48D940. The longer exit draw window means the pad can already leave
|
||||
the viewport before the branch finally stops drawing it.
|
||||
|
||||
Pad top-left is x384,y=380+self[4EC]+slideOffset. Stationary art is
|
||||
x384,y=448+self[4EC] (plus15 per visible row), digit x393,y=450+self[4EC].
|
||||
Entry4070FD..407138 draws only the pad. Stationary4071BA..407247 shows selected
|
||||
flags, digit and pad. Exit407266..40727E hides the44 objective art elements,
|
||||
then407280..4072C4 draws the departing pad. At equality8.7 the40725F test exits.
|
||||
|
||||
Entry sets self[4E8] and emits effect216 once at4070BA..4070CA. Stationary
|
||||
4071BA clears that latch. Resetting the timer while still entering therefore
|
||||
does not necessarily replay the sound; ObjectivePanel retains this distinction.
|
||||
|
||||
## O opens/closes the pad, separate from gadget layout
|
||||
|
||||
407071 reads509887, which is virtual key'O' (4F) plus the recovered keyboard
|
||||
array509838. Controller flag509AC9 joins that condition.4F7C30 is its edge latch:
|
||||
no input clears the latch at40708F; a newly held input sets it at40715B.
|
||||
|
||||
On that edge40714F..407198:
|
||||
|
||||
- If timer is nonnegative and less than7, set it to7 and begin slide-out.
|
||||
- Otherwise reset it to0 and begin slide-in.
|
||||
- Holding the input does not repeat the toggle. Release then press creates a new edge.
|
||||
|
||||
The previous port used O to toggle layout offset-69/0. Original helpers406590
|
||||
and406650 do change that offset and recreate/hide other gadget UI resources,
|
||||
but407070's O branch does not call those helpers. O must control the timer instead.
|
||||
The current objective consumer retains layoutOffset=-69; other gadget layout
|
||||
transitions remain a separate system.
|
||||
|
||||
## Practice/pause policy
|
||||
|
||||
While a practice modal is active (excluding source type12),4044D7..404504 sets
|
||||
the timer to7+1.7 and hides pad and art. No404D97 resets the timer to0, so dismissing
|
||||
practice can explicitly reopen the current objective. This is distinct from
|
||||
pausing the timer because no controlled actor exists. Focus/inspection/global
|
||||
UI-pause scheduling is a caller policy until the complete original UI loop is
|
||||
recovered; the component accepts explicit elapsed seconds and gating arguments.
|
||||
|
||||
## Component and integration API
|
||||
|
||||
`Game/ObjectivePanel.cs` owns only this presentation state:
|
||||
|
||||
```
|
||||
var panel = new ObjectivePanel(currentSelector, layoutOffset: -69);
|
||||
interactions.ObjectiveChanged += panel.Select;
|
||||
// Each active UI tick; pass the actual held O state only when UI input is allowed.
|
||||
panel.Key(oHeld);
|
||||
panel.Step(seconds, hasControlledActor, modalActive);
|
||||
// Pad and content need independent draw visibility.
|
||||
panel.PadVisible; panel.ContentVisible; panel.YOffset;
|
||||
// On practice No, matching404D97:
|
||||
panel.Show();
|
||||
```
|
||||
|
||||
`Select(positive)` resets timing even when selector is unchanged. Nonpositive
|
||||
assignments are the recovered no-op. The current renderer has one selected lab
|
||||
objective instead of all44 independent flags; selector0 deliberately shows no
|
||||
invented art/digit. `SoundEffect` emits216 at the source entry latch. Constructor
|
||||
layout bounds and selectors above43 reject malformed caller input.
|
||||
|
||||
## Verification
|
||||
|
||||
`source scripts/env.sh`, then:
|
||||
|
||||
```
|
||||
dotnet run --project tests/GamePort.ObjectiveTests -- ../Original
|
||||
```
|
||||
|
||||
Six groups pass: exact original constants/instructions; entry/hold/exit positions
|
||||
and boundary equality; O edge/hold/reopen/layout separation; repeated selector
|
||||
assignments and0 no-art; controlled-entity/modal/pause lifecycle; source sound
|
||||
latch plus malformed inputs. The tests compare original Neutron.exe bytes at
|
||||
seven decisive timer/input/visibility sites. No original file is modified or
|
||||
executed. Renderer composition/native runtime tests belong to primary integration.
|
||||
+6
-6
@@ -26,16 +26,16 @@ y=`448 + self[4EC] + visibleRow*15`. `407070` renders the pad at x384,
|
||||
y=`380+self[4EC]` during its stationary phase and prints selector `%d`
|
||||
(`4EC794`) at (393,450+offset), font tag SMAL (`534D414C`). `401F9D`
|
||||
initializes offset=-69; `406590` changes -69 to0, while `406650` changes0 to-69.
|
||||
These source paths toggle vertical layout and other gadget UI, not a simple
|
||||
objective visibility bit. The pad extends beyond the640x480 reference viewport;
|
||||
These source paths toggle vertical layout and other gadget UI. They are separate
|
||||
from O, whose recovered timer toggle is documented in objective-timing.md. The pad extends beyond the640x480 reference viewport;
|
||||
retain clipping rather than repositioning it to fit.
|
||||
|
||||
`406F50(index,flag)` only accepts index>0: it clears44 dword flags at4F7D00,
|
||||
sets selector4F8194, resets animation timer4F8188, then enables the selected
|
||||
entry. It does not map selector0 to objective1. The source has sliding/timed
|
||||
objective presentation; the consumer currently renders its stationary geometry
|
||||
under caller-controlled visibility. Animation and exact source visibility timing
|
||||
are not yet implemented.
|
||||
entry. It does not map selector0 to objective1. The source has sliding/timed objective presentation, now implemented by
|
||||
Game/ObjectivePanel.cs:0.7-second entry, stationary until7 seconds, exit until8.7.
|
||||
Pad and content have independent visibility. O toggles this timer.
|
||||
See objective-timing.md for exact source rules and regression evidence.
|
||||
|
||||
`402D70/402CC0` convert positions using windowWidth/640 and windowHeight/480;
|
||||
constants at file8D40C=1/640 and8D408=1/480. The port quads use NDC
|
||||
|
||||
Reference in new issue
Block a user