Implement Baseball aiming, pooled projectiles and VR07 targets
This commit is contained in:
1 parent
50fcb87d90
commit
d6ca417e9e
50 files changed
+3149
-32
No files matched your search
@@ -0,0 +1,144 @@
|
||||
# Baseball source contract
|
||||
|
||||
2026-11-02. Static recovery; original EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
Text raw offsets equal VA−400000. The helper PE-maps and guards15 reviewed
|
||||
source ranges,13 virtual targets and8 constants. No original game code was run.
|
||||
|
||||
## Practical scope
|
||||
|
||||
Baseball is feasible as the next bounded gadget with VR07 targets. It needs a
|
||||
20-entry projectile pool, original sprite, primary hold/release state and narrow
|
||||
ball-specific physics callbacks. Broad enemy AI is unnecessary for VR07's six
|
||||
3TAR objects. Target behavior/registration is independently owned in
|
||||
[baseball-targets.md](baseball-targets.md); resources in
|
||||
[baseball-assets.md](baseball-assets.md). Generic full-scene collisions remain
|
||||
outside a claim of finished gadget fidelity.
|
||||
|
||||
## Evidence and provider boundary
|
||||
|
||||
Local REA/Ghidra successfully decompiled constructor40FC50, Evidence
|
||||
`ev_5c45397cd90b6247920a64a8b27d2838d805a8e1eebba69886f7ffd81d62993a`,
|
||||
and physics scheduler479BC0, Evidence
|
||||
`ev_56b7e074ec8509d1c5b3576d02361ff051963b777d7ccb8259ed9c65dc2db52f`.
|
||||
Complete replies, exported bundle and closed snapshot are in
|
||||
artifacts/baseball-contract/rea-local/. The initial sandbox attempt could not bind
|
||||
the Ghidra Unix socket; its errors remain in rea/. The local permitted execution
|
||||
completed. Queries426030,429A30,40FF40,40FF80,427FF0,428D50,472B10 were not
|
||||
recognized as procedures; provider then interpreted numeric selectors as unmapped
|
||||
file offsets. Their behavior below uses reviewed guarded disassembly, not claimed
|
||||
successful pseudocode. Whole-game execution, original runtime comparison and
|
||||
arbitrary-input x87 equivalence are unverified.
|
||||
|
||||
## Owners, equip and cleanup
|
||||
|
||||
Jimmy complete table4A3BDC:174→428D50 equip,178→427FF0 cleanup,
|
||||
180→429A30 throw,148→429A00 stops saved soundA44 only,170→437740 camera defaults.
|
||||
Item6 dispatch table4298E8+7*4→4296F8; raw6 cleanup428844+6*4→42871D.
|
||||
|
||||
Equip4296F8 sets raw4F0588=6 with **no energy gate**, adds30 to camera scalar
|
||||
complete7CC, hides menu+4E4 if needed, then hides Goddard and disables its body
|
||||
214 and visibilityD0. Practice item9==2 then selects VR07 through42976C..7D8.
|
||||
Cleanup42871D clears complete84C (camera/aim scalar), restores Goddard and shadow,
|
||||
calls170 camera defaults, hides menu4E4, then common tail sets mode−1.
|
||||
It **does not clear** pending throw complete1E26 or saved pitch1E28, and does not
|
||||
destroy or hide the20 flying balls. A later release can therefore still throw.
|
||||
|
||||
Constructor422609..269C allocates20 C3DBaseball complete objects of61C bytes,
|
||||
stores pointers at Jimmy+AB4..B00 and initializes signed WORD B04=0. Ball game
|
||||
interface is complete+C8 (table49141C), unlike Jimmy+C0. Pool capacity is not an
|
||||
ammo count; current nonnull slot is reused and B04 increments modulo20. Null
|
||||
slot leaves index unchanged. No ammo decrement is present in this launch path.
|
||||
|
||||
## Hold, pitch and release
|
||||
|
||||
426030's existing ownership/modal gates and movement438A60 precede primary
|
||||
actions. Held predicate is helper42A7A0 OR separately polled Enter; release means
|
||||
both false. Helper includes mouse/Enter/Ctrl/controller and suppressor4F83E0.
|
||||
42668F..66BD rejects busy1D65, modal4F8182 or raw0, then zeroes controller
|
||||
speed608. Energy helper4269D0 rejects energy<=0 unless complete9F8 override.
|
||||
No minimum1-energy threshold is required. Ground support is necessary to enter
|
||||
the raw6 aiming branch; airborne raw6 follows existing primary behavior.
|
||||
|
||||
Ground hold426718 selects SHOOT, calls148 to stop sound, then raw6:
|
||||
|
||||
1. Emit angle text for the **previous saved pitch**1E28, before any new capture.
|
||||
2. Show fixed menu4E4 crosshair strip.
|
||||
3. First held tick sets pending1E26 and calls148 again; it does not capture pitch.
|
||||
4. Later held ticks clamp complete84C to[0,45], then copy it to1E28.
|
||||
|
||||
The same complete84C is modified by ordinary input438C2C..CC6;4267D3 reads it
|
||||
as interface+78C. It is **not logical EulerX**. Down(VK_DOWN28/address509860) decreases
|
||||
it20*dt; Up(VK_UP26/address50985E) increases it20*dt. Otherwise signed mouseY*dt
|
||||
is added, with analog threshold branches. Raw6 preserves it when not firing;
|
||||
other modes ordinarily reset10. The camera uses it through439625 (eyeY offset
|
||||
7CC−2*84C) and4396A9 (targetY7DC+scale*84C). This is independent of throw's
|
||||
full logical-Euler point/vector transform.
|
||||
|
||||
Menu4E4 is screens Canv253,15×210 at logical(315,100), scale1, initialized hidden
|
||||
at4020DD..2104. Hold shows it, release426585 hides it. The adjacent numeric text
|
||||
call468660 is variadic formatted text (vsprintf at468694), not sprite animation:
|
||||
x286,y=trunc((45−savedPitch)*4.3+100), identity54494D45, format`% .2d`,
|
||||
value=trunc(savedPitch). This yields a positive blank plus two precision digits.
|
||||
TIME selector468C23 uses font5;46844A loads its64-word map from4F4ED8.
|
||||
Digits0..9 map to alphaCanv[118,127,120,121,122,123,124,125,126,119].
|
||||
SPACE maps−1/null; null-glyph advance is separate asset/UI work.
|
||||
|
||||
Release42659F..65F9 tests pending alone, plays SFX10 once, stops soundA44,
|
||||
calls complete180 with(0,80,50,savedPitch), sets interfaceA48=0, clears pending,
|
||||
then energy42A920(−1). It performs **no fresh mode, support or energy gate**.
|
||||
Shared energy exemptions/clamps/warnings apply; VR07 is exempt. SHOOT uses the
|
||||
existing authored shooting clip; no bespoke baseball throw clip was established.
|
||||
|
||||
## Launch and body callbacks
|
||||
|
||||
429A30 transforms local spawn point(0,80,50) through interface384 (472980),
|
||||
unhides selected pool entry, enables collision224 and integration214, publishes
|
||||
root314, transforms local vector(0,float32(savedPitch*float32(1/45)),1) through
|
||||
38C (472B10), quick-normalizes, then sets velocityXYZ×1800 through2C4.
|
||||
It does not clear pending impulse or support on reuse. For upright logical
|
||||
pitch/roll0, yaw theta gives spawn root+(−50sin(theta),80,50cos(theta)) and
|
||||
velocity1800*normalize(−sin(theta),savedPitch/45,cos(theta)). Source trig-table
|
||||
quantization and imported quick magnitude differ from continuous host math.
|
||||
|
||||
Constructor40FC50 binds retainedsprites.omt Canv2 with sprite size25; preloads
|
||||
Canv2..5. Complete57C=25 is size, **not a3D shapeID** (435430→464430).
|
||||
It sets radius15, authored property24=3.2, wall damping28=.46, and leaves the
|
||||
floor support factor1. Floor friction also reads slot248 and is.46 (47A356); suppression scale.5.
|
||||
Pool initialization hides it, disables integration214 and collision224; launch
|
||||
enables both. Generic defaults include support1C8=true, world1D0=true,
|
||||
reflection1D8=true, prevent-lowering208=false. Constructor sets authored204=false
|
||||
and224=false. Do not confuse authored field offsets, live fields and slots.
|
||||
|
||||
|Ball interface slot / implementation|Effect|
|
||||
|---|---|
|
||||
|370→40FF50→472690|Ceiling callback: independently clear positive velocityY and positive accelerationY.|
|
||||
|374→40FEE0→458890→378472750|Generic wall reflection. Normalize horizontal velocity; reflect using supplied normal; rescale by old horizontal magnitude; preserve oldY; damp resulting XZ by(1−slot248), where slot248 reads wall damping.46. Angular heading response is an additional source tail.|
|
||||
|37C→40FF80|Read live velocity2BC; store queued impulse288=(oldX,−.65*oldY,oldZ). **This is not a velocity write.**|
|
||||
|3C4→40FF40→463090→458930→473240|Generic update; no baseball-specific TTL or canvas-frame advancement recovered.|
|
||||
|
||||
Support47BB10..BBA7 publishes floor root, zeros accelerationY, invokes37C only
|
||||
on previous-support=false, then zeros velocityY and sets support true. Next
|
||||
ordinary body tick consumes queued impulse before acceleration/gravity. Because
|
||||
37C queued full X/Z, horizontal speed can increase on the next tick; do not
|
||||
silently discard those components. See existing
|
||||
[body composition](../checkpoint/collision-body-composition-source.md) for
|
||||
gravity, displacement, static support/friction and publication order. Ball's
|
||||
factor1/radius15 and no prevent-lowering must be supplied to a ball adapter;
|
||||
Jimmy-specific callbacks are unsuitable. No automatic first-hit destruction or
|
||||
fixed-distance/time expiry is justified by this class.
|
||||
|
||||
Jimmy enter423014..307D recognizes C3DBASEBALL, disables ball214/224 and hides
|
||||
it. Other objects own their contact effects. A target hit cannot be presumed to
|
||||
consume a ball solely from its name; target and dynamic-contact scheduling need
|
||||
their own source boundary. Cleanup6 leaves balls active; scene/pool ownership
|
||||
must survive until its actual loader/reset boundary.
|
||||
|
||||
## Verification
|
||||
|
||||
tests/test_baseball.py verifies source identity/ranges/virtuals, first-hold versus
|
||||
later pitch capture, stale displayed pitch, hold gates, release after cleanup,
|
||||
ring reuse/null behavior, upright launch offsets and delayed full-vector landing
|
||||
impulse. These are bounded static projections, not original execution or modern
|
||||
runtime verification. Frame animation of the four preloaded ball canvases,
|
||||
general dynamic collision response and exact trig precision remain unresolved.
|
||||
Reference in new issue
Block a user