Implement original gadget panel and playable shrink ray
This commit is contained in:
1 parent
0272f7bef7
commit
7b5230ceb8
57 files changed
+3545
-48
No files matched your search
@@ -0,0 +1,147 @@
|
||||
# Shrink ray primary fire and owned effect
|
||||
|
||||
2026-10-27. Read-only static recovery from supplied EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
Preferred VAs below map to raw file offset VA−400000 for this image's text;
|
||||
shrink_ray.py independently PE-maps all locations and guards eight bounded
|
||||
function ranges plus44 source sites. No original code was executed by this task.
|
||||
|
||||
## Important identity correction
|
||||
|
||||
The inventory/menu highlight is not the raw equipped-mode word4F0588. The
|
||||
[gadget control investigation](gadget-controls.md) proves selecting group0/item3
|
||||
cleans current mode to−1, then calls equip174(3); cases3 and−1 leave that mode
|
||||
unchanged.426E40's shrink scan requires owned item3==1 **and mode−1**. The same
|
||||
item owns the recovered jetpack ability. Earlier jetpack-only descriptions that
|
||||
treat SHRINKRAY as an unrelated internal label are superseded by this combined
|
||||
source path and the original item's SHRINK/JUMP art. Do not implement selected
|
||||
mode3 as a separate shrink-ray state merely because the menu highlights item3.
|
||||
|
||||
## Primary input and animation ownership
|
||||
|
||||
| VA / raw | Recovered contract |
|
||||
|---|---|
|
||||
|426030 /26030|Input callback first requires407060 false,475CA0 true, controlled5099E4 nonnull, global4F8430 false and interface1D2D false. Movement438A60 and gadget subhandlers run before the ordinary fire tail.|
|
||||
|42A7A0 /2A7A0|Primary helper is false while4F83E0 is set; otherwise OR of509834,509845,509849,509AC4. Readme maps Enter/Ctrl/left mouse; pad input remains separate.|
|
||||
|426566..42657F /26566|Held primary helper OR keyboard13 invokes the held-fire branch. Release stops the owned sound loop and hides the ray.|
|
||||
|42668F..4266BD /2668F|Busy1D65 or modal4F8182 rejects; raw mode0 rejects; otherwise controller speed608 is set0.|
|
||||
|4266C8..4266F1 /266C8|Grappler/energy subhandlers run; mode4 exits; ordinary mode−1 continues.|
|
||||
|4266F7..42672B /266F7|Supported body requests SHOOT, then animation148. The caller's grounded shooting pose, not the collision support routine, owns this action.|
|
||||
|4268BE..4268F7 /268BE|Owned item3 must equal1. If sound handle interface974==−1, start SFX0 looping and retain its handle. Invalid availability emits SFX117 and latches busy1D65 until release.|
|
||||
|426902..42698C /26902|Airborne branch permits the ordinary fire path around the FALL action and owns its own loop interruption; do not force all airborne frames to grounded SHOOT.|
|
||||
|4269BD /269BD|Complete virtual1B8 invokes426E40 after these gates. No one-shot cooldown or projectile spawn is present in426E40. It is a held, per-input-invocation scan.|
|
||||
|
||||
Raw primary callback physics/control predicates are separate from the modern F1,
|
||||
inspection, focus and practice modal policies. New primary input must be cleared
|
||||
at modern capture boundaries and must not leak into cutscene skip/menu selection.
|
||||
|
||||
## Target scan and hit order
|
||||
|
||||
426E40..427334:
|
||||
|
||||
1. Require403950(group0,item3)==1 and signed4F0588==−1.
|
||||
2. Show Jimmy-owned complete object+A10 (interface+950) if present. Copy Jimmy's
|
||||
current root exactly via318 and current Euler exactly via330. There is no
|
||||
muzzle offset in this caller; the original ASE supplies the effect geometry.
|
||||
3. Call42A920(−dt) once **before target traversal**, even if there is no hit.
|
||||
There is no positive-energy test in this ordinary scan.42A920 exempts original
|
||||
VR01..VR08, otherwise clamps energy0..100 and owns low/empty sounds/latches.
|
||||
4. Traverse object registry50999C in linked order. Payload is the game interface.
|
||||
Require interface13E nonzero, class-name check18(`C3DENEMY`), interface898
|
||||
nonzero and interface8B0 false (already-shrunk flag).
|
||||
5. Require enemy rootY strictly greater than JimmyY−150 and strictly less than
|
||||
JimmyY+60. Full root-to-root Euclidean distance must be strictly below1500.
|
||||
6. Call imported vector calculate_angles48D108; convert its signed-short heading
|
||||
to degrees with stored float0.02197265625. Require heading strictly inside
|
||||
JimmyEulerY−5 .. JimmyEulerY+5. These instructions add no seam wrapping; exact
|
||||
angle production/convention and generic Euler normalization remain a separate
|
||||
numeric contract. The helper projection accepts the recovered heading as input.
|
||||
7. Build a source ray from Jimmy root+(0,150,0) to offset384(0,150,distance).
|
||||
Call47C210 and reject on **any accepted wall-query hit**. This is the original
|
||||
static grid/winding query, not nearest sphere sweep or a pixel/crosshair test.
|
||||
8. For each accepted enemy invoke Jimmy complete1DC→42AC10(target interface).
|
||||
There is no break/nearest-target reduction: multiple eligible enemies may be
|
||||
hit in a single invocation. Registry order and source wall query are dependencies.
|
||||
|
||||
42AC10 requests exact action string `SHRINK` at4EF71C with argument0 through
|
||||
enemy completeE0, sets enemy complete124(5), then complete974=30.0 and
|
||||
complete970=true. Those fields are interface8B4 timer and8B0 flag. It also owns
|
||||
class/tag-specific objective, score and Humphrey policy, so generic shrinking
|
||||
must not invent a universal score or destruction event.
|
||||
|
||||
The independent [target investigation](shrink-targets.md) owns actual3SOL class,
|
||||
SHRINK morph, timer expiry and restored action. Its source check corrects an
|
||||
initial label:44AEC6 requests `WALK` (4ECA54), not STOP. Visual shrink is driven
|
||||
by the original morph/action; do not substitute an invented uniform scale.
|
||||
|
||||
## Beam effect is an owned object, not a ballistic projectile
|
||||
|
||||
Jimmy constructor4222AB allocates6D0 bytes;4222C9 calls43FE20 and4222D9 stores
|
||||
the resulting complete object at Jimmy+A10.43FE20 establishes C3DShrinkRay
|
||||
interface table4B4350, invokes440000 Init and disables its physical collision
|
||||
through220 setter4710C0. Phase complete6BC starts0 (interface5FC).
|
||||
|
||||
440000 Init binds `HIRAY`→`ray.ase` at440037, then texture slots0/1/2 to
|
||||
ray0000.png/ray0001.png/ray0002.png. It sets action `RAY`, radius40 and source
|
||||
factor0.3; these physical values do not imply a moving projectile. The caller
|
||||
keeps the owned effect at Jimmy's root/Euler while held and hides it on release.
|
||||
|
||||
**Opacity, not scale:** C3DShrinkRay complete114 resolves40E4A0. Positive param
|
||||
walks shape polygons and each nonnull material, writes RGB1 and alpha=param to
|
||||
material+4C..58, source blend field+30=6, destination+34=7 when global509A13 is
|
||||
true or1 otherwise, and ORs material flag38 with1. Init and every texture switch
|
||||
call114(0.5). The earlier per-texture RGBA writes also set0.5; this setter
|
||||
replaces the alpha rather than multiplying it again. No geometric half-scale is
|
||||
justified.
|
||||
|
||||
The engine adapter10036AB0 (raw36AB0) uses table1013667C (raw13667C) to map both
|
||||
material enums into D3D render states19/20. Selected entries are6→D3D5 SRC_ALPHA,
|
||||
1→D3D2 ONE,7→D3D6 INV_SRC_ALPHA. Thus global509A13=false selects alpha-weighted
|
||||
**additive** blending (SrcAlpha,One), while true selects conventional alpha
|
||||
(SrcAlpha,OneMinusSrcAlpha). The flag is loaded from a graphics-setup option and
|
||||
stored476BBE; its complete settings/hardware fallback semantics remain open.
|
||||
Do not silently treat both branches as conventional alpha. The DLL SHA256 is
|
||||
`3ec41ead011adf56387a6dbd4580e5b5a9721b5f8020c8a56420f42824354943`.
|
||||
|
||||
440180 interface3C4 update first invokes base40E050. On its first pass a flag
|
||||
interface604 causes Init through1C; then float timer600 adds dt. When strictly
|
||||
greater than **stored double0.1**, phase5FC increments, wraps after2 back0,
|
||||
swaps the bound texture, reasserts opacity0.5, and resets timer0. It advances at
|
||||
most once per invocation and discards overshoot. Since float0.1 is slightly above
|
||||
double0.1, passing an exact float0.1 triggers the switch. No independent finite
|
||||
beam lifetime is present; hold/release and object visibility own it.
|
||||
|
||||
## REA evidence, gaps and checks
|
||||
|
||||
The three owned EXE REA sessions used the generated hashed
|
||||
artifacts/uncontrolled-phases/rea/Neutron.exe and closed/exported normally.
|
||||
A fourth session used the generated artifacts/asset-probe/game/OMT2.dll copy for
|
||||
the blend adapter, also closed/exported under artifacts/shrink-ray/rea-blend/.
|
||||
|
||||
| Retained path | Successful Evidence |
|
||||
|---|---|
|
||||
|artifacts/shrink-ray/rea-primary-followup/03.json|42A7A0 ev_3ff9cde0cab7a1e7ed456591becfcc4c4f4db3796aa6ab5e76a1dd124f9dac47|
|
||||
|rea-primary-followup/04.json|42A920 ev_71897af12f4bfa1de946c6f17f3bbed34764fdc84258ce64516c8f1f904b465d|
|
||||
|rea-effect/00.json|440000 ev_875816ebeb0d690c83518f14f36a13d646009d3530c0ad1f27efbd3a2342aeff|
|
||||
|rea-effect/03.json|43FE20 ev_3ae9cf6456693b674f937b0e4c86392b88f0d80f8eb416e5b7585f08f790e7f9|
|
||||
|rea-blend/00.json|10036AB0 ev_f5a914ee9eae593b02a04149b6651b2d783151df046bbb417624bf94f23bb96c|
|
||||
|
||||
426030/426E40/429D00 VA queries were unrecognized; corrected raw-offset selectors
|
||||
were tried once and also failed.440180 and42AC10 likewise have no recognized
|
||||
procedure in this profile. Errors/complete diagnostics remain beside successful
|
||||
Evidence; their conclusions use fixed source instruction/body guards and the
|
||||
matching class/vtable/asset chain, not invented successful decompilation.
|
||||
|
||||
`python3 -m unittest discover -s tests -p test_shrink_ray.py -v` passes seven groups:
|
||||
source bodies/constants/assets/opacity anchors; owned3/mode−1; independent target
|
||||
gates; strict range/height; strict quantized-heading/no-added-wrap; texture float/
|
||||
double threshold, wrap and discarded overshoot; DLL body/table identity and
|
||||
additive/conventional-alpha factor distinction. These are source projections,
|
||||
not original execution or managed/native gameplay verification. Complete source
|
||||
report can be generated with shrink_ray.py ../Original; originals remain read-only.
|
||||
|
||||
Remaining: exact imported heading production/Euler normalization, full airborne
|
||||
SHOOT interruption, graphics-option/depth order, full enemy class/
|
||||
script/score policies and original whole-game runtime comparison. The source
|
||||
device's held geometry, textures, ownership gates and target callbacks support a
|
||||
bounded first implementation; a synthetic projectile cadence is not supported.
|
||||
Reference in new issue
Block a user