mirror of
https://github.com/open-goal/jak-project
synced 2026-08-04 09:09:52 -04:00
67d4eda169
Manual patches: - `drill-turret`: The static data for `*turret-13-path*`, `*turret-14-path*` and `*turret-15-path*` was decompiled by hand and the integers in the `set-speed-mult` events have been replaced with boxed integer arrays that contain only that integer in order to make the compiler happy. To that effect, the event handler in `target-turret` was changed to access that array instead of just accessing the int. - `hover-nav-control`: In `hover-nav-control::10`, `arg2` is usually a `vector`, but there are some places where it is called with `#t` as `arg2` and, subsequently, crashes the game because it tries to access the `quad` of `arg2` if `arg2` is truthy. To mitigate this, the condition `arg2` has been replaced with `(and (!= arg2 #t) arg2)` (in this case, it would jump to the `else` that just resets the `dest-vel` and `transv` `quad`s) - `drill-baron`: The static data for `*drill-ship-turret-speed-event*` has been decompiled by hand. TODOs: - Jellyfish crash the game - Destroying the metalhead eggs that are on the breakable wall crashes the game (already happened with the Peacemaker before) - Figure out why static data of type `turret-path-event` doesn't decompile The docs for all the hover-nav and nav-network code could use some love in the future, I'm not smart enough to figure out what any of that code actually means, but it seems to work... Also threw in the fix for the ▲ that was accidentally left commented out.
368 lines
17 KiB
Common Lisp
Vendored
Generated
368 lines
17 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type target
|
|
(deftype target (process-focusable)
|
|
((self-override target :offset 32)
|
|
(control control-info :offset 128)
|
|
(fact-override fact-info-target :offset 160)
|
|
(skel2 joint-control :offset-assert 204)
|
|
(shadow-backup shadow-geo :offset-assert 208)
|
|
(target-flags uint32 :offset 188)
|
|
(game game-info :offset-assert 212)
|
|
(neck joint-mod :offset-assert 216)
|
|
(head joint-mod :offset-assert 220)
|
|
(upper-body joint-mod :offset-assert 224)
|
|
(horns joint-mod :offset-assert 228)
|
|
(hair joint-mod 2 :offset-assert 232)
|
|
(darkjak-interp float :offset-assert 240)
|
|
(darkjak-giant-interp float :offset-assert 244)
|
|
(arm-ik joint-mod-ik 2 :offset-assert 248)
|
|
(leg-ik joint-mod-ik 2 :offset-assert 256)
|
|
(foot joint-mod 2 :offset-assert 264)
|
|
(mech-ik joint-mod-ik 2 :offset-assert 272)
|
|
(init-time time-frame :offset 272)
|
|
(teleport-time time-frame :offset-assert 280)
|
|
(state-hook-time time-frame :offset-assert 288)
|
|
(state-hook (function none :behavior target) :offset-assert 296)
|
|
(cam-user-mode symbol :offset-assert 300)
|
|
(sidekick (pointer sidekick) :offset-assert 304)
|
|
(manipy (pointer manipy) :offset-assert 308)
|
|
(mirror (pointer process-drawable) :offset-assert 312)
|
|
(attack-info attack-info :inline :offset-assert 320)
|
|
(attack-info-rec attack-info :inline :offset-assert 480)
|
|
(attack-info-old attack-info 8 :inline :offset-assert 640)
|
|
(anim-seed uint64 :offset-assert 1920)
|
|
(alt-cam-pos vector :inline :offset-assert 1936)
|
|
(current-level level :offset-assert 1952)
|
|
(saved-pos transformq :inline :offset-assert 1968)
|
|
(saved-owner uint64 :offset-assert 2016)
|
|
(alt-neck-pos vector :inline :offset-assert 2032)
|
|
(focus-search (array collide-shape) :offset-assert 2048)
|
|
(excitement float :offset-assert 2052)
|
|
(shock-effect-time time-frame :offset-assert 2056)
|
|
(beard? symbol :offset-assert 2064)
|
|
(spool-anim spool-anim :offset-assert 2068)
|
|
(ambient-time time-frame :offset-assert 2072)
|
|
(fp-hud handle :offset-assert 2080)
|
|
(no-load-wait uint64 :offset-assert 2088)
|
|
(no-look-around-wait uint64 :offset-assert 2096)
|
|
(burn-proc handle :offset-assert 2104)
|
|
(pre-joint-hook (function none :behavior target) :offset-assert 2112)
|
|
(notify handle :offset-assert 2120)
|
|
(mode-cache basic :offset-assert 2128)
|
|
(mode-param1 handle :offset-assert 2136)
|
|
(mode-param2 uint64 :offset-assert 2144)
|
|
(mode-param3 uint64 :offset-assert 2152)
|
|
(tobot-state state :offset-assert 2160)
|
|
(tobot? symbol :offset-assert 2164)
|
|
(tobot-recorder basic :offset-assert 2168)
|
|
(color-effect basic :offset-assert 2172)
|
|
(color-effect-start-time time-frame :offset-assert 2176)
|
|
(color-effect-duration uint64 :offset-assert 2184)
|
|
(racer racer-info :offset-assert 2192)
|
|
(tube tube-info :offset-assert 2196)
|
|
(flut flut-info :offset-assert 2200)
|
|
(board board-info :offset-assert 2204)
|
|
(pilot pilot-info :offset-assert 2208)
|
|
(gun gun-info :offset-assert 2212)
|
|
(mech mech-info :offset-assert 2216)
|
|
(turret turret-info :offset-assert 2220)
|
|
(darkjak darkjak-info :offset-assert 2224)
|
|
(indax indax-info :offset-assert 2228)
|
|
)
|
|
:heap-base #x840
|
|
:method-count-assert 29
|
|
:size-assert #x8b8
|
|
:flag-assert #x1d084008b8
|
|
(:methods
|
|
(do-edge-grabs (_type_ collide-cache collide-edge-spec) none 27)
|
|
(init-target (_type_ continue-point symbol) none :behavior target 28)
|
|
)
|
|
(:states
|
|
target-attack
|
|
(target-attack-air symbol)
|
|
(target-attack-uppercut float float)
|
|
(target-attack-uppercut-jump float float)
|
|
(target-board-clone-anim handle)
|
|
target-board-duck-stance
|
|
target-board-falling
|
|
(target-board-flip float float symbol)
|
|
(target-board-get-off object symbol)
|
|
target-board-get-on
|
|
(target-board-grab symbol)
|
|
(target-board-grenade handle)
|
|
target-board-halfpipe
|
|
(target-board-hit vector attack-info)
|
|
target-board-hit-ground
|
|
(target-board-hold float float symbol)
|
|
(target-board-jump meters meters symbol)
|
|
target-board-jump-kick
|
|
(target-board-pegasus handle)
|
|
(target-board-ride-edge symbol object object float)
|
|
target-board-stance
|
|
(target-board-start object)
|
|
(target-board-trickx float float symbol)
|
|
(target-board-turn-to vector time-frame)
|
|
(target-board-wall-kick vector float)
|
|
target-carry-drop
|
|
target-carry-falling
|
|
(target-carry-hit-ground symbol)
|
|
(target-carry-jump float float)
|
|
target-carry-pickup
|
|
target-carry-stance
|
|
target-carry-throw
|
|
target-carry-walk
|
|
(target-clone-anim handle)
|
|
(target-continue continue-point)
|
|
target-darkjak-bomb0
|
|
(target-darkjak-bomb1 float float)
|
|
target-darkjak-get-off
|
|
(target-darkjak-get-on int)
|
|
target-darkjak-giant
|
|
target-darkjak-running-attack
|
|
(target-death symbol)
|
|
(target-demo symbol)
|
|
(target-double-jump float float)
|
|
(target-duck-high-jump float float symbol)
|
|
(target-duck-high-jump-jump float float symbol)
|
|
(target-duck-stance symbol)
|
|
(target-duck-walk symbol)
|
|
target-edge-grab
|
|
(target-edge-grab-jump float float)
|
|
target-edge-grab-off
|
|
(target-falling symbol)
|
|
target-float
|
|
(target-flop float float float)
|
|
(target-flop-hit-ground symbol)
|
|
(target-flut-start handle)
|
|
(target-grab symbol)
|
|
target-gun-stance
|
|
target-gun-walk
|
|
target-hide
|
|
(target-high-jump float float object)
|
|
(target-hit symbol attack-info)
|
|
(target-hit-ground symbol)
|
|
(target-hit-ground-hard float)
|
|
target-ice-stance
|
|
target-ice-walk
|
|
target-indax-attack
|
|
(target-indax-attack-air symbol)
|
|
(target-indax-death symbol)
|
|
(target-indax-double-jump float float)
|
|
(target-indax-falling symbol)
|
|
(target-indax-hit symbol attack-info)
|
|
(target-indax-hit-ground symbol)
|
|
(target-indax-jump float float surface)
|
|
target-indax-running-attack
|
|
target-indax-stance
|
|
target-indax-start
|
|
target-indax-trip
|
|
target-indax-walk
|
|
(target-jump float float surface)
|
|
(target-jump-forward float float)
|
|
(target-launch float symbol vector int)
|
|
target-load-wait
|
|
target-look-around
|
|
target-mech-carry-drag
|
|
target-mech-carry-drop
|
|
target-mech-carry-falling
|
|
(target-mech-carry-hit-ground symbol)
|
|
(target-mech-carry-jump float float)
|
|
target-mech-carry-pickup
|
|
target-mech-carry-stance
|
|
target-mech-carry-throw
|
|
target-mech-carry-walk
|
|
(target-mech-clone-anim handle)
|
|
(target-mech-death symbol)
|
|
(target-mech-falling symbol)
|
|
target-mech-get-off
|
|
(target-mech-get-on handle)
|
|
target-mech-grab
|
|
(target-mech-hit symbol attack-info)
|
|
(target-mech-hit-ground symbol)
|
|
(target-mech-jump float float surface)
|
|
target-mech-punch
|
|
target-mech-stance
|
|
(target-mech-start handle float symbol)
|
|
target-mech-walk
|
|
(target-pilot-clone-anim handle)
|
|
(target-pilot-death symbol)
|
|
(target-pilot-edge-grab pilot-edge-grab-info)
|
|
target-pilot-get-off
|
|
target-pilot-get-on
|
|
target-pilot-grab
|
|
(target-pilot-hit symbol attack-info)
|
|
target-pilot-impact
|
|
target-pilot-stance
|
|
(target-pilot-start handle symbol symbol)
|
|
(target-play-anim string handle)
|
|
(target-pole-cycle handle)
|
|
(target-pole-flip-forward float float float)
|
|
(target-pole-flip-forward-jump float float)
|
|
(target-pole-flip-up object object float)
|
|
(target-pole-flip-up-jump float float)
|
|
(target-racing-start handle)
|
|
target-roll
|
|
(target-roll-flip float float)
|
|
target-running-attack
|
|
target-slide-down
|
|
target-slide-down-to-ground
|
|
target-stance
|
|
target-stance-ambient
|
|
target-stance-look-around
|
|
target-startup
|
|
target-swim-down
|
|
(target-swim-jump float float)
|
|
(target-swim-jump-jump float float surface)
|
|
target-swim-stance
|
|
target-swim-up
|
|
target-swim-walk
|
|
(target-title symbol)
|
|
target-tube
|
|
(target-tube-death symbol)
|
|
(target-tube-hit symbol attack-info)
|
|
(target-tube-jump float float)
|
|
(target-tube-start handle)
|
|
target-turn-around
|
|
target-turret-get-off
|
|
(target-turret-get-on handle)
|
|
(target-turret-stance handle)
|
|
target-wade-stance
|
|
target-wade-walk
|
|
target-walk
|
|
(target-warp-in vector vector target)
|
|
(target-warp-out vector vector target)
|
|
target-yellow-jump-blast
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type target
|
|
(defmethod inspect target ((obj target))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type process-focusable inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~2Tcontrol: ~A~%" (-> obj control))
|
|
(format #t "~2Tskel2: ~A~%" (-> obj skel2))
|
|
(format #t "~2Tshadow-backup: ~A~%" (-> obj shadow-backup))
|
|
(format #t "~2Ttarget-flags: ~D~%" (-> obj state-flags))
|
|
(format #t "~2Tgame: ~A~%" (-> obj game))
|
|
(format #t "~2Tneck: ~A~%" (-> obj neck))
|
|
(format #t "~2Thead: ~A~%" (-> obj head))
|
|
(format #t "~2Tupper-body: ~A~%" (-> obj upper-body))
|
|
(format #t "~2Thorns: ~A~%" (-> obj horns))
|
|
(format #t "~2Thair[2] @ #x~X~%" (-> obj hair))
|
|
(format #t "~2Tdarkjak-interp: ~f~%" (-> obj darkjak-interp))
|
|
(format #t "~2Tdarkjak-giant-interp: ~f~%" (-> obj darkjak-giant-interp))
|
|
(format #t "~2Tarm-ik[2] @ #x~X~%" (-> obj arm-ik))
|
|
(format #t "~2Tleg-ik[2] @ #x~X~%" (-> obj leg-ik))
|
|
(format #t "~2Tfoot[2] @ #x~X~%" (-> obj foot))
|
|
(format #t "~2Tinit-time: ~D~%" (-> obj init-time))
|
|
(format #t "~2Tteleport-time: ~D~%" (-> obj teleport-time))
|
|
(format #t "~2Tstate-hook-time: ~D~%" (-> obj state-hook-time))
|
|
(format #t "~2Tstate-hook: ~A~%" (-> obj state-hook))
|
|
(format #t "~2Tcam-user-mode: ~A~%" (-> obj cam-user-mode))
|
|
(format #t "~2Tsidekick: #x~X~%" (-> obj sidekick))
|
|
(format #t "~2Tmanipy: #x~X~%" (-> obj manipy))
|
|
(format #t "~2Tmirror: #x~X~%" (-> obj mirror))
|
|
(format #t "~2Tattack-info: #<attack-info @ #x~X>~%" (-> obj attack-info))
|
|
(format #t "~2Tattack-info-rec: #<attack-info @ #x~X>~%" (-> obj attack-info-rec))
|
|
(format #t "~2Tattack-info-old[8] @ #x~X~%" (-> obj attack-info-old))
|
|
(format #t "~2Tanim-seed: ~D~%" (-> obj anim-seed))
|
|
(format #t "~2Talt-cam-pos: ~`vector`P~%" (-> obj alt-cam-pos))
|
|
(format #t "~2Tcurrent-level: ~A~%" (-> obj current-level))
|
|
(format #t "~2Tsaved-pos: #<transformq @ #x~X>~%" (-> obj saved-pos))
|
|
(format #t "~2Tsaved-owner: ~D~%" (-> obj saved-owner))
|
|
(format #t "~2Talt-neck-pos: ~`vector`P~%" (-> obj alt-neck-pos))
|
|
(format #t "~2Tfocus-search: ~A~%" (-> obj focus-search))
|
|
(format #t "~2Texcitement: ~f~%" (-> obj excitement))
|
|
(format #t "~2Tshock-effect-time: ~D~%" (-> obj shock-effect-time))
|
|
(format #t "~2Tbeard?: ~A~%" (-> obj beard?))
|
|
(format #t "~2Tspool-anim: ~A~%" (-> obj spool-anim))
|
|
(format #t "~2Tambient-time: ~D~%" (-> obj ambient-time))
|
|
(format #t "~2Tfp-hud: ~D~%" (-> obj fp-hud))
|
|
(format #t "~2Tno-load-wait: ~D~%" (-> obj no-load-wait))
|
|
(format #t "~2Tno-look-around-wait: ~D~%" (-> obj no-look-around-wait))
|
|
(format #t "~2Tburn-proc: ~D~%" (-> obj burn-proc))
|
|
(format #t "~2Tpre-joint-hook: ~A~%" (-> obj pre-joint-hook))
|
|
(format #t "~2Tnotify: ~D~%" (-> obj notify))
|
|
(format #t "~2Tmode-cache: ~A~%" (-> obj mode-cache))
|
|
(format #t "~2Tmode-param1: ~D~%" (-> obj mode-param1))
|
|
(format #t "~2Tmode-param2: ~A~%" (-> obj mode-param2))
|
|
(format #t "~2Tmode-param3: ~A~%" (-> obj mode-param3))
|
|
(format #t "~2Ttobot-state: ~A~%" (-> obj tobot-state))
|
|
(format #t "~2Ttobot?: ~A~%" (-> obj tobot?))
|
|
(format #t "~2Ttobot-recorder: ~A~%" (-> obj tobot-recorder))
|
|
(format #t "~2Tcolor-effect: ~A~%" (-> obj color-effect))
|
|
(format #t "~2Tcolor-effect-start-time: ~D~%" (-> obj color-effect-start-time))
|
|
(format #t "~2Tcolor-effect-duration: ~D~%" (-> obj color-effect-duration))
|
|
(format #t "~2Tracer: ~A~%" (-> obj racer))
|
|
(format #t "~2Ttube: ~A~%" (-> obj tube))
|
|
(format #t "~2Tflut: ~A~%" (-> obj flut))
|
|
(format #t "~2Tboard: ~A~%" (-> obj board))
|
|
(format #t "~2Tpilot: ~A~%" (-> obj pilot))
|
|
(format #t "~2Tgun: ~A~%" (-> obj gun))
|
|
(format #t "~2Tmech: ~A~%" (-> obj mech))
|
|
(format #t "~2Tturret: ~A~%" (-> obj turret))
|
|
(format #t "~2Tdarkjak: ~A~%" (-> obj darkjak))
|
|
(format #t "~2Tindax: ~A~%" (-> obj indax))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition (perm) for symbol *target*, type target
|
|
(define-perm *target* target #f)
|
|
|
|
;; definition of type sidekick
|
|
(deftype sidekick (process-drawable)
|
|
((parent-override (pointer target) :offset 16)
|
|
(control control-info :offset 128)
|
|
(anim-seed uint64 :offset 208)
|
|
(shadow-in-movie? symbol :offset-assert 216)
|
|
(special-anim-time time-frame :offset-assert 224)
|
|
(special-anim-interp float :offset-assert 232)
|
|
(special-anim-frame float :offset-assert 236)
|
|
(offset transformq :inline :offset-assert 240)
|
|
(mirror (pointer process-drawable) :offset-assert 288)
|
|
)
|
|
:heap-base #xb0
|
|
:method-count-assert 20
|
|
:size-assert #x124
|
|
:flag-assert #x1400b00124
|
|
(:states
|
|
sidekick-clone
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type sidekick
|
|
(defmethod inspect sidekick ((obj sidekick))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type process-drawable inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~2Tcontrol: ~A~%" (-> obj root))
|
|
(format #t "~2Tstate-time: ~D~%" (-> obj state-time))
|
|
(format #t "~2Tanim-seed: ~D~%" (-> obj anim-seed))
|
|
(format #t "~2Tshadow-in-movie?: ~A~%" (-> obj shadow-in-movie?))
|
|
(format #t "~2Tspecial-anim-time: ~D~%" (-> obj special-anim-time))
|
|
(format #t "~2Tspecial-anim-interp: ~f~%" (-> obj special-anim-interp))
|
|
(format #t "~2Tspecial-anim-frame: ~f~%" (-> obj special-anim-frame))
|
|
(format #t "~2Toffset: #<transformq @ #x~X>~%" (-> obj offset))
|
|
(format #t "~2Tmirror: #x~X~%" (-> obj mirror))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition (perm) for symbol *sidekick*, type sidekick
|
|
(define-perm *sidekick* sidekick #f)
|
|
|
|
;; failed to figure out what this is:
|
|
(new 'static 'boxed-array :type type pilot-info mech-info turret-info indax-info tube-info)
|