From 928b18f01c8d0aaa7e79cc6c2e2d2623a8cdf95b Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sat, 19 Nov 2022 17:58:51 -0500 Subject: [PATCH] clean up to `target-handler` (#2026) --- decompiler/config/jak2/all-types.gc | 190 +++++--- .../jak2/engine/collide/collide-target-h.gc | 440 +++++++++--------- goal_src/jak2/engine/common_objs/voicebox.gc | 44 +- goal_src/jak2/engine/math/transformq-h.gc | 2 +- goal_src/jak2/engine/math/transformq.gc | 12 +- .../jak2/engine/target/board/board-states.gc | 88 ++-- .../jak2/engine/target/board/target-board.gc | 86 ++-- .../engine/target/collide-reaction-target.gc | 12 +- goal_src/jak2/engine/target/logic-target.gc | 352 +++++++------- goal_src/jak2/engine/target/sidekick.gc | 6 +- goal_src/jak2/engine/target/target-anim.gc | 18 +- goal_src/jak2/engine/target/target-carry.gc | 4 +- goal_src/jak2/engine/target/target-darkjak.gc | 24 +- goal_src/jak2/engine/target/target-gun.gc | 20 +- goal_src/jak2/engine/target/target-swim.gc | 16 +- goal_src/jak2/engine/target/target-util.gc | 92 ++-- goal_src/jak2/engine/target/target.gc | 140 +++--- goal_src/jak2/engine/target/target2.gc | 40 +- .../engine/collide/collide-target-h_REF.gc | 440 +++++++++--------- .../jak2/engine/common_objs/voicebox_REF.gc | 44 +- .../jak2/engine/math/transformq-h_REF.gc | 2 +- .../jak2/engine/math/transformq_REF.gc | 6 +- .../engine/target/board/board-states_REF.gc | 88 ++-- .../engine/target/board/target-board_REF.gc | 86 ++-- .../target/collide-reaction-target_REF.gc | 12 +- .../jak2/engine/target/logic-target_REF.gc | 352 +++++++------- .../jak2/engine/target/sidekick_REF.gc | 6 +- .../jak2/engine/target/target-anim_REF.gc | 18 +- .../jak2/engine/target/target-carry_REF.gc | 4 +- .../jak2/engine/target/target-darkjak_REF.gc | 24 +- .../jak2/engine/target/target-gun_REF.gc | 20 +- .../jak2/engine/target/target-swim_REF.gc | 16 +- .../jak2/engine/target/target-util_REF.gc | 92 ++-- .../jak2/engine/target/target2_REF.gc | 40 +- .../jak2/engine/target/target_REF.gc | 140 +++--- 35 files changed, 1494 insertions(+), 1482 deletions(-) diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index a0e9cd38ed..11b203e0a8 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -1578,7 +1578,7 @@ (set-yaw-angle-clear-roll-pitch! (_type_ float) quaternion 14) (set-roll-to-grav! (_type_ float) quaternion 15) (set-roll-to-grav-2! (_type_ float) quaternion 16) - (rotate-toward-orientation! (_type_ quaternion float float int float float) quaternion 17) + (rotate-toward-orientation! (_type_ quaternion float float int int float) quaternion 17) (set-quaternion! (_type_ quaternion) quaternion 18) (set-heading-vec-clear-roll-pitch! (_type_ vector) quaternion 19) (point-toward-point-clear-roll-pitch! (_type_ vector) quaternion 20) @@ -16751,7 +16751,7 @@ ;; the desired velocity (target-transv vector :inline :offset 496) ;; logic-target::add-thrust - (unknown-vector02 vector :inline :offset 512) ;; logic-target::reset-target-state + (bent-gravity-normal vector :inline :offset 512) ;; logic-target::reset-target-state ;; the quaternion used for all the control code. ;; there is an additional rotation offset applied for certain effects, like the pitch of @@ -16768,15 +16768,15 @@ (ctrl-xz-vel float :offset 564) ;; logic-target::target-print-stats (unknown-float003 float :offset 568) ;; (anon-function 22 target-gun) - (unknown-float06 float :offset 572) ;; logic-target::do-rotations2 - (unknown-float07 float :offset 576) ;; logic-target::add-thrust - (unknown-time-frame00 time-frame :offset 584) ;; logic-target::do-rotations2 - (unknown-vector03 vector :inline :offset 592) ;; logic-target::do-rotations2 - (unknown-quaternion02 quaternion :inline :offset 608) ;; logic-target::flag-setup - (unknown-quaternion03 quaternion :inline :offset 624) ;; logic-target::flag-setup - (unknown-vector-array00 vector 128 :inline :offset 640) ;; logic-target::target-log-trans - (unknown-time-frame-array00 time-frame 128 :offset 2688) ;; logic-target::target-log-trans - (unknown-word00 int32 :offset 3712) ;; logic-target::target-log-trans + (turn-go-the-long-way float :offset 572) ;; logic-target::do-rotations2 + (velocity-after-thrust float :offset 576) ;; logic-target::add-thrust + (turn-lockout-end-time time-frame :offset 584) ;; logic-target::do-rotations2 + (turn-to-alt-heading vector :inline :offset 592) ;; logic-target::do-rotations2 + (last-transv vector :inline :offset 608) ;; logic-target::flag-setup + (last-quat-for-control quaternion :inline :offset 624) ;; logic-target::flag-setup + (trans-log-trans vector 128 :inline :offset 640) ;; logic-target::target-log-trans + (trans-log-times time-frame 128 :offset 2688) ;; logic-target::target-log-trans + (trans-log-idx int32 :offset 3712) ;; logic-target::target-log-trans ;; offset applied to drawing, separate from collision or anything else ;; this should be filled out by the control code. @@ -16796,34 +16796,40 @@ ;; how much this changed from frame to frame. (anim-collide-offset-delta-world vector :inline :offset 3808) - (unknown-dynamics00 dynamics :offset 3824) ;; logic-target::reset-target-state + + ;; pointer to the *standard-dynamics* to help restore things. + (standard-dynamics dynamics :offset 3824) ;; logic-target::reset-target-state (mod-surface surface :offset 3828) ;; logic-target::target-print-stats ;; the "current" surface - interpolating between the surfaces we're standing on ;; plus mods. (current-surface surface :offset 3832) ;; board-h::want-to-board? - (unknown-surface02 surface :offset 3836) ;; logic-target::build-conversions + + ;; the previous "surf" (not the interpolated one, the "surf" one) + (prev-surf surface :offset 3836) ;; logic-target::build-conversions (time-of-last-surface-change time-frame :offset 3840) ;; logic-target::build-conversions (cpad cpad-info :offset 3848) ;; board-h::want-to-board? - (unknown-float08 float :offset 3852) ;; logic-target::turn-to-vector - (unknown-float09 float :offset 3856) ;; logic-target::turn-to-vector - (unknown-float10 float :offset 3860) ;; logic-target::turn-to-vector - (unknown-float11 float :offset 3864) ;; logic-target::turn-to-vector + (turn-to-angle float :offset 3852) ;; logic-target::turn-to-vector + (last-turn-to-angle float :offset 3856) ;; logic-target::turn-to-vector + (turn-to-magnitude float :offset 3860) ;; logic-target::turn-to-vector + (last-turn-to-magnitude float :offset 3864) ;; logic-target::turn-to-vector ;; unit vector in xz plane. Points from jak to the 'target' point. ;; if the user's input is 0, will keep the last value. (to-target-pt-xz vector :inline :offset 3872) ;; logic-target::turn-to-vector - (unknown-vector09 vector :inline :offset 3888) ;; logic-target::turn-to-vector - (unknown-vector10 vector :inline :offset 3904) ;; logic-target::turn-to-vector - (unknown-vector11 vector :inline :offset 3920) ;; logic-target::turn-to-vector + (last-to-target-pt-xz vector :inline :offset 3888) ;; logic-target::turn-to-vector + + ;; scaled by stick magnitude, in the local normal plane. + (turn-to-target vector :inline :offset 3904) ;; logic-target::turn-to-vector + (last-turn-to-target vector :inline :offset 3920) ;; logic-target::turn-to-vector ;; last 7 (8?) turning directions, in control frame. (turn-history-ctrl vector 7 :inline :offset 3936) ;; logic-target::turn-to-vector - (unknown-vector12 vector :inline :offset 4064) ;; logic-target::read-pad - (unknown-vector13 vector :inline :offset 4080) ;; logic-target::read-pad - (unknown-float12 float :offset 4096) ;; logic-target::read-pad - (unknown-float13 float :offset 4100) ;; logic-target::read-pad - (unknown-dword01 int64 :offset 4104) ;; logic-target::read-pad + (pad-xz-dir vector :inline :offset 4064) ;; logic-target::read-pad + (last-pad-xz-dir vector :inline :offset 4080) ;; logic-target::read-pad + (pad-magnitude float :offset 4096) ;; logic-target::read-pad + (last-pad-magnitude float :offset 4100) ;; logic-target::read-pad + (time-of-last-pad-read time-frame :offset 4104) ;; logic-target::read-pad ;; rotations from world to control frame and back. (w-R-c matrix :inline :offset 4112) ;; logic-target::build-conversions @@ -16831,26 +16837,32 @@ ;; rotate from "control frame" to world frame. (ctrl-orientation matrix :inline :offset 4240) ;; logic-target::joint-points - (unknown-vector14 vector :inline :offset 4320) ;; logic-target::pre-collide-setup + (pre-collide-local-normal vector :inline :offset 4320) ;; logic-target::pre-collide-setup ;; position that the camera should track. ;; note that there is an alt-cam-pos as well (camera-pos vector :inline :offset 4336) ;; logic-target::reset-target-state - (unknown-matrix03 matrix :inline :offset 4352) ;; logic-target::read-pad - (unknown-dword02 int64 :offset 4416) ;; logic-target::read-pad - (unknown-vector16 vector :inline :offset 4432) ;; logic-target::target-real-post - (unknown-float14 float :offset 4448) ;; logic-target::target-real-post + ;; rotate from camera frame to world. + (cam-R-w matrix :inline :offset 4352) ;; logic-target::read-pad + ;; wait until this time to start updating cam-R-w + (update-cam-R-w-start-time int64 :offset 4416) ;; logic-target::read-pad + (force-turn-to-direction vector :inline :offset 4432) ;; logic-target::target-real-post + (force-turn-to-speed float :offset 4448) ;; logic-target::target-real-post (unknown-floatiujh1bnb2n3i1 float :offset 4452) ;; target-death::velocity-set-to-target! - (unknown-float15 float :offset 4456) ;; logic-target::target-real-post - (unknown-word01 int32 :offset 4460) ;; logic-target::joint-points + ;; 0 to 1, to override the player's pad input. + (force-turn-to-strength float :offset 4456) ;; logic-target::target-real-post + + ;; stupid leftover from jak 1. + (tongue-counter int32 :offset 4460) ;; logic-target::joint-points (collide-extra-velocity vector :inline :offset 4464) ;; logic-target::pre-collide-setup ;; likely board rail misalignment. - (unknown-vector18 vector :inline :offset 4480) ;; logic-target::pre-collide-setup - (unknown-time-frame03 time-frame :offset 4496) ;; logic-target::pre-collide-setup - (unknown-time-frame04 time-frame :offset 4504) ;; logic-target::pre-collide-setup - (unknown-vector19 vector :inline :offset 4512) ;; logic-target::build-conversions - (unknown-vector20 vector :inline :offset 4528) ;; logic-target::build-conversions + (additional-decaying-velocity vector :inline :offset 4480) ;; logic-target::pre-collide-setup + ;; there's a bonus 2 frames after this. + (additional-decaying-velocity-end-time time-frame :offset 4496) ;; logic-target::pre-collide-setup + (additional-decaying-velocity-decay-start-time time-frame :offset 4504) ;; logic-target::pre-collide-setup + (gravity-normal vector :inline :offset 4512) ;; logic-target::build-conversions + (last-gravity-normal vector :inline :offset 4528) ;; logic-target::build-conversions (last-trans-any-surf vector :inline :offset 4544) ;; logic-target::target-print-stats (unknown-float16 float :offset 4548) ;; logic-target::target-print-stats (ground-contact-normal vector :inline :offset 4560) ;; logic-target::target-update-ik @@ -16872,7 +16884,7 @@ (surface-slope-x float :offset 4648) ;; logic-target::target-compute-slopes (last-time-on-surface time-frame :offset 4656) ;; board-h::want-to-board? (normal-impact-vel float :offset 4664) ;; target-board-anim-trans - (unknown-time-frame07 time-frame :offset 4672) ;; logic-target::turn-around? + (last-time-touching-actor time-frame :offset 4672) ;; logic-target::turn-around? (wall-contact-pat pat-surface :offset 4680) ;; logic-target::target-print-stats (wall-contact-pt vector :inline :offset 4688) ;; logic-target::add-thrust (wall-contact-poly-normal vector :inline :offset 4704) @@ -16880,7 +16892,7 @@ (actor-contact-pt vector :inline :offset 4736) ;; target2::target-bonk-event-handler (actor-contact-normal vector :inline :offset 4752) (actor-contact-handle handle :offset 4768) ;; logic-target::reset-target-state - (unknown-pat-surface01 pat-surface :offset 4776) ;; logic-target::target-print-stats + (gspot-pat-surfce pat-surface :offset 4776) ;; logic-target::target-print-stats (gspot-slope-z float :offset 4780) ;; logic-target::target-compute-slopes (gspot-slope-x float :offset 4784) ;; logic-target::target-compute-slopes (ctrl-slope-heading float :offset 4788) ;; logic-target::target-compute-slopes @@ -16923,7 +16935,8 @@ ;; number which goes toward 1 as jak is blocked by a wall, and has surface mode air. (blocked-in-air-factor float :offset 4996) - (unknown-time-frame09 time-frame :offset 5000) ;; logic-target::add-thrust + ;; last time we went from (jumping into wall) -> (jumping, not into wall) + (time-of-last-clear-wall-in-jump time-frame :offset 5000) ;; logic-target::add-thrust (time-of-last-lc-touch-edge time-frame :offset 5008) (collision-spheres collide-shape-prim-sphere 10 :offset 5016) ;; (method 28 target) (unknown-word02 int32 :offset 5064) ;; (enter target-roll) @@ -16935,16 +16948,23 @@ (last-feet-attempt-time time-frame :offset 5104) ;; target-util::can-feet? (unknown-time-frame13 time-frame :offset 5112) ;; (exit target-slide-down) (last-time-of-stuck time-frame :offset 5120) ;; (trans target-stance) - (unknown-float28 float :offset 5132) ;; logic-target::target-print-stats - (unknown-float29 float :offset 5136) ;; logic-target::target-print-stats - (unknown-float30 float :offset 5140) ;; logic-target::target-print-stats - (unknown-vector28 vector :inline :offset 5152) ;; logic-target::joint-points + + ;; the "bend" rotates the y axis of the control frame to align with the normal + ;; of the ground as bend-amount goes from 0 to 1. + (bend-amount float :offset 5132) ;; logic-target::target-print-stats + + ;; the target value for bend. + (bend-target float :offset 5136) ;; logic-target::target-print-stats + + ;; how fast the "bend" is applied + (bend-speed float :offset 5140) ;; logic-target::target-print-stats + (ctrl-to-head-offset vector :inline :offset 5152) ;; logic-target::joint-points ;(unknown-vector29 vector :inline :offset 5168) ;; logic-target::joint-points (lhand-cspace cspace :offset 5168) (rhand-cspace cspace :offset 5172) (midpoint-of-hands vector :inline :offset 5184) ;; logic-target::joint-points - (unknown-vector31 vector :inline :offset 5200) ;; logic-target::joint-points - (unknown-cspacei1un23i1 cspace :inline :offset 5216) ;; logic-target::joint-points + (ctrl-to-hands-offset vector :inline :offset 5200) ;; logic-target::joint-points + (sidekick-root cspace :inline :offset 5216) ;; logic-target::joint-points ;; (unknown-vector33 vector :inline :offset 5232) ;; logic-target::joint-points ;; 'duck 'normal 'gun @@ -16957,26 +16977,39 @@ ;; similar to above, but only used for duck, gun, and tube transitions. (duck-gun-tube-transision float :offset 5256) ;; logic-target::joint-points - (unknown-vector-array02 vector 15 :inline :offset 5264) ;; logic-target::turn-around? - (unknown-float32 float :offset 5520) ;; logic-target::turn-around? - (unknown-word03 int32 :offset 5524) ;; logic-target::turn-around? - (unknown-float33 float :offset 5528) ;; logic-target::target-compute-pole + + ;; w is ctrl-xz-vel + (transv-history vector 15 :inline :offset 5264) ;; logic-target::turn-around? + ;; in the above history + (average-xz-vel float :offset 5520) ;; logic-target::turn-around? + ;; index of the above transv-history with the faster xz velocity in control frame. + (idx-of-fastest-xz-vel int32 :offset 5524) ;; logic-target::turn-around? + + ;; distance that goes to 0 as jak is pulled toward an edge grab or pole swing + ;; measued as hand to edge distance or similar. + (hand-to-edge-dist float :offset 5528) ;; logic-target::target-compute-pole (unknown-symbol000 symbol :offset 5532) ;; (code target-edge-grab) (edge-grab-edge-dir vector :inline :offset 5536) ;; logic-target::target-compute-pole (unknown-vector35 vector :inline :offset 5552) ;; target-board::target-board-compute-edge ;; go along this direction to cross the edge. normal to gravity and edge dir. (edge-grab-across-edge-dir vector :inline :offset 5568) ;; logic-target::target-compute-pole - (unknown-time-frame15 time-frame :offset 5584) ;; logic-target::target-compute-edge - (unknown-time-frame16 time-frame :offset 5592) ;; logic-target::target-compute-edge + (last-successful-compute-edge-time time-frame :offset 5584) ;; logic-target::target-compute-edge + (edge-grab-start-time time-frame :offset 5592) ;; logic-target::target-compute-edge (unknown-handle000 handle :offset 5600) ;; (code target-edge-grab) - (unknown-handle01 handle :offset 5608) ;; logic-target::reset-target-state + + ;; the thing that does clone-anim on target. + (anim-handle handle :offset 5608) ;; logic-target::reset-target-state (unknown-word04 uint32 :offset 5616) (unknown-spool-anim00 spool-anim :offset 5616) ;; (code target-board-get-on) (unknown-word05 int32 :offset 5616) (unknown-symbol01 symbol :offset 5616) (unknown-float34 float :offset 5616) - (unknown-symbol02 float :offset 5620) ;; logic-target::target-compute-pole + + ;; awful thing, it's used as a boolean flag for remembering if we've moved + ;; to the pole during jumping on a pole, and also the max height for the current jump + (did-move-to-pole-or-max-jump-height float :offset 5620) ;; logic-target::target-compute-pole + (unknown-symbol03 float :offset 5624) ;; (trans target-duck-high-jump-jump) (unknown-float35 float :offset 5628) ;; (trans target-high-jump) (unknown-float36 float :offset 5632) ;; (trans target-board-flip) @@ -16985,16 +17018,19 @@ (unknown-vector38 vector :inline :offset 5664) ;; (trans target-board-jump-kick) (unknown-vector39 vector :inline :offset 5680) ;; (code target-board-pegasus) (unknown-vector40 vector :inline :offset 5696) ;; (code target-board-pegasus) - (unknown-time-frame17 time-frame :offset 5712) ;; (trans target-board-halfpipe) + (sliding-start-time time-frame :offset 5712) ;; (trans target-board-halfpipe) (unknown-time-frame18 time-frame :offset 5720) ;; (code target-running-attack) (unknown-sound-id00 sound-id :offset 5776) ;; (enter target-board-flip) (unknown-handle02 handle :offset 5792) ;; (event target-board-grenade) ;; TODO - make sure this is a handle - (unknown-impact-control00 impact-control :inline :offset 5824) ;; logic-target::joint-points + (impact-ctrl impact-control :inline :offset 5824) ;; logic-target::joint-points (unknown-word06 int32 :offset 5832) ;; (code target-running-attack) (unknown-vector41 vector :inline :offset 5888) ;; (code target-running-attack) (last-trans-leaving-surf vector :inline :offset 5904) ;; logic-target::target-print-stats (unknown-float38 float :offset 5908) ;; logic-target::target-print-stats - (unknown-vector43 vector :inline :offset 5920) ;; logic-target::target-print-stats + + ;; same xz as trans, at the max height of the current jump + ;; gets reset to the current height when we leave a surface. + (highest-jump-mark vector :inline :offset 5920) ;; logic-target::target-print-stats (unknown-float39 float :offset 5924) ;; logic-target::target-print-stats (unknown-time-frame19 time-frame :offset 5936) ;; target::init-var-jump (time-of-last-debug-float time-frame :offset 5944) ;; board-h::want-to-board? @@ -17013,45 +17049,49 @@ (unknown-dword08 int64 :offset 6104) ;; (enter target-double-jump) (unknown-dword09 int64 :offset 6112) ;; (enter target-double-jump) (unknown-dword10 int64 :offset 6120) ;; (enter target-double-jump) - (unknown-symbol06 symbol :offset 6144) ;; logic-target::post-flag-setup + + ;; unused, set to #f, checked for 'launch + (jump-kind symbol :offset 6144) ;; logic-target::post-flag-setup (unknown-quaternion04 quaternion :inline :offset 6160) ;; (enter target-attack) (unknown-sound-id01 sound-id :offset 6176) ;; (code target-attack) (unknown-float41 float :offset 6180) ;; (enter target-attack) (unknown-float42 float :offset 6184) ;; (enter target-attack) (history-idx uint16 :offset 6188) ;; logic-target::target-no-move-post (history-length uint16 :offset 6190) ;; logic-target::draw-history - (unknown-word07 int32 :offset 6192) ;; logic-target::target-real-post + (remaining-ctrl-iterations int32 :offset 6192) ;; logic-target::target-real-post (invul1-on-time time-frame :offset 6200) ;; logic-target::post-flag-setup (invul1-off-time time-frame :offset 6208) ;; logic-target::post-flag-setup (invul2-on-time time-frame :offset 6216) ;; logic-target::post-flag-setup (invul2-off-time time-frame :offset 6224) ;; logic-target::post-flag-setup (unknown-float43 float :offset 6232) ;; (event target-flop) (unknown-float001 float :offset 6236) ;; target-swim::target-swim-tilt - (unknown-sound-id02 sound-id :offset 6240) ;; (method 28 target) - (unknown-sound-id03 sound-id :offset 6244) ;; (method 28 target) + (board-jump-and-swim-sound sound-id :offset 6240) ;; (method 28 target) + (bubbles-sound sound-id :offset 6244) ;; (method 28 target) (unknown-time-frame26 time-frame :offset 6248) ;; logic-target::target-calc-camera-pos (unknown-time-frame27 time-frame :offset 6256) ;; logic-target::target-calc-camera-pos - (unknown-dword11 int64 :offset 6264) ;; logic-target::reset-target-state + + ;; possibly unused timeout from jak 1 for yellow eco/triangle zoom in mode thing. + (yellow-eco-last-use-time int64 :offset 6264) ;; logic-target::reset-target-state ;; the xz velocity from align. (align-xz-vel vector :inline :offset 6272) ;; (code target-roll-flip) (zx-vel-frac float :offset 6288) ;; (code target-roll-flip) (unknown-sound-id04 sound-id :offset 6292) ;; (method 28 target) (unknown-float45 float :offset 6296) ;; powerups::target-powerup-process - (unknown-word08 int32 :offset 6300) ;; (method 28 target) - (default-collide-as collide-spec :offset 6304) ;; (method 28 target) - (unknown-word09 int32 :offset 6308) ;; (method 28 target) - (default-collide-with collide-spec :offset 6312) ;; (method 28 target) + (default-collide-as-all collide-spec :offset 6300) ;; (method 28 target) + (default-collide-as-fgnd collide-spec :offset 6304) ;; (method 28 target) + (default-collide-with-all collide-spec :offset 6308) ;; (method 28 target) + (default-collide-with-fgnd collide-spec :offset 6312) ;; (method 28 target) (time-of-last-zero-input time-frame :offset 6320) ;; logic-target::flag-setup - (unknown-time-frame29 time-frame :offset 6328) ;; logic-target::flag-setup - (unknown-dword12 int64 :offset 6336) ;; logic-target::flag-setup + (time-of-last-nonzero-input time-frame :offset 6328) ;; logic-target::flag-setup + (time-between-zero-inputs time-frame :offset 6336) ;; logic-target::flag-setup ;; when r2 was pushed to cancel out damage. ;; used to prevent this from getting mixed up with trying to get on/off jetboard. (time-of-last-debug-heal time-frame :offset 6368) ;; board-h::want-to-board? - (unknown-quaternion05 quaternion :inline :offset 6384) ;; logic-target::flag-setup - (unknown-time-frame31 time-frame :offset 6400) ;; logic-target::wall-hide? - (unknown-time-frame32 time-frame :offset 6408) ;; logic-target::wall-hide? + (last-nonzero-input-dir-targ quaternion :inline :offset 6384) ;; logic-target::flag-setup + (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) ;; logic-target::wall-hide? + (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) ;; logic-target::wall-hide? (pad uint8 :offset #x190f) ) :flag-assert #x4400001910 @@ -28508,9 +28548,9 @@ (enter () _type_ :state 20) (idle () _type_ :state 21) (exit () _type_ :state 22) - (remote-method-23 (_type_) none 23) - (remote-method-24 (_type_ vector) float 24) - (remote-method-25 (_type_) none 25) + (init (_type_) none 23) + (get-track-pt-and-scale (_type_ vector) float 24) + (post-common (_type_) none 25) ) ) @@ -28535,7 +28575,7 @@ :flag-assert #x1c00c00139 (:methods (wait () _type_ :state 26) - (judge-method-27 (_type_) none 27) + (setup-collision (_type_) none 27) ) ) diff --git a/goal_src/jak2/engine/collide/collide-target-h.gc b/goal_src/jak2/engine/collide/collide-target-h.gc index 0378d30b7b..ccf882683a 100644 --- a/goal_src/jak2/engine/collide/collide-target-h.gc +++ b/goal_src/jak2/engine/collide/collide-target-h.gc @@ -8,226 +8,226 @@ ;; DECOMP BEGINS (deftype control-info (collide-shape-moving) - ((unknown-float00 float :offset 448) - (unknown-float01 float :offset 452) - (unknown-float02 float :offset 456) - (unknown-float03 float :offset 460) - (transv-ctrl vector :inline :offset 480) - (target-transv vector :inline :offset 496) - (unknown-vector02 vector :inline :offset 512) - (quat-for-control quaternion :inline :offset 528) - (override-quat quaternion :inline :offset 544) - (override-quat-alpha float :offset 560) - (ctrl-xz-vel float :offset 564) - (unknown-float003 float :offset 568) - (unknown-float06 float :offset 572) - (unknown-float07 float :offset 576) - (unknown-time-frame00 time-frame :offset 584) - (unknown-vector03 vector :inline :offset 592) - (unknown-quaternion02 quaternion :inline :offset 608) - (unknown-quaternion03 quaternion :inline :offset 624) - (unknown-vector-array00 vector 128 :inline :offset 640) - (unknown-time-frame-array00 time-frame 128 :offset 2688) - (unknown-word00 int32 :offset 3712) - (draw-offset vector :inline :offset 3728) - (cspace-offset vector :inline :offset 3744) - (anim-collide-offset-local vector :inline :offset 3760) - (anim-collide-offset-world vector :inline :offset 3776) - (old-anim-collide-offset-world vector :inline :offset 3792) - (anim-collide-offset-delta-world vector :inline :offset 3808) - (unknown-dynamics00 dynamics :offset 3824) - (mod-surface surface :offset 3828) - (current-surface surface :offset 3832) - (unknown-surface02 surface :offset 3836) - (time-of-last-surface-change time-frame :offset 3840) - (cpad cpad-info :offset 3848) - (unknown-float08 float :offset 3852) - (unknown-float09 float :offset 3856) - (unknown-float10 float :offset 3860) - (unknown-float11 float :offset 3864) - (to-target-pt-xz vector :inline :offset 3872) - (unknown-vector09 vector :inline :offset 3888) - (unknown-vector10 vector :inline :offset 3904) - (unknown-vector11 vector :inline :offset 3920) - (turn-history-ctrl vector 7 :inline :offset 3936) - (unknown-vector12 vector :inline :offset 4064) - (unknown-vector13 vector :inline :offset 4080) - (unknown-float12 float :offset 4096) - (unknown-float13 float :offset 4100) - (unknown-dword01 int64 :offset 4104) - (w-R-c matrix :inline :offset 4112) - (c-R-w matrix :inline :offset 4176) - (ctrl-orientation matrix :inline :offset 4240) - (unknown-vector14 vector :inline :offset 4320) - (camera-pos vector :inline :offset 4336) - (unknown-matrix03 matrix :inline :offset 4352) - (unknown-dword02 int64 :offset 4416) - (unknown-vector16 vector :inline :offset 4432) - (unknown-float14 float :offset 4448) - (unknown-floatiujh1bnb2n3i1 float :offset 4452) - (unknown-float15 float :offset 4456) - (unknown-word01 int32 :offset 4460) - (collide-extra-velocity vector :inline :offset 4464) - (unknown-vector18 vector :inline :offset 4480) - (unknown-time-frame03 time-frame :offset 4496) - (unknown-time-frame04 time-frame :offset 4504) - (unknown-vector19 vector :inline :offset 4512) - (unknown-vector20 vector :inline :offset 4528) - (last-trans-any-surf vector :inline :offset 4544) - (unknown-float16 float :offset 4548) - (ground-contact-normal vector :inline :offset 4560) - (last-trans-on-ground vector :inline :offset 4576) - (ground-contact-sphere-center vector :inline :offset 4592) - (transv-on-last-impact vector :inline :offset 4608) - (list-time-on-ground time-frame :offset 4624) - (ground-local-norm-dot-grav float :offset 4632) - (local-slope-z float :offset 4636) - (local-slope-x float :offset 4640) - (surface-slope-z float :offset 4644) - (surface-slope-x float :offset 4648) - (last-time-on-surface time-frame :offset 4656) - (normal-impact-vel float :offset 4664) - (unknown-time-frame07 time-frame :offset 4672) - (wall-contact-pat pat-surface :offset 4680) - (wall-contact-pt vector :inline :offset 4688) - (wall-contact-poly-normal vector :inline :offset 4704) - (wall-contact-normal vector :inline :offset 4720) - (actor-contact-pt vector :inline :offset 4736) - (actor-contact-normal vector :inline :offset 4752) - (actor-contact-handle handle :offset 4768) - (unknown-pat-surface01 pat-surface :offset 4776) - (gspot-slope-z float :offset 4780) - (gspot-slope-x float :offset 4784) - (ctrl-slope-heading float :offset 4788) - (ctrl-slope-z float :offset 4792) - (ctrl-slope-x float :offset 4796) - (unknown-word000 int32 :offset 4800) - (unknown-float002 float :offset 4804) - (unknown-float-n12iuh3n1 float :offset 4808) - (unknown-float-ki1jhbn23hj float :offset 4812) - (time-of-last-lc time-frame :offset 4816) - (low-coverage-pat-next1 pat-surface :offset 4828) - (low-coverage-dist-to-next2 float :offset 4832) - (low-coverage-pat-next2 pat-surface :offset 4836) - (low-coverage-slope-to-next1 float :offset 4824) - (low-coverage-norm-of-next1 vector :inline :offset 4848) - (low-coverage-norm-of-next2 vector :inline :offset 4864) - (low-coverage-overhang-plane-normal vector :inline :offset 4912) - (low-coverage-tangent vector :inline :offset 4928) - (low-coverage-tangent-xz vector :inline :offset 4944) - (btransv vector :inline :offset 4976) - (blocked-factor float :offset 4992) - (blocked-in-air-factor float :offset 4996) - (unknown-time-frame09 time-frame :offset 5000) - (time-of-last-lc-touch-edge time-frame :offset 5008) - (collision-spheres collide-shape-prim-sphere 10 :offset 5016) - (unknown-word02 int32 :offset 5064) - (last-roll-end-time time-frame :offset 5072) - (last-running-attack-end-time time-frame :offset 5080) - (last-hands-attempt-time time-frame :offset 5088) - (last-attack-end-time time-frame :offset 5096) - (last-feet-attempt-time time-frame :offset 5104) - (unknown-time-frame13 time-frame :offset 5112) - (last-time-of-stuck time-frame :offset 5120) - (unknown-float28 float :offset 5132) - (unknown-float29 float :offset 5136) - (unknown-float30 float :offset 5140) - (unknown-vector28 vector :inline :offset 5152) - (lhand-cspace cspace :offset 5168) - (rhand-cspace cspace :offset 5172) - (midpoint-of-hands vector :inline :offset 5184) - (unknown-vector31 vector :inline :offset 5200) - (unknown-cspacei1un23i1 cspace :inline :offset 5216) - (collide-mode symbol :offset 5248) - (collide-mode-transition float :offset 5252) - (duck-gun-tube-transision float :offset 5256) - (unknown-vector-array02 vector 15 :inline :offset 5264) - (unknown-float32 float :offset 5520) - (unknown-word03 int32 :offset 5524) - (unknown-float33 float :offset 5528) - (unknown-symbol000 symbol :offset 5532) - (edge-grab-edge-dir vector :inline :offset 5536) - (unknown-vector35 vector :inline :offset 5552) - (edge-grab-across-edge-dir vector :inline :offset 5568) - (unknown-time-frame15 time-frame :offset 5584) - (unknown-time-frame16 time-frame :offset 5592) - (unknown-handle000 handle :offset 5600) - (unknown-handle01 handle :offset 5608) - (unknown-word04 uint32 :offset 5616) - (unknown-spool-anim00 spool-anim :offset 5616) - (unknown-word05 int32 :offset 5616) - (unknown-symbol01 symbol :offset 5616) - (unknown-float34 float :offset 5616) - (unknown-symbol02 float :offset 5620) - (unknown-symbol03 float :offset 5624) - (unknown-float35 float :offset 5628) - (unknown-float36 float :offset 5632) - (unknown-float37 float :offset 5636) - (unknown-vector37 vector :inline :offset 5648) - (unknown-vector38 vector :inline :offset 5664) - (unknown-vector39 vector :inline :offset 5680) - (unknown-vector40 vector :inline :offset 5696) - (unknown-time-frame17 time-frame :offset 5712) - (unknown-time-frame18 time-frame :offset 5720) - (unknown-sound-id00 sound-id :offset 5776) - (unknown-handle02 handle :offset 5792) - (unknown-impact-control00 impact-control :inline :offset 5824) - (unknown-word06 int32 :offset 5832) - (unknown-vector41 vector :inline :offset 5888) - (last-trans-leaving-surf vector :inline :offset 5904) - (unknown-float38 float :offset 5908) - (unknown-vector43 vector :inline :offset 5920) - (unknown-float39 float :offset 5924) - (unknown-time-frame19 time-frame :offset 5936) - (time-of-last-debug-float time-frame :offset 5944) - (danger-mode symbol :offset 5984) - (target-attack-id uint32 :offset 5988) - (unknown-attack-id00 int32 :offset 5992) - (bomb-scale float :offset 5996) - (attack-count uint64 :offset 6000) - (unknown-dword06 handle :offset 6008) - (unknown-time-frame000 time-frame :offset 6016) - (unknown-combo-tracker00 combo-tracker :inline :offset 6032) - (unknown-time-frame21 time-frame :offset 6072) - (unknown-dword07 int64 :offset 6096) - (unknown-dword08 int64 :offset 6104) - (unknown-dword09 int64 :offset 6112) - (unknown-dword10 int64 :offset 6120) - (unknown-symbol06 symbol :offset 6144) - (unknown-quaternion04 quaternion :inline :offset 6160) - (unknown-sound-id01 sound-id :offset 6176) - (unknown-float41 float :offset 6180) - (unknown-float42 float :offset 6184) - (history-idx uint16 :offset 6188) - (history-length uint16 :offset 6190) - (unknown-word07 int32 :offset 6192) - (invul1-on-time time-frame :offset 6200) - (invul1-off-time time-frame :offset 6208) - (invul2-on-time time-frame :offset 6216) - (invul2-off-time time-frame :offset 6224) - (unknown-float43 float :offset 6232) - (unknown-float001 float :offset 6236) - (unknown-sound-id02 sound-id :offset 6240) - (unknown-sound-id03 sound-id :offset 6244) - (unknown-time-frame26 time-frame :offset 6248) - (unknown-time-frame27 time-frame :offset 6256) - (unknown-dword11 int64 :offset 6264) - (align-xz-vel vector :inline :offset 6272) - (zx-vel-frac float :offset 6288) - (unknown-sound-id04 sound-id :offset 6292) - (unknown-float45 float :offset 6296) - (unknown-word08 int32 :offset 6300) - (default-collide-as collide-spec :offset 6304) - (unknown-word09 int32 :offset 6308) - (default-collide-with collide-spec :offset 6312) - (time-of-last-zero-input time-frame :offset 6320) - (unknown-time-frame29 time-frame :offset 6328) - (unknown-dword12 int64 :offset 6336) - (time-of-last-debug-heal time-frame :offset 6368) - (unknown-quaternion05 quaternion :inline :offset 6384) - (unknown-time-frame31 time-frame :offset 6400) - (unknown-time-frame32 time-frame :offset 6408) - (pad uint8 :offset 6415) + ((unknown-float00 float :offset 448) + (unknown-float01 float :offset 452) + (unknown-float02 float :offset 456) + (unknown-float03 float :offset 460) + (transv-ctrl vector :inline :offset 480) + (target-transv vector :inline :offset 496) + (bent-gravity-normal vector :inline :offset 512) + (quat-for-control quaternion :inline :offset 528) + (override-quat quaternion :inline :offset 544) + (override-quat-alpha float :offset 560) + (ctrl-xz-vel float :offset 564) + (unknown-float003 float :offset 568) + (turn-go-the-long-way float :offset 572) + (velocity-after-thrust float :offset 576) + (turn-lockout-end-time time-frame :offset 584) + (turn-to-alt-heading vector :inline :offset 592) + (last-transv vector :inline :offset 608) + (last-quat-for-control quaternion :inline :offset 624) + (trans-log-trans vector 128 :inline :offset 640) + (trans-log-times time-frame 128 :offset 2688) + (trans-log-idx int32 :offset 3712) + (draw-offset vector :inline :offset 3728) + (cspace-offset vector :inline :offset 3744) + (anim-collide-offset-local vector :inline :offset 3760) + (anim-collide-offset-world vector :inline :offset 3776) + (old-anim-collide-offset-world vector :inline :offset 3792) + (anim-collide-offset-delta-world vector :inline :offset 3808) + (standard-dynamics dynamics :offset 3824) + (mod-surface surface :offset 3828) + (current-surface surface :offset 3832) + (prev-surf surface :offset 3836) + (time-of-last-surface-change time-frame :offset 3840) + (cpad cpad-info :offset 3848) + (turn-to-angle float :offset 3852) + (last-turn-to-angle float :offset 3856) + (turn-to-magnitude float :offset 3860) + (last-turn-to-magnitude float :offset 3864) + (to-target-pt-xz vector :inline :offset 3872) + (last-to-target-pt-xz vector :inline :offset 3888) + (turn-to-target vector :inline :offset 3904) + (last-turn-to-target vector :inline :offset 3920) + (turn-history-ctrl vector 7 :inline :offset 3936) + (pad-xz-dir vector :inline :offset 4064) + (last-pad-xz-dir vector :inline :offset 4080) + (pad-magnitude float :offset 4096) + (last-pad-magnitude float :offset 4100) + (time-of-last-pad-read time-frame :offset 4104) + (w-R-c matrix :inline :offset 4112) + (c-R-w matrix :inline :offset 4176) + (ctrl-orientation matrix :inline :offset 4240) + (pre-collide-local-normal vector :inline :offset 4320) + (camera-pos vector :inline :offset 4336) + (cam-R-w matrix :inline :offset 4352) + (update-cam-R-w-start-time int64 :offset 4416) + (force-turn-to-direction vector :inline :offset 4432) + (force-turn-to-speed float :offset 4448) + (unknown-floatiujh1bnb2n3i1 float :offset 4452) + (force-turn-to-strength float :offset 4456) + (tongue-counter int32 :offset 4460) + (collide-extra-velocity vector :inline :offset 4464) + (additional-decaying-velocity vector :inline :offset 4480) + (additional-decaying-velocity-end-time time-frame :offset 4496) + (additional-decaying-velocity-decay-start-time time-frame :offset 4504) + (gravity-normal vector :inline :offset 4512) + (last-gravity-normal vector :inline :offset 4528) + (last-trans-any-surf vector :inline :offset 4544) + (unknown-float16 float :offset 4548) + (ground-contact-normal vector :inline :offset 4560) + (last-trans-on-ground vector :inline :offset 4576) + (ground-contact-sphere-center vector :inline :offset 4592) + (transv-on-last-impact vector :inline :offset 4608) + (list-time-on-ground time-frame :offset 4624) + (ground-local-norm-dot-grav float :offset 4632) + (local-slope-z float :offset 4636) + (local-slope-x float :offset 4640) + (surface-slope-z float :offset 4644) + (surface-slope-x float :offset 4648) + (last-time-on-surface time-frame :offset 4656) + (normal-impact-vel float :offset 4664) + (last-time-touching-actor time-frame :offset 4672) + (wall-contact-pat pat-surface :offset 4680) + (wall-contact-pt vector :inline :offset 4688) + (wall-contact-poly-normal vector :inline :offset 4704) + (wall-contact-normal vector :inline :offset 4720) + (actor-contact-pt vector :inline :offset 4736) + (actor-contact-normal vector :inline :offset 4752) + (actor-contact-handle handle :offset 4768) + (gspot-pat-surfce pat-surface :offset 4776) + (gspot-slope-z float :offset 4780) + (gspot-slope-x float :offset 4784) + (ctrl-slope-heading float :offset 4788) + (ctrl-slope-z float :offset 4792) + (ctrl-slope-x float :offset 4796) + (unknown-word000 int32 :offset 4800) + (unknown-float002 float :offset 4804) + (unknown-float-n12iuh3n1 float :offset 4808) + (unknown-float-ki1jhbn23hj float :offset 4812) + (time-of-last-lc time-frame :offset 4816) + (low-coverage-pat-next1 pat-surface :offset 4828) + (low-coverage-dist-to-next2 float :offset 4832) + (low-coverage-pat-next2 pat-surface :offset 4836) + (low-coverage-slope-to-next1 float :offset 4824) + (low-coverage-norm-of-next1 vector :inline :offset 4848) + (low-coverage-norm-of-next2 vector :inline :offset 4864) + (low-coverage-overhang-plane-normal vector :inline :offset 4912) + (low-coverage-tangent vector :inline :offset 4928) + (low-coverage-tangent-xz vector :inline :offset 4944) + (btransv vector :inline :offset 4976) + (blocked-factor float :offset 4992) + (blocked-in-air-factor float :offset 4996) + (time-of-last-clear-wall-in-jump time-frame :offset 5000) + (time-of-last-lc-touch-edge time-frame :offset 5008) + (collision-spheres collide-shape-prim-sphere 10 :offset 5016) + (unknown-word02 int32 :offset 5064) + (last-roll-end-time time-frame :offset 5072) + (last-running-attack-end-time time-frame :offset 5080) + (last-hands-attempt-time time-frame :offset 5088) + (last-attack-end-time time-frame :offset 5096) + (last-feet-attempt-time time-frame :offset 5104) + (unknown-time-frame13 time-frame :offset 5112) + (last-time-of-stuck time-frame :offset 5120) + (bend-amount float :offset 5132) + (bend-target float :offset 5136) + (bend-speed float :offset 5140) + (ctrl-to-head-offset vector :inline :offset 5152) + (lhand-cspace cspace :offset 5168) + (rhand-cspace cspace :offset 5172) + (midpoint-of-hands vector :inline :offset 5184) + (ctrl-to-hands-offset vector :inline :offset 5200) + (sidekick-root cspace :inline :offset 5216) + (collide-mode symbol :offset 5248) + (collide-mode-transition float :offset 5252) + (duck-gun-tube-transision float :offset 5256) + (transv-history vector 15 :inline :offset 5264) + (average-xz-vel float :offset 5520) + (idx-of-fastest-xz-vel int32 :offset 5524) + (hand-to-edge-dist float :offset 5528) + (unknown-symbol000 symbol :offset 5532) + (edge-grab-edge-dir vector :inline :offset 5536) + (unknown-vector35 vector :inline :offset 5552) + (edge-grab-across-edge-dir vector :inline :offset 5568) + (last-successful-compute-edge-time time-frame :offset 5584) + (edge-grab-start-time time-frame :offset 5592) + (unknown-handle000 handle :offset 5600) + (anim-handle handle :offset 5608) + (unknown-word04 uint32 :offset 5616) + (unknown-spool-anim00 spool-anim :offset 5616) + (unknown-word05 int32 :offset 5616) + (unknown-symbol01 symbol :offset 5616) + (unknown-float34 float :offset 5616) + (did-move-to-pole-or-max-jump-height float :offset 5620) + (unknown-symbol03 float :offset 5624) + (unknown-float35 float :offset 5628) + (unknown-float36 float :offset 5632) + (unknown-float37 float :offset 5636) + (unknown-vector37 vector :inline :offset 5648) + (unknown-vector38 vector :inline :offset 5664) + (unknown-vector39 vector :inline :offset 5680) + (unknown-vector40 vector :inline :offset 5696) + (sliding-start-time time-frame :offset 5712) + (unknown-time-frame18 time-frame :offset 5720) + (unknown-sound-id00 sound-id :offset 5776) + (unknown-handle02 handle :offset 5792) + (impact-ctrl impact-control :inline :offset 5824) + (unknown-word06 int32 :offset 5832) + (unknown-vector41 vector :inline :offset 5888) + (last-trans-leaving-surf vector :inline :offset 5904) + (unknown-float38 float :offset 5908) + (highest-jump-mark vector :inline :offset 5920) + (unknown-float39 float :offset 5924) + (unknown-time-frame19 time-frame :offset 5936) + (time-of-last-debug-float time-frame :offset 5944) + (danger-mode symbol :offset 5984) + (target-attack-id uint32 :offset 5988) + (unknown-attack-id00 int32 :offset 5992) + (bomb-scale float :offset 5996) + (attack-count uint64 :offset 6000) + (unknown-dword06 handle :offset 6008) + (unknown-time-frame000 time-frame :offset 6016) + (unknown-combo-tracker00 combo-tracker :inline :offset 6032) + (unknown-time-frame21 time-frame :offset 6072) + (unknown-dword07 int64 :offset 6096) + (unknown-dword08 int64 :offset 6104) + (unknown-dword09 int64 :offset 6112) + (unknown-dword10 int64 :offset 6120) + (jump-kind symbol :offset 6144) + (unknown-quaternion04 quaternion :inline :offset 6160) + (unknown-sound-id01 sound-id :offset 6176) + (unknown-float41 float :offset 6180) + (unknown-float42 float :offset 6184) + (history-idx uint16 :offset 6188) + (history-length uint16 :offset 6190) + (remaining-ctrl-iterations int32 :offset 6192) + (invul1-on-time time-frame :offset 6200) + (invul1-off-time time-frame :offset 6208) + (invul2-on-time time-frame :offset 6216) + (invul2-off-time time-frame :offset 6224) + (unknown-float43 float :offset 6232) + (unknown-float001 float :offset 6236) + (board-jump-and-swim-sound sound-id :offset 6240) + (bubbles-sound sound-id :offset 6244) + (unknown-time-frame26 time-frame :offset 6248) + (unknown-time-frame27 time-frame :offset 6256) + (yellow-eco-last-use-time int64 :offset 6264) + (align-xz-vel vector :inline :offset 6272) + (zx-vel-frac float :offset 6288) + (unknown-sound-id04 sound-id :offset 6292) + (unknown-float45 float :offset 6296) + (default-collide-as-all collide-spec :offset 6300) + (default-collide-as-fgnd collide-spec :offset 6304) + (default-collide-with-all collide-spec :offset 6308) + (default-collide-with-fgnd collide-spec :offset 6312) + (time-of-last-zero-input time-frame :offset 6320) + (time-of-last-nonzero-input time-frame :offset 6328) + (time-between-zero-inputs time-frame :offset 6336) + (time-of-last-debug-heal time-frame :offset 6368) + (last-nonzero-input-dir-targ quaternion :inline :offset 6384) + (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) + (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) + (pad uint8 :offset 6415) ) :method-count-assert 68 :size-assert #x1910 diff --git a/goal_src/jak2/engine/common_objs/voicebox.gc b/goal_src/jak2/engine/common_objs/voicebox.gc index b1394fb52b..1f3560ed84 100644 --- a/goal_src/jak2/engine/common_objs/voicebox.gc +++ b/goal_src/jak2/engine/common_objs/voicebox.gc @@ -75,9 +75,9 @@ (enter () _type_ :state 20) (idle () _type_ :state 21) (exit () _type_ :state 22) - (remote-method-23 (_type_) none 23) - (remote-method-24 (_type_ vector) float 24) - (remote-method-25 (_type_) none 25) + (init (_type_) none 23) + (get-track-pt-and-scale (_type_ vector) float 24) + (post-common (_type_) none 25) ) ) @@ -89,7 +89,7 @@ :sort 1 ) -(defmethod remote-method-24 remote ((obj remote) (arg0 vector)) +(defmethod get-track-pt-and-scale remote ((obj remote) (arg0 vector)) (let ((s4-0 (handle->process (-> obj focus handle)))) (when s4-0 (set! (-> arg0 quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) @@ -101,7 +101,7 @@ (lerp-scale 1.0 0.0 (-> obj blend) 0.8 1.0) ) -(defmethod remote-method-25 remote ((obj remote)) +(defmethod post-common remote ((obj remote)) (with-pp (rlet ((acc :class vf) (vf0 :class vf) @@ -160,7 +160,7 @@ (s5-0 (new 'stack-no-clear 'vector)) ) (set! (-> s5-0 quad) (-> self parent-override 0 trans quad)) - (let ((f30-0 (remote-method-24 self s5-0))) + (let ((f30-0 (get-track-pt-and-scale self s5-0))) (let ((a1-2 (new 'stack-no-clear 'vector))) (set! (-> a1-2 quad) (-> self parent-override 0 trans quad)) (vector-lerp! (-> self root trans) a1-2 s5-0 (-> self blend)) @@ -174,15 +174,7 @@ (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (target-pos 8) (-> self root trans)) 1.0) (new 'static 'vector :y 1.0 :w 1.0) ) - (rotate-toward-orientation! - (-> self root) - s5-1 - 65536.0 - 5461.3335 - 150 - 0.00000000000000000000000000000000000000000021 - 0.0 - ) + (rotate-toward-orientation! (-> self root) s5-1 65536.0 5461.3335 150 150 0.0) ) (when gp-0 (let* ((gp-1 (-> (the-as process-drawable gp-0) root)) @@ -295,7 +287,7 @@ (none) ) :post (behavior () - (remote-method-25 self) + (post-common self) (none) ) ) @@ -329,7 +321,7 @@ ) ;; WARN: Return type mismatch remote vs none. -(defmethod remote-method-23 remote ((obj remote)) +(defmethod init remote ((obj remote)) (reset-to-collide-spec (-> obj focus) (collide-spec jak player-list)) (initialize-skeleton obj @@ -399,7 +391,7 @@ (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> arg0 quad)) (set! (-> self base-trans quad) (-> arg0 quad)) - (remote-method-23 self) + (init self) (set! (-> self event-hook) (-> (method-of-object self enter) event)) (go-virtual enter) (none) @@ -429,17 +421,17 @@ :flag-assert #x1c00c00139 (:methods (wait () _type_ :state 26) - (judge-method-27 (_type_) none 27) + (setup-collision (_type_) none 27) ) ) -(defmethod remote-method-24 judge ((obj judge) (arg0 vector)) +(defmethod get-track-pt-and-scale judge ((obj judge) (arg0 vector)) (set! (-> arg0 quad) (-> obj base-trans quad)) 1.0 ) -(defmethod remote-method-25 judge ((obj judge)) +(defmethod post-common judge ((obj judge)) (ja-post) (if (type? (-> obj root) collide-shape) (update-transforms (the-as collide-shape (-> obj root))) @@ -534,7 +526,7 @@ ) ) -(defmethod judge-method-27 judge ((obj judge)) +(defmethod setup-collision judge ((obj judge)) (let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec collectable)) @@ -556,8 +548,8 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! judge ((obj judge) (arg0 entity-actor)) - (judge-method-27 obj) - (remote-method-23 obj) + (setup-collision obj) + (init obj) (process-drawable-from-entity! obj arg0) (set! (-> obj root trans y) (+ 4096.0 (-> obj root trans y))) (set! (-> obj base-trans quad) (-> obj root trans quad)) @@ -570,8 +562,8 @@ (defbehavior judge-init-by-other judge ((arg0 vector) (arg1 uint)) (process-entity-set! self (the-as entity-actor #f)) (set! (-> self score) arg1) - (judge-method-27 self) - (remote-method-23 self) + (setup-collision self) + (init self) (vector-identity! (-> self root scale)) (quaternion-identity! (-> self root quat)) (set! (-> self root trans quad) (-> arg0 quad)) diff --git a/goal_src/jak2/engine/math/transformq-h.gc b/goal_src/jak2/engine/math/transformq-h.gc index 1476a6af8a..393be4cf03 100644 --- a/goal_src/jak2/engine/math/transformq-h.gc +++ b/goal_src/jak2/engine/math/transformq-h.gc @@ -64,7 +64,7 @@ (set-yaw-angle-clear-roll-pitch! (_type_ float) quaternion 14) (set-roll-to-grav! (_type_ float) quaternion 15) (set-roll-to-grav-2! (_type_ float) quaternion 16) - (rotate-toward-orientation! (_type_ quaternion float float int float float) quaternion 17) + (rotate-toward-orientation! (_type_ quaternion float float int int float) quaternion 17) (set-quaternion! (_type_ quaternion) quaternion 18) (set-heading-vec-clear-roll-pitch! (_type_ vector) quaternion 19) (point-toward-point-clear-roll-pitch! (_type_ vector) quaternion 20) diff --git a/goal_src/jak2/engine/math/transformq.gc b/goal_src/jak2/engine/math/transformq.gc index 683bf104e6..8615a8f5e5 100644 --- a/goal_src/jak2/engine/math/transformq.gc +++ b/goal_src/jak2/engine/math/transformq.gc @@ -135,9 +135,9 @@ (s1-0 (-> *standard-dynamics* gravity-normal)) (s3-0 (quaternion->matrix (new 'stack-no-clear 'matrix) s5-0)) ) - (let ((s4-0 (&-> s3-0 data 8))) - (vector-normalize! (vector-flatten! (the-as vector (&-> s3-0 data 4)) s1-0 (the-as vector s4-0)) 1.0) - (vector-cross! (the-as vector (-> s3-0 data)) (the-as vector (&-> s3-0 data 4)) (the-as vector s4-0)) + (let ((s4-0 (-> s3-0 vector 2))) + (vector-normalize! (vector-flatten! (-> s3-0 vector 1) s1-0 s4-0) 1.0) + (vector-cross! (the-as vector (-> s3-0 vector)) (-> s3-0 vector 1) s4-0) ) (let ((a1-5 (matrix-rotate-z! (new 'stack-no-clear 'matrix) arg0))) (matrix*! s3-0 a1-5 s3-0) @@ -162,7 +162,7 @@ ) ) -(defmethod rotate-toward-orientation! trsqv ((obj trsqv) (arg0 quaternion) (arg1 float) (arg2 float) (arg3 int) (arg4 float) (arg5 float)) +(defmethod rotate-toward-orientation! trsqv ((obj trsqv) (arg0 quaternion) (arg1 float) (arg2 float) (arg3 int) (arg4 int) (arg5 float)) "Adjust our orientation toward target, subject to some rate limits. For jak 1, I said: I don't think this is a very robust function and probably doesn't work right in cases @@ -174,7 +174,7 @@ (sv-192 (function quaternion vector vector float int quaternion)) (sv-208 quaternion) (sv-224 vector) - (sv-240 float) + (sv-240 int) (sv-256 vector) (sv-272 vector) ) @@ -188,7 +188,7 @@ (set! sv-208 gp-0) (set! sv-224 (vector-y-quaternion! (new 'stack-no-clear 'vector) s5-0)) (let ((a2-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) arg0))) - (sv-192 sv-208 sv-224 a2-1 arg2 (the-as int sv-240)) + (sv-192 sv-208 sv-224 a2-1 arg2 sv-240) ) (quaternion-normalize! (quaternion*! s5-0 gp-0 s5-0)) ) diff --git a/goal_src/jak2/engine/target/board/board-states.gc b/goal_src/jak2/engine/target/board/board-states.gc index 6a5b8f9092..5eb2180686 100644 --- a/goal_src/jak2/engine/target/board/board-states.gc +++ b/goal_src/jak2/engine/target/board/board-states.gc @@ -43,22 +43,24 @@ ;; WARN: Return type mismatch float vs none. (defbehavior target-board-anim-trans target () - (let ((f26-0 (deg- - (quaternion-vector-y-angle (-> self control dir-targ) (-> self control local-normal)) - (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) - ) - ) - (f28-0 (* (deg- - (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) - (quaternion-vector-y-angle (-> self control unknown-quaternion03) (-> self control local-normal)) - ) - (-> self clock frames-per-second) - ) + (let ((f26-0 + (deg- + (quaternion-vector-y-angle (-> self control dir-targ) (-> self control local-normal)) + (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) + ) + ) + (f28-0 + (* (deg- + (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) + (quaternion-vector-y-angle (-> self control last-quat-for-control) (-> self control local-normal)) ) + (-> self clock frames-per-second) + ) + ) (f30-0 (-> self board turn-anim-targ)) ) (let ((f0-1 (lerp-scale 1.0 -1.0 f28-0 -32768.0 32768.0))) - (if (or (< (fabs f0-1) 0.1) (< (-> self control unknown-float10) 0.3)) + (if (or (< (fabs f0-1) 0.1) (< (-> self control turn-to-magnitude) 0.3)) (seek! (-> self board turn-anim-mag) 0.0 (* 8.0 (-> self clock seconds-per-frame))) (seek! (-> self board turn-anim-mag) f0-1 (* 2.0 (-> self clock seconds-per-frame))) ) @@ -88,7 +90,7 @@ ) (when (and (or (< (* f30-0 (-> self board turn-anim-targ)) 0.0) (= f30-0 0.0)) (and (< (* 0.2 (-> *TARGET_BOARD-bank* turn-frames)) (fabs (- f30-0 (-> self board turn-anim-targ)))) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) ) ) (let ((v1-50 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) @@ -140,8 +142,8 @@ ) (set! (-> self board spin-start-time) (-> self clock frame-counter)) (set! (-> self board spin-start-dir quad) (-> self node-list data 3 bone transform vector 2 quad)) - (vector-flatten! (-> self control unknown-vector03) (-> self control c-R-w vector 2) *up-vector*) - (vector-normalize! (-> self control unknown-vector03) 1.0) + (vector-flatten! (-> self control turn-to-alt-heading) (-> self control c-R-w vector 2) *up-vector*) + (vector-normalize! (-> self control turn-to-alt-heading) 1.0) (rot->dir-targ! (-> self control)) (set! (-> self board trotyv-max) (lerp-scale @@ -894,7 +896,7 @@ s2-0 (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) - (set! (-> self control unknown-time-frame00) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) (the int (lerp-scale 225.0 0.0 (vector-dot s2-0 (-> self control c-R-w vector 2)) -1.0 1.0)) ) @@ -1143,9 +1145,9 @@ ) ) (('ramp) - (when (not (-> self control unknown-symbol02)) + (when (not (-> self control did-move-to-pole-or-max-jump-height)) (let ((v0-3 (the-as object #t))) - (set! (-> self control unknown-symbol02) (the-as float v0-3)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float v0-3)) v0-3 ) ) @@ -1168,14 +1170,14 @@ (logior! (-> self control root-prim prim-core action) (collide-action no-normal-reset)) (set! (-> self control mod-surface) *board-halfpipe-mods*) (set! (-> self board mods-backup) (-> self control mod-surface)) - (set! (-> self control unknown-time-frame17) 0) + (set! (-> self control sliding-start-time) 0) (when (< (vector-dot (-> self control c-R-w vector 1) (-> self control dynam gravity-normal)) 0.7) (vector-matrix*! (-> self control transv-ctrl) (-> self control transv) (-> self control w-R-c)) (set! (-> self control transv-ctrl y) 0.0) (vector-matrix*! (-> self control transv) (-> self control transv-ctrl) (-> self control c-R-w)) ) (set! (-> self control unknown-word04) (the-as uint #f)) - (set! (-> self control unknown-symbol02) (the-as float #f)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #f)) (do-edge-grabs *target* *collide-cache* *collide-edge-board-halfpipe-spec*) (when (not (-> self control unknown-spool-anim00)) (let ((gp-0 (vector-flatten! @@ -1239,14 +1241,14 @@ (none) ) :trans (behavior () - (when (and (or (= (the-as int (-> self control unknown-symbol02)) #t) + (when (and (or (= (the-as int (-> self control did-move-to-pole-or-max-jump-height)) #t) (and (< (- (-> self clock frame-counter) (-> self board halfpipe-lip-time)) (seconds 0.1)) (= (-> self board halfpipe-lip-event) 'lipramp) ) ) (< 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) - (set! (-> self control unknown-symbol02) (the-as float 'done)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float 'done)) (let ((v1-16 (new-stack-vector0)) (f0-2 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) @@ -1267,7 +1269,7 @@ ) ) (set! (-> self board halfpipe-time) (-> self clock frame-counter)) - (if (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (if (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (set! (-> self board halfpipe-gspot-time) (-> self clock frame-counter)) ) (when (jump-hit-ground-stuck?) @@ -1286,33 +1288,31 @@ ) (target-board-spin-check) (cond - ((> (-> self control unknown-time-frame17) 0) + ((> (-> self control sliding-start-time) 0) (cond - ((< 0.7 (-> self control unknown-float10)) + ((< 0.7 (-> self control turn-to-magnitude)) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self control edge-grab-across-edge-dir quad)) (set! (-> gp-0 y) 0.0) (vector-normalize! gp-0 1.0) (if (< 0.7 (vector-dot (-> self control to-target-pt-xz) gp-0)) - (+! (-> self control unknown-time-frame17) - (- (-> self clock frame-counter) (-> self clock old-frame-counter)) - ) - (set! (-> self control unknown-time-frame17) 1) + (+! (-> self control sliding-start-time) (- (-> self clock frame-counter) (-> self clock old-frame-counter))) + (set! (-> self control sliding-start-time) 1) ) ) ) (else - (set! (-> self control unknown-time-frame17) 1) + (set! (-> self control sliding-start-time) 1) ) ) ) ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (< (-> self board halfpipe-lip-time) (+ (-> self state-time) (seconds -0.2))) ) - (set! (-> self control unknown-time-frame17) 1) + (set! (-> self control sliding-start-time) 1) ) ) - (when (or (>= (-> self control unknown-time-frame17) (seconds 0.05)) + (when (or (>= (-> self control sliding-start-time) (seconds 0.05)) (and (>= (- (-> self clock frame-counter) (-> self board halfpipe-gspot-time)) (seconds 0.5)) (< (-> self board halfpipe-lip-time) (+ (-> self state-time) (seconds -0.2))) ) @@ -2144,14 +2144,14 @@ (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *board-turn-to-mods*) (set! (-> self board mods-backup) (-> self control mod-surface)) - (set! (-> self control unknown-time-frame17) arg1) + (set! (-> self control sliding-start-time) arg1) (vector-normalize-copy! (-> self control unknown-vector38) arg0 1.0) (forward-up-nopitch->quaternion (-> self control dir-targ) (-> self control unknown-vector38) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) - (set! (-> self control unknown-time-frame00) (+ (-> self clock frame-counter) arg1)) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) arg1)) (none) ) :exit target-board-exit @@ -2168,7 +2168,7 @@ (flush-trick-list (-> self board)) (go target-board-jump (-> *TARGET_BOARD-bank* jump-height-min) (-> *TARGET_BOARD-bank* jump-height-max) #f) ) - (if (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self control unknown-time-frame17)) + (if (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self control sliding-start-time)) (go target-board-stance) ) (target-board-anim-trans) @@ -2293,7 +2293,7 @@ 81920.0 1024.0 ) - (set! (-> self control unknown-pat-surface01) (-> s5-0 best-other-tri pat)) + (set! (-> self control gspot-pat-surfce) (-> s5-0 best-other-tri pat)) ) ) (if (< (-> self control trans y) (-> self control gspot-pos y)) @@ -2485,7 +2485,7 @@ ) :trans (behavior () (set! (-> self board halfpipe-time) (-> self clock frame-counter)) - (if (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (if (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (set! (-> self board halfpipe-gspot-time) (-> self clock frame-counter)) ) (if (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 1)) @@ -2795,8 +2795,8 @@ (none) ) :post (behavior () - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) (vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame))) (target-no-move-post) (target-board-effect) @@ -2848,7 +2848,7 @@ :flags (surface-flag check-edge air) ) ) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (let ((a0-6 (target-time-to-ground))) (cond ((< a0-6 (seconds 0.207)) @@ -2993,8 +2993,8 @@ (none) ) :post (behavior () - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) (vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame))) (target-post) (target-board-effect) @@ -3260,8 +3260,8 @@ (none) ) :post (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) diff --git a/goal_src/jak2/engine/target/board/target-board.gc b/goal_src/jak2/engine/target/board/target-board.gc index 53c498504d..be25a9716f 100644 --- a/goal_src/jak2/engine/target/board/target-board.gc +++ b/goal_src/jak2/engine/target/board/target-board.gc @@ -269,7 +269,7 @@ (case arg3 ((1) (when (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) - (let* ((f30-0 (* 122880.0 (-> self control unknown-float10) (-> self clock seconds-per-frame))) + (let* ((f30-0 (* 122880.0 (-> self control turn-to-magnitude) (-> self clock seconds-per-frame))) (a2-1 (-> self board ride-dir)) (v1-12 (vector-flatten! (new 'stack-no-clear 'vector) (-> self control to-target-pt-xz) a2-1)) ) @@ -591,7 +591,7 @@ (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :noboard #x1 :probe #x1)) (set! (-> self focus-status) (logior (focus-status board) (-> self focus-status))) (logclear! (-> self control root-prim prim-core action) (collide-action can-ride)) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (let ((v1-82 (-> self node-list data))) (set! (-> v1-82 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!)) (set! (-> v1-82 0 param1) (the-as basic (-> self control trans))) @@ -610,8 +610,8 @@ (set! (-> self board shock-offset) 0.0) (set! (-> self board shock-offsetv) 0.0) (set! (-> self board shock-rotx) 0.0) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -653,8 +653,8 @@ (set! (-> self board latch?) #f) (mode-set! (-> self board main) (joint-mod-mode flex-blend)) (mode-set! (-> self board upper-body) (joint-mod-mode flex-blend)) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -716,7 +716,7 @@ (defbehavior target-board-smack-surface? target () (when (and (logtest? (-> self control status) (collide-status touch-wall)) - (< (+ (-> self clock frame-counter) (seconds -0.05)) (-> self control unknown-time-frame07)) + (< (+ (-> self clock frame-counter) (seconds -0.05)) (-> self control last-time-touching-actor)) (< 0.7 (-> self control touch-angle)) (< 73728.0 (-> self control ctrl-xz-vel)) (and (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) @@ -765,10 +765,10 @@ 1.0 ) ((< (-> gp-0 z) 0.0) - (fmax 0.75 (-> self control unknown-float10)) + (fmax 0.75 (-> self control turn-to-magnitude)) ) (else - (-> self control unknown-float10) + (-> self control turn-to-magnitude) ) ) ) @@ -798,14 +798,14 @@ (set! f0-28 0.0) (set! f1-23 0.0) ) - (when (and (< (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 1)) + (when (and (< (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 1)) (>= f28-0 0.5) (< (vector-dot (-> self control wall-contact-normal) (-> self control to-target-pt-xz)) -0.7) (logtest? (-> self control mod-surface flags) (surface-flag air)) (< 0.0 (-> gp-0 y)) ) (cond - ((and (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.1)) + ((and (>= (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.1)) (< 0.3 (-> self control blocked-factor)) ) (set! f0-28 f1-23) @@ -1334,10 +1334,10 @@ (go target-board-turn-to (-> self control transv) (seconds 0.2)) ) (else - (set! (-> self control unknown-time-frame00) + (set! (-> self control turn-lockout-end-time) (the-as time-frame - (max (+ (-> self clock frame-counter) (seconds 0.1)) (-> self control unknown-time-frame00)) + (max (+ (-> self clock frame-counter) (seconds 0.1)) (-> self control turn-lockout-end-time)) ) ) ) @@ -1420,11 +1420,11 @@ ) (< (-> self control gspot-slope-z) 0.0) ) - (or (not (or (= (-> self control unknown-pat-surface01 mode) (pat-mode ground)) - (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (or (not (or (= (-> self control gspot-pat-surfce mode) (pat-mode ground)) + (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) ) ) - (or (= (-> self control unknown-pat-surface01 event) (pat-event rail)) + (or (= (-> self control gspot-pat-surfce event) (pat-event rail)) (and (logtest? (-> self water flags) (water-flags active)) (< (-> self control gspot-pos y) (-> self water surface-height)) ) @@ -1434,7 +1434,7 @@ ) (zero? (logand (focus-status halfpipe) (-> self focus-status))) ) - (and (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (and (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (and (< (fabs (vector-dot (-> self control gspot-normal) (-> self control dynam gravity-normal))) 0.7) (zero? (logand (focus-status halfpipe) (-> self focus-status))) ) @@ -1447,12 +1447,12 @@ ) ) ) - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) ) (else - (set! (-> self control unknown-float30) 1024.0) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-speed) 1024.0) + (set! (-> self control bend-target) 1.0) (when (< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) (forward-up-nopitch->quaternion (-> self control dir-targ) @@ -1524,8 +1524,8 @@ (-> self control dynam gravity-normal) (the-as float (-> self control dynam gravity-length)) ) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (when (and (-> self board unknown-symbol00) (zero? (logand (focus-status halfpipe) (-> self focus-status)))) (let ((f30-0 @@ -1548,7 +1548,7 @@ (vector-flatten! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) (-> self control trans) (-> self board unknown-vector00)) - (-> self control unknown-dynamics00 gravity-normal) + (-> self control standard-dynamics gravity-normal) ) ) ) @@ -1561,7 +1561,7 @@ (or (< (-> self board unknown-time-frame01) (-> self control last-time-on-surface)) (< (- (-> self clock frame-counter) (-> self board unknown-time-frame01)) (seconds 0.2)) ) - (< 0.98 (vector-dot (-> self board unknown-vector01) (-> self control unknown-dynamics00 gravity-normal))) + (< 0.98 (vector-dot (-> self board unknown-vector01) (-> self control standard-dynamics gravity-normal))) (< f26-0 8192.0) (< f30-0 8192.0) (or (< (* 0.2 f28-0) f30-0) @@ -1629,7 +1629,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (target-board-pre-move) (build-conversions (-> self control transv)) @@ -1639,7 +1639,7 @@ (when (-> self board stick-off) (let ((f0-5 0.0)) (set! (-> self control cpad stick0-speed) f0-5) - (set! (-> self control unknown-float12) f0-5) + (set! (-> self control pad-magnitude) f0-5) ) ) (when *target-rc-board-controls* @@ -1657,17 +1657,17 @@ (the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0)) ) ) - (turn-to-vector s5-0 (-> self control unknown-float12)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) ) - (if (and (= (-> self control unknown-float12) 0.0) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (if (and (= (-> self control pad-magnitude) 0.0) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) (not (logtest? (-> self control current-surface flags) (surface-flag turn-to-vel))) (>= (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) ) (rot->dir-targ! (-> self control)) ) (when (and (< (- (-> self clock frame-counter) (-> self control last-time-on-surface)) (seconds 0.1)) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) (not (logtest? (-> self control current-surface flags) (surface-flag turn-to-vel))) (>= (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) ) @@ -1815,7 +1815,7 @@ ) ) (target-board-collision) - (if (!= (-> self control unknown-float30) 0.0) + (if (!= (-> self control bend-speed) 0.0) (bend-gravity) ) (post-flag-setup) @@ -2342,28 +2342,28 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) - (set! (-> self control unknown-float30) 32.0) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-speed) 32.0) + (set! (-> self control bend-target) 1.0) (logior! (-> self control root-prim prim-core action) (collide-action check-edge)) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) - (turn-to-vector s5-0 (-> self control unknown-float12)) - (if (< 0.0 (-> self control unknown-float10)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) + (if (< 0.0 (-> self control turn-to-magnitude)) (set! (-> self board ride-pad-vector 0 quad) (-> self control to-target-pt-xz quad)) ) - (board-ride-add-thrust s5-0 (-> self control unknown-float10)) + (board-ride-add-thrust s5-0 (-> self control turn-to-magnitude)) (let ((s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) s5-0 16384.0))) (set! (-> s5-1 y) 0.0) - (vector-xz-normalize! s5-1 (-> self control unknown-float10)) + (vector-xz-normalize! s5-1 (-> self control turn-to-magnitude)) (let ((f0-16 (vector-dot s5-1 (-> self board ride-dir)))) - (if (>= 0.0 (-> self control unknown-float10)) + (if (>= 0.0 (-> self control turn-to-magnitude)) (set! f0-16 0.0) ) (set! (-> self board ride-lean-targ) f0-16) @@ -2584,7 +2584,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float s5-1))) (while (nonzero? s5-1) (+! s5-1 -1) - (set! (-> self control unknown-word07) s5-1) + (set! (-> self control remaining-ctrl-iterations) s5-1) (set! (-> self board turn-anim-targ) (fmax -10.0 (fmin 10.0 (-> self board turn-anim-targ)))) (or (not (>= (* (-> self board turn-anim-targ) (-> self board turn-anim-frame)) 0.0)) (< (fabs (-> self board turn-anim-frame)) (fabs (-> self board turn-anim-targ))) diff --git a/goal_src/jak2/engine/target/collide-reaction-target.gc b/goal_src/jak2/engine/target/collide-reaction-target.gc index e4b1bd940c..83196a5b26 100644 --- a/goal_src/jak2/engine/target/collide-reaction-target.gc +++ b/goal_src/jak2/engine/target/collide-reaction-target.gc @@ -135,7 +135,7 @@ (set! (-> arg0 time-of-last-lc-touch-edge) (-> pp clock frame-counter)) (set! sv-40 (logior sv-40 (collide-status touch-edge))) (set! (-> arg0 time-of-last-lc) (-> pp clock frame-counter)) - (let ((f30-0 (vector-dot tangent (-> arg0 unknown-vector10))) + (let ((f30-0 (vector-dot tangent (-> arg0 turn-to-target))) (f0-27 (if (logtest? sv-32 (cshape-reaction-flags csrf01)) (cos (- 16384.0 (acos (-> arg0 coverage)))) (-> arg0 coverage) @@ -414,9 +414,13 @@ (let ((f0-32 (-> arg0 current-surface slope-change-preserve))) (when (< 0.0 f0-32) (let ((v1-223 (new-stack-vector0))) - (let ((f1-25 (vector-dot (-> arg0 unknown-vector14) (the-as vector (-> sv-88 vector))))) + (let ((f1-25 (vector-dot (-> arg0 pre-collide-local-normal) (the-as vector (-> sv-88 vector))))) 0.0 - (vector-! v1-223 (the-as vector (-> sv-88 vector)) (vector-float*! v1-223 (-> arg0 unknown-vector14) f1-25)) + (vector-! + v1-223 + (the-as vector (-> sv-88 vector)) + (vector-float*! v1-223 (-> arg0 pre-collide-local-normal) f1-25) + ) ) (let ((f1-26 (vector-length v1-223))) f1-26 @@ -583,7 +587,7 @@ (new 'stack-no-clear 'vector) (-> self control edge-grab-across-edge-dir) (seek - (vector-length (-> self control unknown-vector18)) + (vector-length (-> self control additional-decaying-velocity)) 40960.0 (* 81920.0 (-> self clock seconds-per-frame)) ) diff --git a/goal_src/jak2/engine/target/logic-target.gc b/goal_src/jak2/engine/target/logic-target.gc index 15fb7065fe..e03556ba28 100644 --- a/goal_src/jak2/engine/target/logic-target.gc +++ b/goal_src/jak2/engine/target/logic-target.gc @@ -29,8 +29,8 @@ ;; DECOMP BEGINS (defbehavior build-conversions target ((arg0 vector)) - (when (!= (-> self control unknown-surface02) (-> self control surf)) - (set! (-> self control unknown-surface02) (-> self control surf)) + (when (!= (-> self control prev-surf) (-> self control surf)) + (set! (-> self control prev-surf) (-> self control surf)) (set! (-> self control time-of-last-surface-change) (-> self clock frame-counter)) ) (surface-mult! (-> self control current-surface) (-> self control mod-surface) (-> self control surf)) @@ -71,8 +71,8 @@ ) (matrix-transpose! (-> self control w-R-c) (-> self control c-R-w)) (vector-matrix*! (-> self control transv-ctrl) arg0 (-> self control w-R-c)) - (set! (-> self control unknown-vector20 quad) (-> self control unknown-vector19 quad)) - (let ((v0-7 (-> self control unknown-vector19))) + (set! (-> self control last-gravity-normal quad) (-> self control gravity-normal quad)) + (let ((v0-7 (-> self control gravity-normal))) (set! (-> v0-7 quad) (-> self control dynam gravity-normal quad)) v0-7 ) @@ -198,11 +198,11 @@ (let ((s3-3 format) (s2-3 arg1) (s1-3 "~0kgspt:~6X mode:~-8S material:~-10S event:~S~%") - (s0-3 (-> arg0 control unknown-pat-surface01)) + (s0-3 (-> arg0 control gspot-pat-surfce)) ) - (set! sv-192 (pat-mode->string (-> arg0 control unknown-pat-surface01))) - (set! sv-208 (pat-material->string (-> arg0 control unknown-pat-surface01))) - (let ((t1-3 (pat-event->string (-> arg0 control unknown-pat-surface01)))) + (set! sv-192 (pat-mode->string (-> arg0 control gspot-pat-surfce))) + (set! sv-208 (pat-material->string (-> arg0 control gspot-pat-surfce))) + (let ((t1-3 (pat-event->string (-> arg0 control gspot-pat-surfce)))) (s3-3 s2-3 s1-3 s0-3 sv-192 sv-208 t1-3) ) ) @@ -476,7 +476,7 @@ (-> arg0 control last-trans-any-surf y) (- (-> (the-as target pp) clock frame-counter) (-> arg0 control last-time-on-surface)) (- (-> arg0 control trans y) (-> arg0 control last-trans-any-surf y)) - (- (-> arg0 control unknown-vector43 y) (-> arg0 control last-trans-leaving-surf y)) + (- (-> arg0 control highest-jump-mark y) (-> arg0 control last-trans-leaving-surf y)) (-> arg0 control ground-impact-vel) ) (let* ((t9-76 format) @@ -485,7 +485,7 @@ (v1-191 (vector-! (new-stack-vector0) (-> arg0 control trans) (-> arg0 control last-trans-any-surf))) (a2-17 (sqrtf (+ (* (-> v1-191 x) (-> v1-191 x)) (* (-> v1-191 z) (-> v1-191 z))))) (v1-193 - (vector-! (new-stack-vector0) (-> arg0 control unknown-vector43) (-> arg0 control last-trans-leaving-surf)) + (vector-! (new-stack-vector0) (-> arg0 control highest-jump-mark) (-> arg0 control last-trans-leaving-surf)) ) ) (t9-76 a0-131 a1-56 a2-17 (sqrtf (+ (* (-> v1-193 x) (-> v1-193 x)) (* (-> v1-193 z) (-> v1-193 z))))) @@ -493,9 +493,9 @@ (format arg1 "~0kbend b:~F t:~F s:~F~%" - (-> arg0 control unknown-float28) - (-> arg0 control unknown-float29) - (-> arg0 control unknown-float30) + (-> arg0 control bend-amount) + (-> arg0 control bend-target) + (-> arg0 control bend-speed) ) (set! sv-64 0) (set! sv-72 0) @@ -524,19 +524,19 @@ ) (defbehavior read-pad target ((arg0 vector)) - (when (!= (-> self control unknown-dword01) (-> *display* real-clock frame-counter)) - (set! (-> self control unknown-vector13 quad) (-> self control unknown-vector12 quad)) - (set! (-> self control unknown-float13) (-> self control unknown-float12)) - (set! (-> self control unknown-dword01) (the-as int (-> *display* real-clock frame-counter))) + (when (!= (-> self control time-of-last-pad-read) (-> *display* real-clock frame-counter)) + (set! (-> self control last-pad-xz-dir quad) (-> self control pad-xz-dir quad)) + (set! (-> self control last-pad-magnitude) (-> self control pad-magnitude)) + (set! (-> self control time-of-last-pad-read) (-> *display* real-clock frame-counter)) ) (set! (-> arg0 x) (sin (-> self control cpad stick0-dir))) (set! (-> arg0 y) 0.0) (set! (-> arg0 z) (cos (-> self control cpad stick0-dir))) (set! (-> arg0 w) 0.0) - (set! (-> self control unknown-vector12 quad) (-> arg0 quad)) - (set! (-> self control unknown-float12) (-> self control cpad stick0-speed)) - (when (< (-> self control unknown-dword02) (-> self clock frame-counter)) - (let ((s5-0 (-> self control unknown-matrix03)) + (set! (-> self control pad-xz-dir quad) (-> arg0 quad)) + (set! (-> self control pad-magnitude) (-> self control cpad stick0-speed)) + (when (< (-> self control update-cam-R-w-start-time) (-> self clock frame-counter)) + (let ((s5-0 (-> self control cam-R-w)) (t9-2 matrix-local->world) (a0-13 #t) ) @@ -553,12 +553,12 @@ ) ) ) - (vector-matrix*! arg0 arg0 (-> self control unknown-matrix03)) + (vector-matrix*! arg0 arg0 (-> self control cam-R-w)) ) (defbehavior set-pad target ((arg0 vector)) - (set! (-> self control unknown-float12) (vector-length arg0)) - (vector-matrix*! (-> self control unknown-vector12) arg0 (matrix-world->local #t #f)) + (set! (-> self control pad-magnitude) (vector-length arg0)) + (vector-matrix*! (-> self control pad-xz-dir) arg0 (matrix-world->local #t #f)) arg0 ) @@ -570,10 +570,10 @@ (defbehavior vector<-pad-in-surface! target ((arg0 vector) (arg1 symbol)) (let ((a1-1 (read-pad (new-stack-vector0)))) - (warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control unknown-matrix03)) + (warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control cam-R-w)) ) (if arg1 - (vector-float*! arg0 arg0 (-> self control unknown-float12)) + (vector-float*! arg0 arg0 (-> self control pad-magnitude)) ) arg0 ) @@ -617,7 +617,7 @@ ) (set! (-> a0-2 quad) (-> self control transv quad)) (let ((f0-1 (vector-dot gp-0 (t9-2 a0-2 1.0))) - (a1-3 (-> self control unknown-vector-array02)) + (a1-3 (-> self control transv-history)) (f2-0 -1000.0) (f1-0 0.0) (a0-3 -1) @@ -638,16 +638,16 @@ ) ) (let ((f1-1 (* 0.0625 f1-0))) - (set! (-> self control unknown-word03) a0-3) - (set! (-> self control unknown-float32) f1-1) + (set! (-> self control idx-of-fastest-xz-vel) a0-3) + (set! (-> self control average-xz-vel) f1-1) (if (logtest? (-> self control current-surface flags) (surface-flag no-turn-around)) (set! (-> v1-7 0) (-> self clock frame-counter)) ) (and (>= (the-as uint (- (-> self clock frame-counter) (-> v1-7 0))) (the-as uint 300)) (< f0-1 0.0) (< 32768.0 f1-1) - (< 0.7 (-> self control unknown-float12)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.3)) + (< 0.7 (-> self control pad-magnitude)) + (>= (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.3)) (>= (- (-> self clock frame-counter) (-> self control time-of-last-lc)) (seconds 0.3)) (logtest? (-> self control status) (collide-status on-surface)) (and (< 0.7 (-> self control surface-angle)) #t) @@ -658,7 +658,7 @@ ) (defbehavior wall-hide? target () - (when (and (< 0.7 (-> self control unknown-float12)) + (when (and (< 0.7 (-> self control pad-magnitude)) (< 0.7 (-> self control blocked-factor)) (and (< (-> self control ctrl-xz-vel) 8192.0) (logtest? (-> self control status) (collide-status touch-wall)) @@ -670,11 +670,13 @@ ) ) ) - (if (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame31)) (seconds 0.1)) - (set! (-> self control unknown-time-frame32) (-> self clock frame-counter)) + (if (>= (- (-> self clock frame-counter) (-> self control time-of-last-wall-hide-first-check-pass)) (seconds 0.1)) + (set! (-> self control time-of-first-wall-hide-first-check-pass) (-> self clock frame-counter)) ) - (set! (-> self control unknown-time-frame31) (-> self clock frame-counter)) - (when (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame32)) (seconds 0.5)) + (set! (-> self control time-of-last-wall-hide-first-check-pass) (-> self clock frame-counter)) + (when (>= (- (-> self clock frame-counter) (-> self control time-of-first-wall-hide-first-check-pass)) + (seconds 0.5) + ) (let ((gp-0 (new 'stack-no-clear 'collide-query))) (let ((v1-34 (-> gp-0 bbox)) (a0-13 (-> self control trans)) @@ -729,10 +731,10 @@ ) (defbehavior target-log-trans target () - (let ((v1-1 (-> self control unknown-word00))) - (set! (-> self control unknown-time-frame-array00 v1-1) (-> self clock frame-counter)) - (set! (-> self control unknown-vector-array00 v1-1 quad) (-> self control trans quad)) - (set! (-> self control unknown-word00) (logand (+ v1-1 1) 127)) + (let ((v1-1 (-> self control trans-log-idx))) + (set! (-> self control trans-log-times v1-1) (-> self clock frame-counter)) + (set! (-> self control trans-log-trans v1-1 quad) (-> self control trans quad)) + (set! (-> self control trans-log-idx) (logand (+ v1-1 1) 127)) ) 0 (none) @@ -745,10 +747,10 @@ ) (let ((s4-0 (-> self control))) (let* ((v1-0 127) - (a1-2 (logand (+ (-> s4-0 unknown-word00) v1-0) 127)) + (a1-2 (logand (+ (-> s4-0 trans-log-idx) v1-0) 127)) ) - (while (and (< (- (-> self clock frame-counter) (-> s4-0 unknown-time-frame-array00 a1-2)) arg0) (> v1-0 0)) - (vector+! s5-0 s5-0 (-> s4-0 unknown-vector-array00 a1-2)) + (while (and (< (- (-> self clock frame-counter) (-> s4-0 trans-log-times a1-2)) arg0) (> v1-0 0)) + (vector+! s5-0 s5-0 (-> s4-0 trans-log-trans a1-2)) (+! gp-0 1) (+! v1-0 -1) (set! a1-2 (logand (+ a1-2 v1-0) 127)) @@ -757,8 +759,8 @@ (vector-float/! s5-0 s5-0 (the float gp-0)) (let ((s3-0 (- 128 gp-0))) (while (< s3-0 128) - (let ((v1-5 (logand (+ (-> s4-0 unknown-word00) s3-0) 127))) - (+! f30-0 (vector-vector-distance s5-0 (-> s4-0 unknown-vector-array00 v1-5))) + (let ((v1-5 (logand (+ (-> s4-0 trans-log-idx) s3-0) 127))) + (+! f30-0 (vector-vector-distance s5-0 (-> s4-0 trans-log-trans v1-5))) ) (+! s3-0 1) ) @@ -770,19 +772,14 @@ (defbehavior turn-to-vector target ((arg0 vector) (arg1 float)) (let ((gp-0 (new-stack-vector0))) - (warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control unknown-matrix03)) - (set! (-> self control unknown-float11) (-> self control unknown-float10)) - (set! (-> self control unknown-float09) (-> self control unknown-float08)) - (set! (-> self control unknown-vector09 quad) (-> self control to-target-pt-xz quad)) - (set! (-> self control unknown-vector11 quad) (-> self control unknown-vector10 quad)) - (vector-float*! (-> self control unknown-vector10) gp-0 arg1) + (warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control cam-R-w)) + (set! (-> self control last-turn-to-magnitude) (-> self control turn-to-magnitude)) + (set! (-> self control last-turn-to-angle) (-> self control turn-to-angle)) + (set! (-> self control last-to-target-pt-xz quad) (-> self control to-target-pt-xz quad)) + (set! (-> self control last-turn-to-target quad) (-> self control turn-to-target quad)) + (vector-float*! (-> self control turn-to-target) gp-0 arg1) (if (< 0.0 arg1) - (warp-vector-into-surface! - (-> self control to-target-pt-xz) - arg0 - *up-vector* - (-> self control unknown-matrix03) - ) + (warp-vector-into-surface! (-> self control to-target-pt-xz) arg0 *up-vector* (-> self control cam-R-w)) ) (dotimes (v1-17 7) (set! (-> self control turn-history-ctrl (+ v1-17 1) quad) (-> self control turn-history-ctrl v1-17 quad)) @@ -791,8 +788,8 @@ (-> (vector-matrix*! gp-0 gp-0 (-> self control w-R-c)) quad) ) (let ((f0-6 (atan (-> gp-0 x) (-> gp-0 z)))) - (set! (-> self control unknown-float10) arg1) - (set! (-> self control unknown-float08) f0-6) + (set! (-> self control turn-to-magnitude) arg1) + (set! (-> self control turn-to-angle) f0-6) ) (let ((f0-8 (* arg1 (-> self control current-surface target-speed)))) (set! (-> self control target-transv quad) (-> (vector-normalize! gp-0 f0-8) quad)) @@ -997,9 +994,9 @@ ) ) ) - (set! (-> self control unknown-time-frame09) (-> self clock frame-counter)) + (set! (-> self control time-of-last-clear-wall-in-jump) (-> self clock frame-counter)) ) - (if (< (- (-> self clock frame-counter) (-> self control unknown-time-frame09)) (seconds 0.2)) + (if (< (- (-> self clock frame-counter) (-> self control time-of-last-clear-wall-in-jump)) (seconds 0.2)) (set! f30-0 (+ 204800.0 f30-0)) ) (if (and (not (logtest? (-> self control status) (collide-status touch-wall))) @@ -1026,7 +1023,7 @@ ) ) ) - (set! (-> self control unknown-float07) (vector-length gp-0)) + (set! (-> self control velocity-after-thrust) (vector-length gp-0)) ) (let ((gp-1 (new-stack-vector0))) (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) @@ -1126,7 +1123,7 @@ 0.0 (-> self control current-surface tiltv) 150 - (the-as float (the int (-> self control current-surface tiltvf))) + (the int (-> self control current-surface tiltvf)) 0.0 ) ) @@ -1136,13 +1133,13 @@ (s5-0 (cond ((logtest? (surface-flag turn-to-alt) (-> self control current-surface flags)) - (-> self control unknown-vector03) + (-> self control turn-to-alt-heading) ) ((and (or (not (logtest? (logior (-> self control status) (-> self control old-status)) (collide-status on-surface touch-surface) ) ) - (< (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.5)) + (< (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.5)) (not (and (-> self next-state) (let ((v1-15 (-> self next-state name))) (or (= v1-15 'target-walk) (= v1-15 'target-gun-walk)) ) @@ -1151,7 +1148,7 @@ (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (< (- (-> self clock frame-counter) (-> self control time-of-last-lc)) (seconds 0.5)) (logtest? (-> self control current-surface flags) (surface-flag turn-to-pad)) - (!= (-> self control unknown-float15) 0.0) + (!= (-> self control force-turn-to-strength) 0.0) ) (zero? (logand (-> self control current-surface flags) (surface-flag turn-to-vel))) ) @@ -1163,7 +1160,7 @@ ) ) ) - (let* ((s3-0 (-> self control unknown-vector02)) + (let* ((s3-0 (-> self control bent-gravity-normal)) (s4-0 (forward-up-nopitch->quaternion (new-stack-quaternion0) gp-0 s3-0)) (s3-1 (forward-up-nopitch->quaternion (new-stack-quaternion0) s5-0 s3-0)) (f0-2 (acos (vector-dot gp-0 s5-0))) @@ -1174,8 +1171,8 @@ s4-0 s3-1 (cond - ((and (or (>= 0.0 (-> self control unknown-float10)) - (< (-> self clock frame-counter) (-> self control unknown-time-frame00)) + ((and (or (>= 0.0 (-> self control turn-to-magnitude)) + (< (-> self clock frame-counter) (-> self control turn-lockout-end-time)) ) (zero? (logand (-> self control current-surface flags) (surface-flag turn-when-centered))) ) @@ -1221,10 +1218,10 @@ (-> self control current-surface turnv) 0.0 (the int (-> self control current-surface turnvf)) - 0.00000000000000000000000000000000000000000021 - (-> self control unknown-float06) + 150 + (-> self control turn-go-the-long-way) ) - (if (and (!= (-> self control unknown-float06) 0.0) + (if (and (!= (-> self control turn-go-the-long-way) 0.0) (< (fabs (deg-diff (quaternion-y-angle (-> self control quat-for-control)) @@ -1234,7 +1231,7 @@ 182.04445 ) ) - (set! (-> self control unknown-float06) 0.0) + (set! (-> self control turn-go-the-long-way) 0.0) ) (quaternion-slerp! (-> self control quat) @@ -1516,21 +1513,29 @@ ) (defbehavior pre-collide-setup target () - (if (>= (-> self clock frame-counter) (-> self control unknown-time-frame04)) + (if (>= (-> self clock frame-counter) (-> self control additional-decaying-velocity-decay-start-time)) (vector-normalize! - (-> self control unknown-vector18) - (seek (vector-length (-> self control unknown-vector18)) 0.0 (* 40960.0 (-> self clock seconds-per-frame))) + (-> self control additional-decaying-velocity) + (seek + (vector-length (-> self control additional-decaying-velocity)) + 0.0 + (* 40960.0 (-> self clock seconds-per-frame)) + ) ) ) (cond ((logtest? (-> self control old-status) (collide-status on-surface)) - (if (>= (+ (-> self clock frame-counter) (seconds -0.035)) (-> self control unknown-time-frame03)) - (vector-reset! (-> self control unknown-vector18)) + (if (>= (+ (-> self clock frame-counter) (seconds -0.035)) + (-> self control additional-decaying-velocity-end-time) + ) + (vector-reset! (-> self control additional-decaying-velocity)) ) ) (else - (let ((f30-0 (vector-length (-> self control unknown-vector18)))) - (let* ((v1-22 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control unknown-vector18) 1.0)) + (let ((f30-0 (vector-length (-> self control additional-decaying-velocity)))) + (let* ((v1-22 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control additional-decaying-velocity) 1.0) + ) (f0-3 (vector-dot (-> self control transv) v1-22)) ) (if (< f0-3 0.0) @@ -1538,13 +1543,13 @@ ) ) (let ((f0-7 (seek f30-0 0.0 (* 28672.0 (-> self clock seconds-per-frame))))) - (vector-normalize! (-> self control unknown-vector18) f0-7) + (vector-normalize! (-> self control additional-decaying-velocity) f0-7) ) ) ) ) - (set! (-> self control collide-extra-velocity quad) (-> self control unknown-vector18 quad)) - (set! (-> self control unknown-vector14 quad) (-> self control local-normal quad)) + (set! (-> self control collide-extra-velocity quad) (-> self control additional-decaying-velocity quad)) + (set! (-> self control pre-collide-local-normal quad) (-> self control local-normal quad)) 0 (none) ) @@ -1568,23 +1573,23 @@ (defbehavior flag-setup target () (cond ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) - (if (zero? (-> self control unknown-dword12)) - (set! (-> self control unknown-dword12) - (the-as int (- (-> self clock frame-counter) (-> self control time-of-last-zero-input))) + (if (zero? (-> self control time-between-zero-inputs)) + (set! (-> self control time-between-zero-inputs) + (- (-> self clock frame-counter) (-> self control time-of-last-zero-input)) ) ) (set! (-> self control time-of-last-zero-input) (-> self clock frame-counter)) - (quaternion-copy! (-> self control unknown-quaternion05) (-> self control dir-targ)) + (quaternion-copy! (-> self control last-nonzero-input-dir-targ) (-> self control dir-targ)) ) (else - (set! (-> self control unknown-time-frame29) (-> self clock frame-counter)) - (set! (-> self control unknown-dword12) 0) + (set! (-> self control time-of-last-nonzero-input) (-> self clock frame-counter)) + (set! (-> self control time-between-zero-inputs) 0) 0 ) ) (level-setup) - (set! (-> self control unknown-quaternion02 quad) (-> self control transv quad)) - (quaternion-copy! (-> self control unknown-quaternion03) (-> self control quat-for-control)) + (set! (-> self control last-transv quad) (-> self control transv quad)) + (quaternion-copy! (-> self control last-quat-for-control) (-> self control quat-for-control)) ((-> self control current-surface active-hook)) (cond ((logtest? (-> self control status) (collide-status on-surface)) @@ -1602,23 +1607,23 @@ (let ((v1-49 (-> self control trans))) (when (logtest? (-> self control old-status) (collide-status on-surface)) (set! (-> self control last-trans-leaving-surf quad) (-> self control last-trans-any-surf quad)) - (set! (-> self control unknown-vector43 quad) (-> self control last-trans-any-surf quad)) + (set! (-> self control highest-jump-mark quad) (-> self control last-trans-any-surf quad)) ) - (set! (-> self control unknown-vector43 x) (-> v1-49 x)) - (set! (-> self control unknown-vector43 z) (-> v1-49 z)) + (set! (-> self control highest-jump-mark x) (-> v1-49 x)) + (set! (-> self control highest-jump-mark z) (-> v1-49 z)) (if (< (vector-dot (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector43) v1-49) + (vector-! (new 'stack-no-clear 'vector) (-> self control highest-jump-mark) v1-49) ) 0.0 ) - (set! (-> self control unknown-vector43 y) (-> v1-49 y)) + (set! (-> self control highest-jump-mark y) (-> v1-49 y)) ) ) ) ) (when (and (cpad-pressed? (-> self control cpad number) r3) - (zero? (-> self control unknown-word07)) + (zero? (-> self control remaining-ctrl-iterations)) (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie))) (not *pause-lock*) ) @@ -1699,8 +1704,8 @@ ) (send-event self 'change-mode 'falling) ) - (set! (-> self control unknown-time-frame03) 0) - (vector-reset! (-> self control unknown-vector18)) + (set! (-> self control additional-decaying-velocity-end-time) 0) + (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-189 (new-stack-vector0))) (let ((f0-9 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) 0.0 @@ -1793,10 +1798,10 @@ ) ) ) - (set! (-> self control unknown-float30) (if (logtest? (-> self control status) (collide-status on-surface)) - 32.0 - 2.0 - ) + (set! (-> self control bend-speed) (if (logtest? (-> self control status) (collide-status on-surface)) + 32.0 + 2.0 + ) ) (let ((v1-248 (-> *setting-control* user-current beard))) (when (!= (-> self beard?) v1-248) @@ -1818,7 +1823,7 @@ (defbehavior post-flag-setup target () (if (logtest? (-> self control status) (collide-status touch-wall touch-actor)) - (set! (-> self control unknown-time-frame07) (-> self clock frame-counter)) + (set! (-> self control last-time-touching-actor) (-> self clock frame-counter)) ) (when (logtest? (-> self state-flags) (state-flags tinvul1)) (if (< (logand (- (-> self clock frame-counter) (-> self control invul1-on-time)) 3) 1) @@ -1834,7 +1839,7 @@ (target-timed-invulnerable-off self 2) ) ) - (set! (-> self control unknown-symbol06) #f) + (set! (-> self control jump-kind) #f) (target-gun-joint-pre) ((-> self pre-joint-hook)) (target-log-trans) @@ -1911,17 +1916,13 @@ (zero? (logand (-> self control status) (collide-status on-surface))) ) 0.0 - (-> self control unknown-float29) + (-> self control bend-target) ) ) ) - (seek! - (-> self control unknown-float28) - f0-1 - (* (-> self control unknown-float30) (-> self clock seconds-per-frame)) - ) + (seek! (-> self control bend-amount) f0-1 (* (-> self control bend-speed) (-> self clock seconds-per-frame))) ) - (set! (-> self control dynam gravity-normal quad) (-> self control unknown-dynamics00 gravity-normal quad)) + (set! (-> self control dynam gravity-normal quad) (-> self control standard-dynamics gravity-normal quad)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -1932,25 +1933,20 @@ (let ((f30-0 (-> self control current-surface tiltvv)) (gp-0 (-> self control gspot-normal)) ) - (vector-deg-slerp - s5-0 - (-> self control unknown-dynamics00 gravity-normal) - gp-0 - (-> self control unknown-float28) - ) + (vector-deg-slerp s5-0 (-> self control standard-dynamics gravity-normal) gp-0 (-> self control bend-amount)) (let ((a2-3 (matrix-from-two-vectors-smooth! (new 'stack-no-clear 'matrix) - (-> self control unknown-vector02) + (-> self control bent-gravity-normal) s5-0 f30-0 (the int (-> self control current-surface tiltvvf)) ) ) ) - (vector-matrix*! (-> self control unknown-vector02) (-> self control unknown-vector02) a2-3) + (vector-matrix*! (-> self control bent-gravity-normal) (-> self control bent-gravity-normal) a2-3) ) - (vector-normalize! (-> self control unknown-vector02) 1.0) + (vector-normalize! (-> self control bent-gravity-normal) 1.0) (add-debug-vector *display-target-marks* (bucket-id debug-no-zbuf1) @@ -1973,7 +1969,7 @@ *display-target-marks* (bucket-id debug-no-zbuf1) (-> self control trans) - (-> self control unknown-dynamics00 gravity-normal) + (-> self control standard-dynamics gravity-normal) (meters 2.5) (new 'static 'rgba :r #xff :a #x80) ) @@ -1989,7 +1985,7 @@ *display-target-marks* (bucket-id debug-no-zbuf1) (-> self control trans) - (-> self control unknown-vector02) + (-> self control bent-gravity-normal) (meters 3) (new 'static 'rgba :r #xff :b #xff :a #x80) ) @@ -2063,10 +2059,10 @@ ) ) (let ((s4-1 (vector-! (new-stack-vector0) (-> s5-0 center-hold) (-> self control midpoint-of-hands)))) - (set! (-> self control unknown-float33) (vector-length s4-1)) + (set! (-> self control hand-to-edge-dist) (vector-length s4-1)) (cond - ((and (< 819.2 (-> self control unknown-float33)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame15)) (seconds 0.2)) + ((and (< 819.2 (-> self control hand-to-edge-dist)) + (>= (- (-> self clock frame-counter) (-> self control last-successful-compute-edge-time)) (seconds 0.2)) ) (cond ((-> s5-0 pilot-edge-grab?) @@ -2082,14 +2078,14 @@ (s3-1 (vector-lerp! (new 'stack-no-clear 'vector) (-> s5-0 pilot-start-grab-pos) - (vector-! (new 'stack-no-clear 'vector) (-> s5-0 center-hold) (-> self control unknown-vector31)) + (vector-! (new 'stack-no-clear 'vector) (-> s5-0 center-hold) (-> self control ctrl-to-hands-offset)) (smooth-step f0-11) ) ) ) (set! (-> s3-1 y) (+ (lerp (-> s5-0 pilot-start-grab-pos y) - (- (-> s5-0 center-hold y) (-> self control unknown-vector31 y)) + (- (-> s5-0 center-hold y) (-> self control ctrl-to-hands-offset y)) (smooth-step (-> s5-0 pilot-grab-interp)) ) (cond @@ -2116,7 +2112,7 @@ (vector+! s3-1 s3-1 (-> self control cspace-offset)) (move-to-point! (-> self control) s3-1) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) ) (else @@ -2126,8 +2122,8 @@ ) (vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second)) (set! (-> self control rider-time) (-> self clock frame-counter)) - (if (and (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame16)) (seconds 0.5)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame15)) (seconds 0.5)) + (if (and (>= (- (-> self clock frame-counter) (-> self control edge-grab-start-time)) (seconds 0.5)) + (>= (- (-> self clock frame-counter) (-> self control last-successful-compute-edge-time)) (seconds 0.5)) ) (send-event self 'end-mode) ) @@ -2136,15 +2132,15 @@ ) (else (let ((a1-23 (new 'stack-no-clear 'vector))) - (vector-! a1-23 (-> s5-0 center-hold) (-> self control unknown-vector31)) + (vector-! a1-23 (-> s5-0 center-hold) (-> self control ctrl-to-hands-offset)) (vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second)) (set! (-> self control rider-time) (-> self clock frame-counter)) (vector+! a1-23 a1-23 (-> self control cspace-offset)) (move-to-point! (-> self control) a1-23) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) - (set! (-> self control unknown-time-frame15) (-> self clock frame-counter)) + (set! (-> self control last-successful-compute-edge-time) (-> self clock frame-counter)) ) ) ) @@ -2219,14 +2215,14 @@ (move-by-vector! (-> self control) a1-15) ) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (update-anim-data (-> self skel)) (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) ) (defbehavior target-compute-pole target () - (let* ((s2-0 (handle->process (-> self control unknown-handle01))) + (let* ((s2-0 (handle->process (-> self control anim-handle))) (gp-0 (-> (the-as swingpole s2-0) dir)) ) (set! (-> self control edge-grab-edge-dir quad) (-> gp-0 quad)) @@ -2254,10 +2250,10 @@ ) (vector-segment-distance-point! (-> self control midpoint-of-hands) s4-1 s3-1 s5-0) (if (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) - (set! (-> self control unknown-float33) + (set! (-> self control hand-to-edge-dist) (fmax 0.0 (fmin 1.0 (/ (vector-vector-distance s4-1 s5-0) (* 2.0 (-> (the-as swingpole s2-0) edge-length))))) ) - (vector-lerp! s5-0 s4-1 s3-1 (-> self control unknown-float33)) + (vector-lerp! s5-0 s4-1 s3-1 (-> self control hand-to-edge-dist)) ) (when *display-edge-collision-marks* (add-debug-vector @@ -2282,14 +2278,14 @@ ) (let ((a0-26 (vector-! (new-stack-vector0) s5-0 (-> self control midpoint-of-hands)))) (cond - ((and (< 2457.6 (vector-length a0-26)) (not (-> self control unknown-symbol02))) + ((and (< 2457.6 (vector-length a0-26)) (not (-> self control did-move-to-pole-or-max-jump-height))) (move-by-vector! (-> self control) (vector-normalize! a0-26 2457.6)) ) (else - (set! (-> self control unknown-symbol02) (the-as float #t)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #t)) (move-to-point! (-> self control) - (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self control unknown-vector31)) + (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self control ctrl-to-hands-offset)) ) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) ) @@ -2463,11 +2459,11 @@ (matrix<-no-trans-transformq! (-> self control ctrl-orientation) (the-as transformq (-> self control trans))) ) ) - (vector-matrix*! (-> self control unknown-vector28) (-> *TARGET-bank* head-offset) a2-5) + (vector-matrix*! (-> self control ctrl-to-head-offset) (-> *TARGET-bank* head-offset) a2-5) ) (vector<-cspace! - (the-as vector (&-> (-> self control) unknown-cspacei1un23i1 bone)) - (-> self control unknown-cspacei1un23i1 parent) + (the-as vector (&-> (-> self control) sidekick-root bone)) + (-> self control sidekick-root parent) ) (let ((gp-0 (new-stack-vector0)) (s5-0 (new-stack-vector0)) @@ -2476,8 +2472,8 @@ (vector<-cspace! s5-0 (-> self control rhand-cspace)) (vector-average! (-> self control midpoint-of-hands) gp-0 s5-0) ) - (vector-! (-> self control unknown-vector31) (-> self control midpoint-of-hands) (-> self control trans)) - (update-from-cspace (-> self control unknown-impact-control00)) + (vector-! (-> self control ctrl-to-hands-offset) (-> self control midpoint-of-hands) (-> self control trans)) + (update-from-cspace (-> self control impact-ctrl)) (cond ((logtest? (-> self focus-status) (focus-status edge-grab)) (target-compute-edge) @@ -2487,7 +2483,7 @@ ) ) (target-calc-camera-pos) - (set! (-> self control unknown-word01) 0) + (set! (-> self control tongue-counter) 0) (cond ((logtest? (focus-status indax) (-> self focus-status)) ) @@ -2510,7 +2506,7 @@ ) (set! (-> self control gspot-pos quad) (-> self control trans quad)) (set! (-> self control gspot-normal quad) (-> self control ground-poly-normal quad)) - (set! (-> self control unknown-pat-surface01) (-> self control ground-pat)) + (set! (-> self control gspot-pat-surfce) (-> self control ground-pat)) ) (else (let ((gp-0 (new 'stack-no-clear 'collide-query))) @@ -2522,7 +2518,7 @@ 81920.0 1024.0 ) - (set! (-> self control unknown-pat-surface01) (-> gp-0 best-other-tri pat)) + (set! (-> self control gspot-pat-surfce) (-> gp-0 best-other-tri pat)) ) ) ) @@ -2537,26 +2533,26 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) (let ((f28-0 (debounce-speed - (-> self control unknown-float12) - (-> self control unknown-float13) - (-> self control unknown-vector12) - (-> self control unknown-vector13) + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) ) ) ) - (when (!= (-> self control unknown-float15) 0.0) - (let ((f0-12 (fmin 1.0 (-> self control unknown-float15)))) - (set! (-> self control unknown-float15) f0-12) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-12 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-12) (let ((a1-3 (vector-float*! (new 'stack-no-clear 'vector) (if (= f28-0 0.0) @@ -2568,8 +2564,8 @@ ) (a2-2 (vector-float*! (new 'stack-no-clear 'vector) - (-> self control unknown-vector16) - (-> self control unknown-float14) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) ) ) ) @@ -2708,13 +2704,13 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) - (turn-to-vector s5-0 (-> self control unknown-float12)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) ) (add-thrust) (add-gravity) @@ -2835,7 +2831,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) @@ -2963,7 +2959,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) @@ -3079,18 +3075,18 @@ (target-timed-invulnerable-off self 0) (target-timed-invulnerable-off self 2) (set! (-> self control status) (collide-status)) - (set! (-> self control unknown-dynamics00) *standard-dynamics*) + (set! (-> self control standard-dynamics) *standard-dynamics*) (set! (-> self control surf) *standard-ground-surface*) - (set! (-> self control unknown-vector02 quad) (-> self control unknown-dynamics00 gravity-normal quad)) + (set! (-> self control bent-gravity-normal quad) (-> self control standard-dynamics gravity-normal quad)) (quaternion-identity! (-> self control override-quat)) (set! (-> self control override-quat-alpha) 0.0) (set! (-> self control last-time-on-surface) (-> self clock frame-counter)) - (set! (-> self control unknown-float28) 0.0) - (set! (-> self control unknown-float30) 32.0) + (set! (-> self control bend-amount) 0.0) + (set! (-> self control bend-speed) 32.0) (set! (-> self cam-user-mode) 'normal) - (set! (-> self control unknown-handle01) (the-as handle #f)) + (set! (-> self control anim-handle) (the-as handle #f)) (set! (-> self control actor-contact-handle) (the-as handle #f)) - (set! (-> self control unknown-dword11) 0) + (set! (-> self control yellow-eco-last-use-time) 0) (buzz-stop! 0) self ) @@ -3204,10 +3200,10 @@ (set! (-> obj control) s0-0) ) (let ((v1-69 (-> obj control))) - (set! (-> v1-69 unknown-word08) s4-0) - (set! (-> v1-69 unknown-word09) s3-0) - (set! (-> v1-69 default-collide-as) (the-as collide-spec s2-0)) - (set! (-> v1-69 default-collide-with) (the-as collide-spec s1-0)) + (set! (-> v1-69 default-collide-as-all) (the-as collide-spec s4-0)) + (set! (-> v1-69 default-collide-with-all) (the-as collide-spec s3-0)) + (set! (-> v1-69 default-collide-as-fgnd) (the-as collide-spec s2-0)) + (set! (-> v1-69 default-collide-with-fgnd) (the-as collide-spec s1-0)) (set! (-> v1-69 max-iteration-count) (the-as uint 8)) (set! (-> v1-69 event-self) 'touched) ) @@ -3251,7 +3247,7 @@ (set! (-> obj control lhand-cspace) (-> obj node-list data 45)) (set! (-> obj control rhand-cspace) (-> obj node-list data 55)) (set! (-> obj control rhand-cspace) (-> obj node-list data 55)) - (set! (-> obj control unknown-cspacei1un23i1 parent) (-> obj node-list data 23)) + (set! (-> obj control sidekick-root parent) (-> obj node-list data 23)) (set! (-> obj neck) (new 'process 'joint-mod (joint-mod-mode look-at) obj 8)) (set! (-> obj neck parented-scale?) #t) (set! (-> obj neck base-joint) (the-as uint 6)) @@ -3296,8 +3292,8 @@ ) (set! (-> obj sound) (new 'process 'ambient-sound "none" (-> obj control trans))) (set! (-> obj control unknown-sound-id04) (new-sound-id)) - (set! (-> obj control unknown-sound-id03) (new-sound-id)) - (set! (-> obj control unknown-sound-id02) (new-sound-id)) + (set! (-> obj control bubbles-sound) (new-sound-id)) + (set! (-> obj control board-jump-and-swim-sound) (new-sound-id)) (if (and *debug-segment* (!= (-> obj tobot?) 'tobot)) (add-connection *debug-engine* obj target-print-stats obj *stdcon0* #f) ) diff --git a/goal_src/jak2/engine/target/sidekick.gc b/goal_src/jak2/engine/target/sidekick.gc index de722fe6b0..281b6fcf59 100644 --- a/goal_src/jak2/engine/target/sidekick.gc +++ b/goal_src/jak2/engine/target/sidekick.gc @@ -237,7 +237,7 @@ (the-as (function cspace matrix none) cspace<-cspace+transformq!) ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) - (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent)) + (the-as basic (-> self parent-override 0 control sidekick-root parent)) ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset))) ) @@ -412,7 +412,7 @@ (add-debug-sphere *display-sidekick-stats* (bucket-id debug-no-zbuf1) - (-> self parent-override 0 control unknown-cspacei1un23i1 parent bone transform trans) + (-> self parent-override 0 control sidekick-root parent bone transform trans) (meters 0.1) (new 'static 'rgba :g #xff :a #x80) ) @@ -513,7 +513,7 @@ (set! (-> self draw light-index) (the-as uint 30)) (let ((v1-14 (-> self node-list data))) (set! (-> v1-14 0 param0) (the-as (function cspace matrix none) cspace<-cspace+transformq!)) - (set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent))) + (set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control sidekick-root parent))) (set! (-> v1-14 0 param2) (the-as basic (-> self offset))) ) (set! (-> self shadow-in-movie?) #t) diff --git a/goal_src/jak2/engine/target/target-anim.gc b/goal_src/jak2/engine/target/target-anim.gc index 3d8b538d81..8926083d19 100644 --- a/goal_src/jak2/engine/target/target-anim.gc +++ b/goal_src/jak2/engine/target/target-anim.gc @@ -249,7 +249,7 @@ ) ((lambda :behavior target () - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let* ((v1-5 (ja-group)) (a1-0 (cond @@ -300,12 +300,12 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (none) @@ -315,7 +315,7 @@ ((let ((v1-132 (ja-group))) (and v1-132 (= v1-132 (-> self draw art-group data 273))) ) - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let ((a1-18 (-> self draw art-group data 274))) (ja-no-eval :group! a1-18 @@ -324,18 +324,18 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) ) ((let ((v1-166 (ja-group))) (and v1-166 (= v1-166 (-> self draw art-group data 275))) ) - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let ((a1-21 (-> self draw art-group data 276))) (ja-no-eval :group! a1-21 @@ -344,12 +344,12 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) ) ((let ((v1-200 (ja-group))) diff --git a/goal_src/jak2/engine/target/target-carry.gc b/goal_src/jak2/engine/target/target-carry.gc index 014037326e..3162819590 100644 --- a/goal_src/jak2/engine/target/target-carry.gc +++ b/goal_src/jak2/engine/target/target-carry.gc @@ -426,14 +426,14 @@ ) :exit (behavior () ((-> target-carry-pickup exit)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (target-state-hook-exit) (none) ) :trans (behavior () ((-> self state-hook)) (when (move-legs?) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (remove-exit) (go target-carry-walk) ) diff --git a/goal_src/jak2/engine/target/target-darkjak.gc b/goal_src/jak2/engine/target/target-darkjak.gc index 6b0d0eb31d..b4be62d7bf 100644 --- a/goal_src/jak2/engine/target/target-darkjak.gc +++ b/goal_src/jak2/engine/target/target-darkjak.gc @@ -636,7 +636,7 @@ (set-setting! 'rapid-tracking #f 0 0) ((lambda :behavior target () - (set! (-> self control unknown-float29) (* 0.5 (-> self control unknown-float29))) + (set! (-> self control bend-target) (* 0.5 (-> self control bend-target))) (if (logtest? (water-flags touch-water) (-> self water flags)) (sound-play "swim-stroke") ) @@ -659,7 +659,7 @@ ) (target-start-attack) (target-danger-set! 'punch #f) - (let ((a0-8 (-> self control unknown-impact-control00)) + (let ((a0-8 (-> self control impact-ctrl)) (t9-6 (method-of-type impact-control initialize)) (a1-4 self) (v1-33 (ja-group)) @@ -748,13 +748,7 @@ ) ) ) - (initialize - (-> self control unknown-impact-control00) - self - 22 - 3276.8 - (-> self control root-prim prim-core collide-with) - ) + (initialize (-> self control impact-ctrl) self 22 3276.8 (-> self control root-prim prim-core collide-with)) (set! (-> arg0 0) (fmax 0.0 (-> arg0 0))) ) ) @@ -778,7 +772,7 @@ (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) ) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) ) (go target-falling #f) @@ -915,14 +909,14 @@ ) (let ((gp-3 (new 'stack-no-clear 'collide-query))) (when (and (>= (impact-control-method-11 - (-> self control unknown-impact-control00) + (-> self control impact-ctrl) gp-3 (the-as process #f) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1) ) 0.0 ) - (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control unknown-impact-control00 dir))) + (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control impact-ctrl dir))) ) (when (= (-> gp-3 best-other-tri pat mode) (pat-mode wall)) (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000))) @@ -960,7 +954,7 @@ (-> self skel effect) 'punch -1.0 - (the-as int (-> self control unknown-impact-control00 joint)) + (the-as int (-> self control impact-ctrl joint)) (the-as basic #f) (the-as sound-name t1-3) ) @@ -1645,7 +1639,7 @@ ) (while (not (ja-done? 0)) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (set! (-> self darkjak clock-vel) -4.0) (set! (-> self darkjak clock-on) #t) (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) @@ -1913,7 +1907,7 @@ (until (ja-done? 0) (ja-blend-eval) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (set! (-> self darkjak clock-vel) 4.0) (suspend) (ja :num! (seek!)) diff --git a/goal_src/jak2/engine/target/target-gun.gc b/goal_src/jak2/engine/target/target-gun.gc index 51ca60d89a..71b9f7a190 100644 --- a/goal_src/jak2/engine/target/target-gun.gc +++ b/goal_src/jak2/engine/target/target-gun.gc @@ -1182,7 +1182,7 @@ (set! (-> self gun track?) (logand -9 (-> self gun track?))) ) (let ((gp-0 (the-as basic #f))) - (when (and (or (< (- (-> self clock frame-counter) (-> self control unknown-time-frame29)) (seconds 0.2)) + (when (and (or (< (- (-> self clock frame-counter) (-> self control time-of-last-nonzero-input)) (seconds 0.2)) (and (logtest? (-> self control mod-surface flags) (surface-flag air)) (zero? (logand (-> self control status) (collide-status on-surface))) ) @@ -1265,7 +1265,7 @@ (the-as process-focusable gp-0) ) (set! (-> self gun track-start-time) (-> self clock frame-counter)) - (if (< (- (-> self clock frame-counter) (-> self control unknown-time-frame29)) (seconds 0.2)) + (if (< (- (-> self clock frame-counter) (-> self control time-of-last-nonzero-input)) (seconds 0.2)) (set! (-> self gun track-press-start-time) (-> self clock frame-counter)) ) ) @@ -1743,7 +1743,7 @@ ((logtest? (surface-flag gun-no-twist) (-> self control current-surface flags)) (seek! (-> self upper-body twist z) 0.0 (* 16384.0 (-> self clock seconds-per-frame))) ) - ((and (< 0.0 (-> self control unknown-float10)) + ((and (< 0.0 (-> self control turn-to-magnitude)) (zero? (logand (-> self control current-surface flags) (surface-flag duck))) ) (let* ((f0-28 (deg-diff (y-angle (-> self control)) (vector-y-angle (-> self control to-target-pt-xz)))) @@ -1796,8 +1796,8 @@ (logtest? (process-mask enemy guard) (-> (handle->process (-> self gun track-target 0 handle)) mask)) ) (if (and (< (- (-> self clock frame-counter) (-> self gun track-press-start-time)) (seconds 0.5)) - (< (-> self control unknown-dword12) 150) - (and (= (-> self control unknown-float10) 0.0) + (< (-> self control time-between-zero-inputs) (seconds 0.5)) + (and (= (-> self control turn-to-magnitude) 0.0) (not (logtest? (-> self control current-surface flags) (surface-flag air attack))) (-> self gun active?) ) @@ -2835,17 +2835,17 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) (let ((s4-0 (new-stack-vector0))) (read-pad s4-0) (turn-to-vector s4-0 (debounce-speed - (-> self control unknown-float12) - (-> self control unknown-float13) - (-> self control unknown-vector12) - (-> self control unknown-vector13) + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) ) ) ) diff --git a/goal_src/jak2/engine/target/target-swim.gc b/goal_src/jak2/engine/target/target-swim.gc index b19fe2d10a..3767329f65 100644 --- a/goal_src/jak2/engine/target/target-swim.gc +++ b/goal_src/jak2/engine/target/target-swim.gc @@ -408,7 +408,7 @@ ) (let ((v1-15 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> v1-15 command) (sound-command set-param)) - (set! (-> v1-15 id) (-> self control unknown-sound-id02)) + (set! (-> v1-15 id) (-> self control board-jump-and-swim-sound)) (set! (-> v1-15 params volume) -4) (set! (-> v1-15 auto-time) 960) (set! (-> v1-15 auto-from) 2) @@ -470,7 +470,7 @@ (go target-swim-walk) ) (target-swim-tilt 0.0 2.0 0.0 1.0) - (sound-play "swim-bubbles" :id (-> self control unknown-sound-id02)) + (sound-play "swim-bubbles" :id (-> self control board-jump-and-swim-sound)) (none) ) :code (behavior () @@ -593,7 +593,7 @@ ) ) (target-swim-tilt 0.0 2.0 0.0 1.0) - (sound-play "swim-bubbles" :id (-> self control unknown-sound-id02)) + (sound-play "swim-bubbles" :id (-> self control board-jump-and-swim-sound)) (none) ) :code (behavior () @@ -709,8 +709,8 @@ (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) (when (not (and (-> self next-state) (let ((v1-11 (-> self next-state name))) (or (= v1-11 'target-swim-stance) @@ -731,7 +731,7 @@ ) (let ((v1-21 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> v1-21 command) (sound-command set-param)) - (set! (-> v1-21 id) (-> self control unknown-sound-id03)) + (set! (-> v1-21 id) (-> self control bubbles-sound)) (set! (-> v1-21 params volume) -4) (set! (-> v1-21 auto-time) 960) (set! (-> v1-21 auto-from) 2) @@ -849,7 +849,7 @@ ) ) (if (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) - (sound-play "water-bubbles" :id (-> self control unknown-sound-id03)) + (sound-play "water-bubbles" :id (-> self control bubbles-sound)) ) (let ((s4-3 (new-stack-vector0)) (f0-13 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) @@ -928,7 +928,7 @@ ) (go target-swim-down) ) - (sound-play "water-bubbles" :id (-> self control unknown-sound-id03)) + (sound-play "water-bubbles" :id (-> self control bubbles-sound)) ((-> target-swim-down trans)) (none) ) diff --git a/goal_src/jak2/engine/target/target-util.gc b/goal_src/jak2/engine/target/target-util.gc index 53a755459e..60538535d9 100644 --- a/goal_src/jak2/engine/target/target-util.gc +++ b/goal_src/jak2/engine/target/target-util.gc @@ -338,8 +338,8 @@ (target-collide-set! (-> self control collide-mode) (-> self control collide-mode-transition)) ) (('carry?) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) @@ -354,8 +354,8 @@ 9830.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) @@ -370,8 +370,8 @@ 9830.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) 6963.2) (set! (-> self control penetrate-using) (penetrate touch spin board)) ) @@ -382,45 +382,45 @@ 10649.6 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (-> *TARGET-bank* duck-spin-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 35) (set! (-> self control penetrate-using) (penetrate touch spin)) ) (('duck-slide) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (-> *TARGET-bank* duck-spin-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 28) (set! (-> self control penetrate-using) (penetrate touch punch)) ) (('roll-solid) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (+ 819.2 (-> *TARGET-bank* duck-spin-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 8) (set! (-> self control danger-mode) 'roll) @@ -428,15 +428,15 @@ ) (('flip) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (+ 819.2 (-> *TARGET-bank* duck-spin-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 8) (set! (-> self control danger-mode) 'flip) @@ -449,16 +449,16 @@ 11878.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* punch-offset) (-> *TARGET-bank* punch-radius) ) (when (not (logtest? (focus-status indax) (-> self focus-status))) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* punch-radius)) (set! (-> s5-0 transform-index) 21) ) @@ -477,19 +477,19 @@ 11878.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* uppercut0-offset) (-> *TARGET-bank* uppercut-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* uppercut-radius)) (set! (-> s5-0 transform-index) 21) - (set! (-> gp-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> gp-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> gp-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> gp-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> gp-0 local-sphere)) (-> *TARGET-bank* uppercut1-offset) @@ -499,8 +499,8 @@ ) (('flop) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* flop0-offset) @@ -512,15 +512,15 @@ ) (('flop-down) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* flop0-offset) (-> *TARGET-bank* flop-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) (-> *TARGET-bank* flop1-offset) @@ -539,15 +539,15 @@ 12288.0 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) (+ 2048.0 (-> *TARGET-bank* punch-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* @@ -570,9 +570,9 @@ f28-0 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) (set! (-> s4-0 prim-core collide-with) - (logclear (-> self control default-collide-with) (collide-spec collectable)) + (logclear (-> self control default-collide-with-fgnd) (collide-spec collectable)) ) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* root-offset) f28-0) ) @@ -590,9 +590,9 @@ (+ (-> *TARGET-bank* root-radius) (* 2.0 f28-1)) ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s2-0 prim-core collide-as) (-> self control default-collide-as)) + (set! (-> s2-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) (set! (-> s2-0 prim-core collide-with) - (logclear (-> self control default-collide-with) (collide-spec collectable)) + (logclear (-> self control default-collide-with-fgnd) (collide-spec collectable)) ) (set! (-> s2-0 transform-index) 0) (sphere<-vector+r! diff --git a/goal_src/jak2/engine/target/target.gc b/goal_src/jak2/engine/target/target.gc index 194ade2ba5..9a0e8bebb6 100644 --- a/goal_src/jak2/engine/target/target.gc +++ b/goal_src/jak2/engine/target/target.gc @@ -54,7 +54,7 @@ ) :exit (behavior () (logclear! (-> self state-flags) (state-flags lleg-still rleg-still)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (target-state-hook-exit) (none) ) @@ -64,13 +64,13 @@ (go target-wade-stance) ) (when (= (-> self control ground-pat material) (pat-material ice)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (remove-exit) (go target-ice-stance) ) (when (move-legs?) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (remove-exit) (go target-walk) @@ -80,7 +80,7 @@ ) (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (remove-exit) (go target-duck-stance #f) ) @@ -225,7 +225,7 @@ ) (when (and (turn-around?) (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.3))) (set! (-> self control transv quad) - (-> self control unknown-vector-array02 (-> self control unknown-word03) quad) + (-> self control transv-history (-> self control idx-of-fastest-xz-vel) quad) ) (set! (-> self control transv w) 1.0) (go target-turn-around) @@ -260,7 +260,7 @@ :enter (behavior () (vector-turn-to (-> self control transv)) (set! (-> self control mod-surface) *turn-around-mods*) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (none) ) :exit (behavior () @@ -268,7 +268,7 @@ (set-forward-vel 0.0) (set! (-> self control ctrl-xz-vel) 0.0) (set-quaternion! (-> self control) (-> self control dir-targ)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (none) ) :trans (behavior () @@ -310,7 +310,7 @@ (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) ) (remove-exit) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (set! (-> self control ctrl-xz-vel) (* 40960.0 (-> self darkjak-giant-interp))) (set-forward-vel (-> self control ctrl-xz-vel)) (target-state-hook-exit) @@ -445,9 +445,9 @@ :enter (behavior () (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *slide-down-mods*) - (set! (-> self control unknown-time-frame17) 0) - (set! (-> self control unknown-float15) 1.0) - (set! (-> self control unknown-float14) 1.0) + (set! (-> self control sliding-start-time) 0) + (set! (-> self control force-turn-to-strength) 1.0) + (set! (-> self control force-turn-to-speed) 1.0) (none) ) :exit (behavior () @@ -471,9 +471,9 @@ #t ) ) - (zero? (-> self control unknown-time-frame17)) + (zero? (-> self control sliding-start-time)) ) - (set! (-> self control unknown-time-frame17) (-> self clock frame-counter)) + (set! (-> self control sliding-start-time) (-> self clock frame-counter)) ) (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) @@ -487,10 +487,10 @@ ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control unknown-vector16) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control force-turn-to-direction) 1.0) (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) ) - (vector-normalize-copy! (-> self control transv) (-> self control unknown-vector16) 40960.0) + (vector-normalize-copy! (-> self control transv) (-> self control force-turn-to-direction) 40960.0) (go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) *slide-jump-mods*) ) (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) @@ -518,7 +518,7 @@ ) (go target-running-attack) ) - (when (= (-> self control unknown-float15) 0.0) + (when (= (-> self control force-turn-to-strength) 0.0) (logior! (-> self control status) (collide-status on-surface)) (if (using-gun? self) (go target-stance) @@ -531,10 +531,10 @@ :code (-> target-walk code) :post (behavior () (cond - ((zero? (-> self control unknown-time-frame17)) + ((zero? (-> self control sliding-start-time)) (vector-normalize! (vector-flatten! - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-negate! (new 'stack-no-clear 'vector) (-> self control dynam gravity-normal)) (-> self control surface-normal) ) @@ -542,27 +542,27 @@ ) (if (< 0.0 (vector-dot - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat-for-control)) ) ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (vector-negate! (new 'stack-no-clear 'vector) (-> self control unknown-vector16)) + (vector-negate! (new 'stack-no-clear 'vector) (-> self control force-turn-to-direction)) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) ) ) - ((nonzero? (-> self control unknown-time-frame17)) - (seek! (-> self control unknown-float15) 0.0 (* 4.0 (-> self clock seconds-per-frame))) + ((nonzero? (-> self control sliding-start-time)) + (seek! (-> self control force-turn-to-strength) 0.0 (* 4.0 (-> self clock seconds-per-frame))) ) ) - (set! (-> self control unknown-time-frame00) (+ (-> self clock frame-counter) (seconds 0.1))) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) (seconds 0.1))) (target-post) (none) ) @@ -609,11 +609,11 @@ (set! (-> self control unknown-word04) (the-as uint (- s3-1 (+ -409.6 (-> *TARGET-bank* jump-collide-offset)))) ) - (set! (-> self control unknown-symbol02) (- s2-1 (-> *TARGET-bank* jump-collide-offset))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (- s2-1 (-> *TARGET-bank* jump-collide-offset))) ) (else (set! (-> self control unknown-word04) (the-as uint s3-1)) - (set! (-> self control unknown-symbol02) s2-1) + (set! (-> self control did-move-to-pole-or-max-jump-height) s2-1) ) ) ) @@ -670,7 +670,13 @@ (- (sqrtf (* 2.0 (-> self control dynam gravity-length) - (- (lerp-scale (the-as float (-> self control unknown-word04)) (-> self control unknown-symbol02) f0-1 0.0 1.0) + (- (lerp-scale + (the-as float (-> self control unknown-word04)) + (-> self control did-move-to-pole-or-max-jump-height) + f0-1 + 0.0 + 1.0 + ) (vector-dot (-> self control dynam gravity-normal) s3-1) ) ) @@ -781,7 +787,7 @@ (if (not arg0) (set! (-> self state-time) (-> self clock frame-counter)) ) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (set! (-> self control mod-surface) *duck-mods*) (target-collide-set! 'duck 1.0) (none) @@ -951,7 +957,7 @@ (if (not arg0) (set! (-> self state-time) (-> self clock frame-counter)) ) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (target-collide-set! 'duck 1.0) (let ((v1-7 (ja-group))) (if (not (and v1-7 (or (= v1-7 (-> self draw art-group data 59)) (= v1-7 (-> self draw art-group data 282))))) @@ -1088,7 +1094,7 @@ (defstate target-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) - (when (= (-> self control unknown-symbol06) 'launch) + (when (= (-> self control jump-kind) 'launch) (talker-spawn-func (-> *talker-speech* 326) *entity-pool* (target-pos 0) (the-as region #f)) (talker-spawn-func (-> *talker-speech* 327) *entity-pool* (target-pos 0) (the-as region #f)) enter-state @@ -1359,7 +1365,7 @@ :frame-num (ja-aframe 3.0 0) ) (until (ja-done? 0) - (set! (-> self control unknown-time-frame09) 0) + (set! (-> self control time-of-last-clear-wall-in-jump) 0) (suspend) (ja :num! (seek!)) ) @@ -1378,7 +1384,7 @@ (defstate target-double-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float)) - (when (= (-> self control unknown-symbol06) 'launch) + (when (= (-> self control jump-kind) 'launch) enter-state (let ((a0-3 (-> self control unknown-dword07)) (a1-1 (-> self control unknown-dword08)) @@ -1514,7 +1520,7 @@ (defstate target-high-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float) (arg2 object)) - (when (and (= (-> self control unknown-symbol06) 'launch) (!= arg2 'launch)) + (when (and (= (-> self control jump-kind) 'launch) (!= arg2 'launch)) enter-state (let ((a0-3 (-> self control unknown-dword07)) (a1-1 (-> self control unknown-dword08)) @@ -1860,7 +1866,7 @@ (defstate target-hit-ground (target) :event target-walk-event-handler :enter (behavior ((arg0 symbol)) - (set! (-> self control unknown-float06) 0.0) + (set! (-> self control turn-go-the-long-way) 0.0) (cond ((or (= arg0 'stuck) (logtest? (focus-status indax) (-> self focus-status))) ) @@ -2134,7 +2140,7 @@ (set! (-> self water drip-mult) 4.0) (set! (-> self neck flex-blend) 0.0) (set! (-> self gun track-target-hold-time) 0) - (if (< 0.0 (-> self control unknown-float10)) + (if (< 0.0 (-> self control turn-to-magnitude)) (forward-up-nopitch->quaternion (-> self control dir-targ) (-> self control to-target-pt-xz) @@ -2358,7 +2364,7 @@ ) ) (when gp-1 - (set! (-> self control unknown-time-frame17) (-> self clock frame-counter)) + (set! (-> self control sliding-start-time) (-> self clock frame-counter)) (set! (-> self gun combo-window-start) (-> self clock frame-counter)) (set! (-> self gun combo-window-state) (-> self state name)) (let ((v1-13 (if (type? proc process-focusable) @@ -2434,7 +2440,7 @@ (the-as process #f) (-> self clock frame-counter) ) - (set! (-> self control unknown-time-frame17) 0) + (set! (-> self control sliding-start-time) 0) (set! (-> self control unknown-time-frame18) 0) (set! (-> self control unknown-word04) (the-as uint 0)) (set! (-> self control unknown-word04) (the-as uint 0.0)) @@ -2452,14 +2458,14 @@ (set! (-> self neck flex-blend) 0.0) (set! (-> self gun track-target-hold-time) 0) (if (or (< (fabs (-> self control local-slope-x)) 0.3) (< 0.3 (fabs (-> self control local-slope-z)))) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) ) (set! (-> self upper-body twist z) 0.0) (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (set! (-> *run-attack-mods* turnv) 0.0) (set! (-> *run-attack-mods* turnvv) 0.0) (set! (-> self control last-running-attack-end-time) (-> self clock frame-counter)) @@ -2475,7 +2481,7 @@ ) (begin (set! (-> self control unknown-time-frame18) (-> self clock frame-counter)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (let ((v1-11 (new-stack-vector0)) (f0-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) @@ -2494,8 +2500,8 @@ ) #t ) - (or (zero? (-> self control unknown-time-frame17)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (or (zero? (-> self control sliding-start-time)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) (!= (-> self control unknown-word04) 1) ) @@ -2604,13 +2610,7 @@ ) (target-start-attack) (target-danger-set! 'punch #f) - (initialize - (-> self control unknown-impact-control00) - self - 22 - 3276.8 - (-> self control root-prim prim-core collide-with) - ) + (initialize (-> self control impact-ctrl) self 22 3276.8 (-> self control root-prim prim-core collide-with)) (let ((f26-0 (the-as number 0.0)) (f30-0 1.0) (gp-2 0) @@ -2628,7 +2628,7 @@ (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) ) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) ) (go target-falling #f) @@ -2702,14 +2702,14 @@ ) (let ((s5-3 (new 'stack-no-clear 'collide-query))) (when (and (>= (impact-control-method-11 - (-> self control unknown-impact-control00) + (-> self control impact-ctrl) s5-3 (the-as process #f) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1) ) 0.0 ) - (>= 0.0 (vector-dot (-> s5-3 best-other-tri normal) (-> self control unknown-impact-control00 dir))) + (>= 0.0 (vector-dot (-> s5-3 best-other-tri normal) (-> self control impact-ctrl dir))) ) (when (= (-> s5-3 best-other-tri pat mode) (pat-mode wall)) (let ((s4-0 (get-process *default-dead-pool* part-tracker #x4000))) @@ -2752,7 +2752,7 @@ (-> self skel effect) 'punch -1.0 - (the-as int (-> self control unknown-impact-control00 joint)) + (the-as int (-> self control impact-ctrl joint)) (the-as basic #f) (the-as sound-name t1-6) ) @@ -2784,7 +2784,7 @@ (go target-falling #f) ) (when (and (using-gun? self) - (or (< (-> self control unknown-float12) 0.7) (= (-> self gun gun-type) (pickup-type eco-blue))) + (or (< (-> self control pad-magnitude) 0.7) (= (-> self gun gun-type) (pickup-type eco-blue))) ) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.5))) (when (zero? (-> self gun track-target-hold-time)) @@ -2962,8 +2962,8 @@ (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (set! (-> self control last-attack-end-time) (-> self clock frame-counter)) (target-exit) (none) @@ -2976,17 +2976,17 @@ (if (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (seek! (-> self control dynam gravity-length) - (-> self control unknown-dynamics00 gravity-length) + (-> self control standard-dynamics gravity-length) (* 245760.0 (-> self clock seconds-per-frame)) ) ) (when (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) - (< (vector-dot (-> self control dynam gravity-normal) (the-as vector (-> self control unknown-quaternion02))) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control last-transv)) (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) ) ) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) ) (when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2) (>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0) @@ -3322,7 +3322,7 @@ (suspend) (ja :num! (seek! max 0.9)) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (let ((v1-27 (ja-group))) (if (and v1-27 (= v1-27 (-> self draw art-group data 51))) (align! @@ -3465,9 +3465,9 @@ ) ) (target-danger-set! 'harmless #f) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) - (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) (set! (-> self neck flex-blend) 1.0) (none) ) @@ -3586,8 +3586,8 @@ (joint-control-channel-group-eval! gp-0 (the-as art-joint-anim #f) num-func-seek!) ) ) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) - (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) (target-danger-set! 'flop-down #f) (let ((v1-56 (get-channel (-> self skel top-anim) 0))) (if (and v1-56 (= (-> v1-56 frame-group) (-> self draw art-group data 286))) @@ -3706,7 +3706,7 @@ :enter (behavior ((arg0 symbol)) (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector43) (-> self control trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self control highest-jump-mark) (-> self control trans)) ) ) ) @@ -3820,10 +3820,10 @@ ) ) (if (or (< (fabs (-> self control local-slope-x)) 0.3) (< 0.3 (fabs (-> self control local-slope-z)))) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) ) (set! (-> self control unknown-word04) (the-as uint 0)) - (set! (-> self control unknown-symbol02) 0.0) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) (set! (-> self gun track-target-hold-time) 0) (none) ) diff --git a/goal_src/jak2/engine/target/target2.gc b/goal_src/jak2/engine/target/target2.gc index 12f70040a6..2e42887b65 100644 --- a/goal_src/jak2/engine/target/target2.gc +++ b/goal_src/jak2/engine/target/target2.gc @@ -556,7 +556,7 @@ ) ) :enter (behavior ((arg0 handle)) - (set! (-> self control unknown-handle01) arg0) + (set! (-> self control anim-handle) arg0) (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *pole-mods*) (logior! (-> self focus-status) (focus-status pole)) @@ -564,14 +564,14 @@ (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) (set! (-> self control transv quad) (the-as uint128 0)) (send-event *camera* 'ease-in) - (set! (-> self control unknown-symbol02) (the-as float #f)) - (set! (-> self control unknown-float33) 0.5) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #f)) + (set! (-> self control hand-to-edge-dist) 0.5) (none) ) :exit (behavior () (target-collide-set! 'normal 0.0) (logclear! (-> self focus-status) (focus-status pole)) - (set! (-> self control unknown-handle01) (the-as handle #f)) + (set! (-> self control anim-handle) (the-as handle #f)) (none) ) :trans (behavior () @@ -632,14 +632,14 @@ (let ((v1-8 (ja-group))) (cond ((and v1-8 (= v1-8 (-> self draw art-group data 107))) - (while (not (-> self control unknown-symbol02)) + (while (not (-> self control did-move-to-pole-or-max-jump-height)) (ja :num! (seek!)) (suspend) ) (ja :num-func num-func-identity :frame-num (ja-aframe 37.0 0)) ) (else - (while (not (-> self control unknown-symbol02)) + (while (not (-> self control did-move-to-pole-or-max-jump-height)) (suspend) ) (suspend) @@ -798,7 +798,7 @@ (set! (-> *edge-grab-info* pilot-edge-grab?) #f) (set! (-> self control unknown-handle000) (the-as handle #f)) (set! (-> self control mod-surface) *edge-grab-mods*) - (set! (-> self control unknown-time-frame16) (-> self clock frame-counter)) + (set! (-> self control edge-grab-start-time) (-> self clock frame-counter)) (logior! (-> self control root-prim prim-core action) (collide-action dont-push-away)) (logior! (-> self focus-status) (focus-status edge-grab)) (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) @@ -948,7 +948,7 @@ ) ) (else - (while (< 0.0 (-> self control unknown-float33)) + (while (< 0.0 (-> self control hand-to-edge-dist)) (let ((v1-60 (ja-group))) (when (not (and v1-60 (= v1-60 (-> self draw art-group data 27)))) (ja-channel-push! 1 (seconds 0.15)) @@ -1027,7 +1027,7 @@ ) ) (set! (-> self control transv quad) (the-as uint128 0)) - (set! (-> self control unknown-time-frame09) 0) + (set! (-> self control time-of-last-clear-wall-in-jump) 0) (set-forward-vel 16384.0) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.2))) (send-event *camera* 'damp-up) @@ -1193,7 +1193,7 @@ (target-top-anim-base-mode 37) ) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (none) ) :trans (behavior () @@ -1300,18 +1300,18 @@ ) ) (set! (-> self control unknown-word04) (the-as uint 0.5)) - (set! (-> self control unknown-symbol02) 0.5) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.5) (set! (-> self control unknown-float35) (the-as float #f)) (let ((gp-0 (lambda :behavior target () (ja :chan 1 :num! (loop! (the-as float (-> self control unknown-word04)))) (if (rand-vu-percent? 0.05) - (set! (-> self control unknown-symbol02) (rand-vu-float-range 0.5 1.5)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (rand-vu-float-range 0.5 1.5)) ) (set! (-> self control unknown-word04) (the-as uint (seek (the-as float (-> self control unknown-word04)) - (-> self control unknown-symbol02) + (-> self control did-move-to-pole-or-max-jump-height) (* 2.0 (-> self clock seconds-per-frame)) ) ) @@ -1543,14 +1543,14 @@ (defstate target-play-anim (target) :event target-generic-event-handler :enter (behavior ((arg0 string) (arg1 handle)) - (set! (-> self control unknown-handle01) arg1) + (set! (-> self control anim-handle) arg1) (move-to-ground (-> self control) 40960.0 40960.0 #f (-> self control root-prim prim-core collide-with)) (logior! (-> self focus-status) (focus-status grabbed)) (set! (-> self neck flex-blend) 0.0) (none) ) :exit (behavior () - (send-event (handle->process (-> self control unknown-handle01)) 'end-mode) + (send-event (handle->process (-> self control anim-handle)) 'end-mode) (target-exit) (none) ) @@ -1581,7 +1581,7 @@ ((-> target-grab event) proc arg1 event-type event) ) :enter (behavior ((arg0 handle)) - (set! (-> self control unknown-handle01) arg0) + (set! (-> self control anim-handle) arg0) (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) (set! (-> self control unknown-word04) (the-as uint #t)) (quaternion-copy! (the-as quaternion (-> self control unknown-vector38)) (-> self control quat)) @@ -1650,8 +1650,8 @@ :event target-generic-event-handler :enter (behavior () (sound-play-by-spec (static-sound-spec "menu-pick" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (set! (-> self control unknown-time-frame03) 0) - (vector-reset! (-> self control unknown-vector18)) + (set! (-> self control additional-decaying-velocity-end-time) 0) + (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-3 (new-stack-vector0))) (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) 0.0 @@ -1676,8 +1676,8 @@ ) :exit (behavior () (sound-play-by-spec (static-sound-spec "menu-back" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons l2 r2 l1 r1 x)) (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons l2 r2 l1 r1 x)) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-target-h_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-target-h_REF.gc index 966d319c7e..af3ad6da5b 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-target-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-target-h_REF.gc @@ -3,226 +3,226 @@ ;; definition of type control-info (deftype control-info (collide-shape-moving) - ((unknown-float00 float :offset 448) - (unknown-float01 float :offset 452) - (unknown-float02 float :offset 456) - (unknown-float03 float :offset 460) - (transv-ctrl vector :inline :offset 480) - (target-transv vector :inline :offset 496) - (unknown-vector02 vector :inline :offset 512) - (quat-for-control quaternion :inline :offset 528) - (override-quat quaternion :inline :offset 544) - (override-quat-alpha float :offset 560) - (ctrl-xz-vel float :offset 564) - (unknown-float003 float :offset 568) - (unknown-float06 float :offset 572) - (unknown-float07 float :offset 576) - (unknown-time-frame00 time-frame :offset 584) - (unknown-vector03 vector :inline :offset 592) - (unknown-quaternion02 quaternion :inline :offset 608) - (unknown-quaternion03 quaternion :inline :offset 624) - (unknown-vector-array00 vector 128 :inline :offset 640) - (unknown-time-frame-array00 time-frame 128 :offset 2688) - (unknown-word00 int32 :offset 3712) - (draw-offset vector :inline :offset 3728) - (cspace-offset vector :inline :offset 3744) - (anim-collide-offset-local vector :inline :offset 3760) - (anim-collide-offset-world vector :inline :offset 3776) - (old-anim-collide-offset-world vector :inline :offset 3792) - (anim-collide-offset-delta-world vector :inline :offset 3808) - (unknown-dynamics00 dynamics :offset 3824) - (mod-surface surface :offset 3828) - (current-surface surface :offset 3832) - (unknown-surface02 surface :offset 3836) - (time-of-last-surface-change time-frame :offset 3840) - (cpad cpad-info :offset 3848) - (unknown-float08 float :offset 3852) - (unknown-float09 float :offset 3856) - (unknown-float10 float :offset 3860) - (unknown-float11 float :offset 3864) - (to-target-pt-xz vector :inline :offset 3872) - (unknown-vector09 vector :inline :offset 3888) - (unknown-vector10 vector :inline :offset 3904) - (unknown-vector11 vector :inline :offset 3920) - (turn-history-ctrl vector 7 :inline :offset 3936) - (unknown-vector12 vector :inline :offset 4064) - (unknown-vector13 vector :inline :offset 4080) - (unknown-float12 float :offset 4096) - (unknown-float13 float :offset 4100) - (unknown-dword01 int64 :offset 4104) - (w-R-c matrix :inline :offset 4112) - (c-R-w matrix :inline :offset 4176) - (ctrl-orientation matrix :inline :offset 4240) - (unknown-vector14 vector :inline :offset 4320) - (camera-pos vector :inline :offset 4336) - (unknown-matrix03 matrix :inline :offset 4352) - (unknown-dword02 int64 :offset 4416) - (unknown-vector16 vector :inline :offset 4432) - (unknown-float14 float :offset 4448) - (unknown-floatiujh1bnb2n3i1 float :offset 4452) - (unknown-float15 float :offset 4456) - (unknown-word01 int32 :offset 4460) - (collide-extra-velocity vector :inline :offset 4464) - (unknown-vector18 vector :inline :offset 4480) - (unknown-time-frame03 time-frame :offset 4496) - (unknown-time-frame04 time-frame :offset 4504) - (unknown-vector19 vector :inline :offset 4512) - (unknown-vector20 vector :inline :offset 4528) - (last-trans-any-surf vector :inline :offset 4544) - (unknown-float16 float :offset 4548) - (ground-contact-normal vector :inline :offset 4560) - (last-trans-on-ground vector :inline :offset 4576) - (ground-contact-sphere-center vector :inline :offset 4592) - (transv-on-last-impact vector :inline :offset 4608) - (list-time-on-ground time-frame :offset 4624) - (ground-local-norm-dot-grav float :offset 4632) - (local-slope-z float :offset 4636) - (local-slope-x float :offset 4640) - (surface-slope-z float :offset 4644) - (surface-slope-x float :offset 4648) - (last-time-on-surface time-frame :offset 4656) - (normal-impact-vel float :offset 4664) - (unknown-time-frame07 time-frame :offset 4672) - (wall-contact-pat pat-surface :offset 4680) - (wall-contact-pt vector :inline :offset 4688) - (wall-contact-poly-normal vector :inline :offset 4704) - (wall-contact-normal vector :inline :offset 4720) - (actor-contact-pt vector :inline :offset 4736) - (actor-contact-normal vector :inline :offset 4752) - (actor-contact-handle handle :offset 4768) - (unknown-pat-surface01 pat-surface :offset 4776) - (gspot-slope-z float :offset 4780) - (gspot-slope-x float :offset 4784) - (ctrl-slope-heading float :offset 4788) - (ctrl-slope-z float :offset 4792) - (ctrl-slope-x float :offset 4796) - (unknown-word000 int32 :offset 4800) - (unknown-float002 float :offset 4804) - (unknown-float-n12iuh3n1 float :offset 4808) - (unknown-float-ki1jhbn23hj float :offset 4812) - (time-of-last-lc time-frame :offset 4816) - (low-coverage-pat-next1 pat-surface :offset 4828) - (low-coverage-dist-to-next2 float :offset 4832) - (low-coverage-pat-next2 pat-surface :offset 4836) - (low-coverage-slope-to-next1 float :offset 4824) - (low-coverage-norm-of-next1 vector :inline :offset 4848) - (low-coverage-norm-of-next2 vector :inline :offset 4864) - (low-coverage-overhang-plane-normal vector :inline :offset 4912) - (low-coverage-tangent vector :inline :offset 4928) - (low-coverage-tangent-xz vector :inline :offset 4944) - (btransv vector :inline :offset 4976) - (blocked-factor float :offset 4992) - (blocked-in-air-factor float :offset 4996) - (unknown-time-frame09 time-frame :offset 5000) - (time-of-last-lc-touch-edge time-frame :offset 5008) - (collision-spheres collide-shape-prim-sphere 10 :offset 5016) - (unknown-word02 int32 :offset 5064) - (last-roll-end-time time-frame :offset 5072) - (last-running-attack-end-time time-frame :offset 5080) - (last-hands-attempt-time time-frame :offset 5088) - (last-attack-end-time time-frame :offset 5096) - (last-feet-attempt-time time-frame :offset 5104) - (unknown-time-frame13 time-frame :offset 5112) - (last-time-of-stuck time-frame :offset 5120) - (unknown-float28 float :offset 5132) - (unknown-float29 float :offset 5136) - (unknown-float30 float :offset 5140) - (unknown-vector28 vector :inline :offset 5152) - (lhand-cspace cspace :offset 5168) - (rhand-cspace cspace :offset 5172) - (midpoint-of-hands vector :inline :offset 5184) - (unknown-vector31 vector :inline :offset 5200) - (unknown-cspacei1un23i1 cspace :inline :offset 5216) - (collide-mode symbol :offset 5248) - (collide-mode-transition float :offset 5252) - (duck-gun-tube-transision float :offset 5256) - (unknown-vector-array02 vector 15 :inline :offset 5264) - (unknown-float32 float :offset 5520) - (unknown-word03 int32 :offset 5524) - (unknown-float33 float :offset 5528) - (unknown-symbol000 symbol :offset 5532) - (edge-grab-edge-dir vector :inline :offset 5536) - (unknown-vector35 vector :inline :offset 5552) - (edge-grab-across-edge-dir vector :inline :offset 5568) - (unknown-time-frame15 time-frame :offset 5584) - (unknown-time-frame16 time-frame :offset 5592) - (unknown-handle000 handle :offset 5600) - (unknown-handle01 handle :offset 5608) - (unknown-word04 uint32 :offset 5616) - (unknown-spool-anim00 spool-anim :offset 5616) - (unknown-word05 int32 :offset 5616) - (unknown-symbol01 symbol :offset 5616) - (unknown-float34 float :offset 5616) - (unknown-symbol02 float :offset 5620) - (unknown-symbol03 float :offset 5624) - (unknown-float35 float :offset 5628) - (unknown-float36 float :offset 5632) - (unknown-float37 float :offset 5636) - (unknown-vector37 vector :inline :offset 5648) - (unknown-vector38 vector :inline :offset 5664) - (unknown-vector39 vector :inline :offset 5680) - (unknown-vector40 vector :inline :offset 5696) - (unknown-time-frame17 time-frame :offset 5712) - (unknown-time-frame18 time-frame :offset 5720) - (unknown-sound-id00 sound-id :offset 5776) - (unknown-handle02 handle :offset 5792) - (unknown-impact-control00 impact-control :inline :offset 5824) - (unknown-word06 int32 :offset 5832) - (unknown-vector41 vector :inline :offset 5888) - (last-trans-leaving-surf vector :inline :offset 5904) - (unknown-float38 float :offset 5908) - (unknown-vector43 vector :inline :offset 5920) - (unknown-float39 float :offset 5924) - (unknown-time-frame19 time-frame :offset 5936) - (time-of-last-debug-float time-frame :offset 5944) - (danger-mode symbol :offset 5984) - (target-attack-id uint32 :offset 5988) - (unknown-attack-id00 int32 :offset 5992) - (bomb-scale float :offset 5996) - (attack-count uint64 :offset 6000) - (unknown-dword06 handle :offset 6008) - (unknown-time-frame000 time-frame :offset 6016) - (unknown-combo-tracker00 combo-tracker :inline :offset 6032) - (unknown-time-frame21 time-frame :offset 6072) - (unknown-dword07 int64 :offset 6096) - (unknown-dword08 int64 :offset 6104) - (unknown-dword09 int64 :offset 6112) - (unknown-dword10 int64 :offset 6120) - (unknown-symbol06 symbol :offset 6144) - (unknown-quaternion04 quaternion :inline :offset 6160) - (unknown-sound-id01 sound-id :offset 6176) - (unknown-float41 float :offset 6180) - (unknown-float42 float :offset 6184) - (history-idx uint16 :offset 6188) - (history-length uint16 :offset 6190) - (unknown-word07 int32 :offset 6192) - (invul1-on-time time-frame :offset 6200) - (invul1-off-time time-frame :offset 6208) - (invul2-on-time time-frame :offset 6216) - (invul2-off-time time-frame :offset 6224) - (unknown-float43 float :offset 6232) - (unknown-float001 float :offset 6236) - (unknown-sound-id02 sound-id :offset 6240) - (unknown-sound-id03 sound-id :offset 6244) - (unknown-time-frame26 time-frame :offset 6248) - (unknown-time-frame27 time-frame :offset 6256) - (unknown-dword11 int64 :offset 6264) - (align-xz-vel vector :inline :offset 6272) - (zx-vel-frac float :offset 6288) - (unknown-sound-id04 sound-id :offset 6292) - (unknown-float45 float :offset 6296) - (unknown-word08 int32 :offset 6300) - (default-collide-as collide-spec :offset 6304) - (unknown-word09 int32 :offset 6308) - (default-collide-with collide-spec :offset 6312) - (time-of-last-zero-input time-frame :offset 6320) - (unknown-time-frame29 time-frame :offset 6328) - (unknown-dword12 int64 :offset 6336) - (time-of-last-debug-heal time-frame :offset 6368) - (unknown-quaternion05 quaternion :inline :offset 6384) - (unknown-time-frame31 time-frame :offset 6400) - (unknown-time-frame32 time-frame :offset 6408) - (pad uint8 :offset 6415) + ((unknown-float00 float :offset 448) + (unknown-float01 float :offset 452) + (unknown-float02 float :offset 456) + (unknown-float03 float :offset 460) + (transv-ctrl vector :inline :offset 480) + (target-transv vector :inline :offset 496) + (bent-gravity-normal vector :inline :offset 512) + (quat-for-control quaternion :inline :offset 528) + (override-quat quaternion :inline :offset 544) + (override-quat-alpha float :offset 560) + (ctrl-xz-vel float :offset 564) + (unknown-float003 float :offset 568) + (turn-go-the-long-way float :offset 572) + (velocity-after-thrust float :offset 576) + (turn-lockout-end-time time-frame :offset 584) + (turn-to-alt-heading vector :inline :offset 592) + (last-transv vector :inline :offset 608) + (last-quat-for-control quaternion :inline :offset 624) + (trans-log-trans vector 128 :inline :offset 640) + (trans-log-times time-frame 128 :offset 2688) + (trans-log-idx int32 :offset 3712) + (draw-offset vector :inline :offset 3728) + (cspace-offset vector :inline :offset 3744) + (anim-collide-offset-local vector :inline :offset 3760) + (anim-collide-offset-world vector :inline :offset 3776) + (old-anim-collide-offset-world vector :inline :offset 3792) + (anim-collide-offset-delta-world vector :inline :offset 3808) + (standard-dynamics dynamics :offset 3824) + (mod-surface surface :offset 3828) + (current-surface surface :offset 3832) + (prev-surf surface :offset 3836) + (time-of-last-surface-change time-frame :offset 3840) + (cpad cpad-info :offset 3848) + (turn-to-angle float :offset 3852) + (last-turn-to-angle float :offset 3856) + (turn-to-magnitude float :offset 3860) + (last-turn-to-magnitude float :offset 3864) + (to-target-pt-xz vector :inline :offset 3872) + (last-to-target-pt-xz vector :inline :offset 3888) + (turn-to-target vector :inline :offset 3904) + (last-turn-to-target vector :inline :offset 3920) + (turn-history-ctrl vector 7 :inline :offset 3936) + (pad-xz-dir vector :inline :offset 4064) + (last-pad-xz-dir vector :inline :offset 4080) + (pad-magnitude float :offset 4096) + (last-pad-magnitude float :offset 4100) + (time-of-last-pad-read time-frame :offset 4104) + (w-R-c matrix :inline :offset 4112) + (c-R-w matrix :inline :offset 4176) + (ctrl-orientation matrix :inline :offset 4240) + (pre-collide-local-normal vector :inline :offset 4320) + (camera-pos vector :inline :offset 4336) + (cam-R-w matrix :inline :offset 4352) + (update-cam-R-w-start-time int64 :offset 4416) + (force-turn-to-direction vector :inline :offset 4432) + (force-turn-to-speed float :offset 4448) + (unknown-floatiujh1bnb2n3i1 float :offset 4452) + (force-turn-to-strength float :offset 4456) + (tongue-counter int32 :offset 4460) + (collide-extra-velocity vector :inline :offset 4464) + (additional-decaying-velocity vector :inline :offset 4480) + (additional-decaying-velocity-end-time time-frame :offset 4496) + (additional-decaying-velocity-decay-start-time time-frame :offset 4504) + (gravity-normal vector :inline :offset 4512) + (last-gravity-normal vector :inline :offset 4528) + (last-trans-any-surf vector :inline :offset 4544) + (unknown-float16 float :offset 4548) + (ground-contact-normal vector :inline :offset 4560) + (last-trans-on-ground vector :inline :offset 4576) + (ground-contact-sphere-center vector :inline :offset 4592) + (transv-on-last-impact vector :inline :offset 4608) + (list-time-on-ground time-frame :offset 4624) + (ground-local-norm-dot-grav float :offset 4632) + (local-slope-z float :offset 4636) + (local-slope-x float :offset 4640) + (surface-slope-z float :offset 4644) + (surface-slope-x float :offset 4648) + (last-time-on-surface time-frame :offset 4656) + (normal-impact-vel float :offset 4664) + (last-time-touching-actor time-frame :offset 4672) + (wall-contact-pat pat-surface :offset 4680) + (wall-contact-pt vector :inline :offset 4688) + (wall-contact-poly-normal vector :inline :offset 4704) + (wall-contact-normal vector :inline :offset 4720) + (actor-contact-pt vector :inline :offset 4736) + (actor-contact-normal vector :inline :offset 4752) + (actor-contact-handle handle :offset 4768) + (gspot-pat-surfce pat-surface :offset 4776) + (gspot-slope-z float :offset 4780) + (gspot-slope-x float :offset 4784) + (ctrl-slope-heading float :offset 4788) + (ctrl-slope-z float :offset 4792) + (ctrl-slope-x float :offset 4796) + (unknown-word000 int32 :offset 4800) + (unknown-float002 float :offset 4804) + (unknown-float-n12iuh3n1 float :offset 4808) + (unknown-float-ki1jhbn23hj float :offset 4812) + (time-of-last-lc time-frame :offset 4816) + (low-coverage-pat-next1 pat-surface :offset 4828) + (low-coverage-dist-to-next2 float :offset 4832) + (low-coverage-pat-next2 pat-surface :offset 4836) + (low-coverage-slope-to-next1 float :offset 4824) + (low-coverage-norm-of-next1 vector :inline :offset 4848) + (low-coverage-norm-of-next2 vector :inline :offset 4864) + (low-coverage-overhang-plane-normal vector :inline :offset 4912) + (low-coverage-tangent vector :inline :offset 4928) + (low-coverage-tangent-xz vector :inline :offset 4944) + (btransv vector :inline :offset 4976) + (blocked-factor float :offset 4992) + (blocked-in-air-factor float :offset 4996) + (time-of-last-clear-wall-in-jump time-frame :offset 5000) + (time-of-last-lc-touch-edge time-frame :offset 5008) + (collision-spheres collide-shape-prim-sphere 10 :offset 5016) + (unknown-word02 int32 :offset 5064) + (last-roll-end-time time-frame :offset 5072) + (last-running-attack-end-time time-frame :offset 5080) + (last-hands-attempt-time time-frame :offset 5088) + (last-attack-end-time time-frame :offset 5096) + (last-feet-attempt-time time-frame :offset 5104) + (unknown-time-frame13 time-frame :offset 5112) + (last-time-of-stuck time-frame :offset 5120) + (bend-amount float :offset 5132) + (bend-target float :offset 5136) + (bend-speed float :offset 5140) + (ctrl-to-head-offset vector :inline :offset 5152) + (lhand-cspace cspace :offset 5168) + (rhand-cspace cspace :offset 5172) + (midpoint-of-hands vector :inline :offset 5184) + (ctrl-to-hands-offset vector :inline :offset 5200) + (sidekick-root cspace :inline :offset 5216) + (collide-mode symbol :offset 5248) + (collide-mode-transition float :offset 5252) + (duck-gun-tube-transision float :offset 5256) + (transv-history vector 15 :inline :offset 5264) + (average-xz-vel float :offset 5520) + (idx-of-fastest-xz-vel int32 :offset 5524) + (hand-to-edge-dist float :offset 5528) + (unknown-symbol000 symbol :offset 5532) + (edge-grab-edge-dir vector :inline :offset 5536) + (unknown-vector35 vector :inline :offset 5552) + (edge-grab-across-edge-dir vector :inline :offset 5568) + (last-successful-compute-edge-time time-frame :offset 5584) + (edge-grab-start-time time-frame :offset 5592) + (unknown-handle000 handle :offset 5600) + (anim-handle handle :offset 5608) + (unknown-word04 uint32 :offset 5616) + (unknown-spool-anim00 spool-anim :offset 5616) + (unknown-word05 int32 :offset 5616) + (unknown-symbol01 symbol :offset 5616) + (unknown-float34 float :offset 5616) + (did-move-to-pole-or-max-jump-height float :offset 5620) + (unknown-symbol03 float :offset 5624) + (unknown-float35 float :offset 5628) + (unknown-float36 float :offset 5632) + (unknown-float37 float :offset 5636) + (unknown-vector37 vector :inline :offset 5648) + (unknown-vector38 vector :inline :offset 5664) + (unknown-vector39 vector :inline :offset 5680) + (unknown-vector40 vector :inline :offset 5696) + (sliding-start-time time-frame :offset 5712) + (unknown-time-frame18 time-frame :offset 5720) + (unknown-sound-id00 sound-id :offset 5776) + (unknown-handle02 handle :offset 5792) + (impact-ctrl impact-control :inline :offset 5824) + (unknown-word06 int32 :offset 5832) + (unknown-vector41 vector :inline :offset 5888) + (last-trans-leaving-surf vector :inline :offset 5904) + (unknown-float38 float :offset 5908) + (highest-jump-mark vector :inline :offset 5920) + (unknown-float39 float :offset 5924) + (unknown-time-frame19 time-frame :offset 5936) + (time-of-last-debug-float time-frame :offset 5944) + (danger-mode symbol :offset 5984) + (target-attack-id uint32 :offset 5988) + (unknown-attack-id00 int32 :offset 5992) + (bomb-scale float :offset 5996) + (attack-count uint64 :offset 6000) + (unknown-dword06 handle :offset 6008) + (unknown-time-frame000 time-frame :offset 6016) + (unknown-combo-tracker00 combo-tracker :inline :offset 6032) + (unknown-time-frame21 time-frame :offset 6072) + (unknown-dword07 int64 :offset 6096) + (unknown-dword08 int64 :offset 6104) + (unknown-dword09 int64 :offset 6112) + (unknown-dword10 int64 :offset 6120) + (jump-kind symbol :offset 6144) + (unknown-quaternion04 quaternion :inline :offset 6160) + (unknown-sound-id01 sound-id :offset 6176) + (unknown-float41 float :offset 6180) + (unknown-float42 float :offset 6184) + (history-idx uint16 :offset 6188) + (history-length uint16 :offset 6190) + (remaining-ctrl-iterations int32 :offset 6192) + (invul1-on-time time-frame :offset 6200) + (invul1-off-time time-frame :offset 6208) + (invul2-on-time time-frame :offset 6216) + (invul2-off-time time-frame :offset 6224) + (unknown-float43 float :offset 6232) + (unknown-float001 float :offset 6236) + (board-jump-and-swim-sound sound-id :offset 6240) + (bubbles-sound sound-id :offset 6244) + (unknown-time-frame26 time-frame :offset 6248) + (unknown-time-frame27 time-frame :offset 6256) + (yellow-eco-last-use-time int64 :offset 6264) + (align-xz-vel vector :inline :offset 6272) + (zx-vel-frac float :offset 6288) + (unknown-sound-id04 sound-id :offset 6292) + (unknown-float45 float :offset 6296) + (default-collide-as-all collide-spec :offset 6300) + (default-collide-as-fgnd collide-spec :offset 6304) + (default-collide-with-all collide-spec :offset 6308) + (default-collide-with-fgnd collide-spec :offset 6312) + (time-of-last-zero-input time-frame :offset 6320) + (time-of-last-nonzero-input time-frame :offset 6328) + (time-between-zero-inputs time-frame :offset 6336) + (time-of-last-debug-heal time-frame :offset 6368) + (last-nonzero-input-dir-targ quaternion :inline :offset 6384) + (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) + (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) + (pad uint8 :offset 6415) ) :method-count-assert 68 :size-assert #x1910 diff --git a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc index 05c625573d..e651585a15 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc @@ -86,9 +86,9 @@ (enter () _type_ :state 20) (idle () _type_ :state 21) (exit () _type_ :state 22) - (remote-method-23 (_type_) none 23) - (remote-method-24 (_type_ vector) float 24) - (remote-method-25 (_type_) none 25) + (init (_type_) none 23) + (get-track-pt-and-scale (_type_ vector) float 24) + (post-common (_type_) none 25) ) ) @@ -122,7 +122,7 @@ ;; definition for method 24 of type remote ;; INFO: Used lq/sq -(defmethod remote-method-24 remote ((obj remote) (arg0 vector)) +(defmethod get-track-pt-and-scale remote ((obj remote) (arg0 vector)) (let ((s4-0 (handle->process (-> obj focus handle)))) (when s4-0 (set! (-> arg0 quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) @@ -136,7 +136,7 @@ ;; definition for method 25 of type remote ;; WARN: Return type mismatch int vs none. -(defmethod remote-method-25 remote ((obj remote)) +(defmethod post-common remote ((obj remote)) (with-pp (rlet ((acc :class vf) (vf0 :class vf) @@ -198,7 +198,7 @@ (s5-0 (new 'stack-no-clear 'vector)) ) (set! (-> s5-0 quad) (-> self parent-override 0 trans quad)) - (let ((f30-0 (remote-method-24 self s5-0))) + (let ((f30-0 (get-track-pt-and-scale self s5-0))) (let ((a1-2 (new 'stack-no-clear 'vector))) (set! (-> a1-2 quad) (-> self parent-override 0 trans quad)) (vector-lerp! (-> self root trans) a1-2 s5-0 (-> self blend)) @@ -212,15 +212,7 @@ (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (target-pos 8) (-> self root trans)) 1.0) (new 'static 'vector :y 1.0 :w 1.0) ) - (rotate-toward-orientation! - (-> self root) - s5-1 - 65536.0 - 5461.3335 - 150 - 0.00000000000000000000000000000000000000000021 - 0.0 - ) + (rotate-toward-orientation! (-> self root) s5-1 65536.0 5461.3335 150 150 0.0) ) (when gp-0 (let* ((gp-1 (-> (the-as process-drawable gp-0) root)) @@ -334,7 +326,7 @@ (none) ) :post (behavior () - (remote-method-25 self) + (post-common self) (none) ) ) @@ -371,7 +363,7 @@ ;; definition for method 23 of type remote ;; WARN: Return type mismatch remote vs none. -(defmethod remote-method-23 remote ((obj remote)) +(defmethod init remote ((obj remote)) (reset-to-collide-spec (-> obj focus) (collide-spec jak player-list)) (initialize-skeleton obj @@ -459,7 +451,7 @@ (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> arg0 quad)) (set! (-> self base-trans quad) (-> arg0 quad)) - (remote-method-23 self) + (init self) (set! (-> self event-hook) (-> (method-of-object self enter) event)) (go-virtual enter) (none) @@ -491,7 +483,7 @@ :flag-assert #x1c00c00139 (:methods (wait () _type_ :state 26) - (judge-method-27 (_type_) none 27) + (setup-collision (_type_) none 27) ) ) @@ -514,14 +506,14 @@ ;; definition for method 24 of type judge ;; INFO: Used lq/sq -(defmethod remote-method-24 judge ((obj judge) (arg0 vector)) +(defmethod get-track-pt-and-scale judge ((obj judge) (arg0 vector)) (set! (-> arg0 quad) (-> obj base-trans quad)) 1.0 ) ;; definition for method 25 of type judge ;; WARN: Return type mismatch int vs none. -(defmethod remote-method-25 judge ((obj judge)) +(defmethod post-common judge ((obj judge)) (ja-post) (if (type? (-> obj root) collide-shape) (update-transforms (the-as collide-shape (-> obj root))) @@ -621,7 +613,7 @@ ;; definition for method 27 of type judge ;; WARN: Return type mismatch int vs none. -(defmethod judge-method-27 judge ((obj judge)) +(defmethod setup-collision judge ((obj judge)) (let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec collectable)) @@ -645,8 +637,8 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! judge ((obj judge) (arg0 entity-actor)) - (judge-method-27 obj) - (remote-method-23 obj) + (setup-collision obj) + (init obj) (process-drawable-from-entity! obj arg0) (set! (-> obj root trans y) (+ 4096.0 (-> obj root trans y))) (set! (-> obj base-trans quad) (-> obj root trans quad)) @@ -661,8 +653,8 @@ (defbehavior judge-init-by-other judge ((arg0 vector) (arg1 uint)) (process-entity-set! self (the-as entity-actor #f)) (set! (-> self score) arg1) - (judge-method-27 self) - (remote-method-23 self) + (setup-collision self) + (init self) (vector-identity! (-> self root scale)) (quaternion-identity! (-> self root quat)) (set! (-> self root trans quad) (-> arg0 quad)) diff --git a/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc b/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc index 2aedc2a434..83c4b8aa99 100644 --- a/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc @@ -72,7 +72,7 @@ (set-yaw-angle-clear-roll-pitch! (_type_ float) quaternion 14) (set-roll-to-grav! (_type_ float) quaternion 15) (set-roll-to-grav-2! (_type_ float) quaternion 16) - (rotate-toward-orientation! (_type_ quaternion float float int float float) quaternion 17) + (rotate-toward-orientation! (_type_ quaternion float float int int float) quaternion 17) (set-quaternion! (_type_ quaternion) quaternion 18) (set-heading-vec-clear-roll-pitch! (_type_ vector) quaternion 19) (point-toward-point-clear-roll-pitch! (_type_ vector) quaternion 20) diff --git a/test/decompiler/reference/jak2/engine/math/transformq_REF.gc b/test/decompiler/reference/jak2/engine/math/transformq_REF.gc index b914b0473c..97a03b0ea2 100644 --- a/test/decompiler/reference/jak2/engine/math/transformq_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/transformq_REF.gc @@ -158,13 +158,13 @@ ;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3] ;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4] ;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5] -(defmethod rotate-toward-orientation! trsqv ((obj trsqv) (arg0 quaternion) (arg1 float) (arg2 float) (arg3 int) (arg4 float) (arg5 float)) +(defmethod rotate-toward-orientation! trsqv ((obj trsqv) (arg0 quaternion) (arg1 float) (arg2 float) (arg3 int) (arg4 int) (arg5 float)) (local-vars (f0-4 float) (sv-192 (function quaternion vector vector float int quaternion)) (sv-208 quaternion) (sv-224 vector) - (sv-240 float) + (sv-240 int) (sv-256 vector) (sv-272 vector) ) @@ -178,7 +178,7 @@ (set! sv-208 gp-0) (set! sv-224 (vector-y-quaternion! (new 'stack-no-clear 'vector) s5-0)) (let ((a2-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) arg0))) - (sv-192 sv-208 sv-224 a2-1 arg2 (the-as int sv-240)) + (sv-192 sv-208 sv-224 a2-1 arg2 sv-240) ) (quaternion-normalize! (quaternion*! s5-0 gp-0 s5-0)) ) diff --git a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc index 3fd67bb162..f2a76eaf78 100644 --- a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc @@ -17,22 +17,24 @@ ;; definition for function target-board-anim-trans ;; WARN: Return type mismatch float vs none. (defbehavior target-board-anim-trans target () - (let ((f26-0 (deg- - (quaternion-vector-y-angle (-> self control dir-targ) (-> self control local-normal)) - (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) - ) - ) - (f28-0 (* (deg- - (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) - (quaternion-vector-y-angle (-> self control unknown-quaternion03) (-> self control local-normal)) - ) - (-> self clock frames-per-second) - ) + (let ((f26-0 + (deg- + (quaternion-vector-y-angle (-> self control dir-targ) (-> self control local-normal)) + (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) + ) + ) + (f28-0 + (* (deg- + (quaternion-vector-y-angle (-> self control quat-for-control) (-> self control local-normal)) + (quaternion-vector-y-angle (-> self control last-quat-for-control) (-> self control local-normal)) ) + (-> self clock frames-per-second) + ) + ) (f30-0 (-> self board turn-anim-targ)) ) (let ((f0-1 (lerp-scale 1.0 -1.0 f28-0 -32768.0 32768.0))) - (if (or (< (fabs f0-1) 0.1) (< (-> self control unknown-float10) 0.3)) + (if (or (< (fabs f0-1) 0.1) (< (-> self control turn-to-magnitude) 0.3)) (seek! (-> self board turn-anim-mag) 0.0 (* 8.0 (-> self clock seconds-per-frame))) (seek! (-> self board turn-anim-mag) f0-1 (* 2.0 (-> self clock seconds-per-frame))) ) @@ -62,7 +64,7 @@ ) (when (and (or (< (* f30-0 (-> self board turn-anim-targ)) 0.0) (= f30-0 0.0)) (and (< (* 0.2 (-> *TARGET_BOARD-bank* turn-frames)) (fabs (- f30-0 (-> self board turn-anim-targ)))) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) ) ) (let ((v1-50 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) @@ -116,8 +118,8 @@ ) (set! (-> self board spin-start-time) (-> self clock frame-counter)) (set! (-> self board spin-start-dir quad) (-> self node-list data 3 bone transform vector 2 quad)) - (vector-flatten! (-> self control unknown-vector03) (-> self control c-R-w vector 2) *up-vector*) - (vector-normalize! (-> self control unknown-vector03) 1.0) + (vector-flatten! (-> self control turn-to-alt-heading) (-> self control c-R-w vector 2) *up-vector*) + (vector-normalize! (-> self control turn-to-alt-heading) 1.0) (rot->dir-targ! (-> self control)) (set! (-> self board trotyv-max) (lerp-scale @@ -883,7 +885,7 @@ s2-0 (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) - (set! (-> self control unknown-time-frame00) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) (the int (lerp-scale 225.0 0.0 (vector-dot s2-0 (-> self control c-R-w vector 2)) -1.0 1.0)) ) @@ -1133,9 +1135,9 @@ ) ) (('ramp) - (when (not (-> self control unknown-symbol02)) + (when (not (-> self control did-move-to-pole-or-max-jump-height)) (let ((v0-3 (the-as object #t))) - (set! (-> self control unknown-symbol02) (the-as float v0-3)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float v0-3)) v0-3 ) ) @@ -1158,14 +1160,14 @@ (logior! (-> self control root-prim prim-core action) (collide-action no-normal-reset)) (set! (-> self control mod-surface) *board-halfpipe-mods*) (set! (-> self board mods-backup) (-> self control mod-surface)) - (set! (-> self control unknown-time-frame17) 0) + (set! (-> self control sliding-start-time) 0) (when (< (vector-dot (-> self control c-R-w vector 1) (-> self control dynam gravity-normal)) 0.7) (vector-matrix*! (-> self control transv-ctrl) (-> self control transv) (-> self control w-R-c)) (set! (-> self control transv-ctrl y) 0.0) (vector-matrix*! (-> self control transv) (-> self control transv-ctrl) (-> self control c-R-w)) ) (set! (-> self control unknown-word04) (the-as uint #f)) - (set! (-> self control unknown-symbol02) (the-as float #f)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #f)) (do-edge-grabs *target* *collide-cache* *collide-edge-board-halfpipe-spec*) (when (not (-> self control unknown-spool-anim00)) (let ((gp-0 (vector-flatten! @@ -1229,14 +1231,14 @@ (none) ) :trans (behavior () - (when (and (or (= (the-as int (-> self control unknown-symbol02)) #t) + (when (and (or (= (the-as int (-> self control did-move-to-pole-or-max-jump-height)) #t) (and (< (- (-> self clock frame-counter) (-> self board halfpipe-lip-time)) (seconds 0.1)) (= (-> self board halfpipe-lip-event) 'lipramp) ) ) (< 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) - (set! (-> self control unknown-symbol02) (the-as float 'done)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float 'done)) (let ((v1-16 (new-stack-vector0)) (f0-2 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) @@ -1257,7 +1259,7 @@ ) ) (set! (-> self board halfpipe-time) (-> self clock frame-counter)) - (if (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (if (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (set! (-> self board halfpipe-gspot-time) (-> self clock frame-counter)) ) (when (jump-hit-ground-stuck?) @@ -1276,33 +1278,31 @@ ) (target-board-spin-check) (cond - ((> (-> self control unknown-time-frame17) 0) + ((> (-> self control sliding-start-time) 0) (cond - ((< 0.7 (-> self control unknown-float10)) + ((< 0.7 (-> self control turn-to-magnitude)) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self control edge-grab-across-edge-dir quad)) (set! (-> gp-0 y) 0.0) (vector-normalize! gp-0 1.0) (if (< 0.7 (vector-dot (-> self control to-target-pt-xz) gp-0)) - (+! (-> self control unknown-time-frame17) - (- (-> self clock frame-counter) (-> self clock old-frame-counter)) - ) - (set! (-> self control unknown-time-frame17) 1) + (+! (-> self control sliding-start-time) (- (-> self clock frame-counter) (-> self clock old-frame-counter))) + (set! (-> self control sliding-start-time) 1) ) ) ) (else - (set! (-> self control unknown-time-frame17) 1) + (set! (-> self control sliding-start-time) 1) ) ) ) ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (< (-> self board halfpipe-lip-time) (+ (-> self state-time) (seconds -0.2))) ) - (set! (-> self control unknown-time-frame17) 1) + (set! (-> self control sliding-start-time) 1) ) ) - (when (or (>= (-> self control unknown-time-frame17) (seconds 0.05)) + (when (or (>= (-> self control sliding-start-time) (seconds 0.05)) (and (>= (- (-> self clock frame-counter) (-> self board halfpipe-gspot-time)) (seconds 0.5)) (< (-> self board halfpipe-lip-time) (+ (-> self state-time) (seconds -0.2))) ) @@ -2142,14 +2142,14 @@ (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *board-turn-to-mods*) (set! (-> self board mods-backup) (-> self control mod-surface)) - (set! (-> self control unknown-time-frame17) arg1) + (set! (-> self control sliding-start-time) arg1) (vector-normalize-copy! (-> self control unknown-vector38) arg0 1.0) (forward-up-nopitch->quaternion (-> self control dir-targ) (-> self control unknown-vector38) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) - (set! (-> self control unknown-time-frame00) (+ (-> self clock frame-counter) arg1)) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) arg1)) (none) ) :exit target-board-exit @@ -2166,7 +2166,7 @@ (flush-trick-list (-> self board)) (go target-board-jump (-> *TARGET_BOARD-bank* jump-height-min) (-> *TARGET_BOARD-bank* jump-height-max) #f) ) - (if (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self control unknown-time-frame17)) + (if (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self control sliding-start-time)) (go target-board-stance) ) (target-board-anim-trans) @@ -2292,7 +2292,7 @@ 81920.0 1024.0 ) - (set! (-> self control unknown-pat-surface01) (-> s5-0 best-other-tri pat)) + (set! (-> self control gspot-pat-surfce) (-> s5-0 best-other-tri pat)) ) ) (if (< (-> self control trans y) (-> self control gspot-pos y)) @@ -2485,7 +2485,7 @@ ) :trans (behavior () (set! (-> self board halfpipe-time) (-> self clock frame-counter)) - (if (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (if (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (set! (-> self board halfpipe-gspot-time) (-> self clock frame-counter)) ) (if (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 1)) @@ -2797,8 +2797,8 @@ (none) ) :post (behavior () - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) (vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame))) (target-no-move-post) (target-board-effect) @@ -2851,7 +2851,7 @@ :flags (surface-flag check-edge air) ) ) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (let ((a0-6 (target-time-to-ground))) (cond ((< a0-6 (seconds 0.207)) @@ -2996,8 +2996,8 @@ (none) ) :post (behavior () - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) (vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame))) (target-post) (target-board-effect) @@ -3266,8 +3266,8 @@ (none) ) :post (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) diff --git a/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc b/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc index 308d3f9955..207e3876c8 100644 --- a/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc @@ -222,7 +222,7 @@ (case arg3 ((1) (when (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) - (let* ((f30-0 (* 122880.0 (-> self control unknown-float10) (-> self clock seconds-per-frame))) + (let* ((f30-0 (* 122880.0 (-> self control turn-to-magnitude) (-> self clock seconds-per-frame))) (a2-1 (-> self board ride-dir)) (v1-12 (vector-flatten! (new 'stack-no-clear 'vector) (-> self control to-target-pt-xz) a2-1)) ) @@ -559,7 +559,7 @@ (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :noboard #x1 :probe #x1)) (set! (-> self focus-status) (logior (focus-status board) (-> self focus-status))) (logclear! (-> self control root-prim prim-core action) (collide-action can-ride)) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (let ((v1-82 (-> self node-list data))) (set! (-> v1-82 0 param0) (the-as (function cspace matrix none) cspace<-transformq+world-trans!)) (set! (-> v1-82 0 param1) (the-as basic (-> self control trans))) @@ -578,8 +578,8 @@ (set! (-> self board shock-offset) 0.0) (set! (-> self board shock-offsetv) 0.0) (set! (-> self board shock-rotx) 0.0) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -623,8 +623,8 @@ (set! (-> self board latch?) #f) (mode-set! (-> self board main) (joint-mod-mode flex-blend)) (mode-set! (-> self board upper-body) (joint-mod-mode flex-blend)) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -691,7 +691,7 @@ ;; INFO: Used lq/sq (defbehavior target-board-smack-surface? target () (when (and (logtest? (-> self control status) (collide-status touch-wall)) - (< (+ (-> self clock frame-counter) (seconds -0.05)) (-> self control unknown-time-frame07)) + (< (+ (-> self clock frame-counter) (seconds -0.05)) (-> self control last-time-touching-actor)) (< 0.7 (-> self control touch-angle)) (< 73728.0 (-> self control ctrl-xz-vel)) (and (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) @@ -743,10 +743,10 @@ 1.0 ) ((< (-> gp-0 z) 0.0) - (fmax 0.75 (-> self control unknown-float10)) + (fmax 0.75 (-> self control turn-to-magnitude)) ) (else - (-> self control unknown-float10) + (-> self control turn-to-magnitude) ) ) ) @@ -776,14 +776,14 @@ (set! f0-28 0.0) (set! f1-23 0.0) ) - (when (and (< (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 1)) + (when (and (< (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 1)) (>= f28-0 0.5) (< (vector-dot (-> self control wall-contact-normal) (-> self control to-target-pt-xz)) -0.7) (logtest? (-> self control mod-surface flags) (surface-flag air)) (< 0.0 (-> gp-0 y)) ) (cond - ((and (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.1)) + ((and (>= (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.1)) (< 0.3 (-> self control blocked-factor)) ) (set! f0-28 f1-23) @@ -1324,10 +1324,10 @@ (go target-board-turn-to (-> self control transv) (seconds 0.2)) ) (else - (set! (-> self control unknown-time-frame00) + (set! (-> self control turn-lockout-end-time) (the-as time-frame - (max (+ (-> self clock frame-counter) (seconds 0.1)) (-> self control unknown-time-frame00)) + (max (+ (-> self clock frame-counter) (seconds 0.1)) (-> self control turn-lockout-end-time)) ) ) ) @@ -1416,11 +1416,11 @@ ) (< (-> self control gspot-slope-z) 0.0) ) - (or (not (or (= (-> self control unknown-pat-surface01 mode) (pat-mode ground)) - (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (or (not (or (= (-> self control gspot-pat-surfce mode) (pat-mode ground)) + (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) ) ) - (or (= (-> self control unknown-pat-surface01 event) (pat-event rail)) + (or (= (-> self control gspot-pat-surfce event) (pat-event rail)) (and (logtest? (-> self water flags) (water-flags active)) (< (-> self control gspot-pos y) (-> self water surface-height)) ) @@ -1430,7 +1430,7 @@ ) (zero? (logand (focus-status halfpipe) (-> self focus-status))) ) - (and (= (-> self control unknown-pat-surface01 mode) (pat-mode halfpipe)) + (and (= (-> self control gspot-pat-surfce mode) (pat-mode halfpipe)) (and (< (fabs (vector-dot (-> self control gspot-normal) (-> self control dynam gravity-normal))) 0.7) (zero? (logand (focus-status halfpipe) (-> self focus-status))) ) @@ -1443,12 +1443,12 @@ ) ) ) - (set! (-> self control unknown-float30) 0.0) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-speed) 0.0) + (set! (-> self control bend-target) 0.0) ) (else - (set! (-> self control unknown-float30) 1024.0) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-speed) 1024.0) + (set! (-> self control bend-target) 1.0) (when (< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) (forward-up-nopitch->quaternion (-> self control dir-targ) @@ -1520,8 +1520,8 @@ (-> self control dynam gravity-normal) (the-as float (-> self control dynam gravity-length)) ) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (when (and (-> self board unknown-symbol00) (zero? (logand (focus-status halfpipe) (-> self focus-status)))) (let ((f30-0 @@ -1544,7 +1544,7 @@ (vector-flatten! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) (-> self control trans) (-> self board unknown-vector00)) - (-> self control unknown-dynamics00 gravity-normal) + (-> self control standard-dynamics gravity-normal) ) ) ) @@ -1557,7 +1557,7 @@ (or (< (-> self board unknown-time-frame01) (-> self control last-time-on-surface)) (< (- (-> self clock frame-counter) (-> self board unknown-time-frame01)) (seconds 0.2)) ) - (< 0.98 (vector-dot (-> self board unknown-vector01) (-> self control unknown-dynamics00 gravity-normal))) + (< 0.98 (vector-dot (-> self board unknown-vector01) (-> self control standard-dynamics gravity-normal))) (< f26-0 8192.0) (< f30-0 8192.0) (or (< (* 0.2 f28-0) f30-0) @@ -1628,7 +1628,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (target-board-pre-move) (build-conversions (-> self control transv)) @@ -1638,7 +1638,7 @@ (when (-> self board stick-off) (let ((f0-5 0.0)) (set! (-> self control cpad stick0-speed) f0-5) - (set! (-> self control unknown-float12) f0-5) + (set! (-> self control pad-magnitude) f0-5) ) ) (when *target-rc-board-controls* @@ -1656,17 +1656,17 @@ (the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0)) ) ) - (turn-to-vector s5-0 (-> self control unknown-float12)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) ) - (if (and (= (-> self control unknown-float12) 0.0) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (if (and (= (-> self control pad-magnitude) 0.0) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) (not (logtest? (-> self control current-surface flags) (surface-flag turn-to-vel))) (>= (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) ) (rot->dir-targ! (-> self control)) ) (when (and (< (- (-> self clock frame-counter) (-> self control last-time-on-surface)) (seconds 0.1)) - (>= (-> self clock frame-counter) (-> self control unknown-time-frame00)) + (>= (-> self clock frame-counter) (-> self control turn-lockout-end-time)) (not (logtest? (-> self control current-surface flags) (surface-flag turn-to-vel))) (>= (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1)) ) @@ -1814,7 +1814,7 @@ ) ) (target-board-collision) - (if (!= (-> self control unknown-float30) 0.0) + (if (!= (-> self control bend-speed) 0.0) (bend-gravity) ) (post-flag-setup) @@ -2350,28 +2350,28 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) - (set! (-> self control unknown-float30) 32.0) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-speed) 32.0) + (set! (-> self control bend-target) 1.0) (logior! (-> self control root-prim prim-core action) (collide-action check-edge)) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) - (turn-to-vector s5-0 (-> self control unknown-float12)) - (if (< 0.0 (-> self control unknown-float10)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) + (if (< 0.0 (-> self control turn-to-magnitude)) (set! (-> self board ride-pad-vector 0 quad) (-> self control to-target-pt-xz quad)) ) - (board-ride-add-thrust s5-0 (-> self control unknown-float10)) + (board-ride-add-thrust s5-0 (-> self control turn-to-magnitude)) (let ((s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) s5-0 16384.0))) (set! (-> s5-1 y) 0.0) - (vector-xz-normalize! s5-1 (-> self control unknown-float10)) + (vector-xz-normalize! s5-1 (-> self control turn-to-magnitude)) (let ((f0-16 (vector-dot s5-1 (-> self board ride-dir)))) - (if (>= 0.0 (-> self control unknown-float10)) + (if (>= 0.0 (-> self control turn-to-magnitude)) (set! f0-16 0.0) ) (set! (-> self board ride-lean-targ) f0-16) @@ -2597,7 +2597,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float s5-1))) (while (nonzero? s5-1) (+! s5-1 -1) - (set! (-> self control unknown-word07) s5-1) + (set! (-> self control remaining-ctrl-iterations) s5-1) (set! (-> self board turn-anim-targ) (fmax -10.0 (fmin 10.0 (-> self board turn-anim-targ)))) (or (not (>= (* (-> self board turn-anim-targ) (-> self board turn-anim-frame)) 0.0)) (< (fabs (-> self board turn-anim-frame)) (fabs (-> self board turn-anim-targ))) diff --git a/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc b/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc index c221187dc5..eab7d5b4d4 100644 --- a/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc @@ -146,7 +146,7 @@ (set! (-> arg0 time-of-last-lc-touch-edge) (-> pp clock frame-counter)) (set! sv-40 (logior sv-40 (collide-status touch-edge))) (set! (-> arg0 time-of-last-lc) (-> pp clock frame-counter)) - (let ((f30-0 (vector-dot tangent (-> arg0 unknown-vector10))) + (let ((f30-0 (vector-dot tangent (-> arg0 turn-to-target))) (f0-27 (if (logtest? sv-32 (cshape-reaction-flags csrf01)) (cos (- 16384.0 (acos (-> arg0 coverage)))) (-> arg0 coverage) @@ -427,9 +427,13 @@ (let ((f0-32 (-> arg0 current-surface slope-change-preserve))) (when (< 0.0 f0-32) (let ((v1-223 (new-stack-vector0))) - (let ((f1-25 (vector-dot (-> arg0 unknown-vector14) (the-as vector (-> sv-88 vector))))) + (let ((f1-25 (vector-dot (-> arg0 pre-collide-local-normal) (the-as vector (-> sv-88 vector))))) 0.0 - (vector-! v1-223 (the-as vector (-> sv-88 vector)) (vector-float*! v1-223 (-> arg0 unknown-vector14) f1-25)) + (vector-! + v1-223 + (the-as vector (-> sv-88 vector)) + (vector-float*! v1-223 (-> arg0 pre-collide-local-normal) f1-25) + ) ) (let ((f1-26 (vector-length v1-223))) f1-26 @@ -603,7 +607,7 @@ (new 'stack-no-clear 'vector) (-> self control edge-grab-across-edge-dir) (seek - (vector-length (-> self control unknown-vector18)) + (vector-length (-> self control additional-decaying-velocity)) 40960.0 (* 81920.0 (-> self clock seconds-per-frame)) ) diff --git a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc index af878a3e71..35bfd3f4a3 100644 --- a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc @@ -4,8 +4,8 @@ ;; definition for function build-conversions ;; INFO: Used lq/sq (defbehavior build-conversions target ((arg0 vector)) - (when (!= (-> self control unknown-surface02) (-> self control surf)) - (set! (-> self control unknown-surface02) (-> self control surf)) + (when (!= (-> self control prev-surf) (-> self control surf)) + (set! (-> self control prev-surf) (-> self control surf)) (set! (-> self control time-of-last-surface-change) (-> self clock frame-counter)) ) (surface-mult! (-> self control current-surface) (-> self control mod-surface) (-> self control surf)) @@ -46,8 +46,8 @@ ) (matrix-transpose! (-> self control w-R-c) (-> self control c-R-w)) (vector-matrix*! (-> self control transv-ctrl) arg0 (-> self control w-R-c)) - (set! (-> self control unknown-vector20 quad) (-> self control unknown-vector19 quad)) - (let ((v0-7 (-> self control unknown-vector19))) + (set! (-> self control last-gravity-normal quad) (-> self control gravity-normal quad)) + (let ((v0-7 (-> self control gravity-normal))) (set! (-> v0-7 quad) (-> self control dynam gravity-normal quad)) v0-7 ) @@ -180,11 +180,11 @@ (let ((s3-3 format) (s2-3 arg1) (s1-3 "~0kgspt:~6X mode:~-8S material:~-10S event:~S~%") - (s0-3 (-> arg0 control unknown-pat-surface01)) + (s0-3 (-> arg0 control gspot-pat-surfce)) ) - (set! sv-192 (pat-mode->string (-> arg0 control unknown-pat-surface01))) - (set! sv-208 (pat-material->string (-> arg0 control unknown-pat-surface01))) - (let ((t1-3 (pat-event->string (-> arg0 control unknown-pat-surface01)))) + (set! sv-192 (pat-mode->string (-> arg0 control gspot-pat-surfce))) + (set! sv-208 (pat-material->string (-> arg0 control gspot-pat-surfce))) + (let ((t1-3 (pat-event->string (-> arg0 control gspot-pat-surfce)))) (s3-3 s2-3 s1-3 s0-3 sv-192 sv-208 t1-3) ) ) @@ -458,7 +458,7 @@ (-> arg0 control last-trans-any-surf y) (- (-> (the-as target pp) clock frame-counter) (-> arg0 control last-time-on-surface)) (- (-> arg0 control trans y) (-> arg0 control last-trans-any-surf y)) - (- (-> arg0 control unknown-vector43 y) (-> arg0 control last-trans-leaving-surf y)) + (- (-> arg0 control highest-jump-mark y) (-> arg0 control last-trans-leaving-surf y)) (-> arg0 control ground-impact-vel) ) (let* ((t9-76 format) @@ -467,7 +467,7 @@ (v1-191 (vector-! (new-stack-vector0) (-> arg0 control trans) (-> arg0 control last-trans-any-surf))) (a2-17 (sqrtf (+ (* (-> v1-191 x) (-> v1-191 x)) (* (-> v1-191 z) (-> v1-191 z))))) (v1-193 - (vector-! (new-stack-vector0) (-> arg0 control unknown-vector43) (-> arg0 control last-trans-leaving-surf)) + (vector-! (new-stack-vector0) (-> arg0 control highest-jump-mark) (-> arg0 control last-trans-leaving-surf)) ) ) (t9-76 a0-131 a1-56 a2-17 (sqrtf (+ (* (-> v1-193 x) (-> v1-193 x)) (* (-> v1-193 z) (-> v1-193 z))))) @@ -475,9 +475,9 @@ (format arg1 "~0kbend b:~F t:~F s:~F~%" - (-> arg0 control unknown-float28) - (-> arg0 control unknown-float29) - (-> arg0 control unknown-float30) + (-> arg0 control bend-amount) + (-> arg0 control bend-target) + (-> arg0 control bend-speed) ) (set! sv-64 0) (set! sv-72 0) @@ -508,19 +508,19 @@ ;; definition for function read-pad ;; INFO: Used lq/sq (defbehavior read-pad target ((arg0 vector)) - (when (!= (-> self control unknown-dword01) (-> *display* real-clock frame-counter)) - (set! (-> self control unknown-vector13 quad) (-> self control unknown-vector12 quad)) - (set! (-> self control unknown-float13) (-> self control unknown-float12)) - (set! (-> self control unknown-dword01) (the-as int (-> *display* real-clock frame-counter))) + (when (!= (-> self control time-of-last-pad-read) (-> *display* real-clock frame-counter)) + (set! (-> self control last-pad-xz-dir quad) (-> self control pad-xz-dir quad)) + (set! (-> self control last-pad-magnitude) (-> self control pad-magnitude)) + (set! (-> self control time-of-last-pad-read) (-> *display* real-clock frame-counter)) ) (set! (-> arg0 x) (sin (-> self control cpad stick0-dir))) (set! (-> arg0 y) 0.0) (set! (-> arg0 z) (cos (-> self control cpad stick0-dir))) (set! (-> arg0 w) 0.0) - (set! (-> self control unknown-vector12 quad) (-> arg0 quad)) - (set! (-> self control unknown-float12) (-> self control cpad stick0-speed)) - (when (< (-> self control unknown-dword02) (-> self clock frame-counter)) - (let ((s5-0 (-> self control unknown-matrix03)) + (set! (-> self control pad-xz-dir quad) (-> arg0 quad)) + (set! (-> self control pad-magnitude) (-> self control cpad stick0-speed)) + (when (< (-> self control update-cam-R-w-start-time) (-> self clock frame-counter)) + (let ((s5-0 (-> self control cam-R-w)) (t9-2 matrix-local->world) (a0-13 #t) ) @@ -537,13 +537,13 @@ ) ) ) - (vector-matrix*! arg0 arg0 (-> self control unknown-matrix03)) + (vector-matrix*! arg0 arg0 (-> self control cam-R-w)) ) ;; definition for function set-pad (defbehavior set-pad target ((arg0 vector)) - (set! (-> self control unknown-float12) (vector-length arg0)) - (vector-matrix*! (-> self control unknown-vector12) arg0 (matrix-world->local #t #f)) + (set! (-> self control pad-magnitude) (vector-length arg0)) + (vector-matrix*! (-> self control pad-xz-dir) arg0 (matrix-world->local #t #f)) arg0 ) @@ -559,10 +559,10 @@ ;; INFO: Used lq/sq (defbehavior vector<-pad-in-surface! target ((arg0 vector) (arg1 symbol)) (let ((a1-1 (read-pad (new-stack-vector0)))) - (warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control unknown-matrix03)) + (warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control cam-R-w)) ) (if arg1 - (vector-float*! arg0 arg0 (-> self control unknown-float12)) + (vector-float*! arg0 arg0 (-> self control pad-magnitude)) ) arg0 ) @@ -611,7 +611,7 @@ ) (set! (-> a0-2 quad) (-> self control transv quad)) (let ((f0-1 (vector-dot gp-0 (t9-2 a0-2 1.0))) - (a1-3 (-> self control unknown-vector-array02)) + (a1-3 (-> self control transv-history)) (f2-0 -1000.0) (f1-0 0.0) (a0-3 -1) @@ -632,16 +632,16 @@ ) ) (let ((f1-1 (* 0.0625 f1-0))) - (set! (-> self control unknown-word03) a0-3) - (set! (-> self control unknown-float32) f1-1) + (set! (-> self control idx-of-fastest-xz-vel) a0-3) + (set! (-> self control average-xz-vel) f1-1) (if (logtest? (-> self control current-surface flags) (surface-flag no-turn-around)) (set! (-> v1-7 0) (-> self clock frame-counter)) ) (and (>= (the-as uint (- (-> self clock frame-counter) (-> v1-7 0))) (the-as uint 300)) (< f0-1 0.0) (< 32768.0 f1-1) - (< 0.7 (-> self control unknown-float12)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.3)) + (< 0.7 (-> self control pad-magnitude)) + (>= (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.3)) (>= (- (-> self clock frame-counter) (-> self control time-of-last-lc)) (seconds 0.3)) (logtest? (-> self control status) (collide-status on-surface)) (and (< 0.7 (-> self control surface-angle)) #t) @@ -654,7 +654,7 @@ ;; definition for function wall-hide? ;; INFO: Used lq/sq (defbehavior wall-hide? target () - (when (and (< 0.7 (-> self control unknown-float12)) + (when (and (< 0.7 (-> self control pad-magnitude)) (< 0.7 (-> self control blocked-factor)) (and (< (-> self control ctrl-xz-vel) 8192.0) (logtest? (-> self control status) (collide-status touch-wall)) @@ -666,11 +666,13 @@ ) ) ) - (if (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame31)) (seconds 0.1)) - (set! (-> self control unknown-time-frame32) (-> self clock frame-counter)) + (if (>= (- (-> self clock frame-counter) (-> self control time-of-last-wall-hide-first-check-pass)) (seconds 0.1)) + (set! (-> self control time-of-first-wall-hide-first-check-pass) (-> self clock frame-counter)) ) - (set! (-> self control unknown-time-frame31) (-> self clock frame-counter)) - (when (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame32)) (seconds 0.5)) + (set! (-> self control time-of-last-wall-hide-first-check-pass) (-> self clock frame-counter)) + (when (>= (- (-> self clock frame-counter) (-> self control time-of-first-wall-hide-first-check-pass)) + (seconds 0.5) + ) (let ((gp-0 (new 'stack-no-clear 'collide-query))) (let ((v1-34 (-> gp-0 bbox)) (a0-13 (-> self control trans)) @@ -728,10 +730,10 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defbehavior target-log-trans target () - (let ((v1-1 (-> self control unknown-word00))) - (set! (-> self control unknown-time-frame-array00 v1-1) (-> self clock frame-counter)) - (set! (-> self control unknown-vector-array00 v1-1 quad) (-> self control trans quad)) - (set! (-> self control unknown-word00) (logand (+ v1-1 1) 127)) + (let ((v1-1 (-> self control trans-log-idx))) + (set! (-> self control trans-log-times v1-1) (-> self clock frame-counter)) + (set! (-> self control trans-log-trans v1-1 quad) (-> self control trans quad)) + (set! (-> self control trans-log-idx) (logand (+ v1-1 1) 127)) ) 0 (none) @@ -746,10 +748,10 @@ ) (let ((s4-0 (-> self control))) (let* ((v1-0 127) - (a1-2 (logand (+ (-> s4-0 unknown-word00) v1-0) 127)) + (a1-2 (logand (+ (-> s4-0 trans-log-idx) v1-0) 127)) ) - (while (and (< (- (-> self clock frame-counter) (-> s4-0 unknown-time-frame-array00 a1-2)) arg0) (> v1-0 0)) - (vector+! s5-0 s5-0 (-> s4-0 unknown-vector-array00 a1-2)) + (while (and (< (- (-> self clock frame-counter) (-> s4-0 trans-log-times a1-2)) arg0) (> v1-0 0)) + (vector+! s5-0 s5-0 (-> s4-0 trans-log-trans a1-2)) (+! gp-0 1) (+! v1-0 -1) (set! a1-2 (logand (+ a1-2 v1-0) 127)) @@ -758,8 +760,8 @@ (vector-float/! s5-0 s5-0 (the float gp-0)) (let ((s3-0 (- 128 gp-0))) (while (< s3-0 128) - (let ((v1-5 (logand (+ (-> s4-0 unknown-word00) s3-0) 127))) - (+! f30-0 (vector-vector-distance s5-0 (-> s4-0 unknown-vector-array00 v1-5))) + (let ((v1-5 (logand (+ (-> s4-0 trans-log-idx) s3-0) 127))) + (+! f30-0 (vector-vector-distance s5-0 (-> s4-0 trans-log-trans v1-5))) ) (+! s3-0 1) ) @@ -773,19 +775,14 @@ ;; INFO: Used lq/sq (defbehavior turn-to-vector target ((arg0 vector) (arg1 float)) (let ((gp-0 (new-stack-vector0))) - (warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control unknown-matrix03)) - (set! (-> self control unknown-float11) (-> self control unknown-float10)) - (set! (-> self control unknown-float09) (-> self control unknown-float08)) - (set! (-> self control unknown-vector09 quad) (-> self control to-target-pt-xz quad)) - (set! (-> self control unknown-vector11 quad) (-> self control unknown-vector10 quad)) - (vector-float*! (-> self control unknown-vector10) gp-0 arg1) + (warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control cam-R-w)) + (set! (-> self control last-turn-to-magnitude) (-> self control turn-to-magnitude)) + (set! (-> self control last-turn-to-angle) (-> self control turn-to-angle)) + (set! (-> self control last-to-target-pt-xz quad) (-> self control to-target-pt-xz quad)) + (set! (-> self control last-turn-to-target quad) (-> self control turn-to-target quad)) + (vector-float*! (-> self control turn-to-target) gp-0 arg1) (if (< 0.0 arg1) - (warp-vector-into-surface! - (-> self control to-target-pt-xz) - arg0 - *up-vector* - (-> self control unknown-matrix03) - ) + (warp-vector-into-surface! (-> self control to-target-pt-xz) arg0 *up-vector* (-> self control cam-R-w)) ) (dotimes (v1-17 7) (set! (-> self control turn-history-ctrl (+ v1-17 1) quad) (-> self control turn-history-ctrl v1-17 quad)) @@ -794,8 +791,8 @@ (-> (vector-matrix*! gp-0 gp-0 (-> self control w-R-c)) quad) ) (let ((f0-6 (atan (-> gp-0 x) (-> gp-0 z)))) - (set! (-> self control unknown-float10) arg1) - (set! (-> self control unknown-float08) f0-6) + (set! (-> self control turn-to-magnitude) arg1) + (set! (-> self control turn-to-angle) f0-6) ) (let ((f0-8 (* arg1 (-> self control current-surface target-speed)))) (set! (-> self control target-transv quad) (-> (vector-normalize! gp-0 f0-8) quad)) @@ -1005,9 +1002,9 @@ ) ) ) - (set! (-> self control unknown-time-frame09) (-> self clock frame-counter)) + (set! (-> self control time-of-last-clear-wall-in-jump) (-> self clock frame-counter)) ) - (if (< (- (-> self clock frame-counter) (-> self control unknown-time-frame09)) (seconds 0.2)) + (if (< (- (-> self clock frame-counter) (-> self control time-of-last-clear-wall-in-jump)) (seconds 0.2)) (set! f30-0 (+ 204800.0 f30-0)) ) (if (and (not (logtest? (-> self control status) (collide-status touch-wall))) @@ -1034,7 +1031,7 @@ ) ) ) - (set! (-> self control unknown-float07) (vector-length gp-0)) + (set! (-> self control velocity-after-thrust) (vector-length gp-0)) ) (let ((gp-1 (new-stack-vector0))) (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) @@ -1138,7 +1135,7 @@ 0.0 (-> self control current-surface tiltv) 150 - (the-as float (the int (-> self control current-surface tiltvf))) + (the int (-> self control current-surface tiltvf)) 0.0 ) ) @@ -1150,13 +1147,13 @@ (s5-0 (cond ((logtest? (surface-flag turn-to-alt) (-> self control current-surface flags)) - (-> self control unknown-vector03) + (-> self control turn-to-alt-heading) ) ((and (or (not (logtest? (logior (-> self control status) (-> self control old-status)) (collide-status on-surface touch-surface) ) ) - (< (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.5)) + (< (- (-> self clock frame-counter) (-> self control last-time-touching-actor)) (seconds 0.5)) (not (and (-> self next-state) (let ((v1-15 (-> self next-state name))) (or (= v1-15 'target-walk) (= v1-15 'target-gun-walk)) ) @@ -1165,7 +1162,7 @@ (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (< (- (-> self clock frame-counter) (-> self control time-of-last-lc)) (seconds 0.5)) (logtest? (-> self control current-surface flags) (surface-flag turn-to-pad)) - (!= (-> self control unknown-float15) 0.0) + (!= (-> self control force-turn-to-strength) 0.0) ) (zero? (logand (-> self control current-surface flags) (surface-flag turn-to-vel))) ) @@ -1177,7 +1174,7 @@ ) ) ) - (let* ((s3-0 (-> self control unknown-vector02)) + (let* ((s3-0 (-> self control bent-gravity-normal)) (s4-0 (forward-up-nopitch->quaternion (new-stack-quaternion0) gp-0 s3-0)) (s3-1 (forward-up-nopitch->quaternion (new-stack-quaternion0) s5-0 s3-0)) (f0-2 (acos (vector-dot gp-0 s5-0))) @@ -1188,8 +1185,8 @@ s4-0 s3-1 (cond - ((and (or (>= 0.0 (-> self control unknown-float10)) - (< (-> self clock frame-counter) (-> self control unknown-time-frame00)) + ((and (or (>= 0.0 (-> self control turn-to-magnitude)) + (< (-> self clock frame-counter) (-> self control turn-lockout-end-time)) ) (zero? (logand (-> self control current-surface flags) (surface-flag turn-when-centered))) ) @@ -1235,10 +1232,10 @@ (-> self control current-surface turnv) 0.0 (the int (-> self control current-surface turnvf)) - 0.00000000000000000000000000000000000000000021 - (-> self control unknown-float06) + 150 + (-> self control turn-go-the-long-way) ) - (if (and (!= (-> self control unknown-float06) 0.0) + (if (and (!= (-> self control turn-go-the-long-way) 0.0) (< (fabs (deg-diff (quaternion-y-angle (-> self control quat-for-control)) @@ -1248,7 +1245,7 @@ 182.04445 ) ) - (set! (-> self control unknown-float06) 0.0) + (set! (-> self control turn-go-the-long-way) 0.0) ) (quaternion-slerp! (-> self control quat) @@ -1538,21 +1535,29 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defbehavior pre-collide-setup target () - (if (>= (-> self clock frame-counter) (-> self control unknown-time-frame04)) + (if (>= (-> self clock frame-counter) (-> self control additional-decaying-velocity-decay-start-time)) (vector-normalize! - (-> self control unknown-vector18) - (seek (vector-length (-> self control unknown-vector18)) 0.0 (* 40960.0 (-> self clock seconds-per-frame))) + (-> self control additional-decaying-velocity) + (seek + (vector-length (-> self control additional-decaying-velocity)) + 0.0 + (* 40960.0 (-> self clock seconds-per-frame)) + ) ) ) (cond ((logtest? (-> self control old-status) (collide-status on-surface)) - (if (>= (+ (-> self clock frame-counter) (seconds -0.035)) (-> self control unknown-time-frame03)) - (vector-reset! (-> self control unknown-vector18)) + (if (>= (+ (-> self clock frame-counter) (seconds -0.035)) + (-> self control additional-decaying-velocity-end-time) + ) + (vector-reset! (-> self control additional-decaying-velocity)) ) ) (else - (let ((f30-0 (vector-length (-> self control unknown-vector18)))) - (let* ((v1-22 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control unknown-vector18) 1.0)) + (let ((f30-0 (vector-length (-> self control additional-decaying-velocity)))) + (let* ((v1-22 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control additional-decaying-velocity) 1.0) + ) (f0-3 (vector-dot (-> self control transv) v1-22)) ) (if (< f0-3 0.0) @@ -1560,13 +1565,13 @@ ) ) (let ((f0-7 (seek f30-0 0.0 (* 28672.0 (-> self clock seconds-per-frame))))) - (vector-normalize! (-> self control unknown-vector18) f0-7) + (vector-normalize! (-> self control additional-decaying-velocity) f0-7) ) ) ) ) - (set! (-> self control collide-extra-velocity quad) (-> self control unknown-vector18 quad)) - (set! (-> self control unknown-vector14 quad) (-> self control local-normal quad)) + (set! (-> self control collide-extra-velocity quad) (-> self control additional-decaying-velocity quad)) + (set! (-> self control pre-collide-local-normal quad) (-> self control local-normal quad)) 0 (none) ) @@ -1595,23 +1600,23 @@ (defbehavior flag-setup target () (cond ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) - (if (zero? (-> self control unknown-dword12)) - (set! (-> self control unknown-dword12) - (the-as int (- (-> self clock frame-counter) (-> self control time-of-last-zero-input))) + (if (zero? (-> self control time-between-zero-inputs)) + (set! (-> self control time-between-zero-inputs) + (- (-> self clock frame-counter) (-> self control time-of-last-zero-input)) ) ) (set! (-> self control time-of-last-zero-input) (-> self clock frame-counter)) - (quaternion-copy! (-> self control unknown-quaternion05) (-> self control dir-targ)) + (quaternion-copy! (-> self control last-nonzero-input-dir-targ) (-> self control dir-targ)) ) (else - (set! (-> self control unknown-time-frame29) (-> self clock frame-counter)) - (set! (-> self control unknown-dword12) 0) + (set! (-> self control time-of-last-nonzero-input) (-> self clock frame-counter)) + (set! (-> self control time-between-zero-inputs) 0) 0 ) ) (level-setup) - (set! (-> self control unknown-quaternion02 quad) (-> self control transv quad)) - (quaternion-copy! (-> self control unknown-quaternion03) (-> self control quat-for-control)) + (set! (-> self control last-transv quad) (-> self control transv quad)) + (quaternion-copy! (-> self control last-quat-for-control) (-> self control quat-for-control)) ((-> self control current-surface active-hook)) (cond ((logtest? (-> self control status) (collide-status on-surface)) @@ -1629,23 +1634,23 @@ (let ((v1-49 (-> self control trans))) (when (logtest? (-> self control old-status) (collide-status on-surface)) (set! (-> self control last-trans-leaving-surf quad) (-> self control last-trans-any-surf quad)) - (set! (-> self control unknown-vector43 quad) (-> self control last-trans-any-surf quad)) + (set! (-> self control highest-jump-mark quad) (-> self control last-trans-any-surf quad)) ) - (set! (-> self control unknown-vector43 x) (-> v1-49 x)) - (set! (-> self control unknown-vector43 z) (-> v1-49 z)) + (set! (-> self control highest-jump-mark x) (-> v1-49 x)) + (set! (-> self control highest-jump-mark z) (-> v1-49 z)) (if (< (vector-dot (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector43) v1-49) + (vector-! (new 'stack-no-clear 'vector) (-> self control highest-jump-mark) v1-49) ) 0.0 ) - (set! (-> self control unknown-vector43 y) (-> v1-49 y)) + (set! (-> self control highest-jump-mark y) (-> v1-49 y)) ) ) ) ) (when (and (cpad-pressed? (-> self control cpad number) r3) - (zero? (-> self control unknown-word07)) + (zero? (-> self control remaining-ctrl-iterations)) (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie))) (not *pause-lock*) ) @@ -1726,8 +1731,8 @@ ) (send-event self 'change-mode 'falling) ) - (set! (-> self control unknown-time-frame03) 0) - (vector-reset! (-> self control unknown-vector18)) + (set! (-> self control additional-decaying-velocity-end-time) 0) + (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-189 (new-stack-vector0))) (let ((f0-9 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) 0.0 @@ -1820,10 +1825,10 @@ ) ) ) - (set! (-> self control unknown-float30) (if (logtest? (-> self control status) (collide-status on-surface)) - 32.0 - 2.0 - ) + (set! (-> self control bend-speed) (if (logtest? (-> self control status) (collide-status on-surface)) + 32.0 + 2.0 + ) ) (let ((v1-248 (-> *setting-control* user-current beard))) (when (!= (-> self beard?) v1-248) @@ -1847,7 +1852,7 @@ ;; WARN: Return type mismatch int vs none. (defbehavior post-flag-setup target () (if (logtest? (-> self control status) (collide-status touch-wall touch-actor)) - (set! (-> self control unknown-time-frame07) (-> self clock frame-counter)) + (set! (-> self control last-time-touching-actor) (-> self clock frame-counter)) ) (when (logtest? (-> self state-flags) (state-flags tinvul1)) (if (< (logand (- (-> self clock frame-counter) (-> self control invul1-on-time)) 3) 1) @@ -1863,7 +1868,7 @@ (target-timed-invulnerable-off self 2) ) ) - (set! (-> self control unknown-symbol06) #f) + (set! (-> self control jump-kind) #f) (target-gun-joint-pre) ((-> self pre-joint-hook)) (target-log-trans) @@ -1942,17 +1947,13 @@ (zero? (logand (-> self control status) (collide-status on-surface))) ) 0.0 - (-> self control unknown-float29) + (-> self control bend-target) ) ) ) - (seek! - (-> self control unknown-float28) - f0-1 - (* (-> self control unknown-float30) (-> self clock seconds-per-frame)) - ) + (seek! (-> self control bend-amount) f0-1 (* (-> self control bend-speed) (-> self clock seconds-per-frame))) ) - (set! (-> self control dynam gravity-normal quad) (-> self control unknown-dynamics00 gravity-normal quad)) + (set! (-> self control dynam gravity-normal quad) (-> self control standard-dynamics gravity-normal quad)) (vector-float*! (-> self control dynam gravity) (-> self control dynam gravity-normal) @@ -1963,25 +1964,20 @@ (let ((f30-0 (-> self control current-surface tiltvv)) (gp-0 (-> self control gspot-normal)) ) - (vector-deg-slerp - s5-0 - (-> self control unknown-dynamics00 gravity-normal) - gp-0 - (-> self control unknown-float28) - ) + (vector-deg-slerp s5-0 (-> self control standard-dynamics gravity-normal) gp-0 (-> self control bend-amount)) (let ((a2-3 (matrix-from-two-vectors-smooth! (new 'stack-no-clear 'matrix) - (-> self control unknown-vector02) + (-> self control bent-gravity-normal) s5-0 f30-0 (the int (-> self control current-surface tiltvvf)) ) ) ) - (vector-matrix*! (-> self control unknown-vector02) (-> self control unknown-vector02) a2-3) + (vector-matrix*! (-> self control bent-gravity-normal) (-> self control bent-gravity-normal) a2-3) ) - (vector-normalize! (-> self control unknown-vector02) 1.0) + (vector-normalize! (-> self control bent-gravity-normal) 1.0) (add-debug-vector *display-target-marks* (bucket-id debug-no-zbuf1) @@ -2004,7 +2000,7 @@ *display-target-marks* (bucket-id debug-no-zbuf1) (-> self control trans) - (-> self control unknown-dynamics00 gravity-normal) + (-> self control standard-dynamics gravity-normal) (meters 2.5) (new 'static 'rgba :r #xff :a #x80) ) @@ -2020,7 +2016,7 @@ *display-target-marks* (bucket-id debug-no-zbuf1) (-> self control trans) - (-> self control unknown-vector02) + (-> self control bent-gravity-normal) (meters 3) (new 'static 'rgba :r #xff :b #xff :a #x80) ) @@ -2096,10 +2092,10 @@ ) ) (let ((s4-1 (vector-! (new-stack-vector0) (-> s5-0 center-hold) (-> self control midpoint-of-hands)))) - (set! (-> self control unknown-float33) (vector-length s4-1)) + (set! (-> self control hand-to-edge-dist) (vector-length s4-1)) (cond - ((and (< 819.2 (-> self control unknown-float33)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame15)) (seconds 0.2)) + ((and (< 819.2 (-> self control hand-to-edge-dist)) + (>= (- (-> self clock frame-counter) (-> self control last-successful-compute-edge-time)) (seconds 0.2)) ) (cond ((-> s5-0 pilot-edge-grab?) @@ -2115,14 +2111,14 @@ (s3-1 (vector-lerp! (new 'stack-no-clear 'vector) (-> s5-0 pilot-start-grab-pos) - (vector-! (new 'stack-no-clear 'vector) (-> s5-0 center-hold) (-> self control unknown-vector31)) + (vector-! (new 'stack-no-clear 'vector) (-> s5-0 center-hold) (-> self control ctrl-to-hands-offset)) (smooth-step f0-11) ) ) ) (set! (-> s3-1 y) (+ (lerp (-> s5-0 pilot-start-grab-pos y) - (- (-> s5-0 center-hold y) (-> self control unknown-vector31 y)) + (- (-> s5-0 center-hold y) (-> self control ctrl-to-hands-offset y)) (smooth-step (-> s5-0 pilot-grab-interp)) ) (cond @@ -2149,7 +2145,7 @@ (vector+! s3-1 s3-1 (-> self control cspace-offset)) (move-to-point! (-> self control) s3-1) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) ) (else @@ -2159,8 +2155,8 @@ ) (vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second)) (set! (-> self control rider-time) (-> self clock frame-counter)) - (if (and (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame16)) (seconds 0.5)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame15)) (seconds 0.5)) + (if (and (>= (- (-> self clock frame-counter) (-> self control edge-grab-start-time)) (seconds 0.5)) + (>= (- (-> self clock frame-counter) (-> self control last-successful-compute-edge-time)) (seconds 0.5)) ) (send-event self 'end-mode) ) @@ -2169,15 +2165,15 @@ ) (else (let ((a1-23 (new 'stack-no-clear 'vector))) - (vector-! a1-23 (-> s5-0 center-hold) (-> self control unknown-vector31)) + (vector-! a1-23 (-> s5-0 center-hold) (-> self control ctrl-to-hands-offset)) (vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second)) (set! (-> self control rider-time) (-> self clock frame-counter)) (vector+! a1-23 a1-23 (-> self control cspace-offset)) (move-to-point! (-> self control) a1-23) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) - (set! (-> self control unknown-time-frame15) (-> self clock frame-counter)) + (set! (-> self control last-successful-compute-edge-time) (-> self clock frame-counter)) ) ) ) @@ -2254,7 +2250,7 @@ (move-by-vector! (-> self control) a1-15) ) ) - (set! (-> self control unknown-float33) 0.0) + (set! (-> self control hand-to-edge-dist) 0.0) (update-anim-data (-> self skel)) (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) @@ -2263,7 +2259,7 @@ ;; definition for function target-compute-pole ;; INFO: Used lq/sq (defbehavior target-compute-pole target () - (let* ((s2-0 (handle->process (-> self control unknown-handle01))) + (let* ((s2-0 (handle->process (-> self control anim-handle))) (gp-0 (-> (the-as swingpole s2-0) dir)) ) (set! (-> self control edge-grab-edge-dir quad) (-> gp-0 quad)) @@ -2291,10 +2287,10 @@ ) (vector-segment-distance-point! (-> self control midpoint-of-hands) s4-1 s3-1 s5-0) (if (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) - (set! (-> self control unknown-float33) + (set! (-> self control hand-to-edge-dist) (fmax 0.0 (fmin 1.0 (/ (vector-vector-distance s4-1 s5-0) (* 2.0 (-> (the-as swingpole s2-0) edge-length))))) ) - (vector-lerp! s5-0 s4-1 s3-1 (-> self control unknown-float33)) + (vector-lerp! s5-0 s4-1 s3-1 (-> self control hand-to-edge-dist)) ) (when *display-edge-collision-marks* (add-debug-vector @@ -2319,14 +2315,14 @@ ) (let ((a0-26 (vector-! (new-stack-vector0) s5-0 (-> self control midpoint-of-hands)))) (cond - ((and (< 2457.6 (vector-length a0-26)) (not (-> self control unknown-symbol02))) + ((and (< 2457.6 (vector-length a0-26)) (not (-> self control did-move-to-pole-or-max-jump-height))) (move-by-vector! (-> self control) (vector-normalize! a0-26 2457.6)) ) (else - (set! (-> self control unknown-symbol02) (the-as float #t)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #t)) (move-to-point! (-> self control) - (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self control unknown-vector31)) + (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self control ctrl-to-hands-offset)) ) (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) ) @@ -2506,11 +2502,11 @@ (matrix<-no-trans-transformq! (-> self control ctrl-orientation) (the-as transformq (-> self control trans))) ) ) - (vector-matrix*! (-> self control unknown-vector28) (-> *TARGET-bank* head-offset) a2-5) + (vector-matrix*! (-> self control ctrl-to-head-offset) (-> *TARGET-bank* head-offset) a2-5) ) (vector<-cspace! - (the-as vector (&-> (-> self control) unknown-cspacei1un23i1 bone)) - (-> self control unknown-cspacei1un23i1 parent) + (the-as vector (&-> (-> self control) sidekick-root bone)) + (-> self control sidekick-root parent) ) (let ((gp-0 (new-stack-vector0)) (s5-0 (new-stack-vector0)) @@ -2519,8 +2515,8 @@ (vector<-cspace! s5-0 (-> self control rhand-cspace)) (vector-average! (-> self control midpoint-of-hands) gp-0 s5-0) ) - (vector-! (-> self control unknown-vector31) (-> self control midpoint-of-hands) (-> self control trans)) - (update-from-cspace (-> self control unknown-impact-control00)) + (vector-! (-> self control ctrl-to-hands-offset) (-> self control midpoint-of-hands) (-> self control trans)) + (update-from-cspace (-> self control impact-ctrl)) (cond ((logtest? (-> self focus-status) (focus-status edge-grab)) (target-compute-edge) @@ -2530,7 +2526,7 @@ ) ) (target-calc-camera-pos) - (set! (-> self control unknown-word01) 0) + (set! (-> self control tongue-counter) 0) (cond ((logtest? (focus-status indax) (-> self focus-status)) ) @@ -2556,7 +2552,7 @@ ) (set! (-> self control gspot-pos quad) (-> self control trans quad)) (set! (-> self control gspot-normal quad) (-> self control ground-poly-normal quad)) - (set! (-> self control unknown-pat-surface01) (-> self control ground-pat)) + (set! (-> self control gspot-pat-surfce) (-> self control ground-pat)) ) (else (let ((gp-0 (new 'stack-no-clear 'collide-query))) @@ -2568,7 +2564,7 @@ 81920.0 1024.0 ) - (set! (-> self control unknown-pat-surface01) (-> gp-0 best-other-tri pat)) + (set! (-> self control gspot-pat-surfce) (-> gp-0 best-other-tri pat)) ) ) ) @@ -2585,26 +2581,26 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) - (if (< (-> self control unknown-float15) 0.0) - (set! (-> self control unknown-float15) (- 1.0 (-> self control cpad stick0-speed))) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) ) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) (let ((f28-0 (debounce-speed - (-> self control unknown-float12) - (-> self control unknown-float13) - (-> self control unknown-vector12) - (-> self control unknown-vector13) + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) ) ) ) - (when (!= (-> self control unknown-float15) 0.0) - (let ((f0-12 (fmin 1.0 (-> self control unknown-float15)))) - (set! (-> self control unknown-float15) f0-12) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-12 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-12) (let ((a1-3 (vector-float*! (new 'stack-no-clear 'vector) (if (= f28-0 0.0) @@ -2616,8 +2612,8 @@ ) (a2-2 (vector-float*! (new 'stack-no-clear 'vector) - (-> self control unknown-vector16) - (-> self control unknown-float14) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) ) ) ) @@ -2759,13 +2755,13 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) (let ((s5-0 (new-stack-vector0))) (read-pad s5-0) - (turn-to-vector s5-0 (-> self control unknown-float12)) + (turn-to-vector s5-0 (-> self control pad-magnitude)) ) (add-thrust) (add-gravity) @@ -2888,7 +2884,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) @@ -3018,7 +3014,7 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) @@ -3137,18 +3133,18 @@ (target-timed-invulnerable-off self 0) (target-timed-invulnerable-off self 2) (set! (-> self control status) (collide-status)) - (set! (-> self control unknown-dynamics00) *standard-dynamics*) + (set! (-> self control standard-dynamics) *standard-dynamics*) (set! (-> self control surf) *standard-ground-surface*) - (set! (-> self control unknown-vector02 quad) (-> self control unknown-dynamics00 gravity-normal quad)) + (set! (-> self control bent-gravity-normal quad) (-> self control standard-dynamics gravity-normal quad)) (quaternion-identity! (-> self control override-quat)) (set! (-> self control override-quat-alpha) 0.0) (set! (-> self control last-time-on-surface) (-> self clock frame-counter)) - (set! (-> self control unknown-float28) 0.0) - (set! (-> self control unknown-float30) 32.0) + (set! (-> self control bend-amount) 0.0) + (set! (-> self control bend-speed) 32.0) (set! (-> self cam-user-mode) 'normal) - (set! (-> self control unknown-handle01) (the-as handle #f)) + (set! (-> self control anim-handle) (the-as handle #f)) (set! (-> self control actor-contact-handle) (the-as handle #f)) - (set! (-> self control unknown-dword11) 0) + (set! (-> self control yellow-eco-last-use-time) 0) (buzz-stop! 0) self ) @@ -3265,10 +3261,10 @@ (set! (-> obj control) s0-0) ) (let ((v1-69 (-> obj control))) - (set! (-> v1-69 unknown-word08) s4-0) - (set! (-> v1-69 unknown-word09) s3-0) - (set! (-> v1-69 default-collide-as) (the-as collide-spec s2-0)) - (set! (-> v1-69 default-collide-with) (the-as collide-spec s1-0)) + (set! (-> v1-69 default-collide-as-all) (the-as collide-spec s4-0)) + (set! (-> v1-69 default-collide-with-all) (the-as collide-spec s3-0)) + (set! (-> v1-69 default-collide-as-fgnd) (the-as collide-spec s2-0)) + (set! (-> v1-69 default-collide-with-fgnd) (the-as collide-spec s1-0)) (set! (-> v1-69 max-iteration-count) (the-as uint 8)) (set! (-> v1-69 event-self) 'touched) ) @@ -3312,7 +3308,7 @@ (set! (-> obj control lhand-cspace) (-> obj node-list data 45)) (set! (-> obj control rhand-cspace) (-> obj node-list data 55)) (set! (-> obj control rhand-cspace) (-> obj node-list data 55)) - (set! (-> obj control unknown-cspacei1un23i1 parent) (-> obj node-list data 23)) + (set! (-> obj control sidekick-root parent) (-> obj node-list data 23)) (set! (-> obj neck) (new 'process 'joint-mod (joint-mod-mode look-at) obj 8)) (set! (-> obj neck parented-scale?) #t) (set! (-> obj neck base-joint) (the-as uint 6)) @@ -3357,8 +3353,8 @@ ) (set! (-> obj sound) (new 'process 'ambient-sound "none" (-> obj control trans))) (set! (-> obj control unknown-sound-id04) (new-sound-id)) - (set! (-> obj control unknown-sound-id03) (new-sound-id)) - (set! (-> obj control unknown-sound-id02) (new-sound-id)) + (set! (-> obj control bubbles-sound) (new-sound-id)) + (set! (-> obj control board-jump-and-swim-sound) (new-sound-id)) (if (and *debug-segment* (!= (-> obj tobot?) 'tobot)) (add-connection *debug-engine* obj target-print-stats obj *stdcon0* #f) ) diff --git a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc index 31124adad2..4fa4e722ac 100644 --- a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc @@ -235,7 +235,7 @@ (the-as (function cspace matrix none) cspace<-cspace+transformq!) ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) - (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent)) + (the-as basic (-> self parent-override 0 control sidekick-root parent)) ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset))) ) @@ -410,7 +410,7 @@ (add-debug-sphere *display-sidekick-stats* (bucket-id debug-no-zbuf1) - (-> self parent-override 0 control unknown-cspacei1un23i1 parent bone transform trans) + (-> self parent-override 0 control sidekick-root parent bone transform trans) (meters 0.1) (new 'static 'rgba :g #xff :a #x80) ) @@ -512,7 +512,7 @@ (set! (-> self draw light-index) (the-as uint 30)) (let ((v1-14 (-> self node-list data))) (set! (-> v1-14 0 param0) (the-as (function cspace matrix none) cspace<-cspace+transformq!)) - (set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent))) + (set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control sidekick-root parent))) (set! (-> v1-14 0 param2) (the-as basic (-> self offset))) ) (set! (-> self shadow-in-movie?) #t) diff --git a/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc b/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc index 222b58b2f5..b7457e6cfc 100644 --- a/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc @@ -245,7 +245,7 @@ ) ((lambda :behavior target () - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let* ((v1-5 (ja-group)) (a1-0 (cond @@ -296,12 +296,12 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (none) @@ -311,7 +311,7 @@ ((let ((v1-132 (ja-group))) (and v1-132 (= v1-132 (-> self draw art-group data 273))) ) - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let ((a1-18 (-> self draw art-group data 274))) (ja-no-eval :group! a1-18 @@ -320,18 +320,18 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) ) ((let ((v1-166 (ja-group))) (and v1-166 (= v1-166 (-> self draw art-group data 275))) ) - (set! (-> self control unknown-float29) (-> self control unknown-float28)) + (set! (-> self control bend-target) (-> self control bend-amount)) (set! (-> self control mod-surface) *walk-no-turn-mods*) (let ((a1-21 (-> self draw art-group data 276))) (ja-no-eval :group! a1-21 @@ -340,12 +340,12 @@ ) ) (until (ja-done? 0) - (seek! (-> self control unknown-float29) 0.0 (-> self clock seconds-per-frame)) + (seek! (-> self control bend-target) 0.0 (-> self clock seconds-per-frame)) (suspend) (ja :num! (seek!)) ) (set! (-> self control mod-surface) *walk-mods*) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (rot->dir-targ! (-> self control)) ) ((let ((v1-200 (ja-group))) diff --git a/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc b/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc index 58b08667fb..b434edbe0e 100644 --- a/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc @@ -428,14 +428,14 @@ ) :exit (behavior () ((-> target-carry-pickup exit)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (target-state-hook-exit) (none) ) :trans (behavior () ((-> self state-hook)) (when (move-legs?) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (remove-exit) (go target-carry-walk) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc b/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc index 8d58c1a6ad..a13af6ea66 100644 --- a/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc @@ -636,7 +636,7 @@ (set-setting! 'rapid-tracking #f 0 0) ((lambda :behavior target () - (set! (-> self control unknown-float29) (* 0.5 (-> self control unknown-float29))) + (set! (-> self control bend-target) (* 0.5 (-> self control bend-target))) (if (logtest? (water-flags touch-water) (-> self water flags)) (sound-play "swim-stroke") ) @@ -659,7 +659,7 @@ ) (target-start-attack) (target-danger-set! 'punch #f) - (let ((a0-8 (-> self control unknown-impact-control00)) + (let ((a0-8 (-> self control impact-ctrl)) (t9-6 (method-of-type impact-control initialize)) (a1-4 self) (v1-33 (ja-group)) @@ -748,13 +748,7 @@ ) ) ) - (initialize - (-> self control unknown-impact-control00) - self - 22 - 3276.8 - (-> self control root-prim prim-core collide-with) - ) + (initialize (-> self control impact-ctrl) self 22 3276.8 (-> self control root-prim prim-core collide-with)) (set! (-> arg0 0) (fmax 0.0 (-> arg0 0))) ) ) @@ -778,7 +772,7 @@ (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) ) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) ) (go target-falling #f) @@ -915,14 +909,14 @@ ) (let ((gp-3 (new 'stack-no-clear 'collide-query))) (when (and (>= (impact-control-method-11 - (-> self control unknown-impact-control00) + (-> self control impact-ctrl) gp-3 (the-as process #f) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1) ) 0.0 ) - (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control unknown-impact-control00 dir))) + (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control impact-ctrl dir))) ) (when (= (-> gp-3 best-other-tri pat mode) (pat-mode wall)) (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000))) @@ -960,7 +954,7 @@ (-> self skel effect) 'punch -1.0 - (the-as int (-> self control unknown-impact-control00 joint)) + (the-as int (-> self control impact-ctrl joint)) (the-as basic #f) (the-as sound-name t1-3) ) @@ -1654,7 +1648,7 @@ ) (while (not (ja-done? 0)) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (set! (-> self darkjak clock-vel) -4.0) (set! (-> self darkjak clock-on) #t) (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) @@ -1922,7 +1916,7 @@ (until (ja-done? 0) (ja-blend-eval) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (set! (-> self darkjak clock-vel) 4.0) (suspend) (ja :num! (seek!)) diff --git a/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc b/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc index 548ad1e763..352147e455 100644 --- a/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc @@ -1197,7 +1197,7 @@ (set! (-> self gun track?) (logand -9 (-> self gun track?))) ) (let ((gp-0 (the-as basic #f))) - (when (and (or (< (- (-> self clock frame-counter) (-> self control unknown-time-frame29)) (seconds 0.2)) + (when (and (or (< (- (-> self clock frame-counter) (-> self control time-of-last-nonzero-input)) (seconds 0.2)) (and (logtest? (-> self control mod-surface flags) (surface-flag air)) (zero? (logand (-> self control status) (collide-status on-surface))) ) @@ -1280,7 +1280,7 @@ (the-as process-focusable gp-0) ) (set! (-> self gun track-start-time) (-> self clock frame-counter)) - (if (< (- (-> self clock frame-counter) (-> self control unknown-time-frame29)) (seconds 0.2)) + (if (< (- (-> self clock frame-counter) (-> self control time-of-last-nonzero-input)) (seconds 0.2)) (set! (-> self gun track-press-start-time) (-> self clock frame-counter)) ) ) @@ -1765,7 +1765,7 @@ ((logtest? (surface-flag gun-no-twist) (-> self control current-surface flags)) (seek! (-> self upper-body twist z) 0.0 (* 16384.0 (-> self clock seconds-per-frame))) ) - ((and (< 0.0 (-> self control unknown-float10)) + ((and (< 0.0 (-> self control turn-to-magnitude)) (zero? (logand (-> self control current-surface flags) (surface-flag duck))) ) (let* ((f0-28 (deg-diff (y-angle (-> self control)) (vector-y-angle (-> self control to-target-pt-xz)))) @@ -1818,8 +1818,8 @@ (logtest? (process-mask enemy guard) (-> (handle->process (-> self gun track-target 0 handle)) mask)) ) (if (and (< (- (-> self clock frame-counter) (-> self gun track-press-start-time)) (seconds 0.5)) - (< (-> self control unknown-dword12) 150) - (and (= (-> self control unknown-float10) 0.0) + (< (-> self control time-between-zero-inputs) (seconds 0.5)) + (and (= (-> self control turn-to-magnitude) 0.0) (not (logtest? (-> self control current-surface flags) (surface-flag air attack))) (-> self gun active?) ) @@ -2870,17 +2870,17 @@ (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) (while (nonzero? gp-1) (+! gp-1 -1) - (set! (-> self control unknown-word07) gp-1) + (set! (-> self control remaining-ctrl-iterations) gp-1) (flag-setup) (build-conversions (-> self control transv)) (do-rotations1) (let ((s4-0 (new-stack-vector0))) (read-pad s4-0) (turn-to-vector s4-0 (debounce-speed - (-> self control unknown-float12) - (-> self control unknown-float13) - (-> self control unknown-vector12) - (-> self control unknown-vector13) + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) ) ) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc b/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc index 4543e62532..dd3c2c81d2 100644 --- a/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc @@ -406,7 +406,7 @@ ) (let ((v1-15 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> v1-15 command) (sound-command set-param)) - (set! (-> v1-15 id) (-> self control unknown-sound-id02)) + (set! (-> v1-15 id) (-> self control board-jump-and-swim-sound)) (set! (-> v1-15 params volume) -4) (set! (-> v1-15 auto-time) 960) (set! (-> v1-15 auto-from) 2) @@ -468,7 +468,7 @@ (go target-swim-walk) ) (target-swim-tilt 0.0 2.0 0.0 1.0) - (sound-play "swim-bubbles" :id (-> self control unknown-sound-id02)) + (sound-play "swim-bubbles" :id (-> self control board-jump-and-swim-sound)) (none) ) :code (behavior () @@ -592,7 +592,7 @@ ) ) (target-swim-tilt 0.0 2.0 0.0 1.0) - (sound-play "swim-bubbles" :id (-> self control unknown-sound-id02)) + (sound-play "swim-bubbles" :id (-> self control board-jump-and-swim-sound)) (none) ) :code (behavior () @@ -709,8 +709,8 @@ (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) (when (not (and (-> self next-state) (let ((v1-11 (-> self next-state name))) (or (= v1-11 'target-swim-stance) @@ -731,7 +731,7 @@ ) (let ((v1-21 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> v1-21 command) (sound-command set-param)) - (set! (-> v1-21 id) (-> self control unknown-sound-id03)) + (set! (-> v1-21 id) (-> self control bubbles-sound)) (set! (-> v1-21 params volume) -4) (set! (-> v1-21 auto-time) 960) (set! (-> v1-21 auto-from) 2) @@ -849,7 +849,7 @@ ) ) (if (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) - (sound-play "water-bubbles" :id (-> self control unknown-sound-id03)) + (sound-play "water-bubbles" :id (-> self control bubbles-sound)) ) (let ((s4-3 (new-stack-vector0)) (f0-13 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) @@ -929,7 +929,7 @@ ) (go target-swim-down) ) - (sound-play "water-bubbles" :id (-> self control unknown-sound-id03)) + (sound-play "water-bubbles" :id (-> self control bubbles-sound)) ((-> target-swim-down trans)) (none) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-util_REF.gc b/test/decompiler/reference/jak2/engine/target/target-util_REF.gc index d7d2b35314..fcc4e150c6 100644 --- a/test/decompiler/reference/jak2/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-util_REF.gc @@ -458,8 +458,8 @@ (target-collide-set! (-> self control collide-mode) (-> self control collide-mode-transition)) ) (('carry?) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) @@ -474,8 +474,8 @@ 9830.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) @@ -490,8 +490,8 @@ 9830.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) 6963.2) (set! (-> self control penetrate-using) (penetrate touch spin board)) ) @@ -502,45 +502,45 @@ 10649.6 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (-> *TARGET-bank* duck-spin-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 35) (set! (-> self control penetrate-using) (penetrate touch spin)) ) (('duck-slide) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (-> *TARGET-bank* duck-spin-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 28) (set! (-> self control penetrate-using) (penetrate touch punch)) ) (('roll-solid) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (+ 819.2 (-> *TARGET-bank* duck-spin-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 8) (set! (-> self control danger-mode) 'roll) @@ -548,15 +548,15 @@ ) (('flip) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* duck-spin-offset) (+ 819.2 (-> *TARGET-bank* duck-spin-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* duck-spin-radius)) (set! (-> s5-0 transform-index) 8) (set! (-> self control danger-mode) 'flip) @@ -569,16 +569,16 @@ 11878.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* punch-offset) (-> *TARGET-bank* punch-radius) ) (when (not (logtest? (focus-status indax) (-> self focus-status))) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* punch-radius)) (set! (-> s5-0 transform-index) 21) ) @@ -597,19 +597,19 @@ 11878.4 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* uppercut0-offset) (-> *TARGET-bank* uppercut-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* (-> *TARGET-bank* uppercut-radius)) (set! (-> s5-0 transform-index) 21) - (set! (-> gp-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> gp-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> gp-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> gp-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> gp-0 local-sphere)) (-> *TARGET-bank* uppercut1-offset) @@ -619,8 +619,8 @@ ) (('flop) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* flop0-offset) @@ -632,15 +632,15 @@ ) (('flop-down) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* flop0-offset) (-> *TARGET-bank* flop-radius) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) (-> *TARGET-bank* flop1-offset) @@ -659,15 +659,15 @@ 12288.0 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s4-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* spin-offset) (+ 2048.0 (-> *TARGET-bank* punch-radius)) ) - (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as)) - (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with)) + (set! (-> s5-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) + (set! (-> s5-0 prim-core collide-with) (-> self control default-collide-with-fgnd)) (sphere<-vector+r! (the-as sphere (-> s5-0 local-sphere)) *null-vector* @@ -690,9 +690,9 @@ f28-0 ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as)) + (set! (-> s4-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) (set! (-> s4-0 prim-core collide-with) - (logclear (-> self control default-collide-with) (collide-spec collectable)) + (logclear (-> self control default-collide-with-fgnd) (collide-spec collectable)) ) (sphere<-vector+r! (the-as sphere (-> s4-0 local-sphere)) (-> *TARGET-bank* root-offset) f28-0) ) @@ -710,9 +710,9 @@ (+ (-> *TARGET-bank* root-radius) (* 2.0 f28-1)) ) (logior! (-> self focus-status) (focus-status dangerous)) - (set! (-> s2-0 prim-core collide-as) (-> self control default-collide-as)) + (set! (-> s2-0 prim-core collide-as) (-> self control default-collide-as-fgnd)) (set! (-> s2-0 prim-core collide-with) - (logclear (-> self control default-collide-with) (collide-spec collectable)) + (logclear (-> self control default-collide-with-fgnd) (collide-spec collectable)) ) (set! (-> s2-0 transform-index) 0) (sphere<-vector+r! diff --git a/test/decompiler/reference/jak2/engine/target/target2_REF.gc b/test/decompiler/reference/jak2/engine/target/target2_REF.gc index b7ae51abda..0b46d706d9 100644 --- a/test/decompiler/reference/jak2/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target2_REF.gc @@ -555,7 +555,7 @@ ) ) :enter (behavior ((arg0 handle)) - (set! (-> self control unknown-handle01) arg0) + (set! (-> self control anim-handle) arg0) (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *pole-mods*) (logior! (-> self focus-status) (focus-status pole)) @@ -563,14 +563,14 @@ (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) (set! (-> self control transv quad) (the-as uint128 0)) (send-event *camera* 'ease-in) - (set! (-> self control unknown-symbol02) (the-as float #f)) - (set! (-> self control unknown-float33) 0.5) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float #f)) + (set! (-> self control hand-to-edge-dist) 0.5) (none) ) :exit (behavior () (target-collide-set! 'normal 0.0) (logclear! (-> self focus-status) (focus-status pole)) - (set! (-> self control unknown-handle01) (the-as handle #f)) + (set! (-> self control anim-handle) (the-as handle #f)) (none) ) :trans (behavior () @@ -631,14 +631,14 @@ (let ((v1-8 (ja-group))) (cond ((and v1-8 (= v1-8 (-> self draw art-group data 107))) - (while (not (-> self control unknown-symbol02)) + (while (not (-> self control did-move-to-pole-or-max-jump-height)) (ja :num! (seek!)) (suspend) ) (ja :num-func num-func-identity :frame-num (ja-aframe 37.0 0)) ) (else - (while (not (-> self control unknown-symbol02)) + (while (not (-> self control did-move-to-pole-or-max-jump-height)) (suspend) ) (suspend) @@ -802,7 +802,7 @@ (set! (-> *edge-grab-info* pilot-edge-grab?) #f) (set! (-> self control unknown-handle000) (the-as handle #f)) (set! (-> self control mod-surface) *edge-grab-mods*) - (set! (-> self control unknown-time-frame16) (-> self clock frame-counter)) + (set! (-> self control edge-grab-start-time) (-> self clock frame-counter)) (logior! (-> self control root-prim prim-core action) (collide-action dont-push-away)) (logior! (-> self focus-status) (focus-status edge-grab)) (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) @@ -952,7 +952,7 @@ ) ) (else - (while (< 0.0 (-> self control unknown-float33)) + (while (< 0.0 (-> self control hand-to-edge-dist)) (let ((v1-60 (ja-group))) (when (not (and v1-60 (= v1-60 (-> self draw art-group data 27)))) (ja-channel-push! 1 (seconds 0.15)) @@ -1032,7 +1032,7 @@ ) ) (set! (-> self control transv quad) (the-as uint128 0)) - (set! (-> self control unknown-time-frame09) 0) + (set! (-> self control time-of-last-clear-wall-in-jump) 0) (set-forward-vel 16384.0) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.2))) (send-event *camera* 'damp-up) @@ -1203,7 +1203,7 @@ (target-top-anim-base-mode 37) ) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (none) ) :trans (behavior () @@ -1310,18 +1310,18 @@ ) ) (set! (-> self control unknown-word04) (the-as uint 0.5)) - (set! (-> self control unknown-symbol02) 0.5) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.5) (set! (-> self control unknown-float35) (the-as float #f)) (let ((gp-0 (lambda :behavior target () (ja :chan 1 :num! (loop! (the-as float (-> self control unknown-word04)))) (if (rand-vu-percent? 0.05) - (set! (-> self control unknown-symbol02) (rand-vu-float-range 0.5 1.5)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (rand-vu-float-range 0.5 1.5)) ) (set! (-> self control unknown-word04) (the-as uint (seek (the-as float (-> self control unknown-word04)) - (-> self control unknown-symbol02) + (-> self control did-move-to-pole-or-max-jump-height) (* 2.0 (-> self clock seconds-per-frame)) ) ) @@ -1555,14 +1555,14 @@ (defstate target-play-anim (target) :event target-generic-event-handler :enter (behavior ((arg0 string) (arg1 handle)) - (set! (-> self control unknown-handle01) arg1) + (set! (-> self control anim-handle) arg1) (move-to-ground (-> self control) 40960.0 40960.0 #f (-> self control root-prim prim-core collide-with)) (logior! (-> self focus-status) (focus-status grabbed)) (set! (-> self neck flex-blend) 0.0) (none) ) :exit (behavior () - (send-event (handle->process (-> self control unknown-handle01)) 'end-mode) + (send-event (handle->process (-> self control anim-handle)) 'end-mode) (target-exit) (none) ) @@ -1594,7 +1594,7 @@ ((-> target-grab event) proc arg1 event-type event) ) :enter (behavior ((arg0 handle)) - (set! (-> self control unknown-handle01) arg0) + (set! (-> self control anim-handle) arg0) (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) (set! (-> self control unknown-word04) (the-as uint #t)) (quaternion-copy! (the-as quaternion (-> self control unknown-vector38)) (-> self control quat)) @@ -1665,8 +1665,8 @@ :event target-generic-event-handler :enter (behavior () (sound-play-by-spec (static-sound-spec "menu-pick" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (set! (-> self control unknown-time-frame03) 0) - (vector-reset! (-> self control unknown-vector18)) + (set! (-> self control additional-decaying-velocity-end-time) 0) + (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-3 (new-stack-vector0))) (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) 0.0 @@ -1691,8 +1691,8 @@ ) :exit (behavior () (sound-play-by-spec (static-sound-spec "menu-back" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons l2 r2 l1 r1 x)) (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons l2 r2 l1 r1 x)) diff --git a/test/decompiler/reference/jak2/engine/target/target_REF.gc b/test/decompiler/reference/jak2/engine/target/target_REF.gc index be272fee4c..c1ce5aa14f 100644 --- a/test/decompiler/reference/jak2/engine/target/target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target_REF.gc @@ -52,7 +52,7 @@ ) :exit (behavior () (logclear! (-> self state-flags) (state-flags lleg-still rleg-still)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (target-state-hook-exit) (none) ) @@ -62,13 +62,13 @@ (go target-wade-stance) ) (when (= (-> self control ground-pat material) (pat-material ice)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (remove-exit) (go target-ice-stance) ) (when (move-legs?) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (remove-exit) (go target-walk) @@ -78,7 +78,7 @@ ) (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) (logclear! (-> self state-flags) (state-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (remove-exit) (go target-duck-stance #f) ) @@ -224,7 +224,7 @@ ) (when (and (turn-around?) (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.3))) (set! (-> self control transv quad) - (-> self control unknown-vector-array02 (-> self control unknown-word03) quad) + (-> self control transv-history (-> self control idx-of-fastest-xz-vel) quad) ) (set! (-> self control transv w) 1.0) (go target-turn-around) @@ -260,7 +260,7 @@ :enter (behavior () (vector-turn-to (-> self control transv)) (set! (-> self control mod-surface) *turn-around-mods*) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (none) ) :exit (behavior () @@ -268,7 +268,7 @@ (set-forward-vel 0.0) (set! (-> self control ctrl-xz-vel) 0.0) (set-quaternion! (-> self control) (-> self control dir-targ)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (none) ) :trans (behavior () @@ -310,7 +310,7 @@ (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) ) (remove-exit) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (set! (-> self control ctrl-xz-vel) (* 40960.0 (-> self darkjak-giant-interp))) (set-forward-vel (-> self control ctrl-xz-vel)) (target-state-hook-exit) @@ -449,9 +449,9 @@ :enter (behavior () (set! (-> self state-time) (-> self clock frame-counter)) (set! (-> self control mod-surface) *slide-down-mods*) - (set! (-> self control unknown-time-frame17) 0) - (set! (-> self control unknown-float15) 1.0) - (set! (-> self control unknown-float14) 1.0) + (set! (-> self control sliding-start-time) 0) + (set! (-> self control force-turn-to-strength) 1.0) + (set! (-> self control force-turn-to-speed) 1.0) (none) ) :exit (behavior () @@ -475,9 +475,9 @@ #t ) ) - (zero? (-> self control unknown-time-frame17)) + (zero? (-> self control sliding-start-time)) ) - (set! (-> self control unknown-time-frame17) (-> self clock frame-counter)) + (set! (-> self control sliding-start-time) (-> self clock frame-counter)) ) (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) @@ -491,10 +491,10 @@ ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control unknown-vector16) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control force-turn-to-direction) 1.0) (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) ) - (vector-normalize-copy! (-> self control transv) (-> self control unknown-vector16) 40960.0) + (vector-normalize-copy! (-> self control transv) (-> self control force-turn-to-direction) 40960.0) (go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) *slide-jump-mods*) ) (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) @@ -522,7 +522,7 @@ ) (go target-running-attack) ) - (when (= (-> self control unknown-float15) 0.0) + (when (= (-> self control force-turn-to-strength) 0.0) (logior! (-> self control status) (collide-status on-surface)) (if (using-gun? self) (go target-stance) @@ -535,10 +535,10 @@ :code (-> target-walk code) :post (behavior () (cond - ((zero? (-> self control unknown-time-frame17)) + ((zero? (-> self control sliding-start-time)) (vector-normalize! (vector-flatten! - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-negate! (new 'stack-no-clear 'vector) (-> self control dynam gravity-normal)) (-> self control surface-normal) ) @@ -546,27 +546,27 @@ ) (if (< 0.0 (vector-dot - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat-for-control)) ) ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (-> self control unknown-vector16) + (-> self control force-turn-to-direction) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) (forward-up-nopitch->quaternion (-> self control dir-targ) - (vector-negate! (new 'stack-no-clear 'vector) (-> self control unknown-vector16)) + (vector-negate! (new 'stack-no-clear 'vector) (-> self control force-turn-to-direction)) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) ) ) ) - ((nonzero? (-> self control unknown-time-frame17)) - (seek! (-> self control unknown-float15) 0.0 (* 4.0 (-> self clock seconds-per-frame))) + ((nonzero? (-> self control sliding-start-time)) + (seek! (-> self control force-turn-to-strength) 0.0 (* 4.0 (-> self clock seconds-per-frame))) ) ) - (set! (-> self control unknown-time-frame00) (+ (-> self clock frame-counter) (seconds 0.1))) + (set! (-> self control turn-lockout-end-time) (+ (-> self clock frame-counter) (seconds 0.1))) (target-post) (none) ) @@ -615,11 +615,11 @@ (set! (-> self control unknown-word04) (the-as uint (- s3-1 (+ -409.6 (-> *TARGET-bank* jump-collide-offset)))) ) - (set! (-> self control unknown-symbol02) (- s2-1 (-> *TARGET-bank* jump-collide-offset))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (- s2-1 (-> *TARGET-bank* jump-collide-offset))) ) (else (set! (-> self control unknown-word04) (the-as uint s3-1)) - (set! (-> self control unknown-symbol02) s2-1) + (set! (-> self control did-move-to-pole-or-max-jump-height) s2-1) ) ) ) @@ -678,7 +678,13 @@ (- (sqrtf (* 2.0 (-> self control dynam gravity-length) - (- (lerp-scale (the-as float (-> self control unknown-word04)) (-> self control unknown-symbol02) f0-1 0.0 1.0) + (- (lerp-scale + (the-as float (-> self control unknown-word04)) + (-> self control did-move-to-pole-or-max-jump-height) + f0-1 + 0.0 + 1.0 + ) (vector-dot (-> self control dynam gravity-normal) s3-1) ) ) @@ -791,7 +797,7 @@ (if (not arg0) (set! (-> self state-time) (-> self clock frame-counter)) ) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (set! (-> self control mod-surface) *duck-mods*) (target-collide-set! 'duck 1.0) (none) @@ -962,7 +968,7 @@ (if (not arg0) (set! (-> self state-time) (-> self clock frame-counter)) ) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) (target-collide-set! 'duck 1.0) (let ((v1-7 (ja-group))) (if (not (and v1-7 (or (= v1-7 (-> self draw art-group data 59)) (= v1-7 (-> self draw art-group data 282))))) @@ -1102,7 +1108,7 @@ (defstate target-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) - (when (= (-> self control unknown-symbol06) 'launch) + (when (= (-> self control jump-kind) 'launch) (talker-spawn-func (-> *talker-speech* 326) *entity-pool* (target-pos 0) (the-as region #f)) (talker-spawn-func (-> *talker-speech* 327) *entity-pool* (target-pos 0) (the-as region #f)) enter-state @@ -1374,7 +1380,7 @@ :frame-num (ja-aframe 3.0 0) ) (until (ja-done? 0) - (set! (-> self control unknown-time-frame09) 0) + (set! (-> self control time-of-last-clear-wall-in-jump) 0) (suspend) (ja :num! (seek!)) ) @@ -1394,7 +1400,7 @@ (defstate target-double-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float)) - (when (= (-> self control unknown-symbol06) 'launch) + (when (= (-> self control jump-kind) 'launch) enter-state (let ((a0-3 (-> self control unknown-dword07)) (a1-1 (-> self control unknown-dword08)) @@ -1531,7 +1537,7 @@ (defstate target-high-jump (target) :event target-jump-event-handler :enter (behavior ((arg0 float) (arg1 float) (arg2 object)) - (when (and (= (-> self control unknown-symbol06) 'launch) (!= arg2 'launch)) + (when (and (= (-> self control jump-kind) 'launch) (!= arg2 'launch)) enter-state (let ((a0-3 (-> self control unknown-dword07)) (a1-1 (-> self control unknown-dword08)) @@ -1881,7 +1887,7 @@ (defstate target-hit-ground (target) :event target-walk-event-handler :enter (behavior ((arg0 symbol)) - (set! (-> self control unknown-float06) 0.0) + (set! (-> self control turn-go-the-long-way) 0.0) (cond ((or (= arg0 'stuck) (logtest? (focus-status indax) (-> self focus-status))) ) @@ -2158,7 +2164,7 @@ (set! (-> self water drip-mult) 4.0) (set! (-> self neck flex-blend) 0.0) (set! (-> self gun track-target-hold-time) 0) - (if (< 0.0 (-> self control unknown-float10)) + (if (< 0.0 (-> self control turn-to-magnitude)) (forward-up-nopitch->quaternion (-> self control dir-targ) (-> self control to-target-pt-xz) @@ -2384,7 +2390,7 @@ ) ) (when gp-1 - (set! (-> self control unknown-time-frame17) (-> self clock frame-counter)) + (set! (-> self control sliding-start-time) (-> self clock frame-counter)) (set! (-> self gun combo-window-start) (-> self clock frame-counter)) (set! (-> self gun combo-window-state) (-> self state name)) (let ((v1-13 (if (type? proc process-focusable) @@ -2460,7 +2466,7 @@ (the-as process #f) (-> self clock frame-counter) ) - (set! (-> self control unknown-time-frame17) 0) + (set! (-> self control sliding-start-time) 0) (set! (-> self control unknown-time-frame18) 0) (set! (-> self control unknown-word04) (the-as uint 0)) (set! (-> self control unknown-word04) (the-as uint 0.0)) @@ -2478,14 +2484,14 @@ (set! (-> self neck flex-blend) 0.0) (set! (-> self gun track-target-hold-time) 0) (if (or (< (fabs (-> self control local-slope-x)) 0.3) (< 0.3 (fabs (-> self control local-slope-z)))) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) ) (set! (-> self upper-body twist z) 0.0) (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (set! (-> *run-attack-mods* turnv) 0.0) (set! (-> *run-attack-mods* turnvv) 0.0) (set! (-> self control last-running-attack-end-time) (-> self clock frame-counter)) @@ -2501,7 +2507,7 @@ ) (begin (set! (-> self control unknown-time-frame18) (-> self clock frame-counter)) - (set! (-> self control unknown-float29) 0.0) + (set! (-> self control bend-target) 0.0) (let ((v1-11 (new-stack-vector0)) (f0-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) ) @@ -2520,8 +2526,8 @@ ) #t ) - (or (zero? (-> self control unknown-time-frame17)) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (or (zero? (-> self control sliding-start-time)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) (!= (-> self control unknown-word04) 1) ) @@ -2630,13 +2636,7 @@ ) (target-start-attack) (target-danger-set! 'punch #f) - (initialize - (-> self control unknown-impact-control00) - self - 22 - 3276.8 - (-> self control root-prim prim-core collide-with) - ) + (initialize (-> self control impact-ctrl) self 22 3276.8 (-> self control root-prim prim-core collide-with)) (let ((f26-0 (the-as number 0.0)) (f30-0 1.0) (gp-2 0) @@ -2654,7 +2654,7 @@ (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) ) - (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame17)) (seconds 0.04)) + (>= (- (-> self clock frame-counter) (-> self control sliding-start-time)) (seconds 0.04)) ) ) (go target-falling #f) @@ -2728,14 +2728,14 @@ ) (let ((s5-3 (new 'stack-no-clear 'collide-query))) (when (and (>= (impact-control-method-11 - (-> self control unknown-impact-control00) + (-> self control impact-ctrl) s5-3 (the-as process #f) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1) ) 0.0 ) - (>= 0.0 (vector-dot (-> s5-3 best-other-tri normal) (-> self control unknown-impact-control00 dir))) + (>= 0.0 (vector-dot (-> s5-3 best-other-tri normal) (-> self control impact-ctrl dir))) ) (when (= (-> s5-3 best-other-tri pat mode) (pat-mode wall)) (let ((s4-0 (get-process *default-dead-pool* part-tracker #x4000))) @@ -2778,7 +2778,7 @@ (-> self skel effect) 'punch -1.0 - (the-as int (-> self control unknown-impact-control00 joint)) + (the-as int (-> self control impact-ctrl joint)) (the-as basic #f) (the-as sound-name t1-6) ) @@ -2810,7 +2810,7 @@ (go target-falling #f) ) (when (and (using-gun? self) - (or (< (-> self control unknown-float12) 0.7) (= (-> self gun gun-type) (pickup-type eco-blue))) + (or (< (-> self control pad-magnitude) 0.7) (= (-> self gun gun-type) (pickup-type eco-blue))) ) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.5))) (when (zero? (-> self gun track-target-hold-time)) @@ -2990,8 +2990,8 @@ (none) ) :exit (behavior () - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (set! (-> self control last-attack-end-time) (-> self clock frame-counter)) (target-exit) (none) @@ -3004,17 +3004,17 @@ (if (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (seek! (-> self control dynam gravity-length) - (-> self control unknown-dynamics00 gravity-length) + (-> self control standard-dynamics gravity-length) (* 245760.0 (-> self clock seconds-per-frame)) ) ) (when (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) - (< (vector-dot (-> self control dynam gravity-normal) (the-as vector (-> self control unknown-quaternion02))) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control last-transv)) (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) ) ) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) ) (when (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2) (>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0) @@ -3354,7 +3354,7 @@ (suspend) (ja :num! (seek! max 0.9)) (compute-alignment! (-> self align)) - (set! (-> self control unknown-float06) 1.0) + (set! (-> self control turn-go-the-long-way) 1.0) (let ((v1-27 (ja-group))) (if (and v1-27 (= v1-27 (-> self draw art-group data 51))) (align! @@ -3498,9 +3498,9 @@ ) ) (target-danger-set! 'harmless #f) - (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) - (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) (set! (-> self neck flex-blend) 1.0) (none) ) @@ -3619,8 +3619,8 @@ (joint-control-channel-group-eval! gp-0 (the-as art-joint-anim #f) num-func-seek!) ) ) - (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) - (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) (target-danger-set! 'flop-down #f) (let ((v1-56 (get-channel (-> self skel top-anim) 0))) (if (and v1-56 (= (-> v1-56 frame-group) (-> self draw art-group data 286))) @@ -3740,7 +3740,7 @@ :enter (behavior ((arg0 symbol)) (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector43) (-> self control trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self control highest-jump-mark) (-> self control trans)) ) ) ) @@ -3855,10 +3855,10 @@ ) ) (if (or (< (fabs (-> self control local-slope-x)) 0.3) (< 0.3 (fabs (-> self control local-slope-z)))) - (set! (-> self control unknown-float29) 1.0) + (set! (-> self control bend-target) 1.0) ) (set! (-> self control unknown-word04) (the-as uint 0)) - (set! (-> self control unknown-symbol02) 0.0) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) (set! (-> self gun track-target-hold-time) 0) (none) )