diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 45677ceac0..e347d3ed73 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -8429,7 +8429,7 @@ (joint-num int16 :offset-assert 8) (geo basic :offset-assert 12) (bone bone :offset-assert 16) - (param0 function :offset-assert 20) ;; guessed by decompiler + (param0 (function cspace matrix none) :offset-assert 20) ;; guessed by decompiler (param1 basic :offset-assert 24) (param2 basic :offset-assert 28) ) @@ -11152,7 +11152,7 @@ :size-assert #x31 :flag-assert #xa00000031 (:methods - (lod-set-method-9 () none 9) ;; (setup-lods! (_type_ skeleton-group art-group entity) _type_ 9) + (setup-lods! (_type_ skeleton-group art-group entity) _type_ 9) ) ) @@ -11198,7 +11198,7 @@ (declare-type joint-control basic) (deftype draw-control (basic) - ((process process :offset-assert 4) + ((process process-drawable :offset-assert 4) (status draw-control-status) (data-format draw-control-data-format) (global-effect draw-control-global-effect) @@ -11246,11 +11246,11 @@ (:methods (new (symbol type process symbol) _type_ 0) (get-skeleton-origin (_type_) vector 9) - (draw-control-method-10 () none 10) ;; (lod-set! (_type_ int) none 10) - (draw-control-method-11 () none 11) ;; (lods-assign! (_type_ lod-set) none 11) - (draw-control-method-12 (_type_ uint int) none 12) - (draw-control-method-13 () none 13) - (draw-control-method-14 (_type_ cspace-array joint-control) none 14) + (lod-set! (_type_ int) none 10) + (lods-assign! (_type_ lod-set) none 11) + (setup-masks (_type_ uint int) none 12) + (setup-cspace-and-add (_type_ art-joint-geo symbol) none 13) + (do-joint-math (_type_ cspace-array joint-control) none 14) ) ) @@ -11636,7 +11636,7 @@ (deftype merc-ctrl (art-element) ((num-joints int32 :offset 20) - (seg-table basic :offset 24) + (seg-table (array uint64) :offset 24) (header merc-ctrl-header :inline :offset-assert 32) (effect merc-effect :inline :dynamic :offset-assert 160) ;; guessed by decompiler ) @@ -13371,10 +13371,13 @@ (defenum joint-control-command :type int64 + (zero 0) (push 1) (blend 2) + (four 4) (eight 8) (push1 19) + (thirty-two 32) (stack 36) (float 42) (stack1 52) @@ -13411,9 +13414,9 @@ (base-anim-blend float :offset-assert 32) (interp float :offset-assert 36) (frame-group art-joint-anim :offset-assert 40) - (frame-group-push basic :offset-assert 44) + (frame-group-push art-joint-anim :offset-assert 44) (frame-num float :offset-assert 48) - (frame-targ basic :offset-assert 52) + (frame-targ art-joint-anim :offset-assert 52) (frame-speed float :offset-assert 56) (frame-blend float :offset-assert 60) (frame-cur-blend float :offset-assert 64) @@ -13428,10 +13431,11 @@ :size-assert #x68 :flag-assert #xd00000068 (:methods - (top-anim-joint-control-method-9 (_type_) none 9) - (top-anim-joint-control-method-10 (_type_) none 10) - (top-anim-joint-control-method-11 (_type_ int) joint-control-channel 11) - (top-anim-joint-control-method-12 (_type_ art-element float int int float float symbol) none 12) + (new (symbol type process-drawable) _type_ 0) + (reset (_type_) none 9) + (update (_type_) none 10) + (get-channel (_type_ int) joint-control-channel 11) + (push-anim-to-targ (_type_ art-joint-anim float int int float float symbol) none 12) ) ) @@ -13458,12 +13462,12 @@ (allocated-length uint8) (active-channels uint8) (root-channel (inline-array joint-control-channel) :offset 16) - (blend-index uint8) - (active-frame-interp uint8) - (float-channels uint8) - (generate-frame-function function) - (prebind-function function) - (postbind-function function) + (blend-index uint8 :offset-assert 20) + (active-frame-interp uint8 :offset-assert 21) + (float-channels uint8 :offset-assert 22) + (generate-frame-function (function joint-anim-frame int joint-control int) :offset-assert 24) + (prebind-function (function joint-anim-frame int joint-control int)) + (postbind-function (function draw-control cspace-array joint-control none)) (effect effect-control) (interp-select int64 2) (top-anim top-anim-joint-control) @@ -13477,7 +13481,7 @@ (:methods (new (symbol type int) _type_ 0) (current-cycle-distance (_type_) float 9) - (joint-control-method-10 (_type_) none 10) + (update-anim-data (_type_) none 10) (debug-print-channels (_type_ symbol) int 11) ) ) @@ -14729,12 +14733,12 @@ :size-assert #xc8 :flag-assert #x14005000c8 (:methods - (initialize-skeleton (_type_ skeleton-group pair) none 14) + (initialize-skeleton (_type_ skeleton-group pair) draw-control 14) (initialize-skeleton-by-name (_type_ string) draw-control 15) - (apply-alignment (_type_ align-opts transformq vector) object 16) - (process-drawable-method-17 (_type_) none 17) ;; (do-joint-math! (_type_) none 17) - (process-drawable-method-18 () none 18) ;; (cleanup-for-death (_type_) none 18) - (process-drawable-method-19 () none 19) ;; (evaluate-joint-control (_type_) none 19) + (apply-alignment (_type_ align-opts transformq vector) trsqv 16) + (cleanup-for-death (_type_) none 17) ;; (do-joint-math! (_type_) none 17) + (relocate-nav (_type_ int) none 18) ;; ( (_type_) none 18) + (evaluate-joint-control (_type_) none 19) ;; (evaluate-joint-control (_type_) none 19) ) ) @@ -15426,6 +15430,8 @@ :flag-assert #x900004b10 ) +(define-extern *debug-vertex-stats* debug-vertex-stats) + (define-extern *color-black* rgba) (define-extern *color-white* rgba) (define-extern *color-gray* rgba) @@ -22615,7 +22621,7 @@ (sphere-hash-method-30 (_type_ find-nav-sphere-ids-params) none 30) (sphere-hash-method-31 (_type_ vector int int) none 31) (sphere-hash-method-32 (_type_ vector vector float int) symbol 32) - (sphere-hash-method-33 (_type_ sphere int) none 33) + (remove-by-id (_type_ sphere int) none 33) ) ) @@ -27378,50 +27384,52 @@ ;; process-drawable ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-extern fuel-cell type) + (define-extern cspace-by-name (function process-drawable string cspace)) (define-extern cspace-index-by-name (function process-drawable string int)) (define-extern vector<-cspace! (function vector cspace vector)) (define-extern vector<-matrix! (function vector matrix vector)) -;; (define-extern vector<-cspace+vector! function) ;; (function vector cspace vector vector) +(define-extern vector<-cspace+vector! (function vector cspace vector vector)) ;; (define-extern cspace-children function) ;; (function process-drawable int pair) -;; (define-extern cspace-inspect-tree function) ;; (function process-drawable cspace int int object object) +(define-extern cspace-inspect-tree (function process-drawable cspace int int object object)) (define-extern execute-math-engine (function int)) (define-extern draw-joint-axes (function process-drawable none)) -;; (define-extern draw-root function) +(define-extern draw-root (function process-drawable none)) ;; (define-extern empty-state state) ;; (state process) (define-extern process-drawable-art-error (state string process-drawable)) -;; (define-extern process-drawable-idle state) ;; (state process-drawable) -;; (define-extern skeleton-group->draw-control function) +(define-extern process-drawable-idle (state process-drawable)) +(define-extern skeleton-group->draw-control (function process-drawable skeleton-group (pointer cspace-array) draw-control)) (define-extern ja-done? (function int symbol :behavior process-drawable)) (define-extern ja-min? (function int symbol :behavior process-drawable)) ;; (define-extern ja-max? (function int symbol :behavior process-drawable)) ;; -;; (define-extern ja-num-frames function) ;; (function int int :behavior process-drawable) +(define-extern ja-num-frames (function int int :behavior process-drawable)) (define-extern ja-frame-num (function int float :behavior process-drawable)) (define-extern ja-aframe-num (function int float :behavior process-drawable)) (define-extern ja-aframe (function float int float :behavior process-drawable)) -;; (define-extern ja-speed function) ;; (function int float :behavior process-drawable) +(define-extern ja-speed (function int float :behavior process-drawable)) (define-extern ja-step (function int float :behavior process-drawable)) ;; (define-extern ja-channel-set! (function int int :behavior process-drawable)) (define-extern ja-channel-push! (function int time-frame int :behavior process-drawable)) -;; (define-extern ja-channel-float! function) +(define-extern ja-channel-float! (function art-joint-anim float float float joint-control-channel :behavior process-drawable)) (define-extern joint-control-reset! (function joint-control joint-control-channel none :behavior process-drawable)) (define-extern ja-group-size (function int :behavior process-drawable)) (define-extern ja-eval (function int :behavior process-drawable)) (define-extern ja-blend-eval (function int :behavior process-drawable)) (define-extern ja-post (function none :behavior process-drawable)) (define-extern sleep-code (function symbol :behavior process-drawable)) -;; (define-extern transform-and-sleep function) -;; (define-extern transform-and-sleep-code function) +(define-extern transform-and-sleep (function none :behavior process-drawable)) +(define-extern transform-and-sleep-code (function none :behavior process-drawable)) (define-extern transform-post (function int :behavior process-drawable)) (define-extern rider-trans (function none :behavior process-drawable)) (define-extern rider-post (function none :behavior process-drawable)) -;; (define-extern pusher-post function) ;; (function int :behavior process-drawable) -;; (define-extern process-drawable-delay-player function) ;; (function time-frame int :behavior process-drawable) -;; (define-extern process-drawable-fuel-cell-handler function) ;; (function process int symbol event-message-block none :behavior process-drawable) -;; (define-extern process-drawable-birth-fuel-cell function) ;; (function entity vector symbol none :behavior process-drawable) -(define-extern find-offending-process-focusable (function process-tree symbol process-focusable)) -;; (define-extern *valid-con* object) ;; string -;; (define-extern process-drawable-valid? function) ;; (function process-drawable symbol) +(define-extern pusher-post (function int :behavior process-drawable)) +(define-extern process-drawable-delay-player (function time-frame int :behavior process-drawable)) +(define-extern process-drawable-fuel-cell-handler (function process int symbol event-message-block none :behavior process-drawable)) +(define-extern process-drawable-birth-fuel-cell (function entity vector symbol none :behavior process-drawable)) +(define-extern find-offending-process-focusable (function process-tree process-focusable)) +(define-extern *valid-con* string) +(define-extern process-drawable-valid? (function process-drawable symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ambient ;; @@ -27483,8 +27491,7 @@ ) ) -;; TODO - takes vectors, but hits an assertion! -(define-extern fma-sphere-init-by-other (function fma-sphere-mode process-drawable int time-frame object object fma-sphere :behavior fma-sphere)) +(define-extern fma-sphere-init-by-other (function fma-sphere-mode process-drawable int time-frame vector vector none :behavior fma-sphere)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; script ;; @@ -27585,7 +27592,7 @@ ;; (define-extern part-tracker-move-to-target function) ;; (function part-tracker vector) ;; (define-extern part-tracker-track-target function) ;; (function part-tracker vector) (define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none)) -(define-extern process-grab? (function process symbol :behavior process)) +(define-extern process-grab? (function process symbol symbol :behavior process)) (define-extern process-release? (function process symbol :behavior process)) ;; (define-extern camera-look-at function) ;; (function pair uint process :behavior camera-tracker) (define-extern ja-anim-done? (function process symbol)) ;; @@ -29319,10 +29326,10 @@ ;; (define-extern set-shadow-by-name function) ;; (define-extern get-shadow-by-name function) ;; (define-extern teleport-camera-by-name function) -;; (define-extern dma-add-process-drawable function) ;; (function process-drawable draw-control symbol dma-buffer none) +(define-extern dma-add-process-drawable function) ;; (function process-drawable draw-control symbol dma-buffer none) (define-extern *hud-lights* vu-lights) ;; (define-extern dma-add-process-drawable-hud function) ;; (function process-drawable draw-control symbol dma-buffer none) -;; (define-extern add-process-drawable function) ;; (function process-drawable draw-control symbol dma-buffer none) +(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none)) (define-extern foreground-engine-execute (function engine display-frame none)) ;; (define-extern main-debug-hook function) ;; (function none) ;; (define-extern *debug-hook* object) ;; (function none) @@ -29660,7 +29667,7 @@ (define-extern plane-height-at-xz-point (function plane vector float)) (define-extern nav-normal-from-3-points (function vector vector vector vector none)) (define-extern get-nav-mesh (function actor-id nav-mesh)) -(define-extern find-nearest-nav-mesh (function vector float nav-mesh)) +(define-extern find-nearest-nav-mesh (function vector int nav-mesh)) ;; (define-extern point-to-poly-boundary ;; "TODO - assertion: ;; Assertion failed: 'std::isfinite(value)' diff --git a/decompiler/config/jak2/hacks.jsonc b/decompiler/config/jak2/hacks.jsonc index b9fe59ced3..300597ede3 100644 --- a/decompiler/config/jak2/hacks.jsonc +++ b/decompiler/config/jak2/hacks.jsonc @@ -36,7 +36,6 @@ "asm_functions_by_name": [ // checking boxed type is different now - these make the cfg stuff sad "name=", - "cspace-inspect-tree", "(method 77 spyder)", "(method 77 flamer)", "(method 77 grenadier)", @@ -387,7 +386,9 @@ "(method 12 collide-shape-prim-sphere)": [1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 15], "(method 12 collide-shape-prim-mesh)": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16], "(method 24 grid-hash)": [39, 35, 22, 15], - "(method 12 flow-control)": [11, 12, 13, 14, 15, 18, 20, 22, 29] + "(method 12 flow-control)": [11, 12, 13, 14, 15, 18, 20, 22, 29], + "(method 19 process-drawable)": [0, 2, 3, 7, 10, 11, 30], + "find-offending-process-focusable": [16, 19] }, // Sometimes the game might use format strings that are fetched dynamically, diff --git a/decompiler/config/jak2/label_types.jsonc b/decompiler/config/jak2/label_types.jsonc index 54ee4c5135..3752278b2d 100644 --- a/decompiler/config/jak2/label_types.jsonc +++ b/decompiler/config/jak2/label_types.jsonc @@ -512,5 +512,9 @@ ["L375", "attack-info"], ["L372", "vector"], ["L365", "attack-info"] + ], + "process-drawable": [ + ["L366", "vector"], + ["L365", "vector"] ] } diff --git a/decompiler/config/jak2/stack_structures.jsonc b/decompiler/config/jak2/stack_structures.jsonc index 00fac61cb0..1e0aee58b6 100644 --- a/decompiler/config/jak2/stack_structures.jsonc +++ b/decompiler/config/jak2/stack_structures.jsonc @@ -1190,5 +1190,6 @@ "(method 11 grid-hash)": [ [16, "vector"], [32, "vector"] ], - "(method 11 flow-control)": [[80, "vector"], [128, "vector"]] + "(method 11 flow-control)": [[80, "vector"], [128, "vector"]], + "(method 9 joint-control)": [[16, "vector"]] } diff --git a/decompiler/config/jak2/type_casts.jsonc b/decompiler/config/jak2/type_casts.jsonc index af23ef39e9..1f79320f09 100644 --- a/decompiler/config/jak2/type_casts.jsonc +++ b/decompiler/config/jak2/type_casts.jsonc @@ -4705,5 +4705,72 @@ ], "(method 10 flow-control)": [ ["_stack_", 32, "flow-section"] + ], + "(method 9 lod-set)": [ + ["_stack_", 16, "res-tag"] + ], + "execute-math-engine": [ + [[15, 28], "v1", "process-drawable"] + ], + "(method 14 draw-control)": [ + [13, "v1", "process-drawable"] + ], + "(method 17 process-drawable)": [ + [7, "v1", "collide-shape"] + ], + "(method 10 process-drawable)": [ + [32, "a0", "collide-shape"] + ], + "(code process-drawable-art-error)": [ + [[18, 50], "v1", "collide-shape"] + ], + "(method 18 process-drawable)": [ + [1, "v1", "pointer"] + ], + "skeleton-group->draw-control": [ + [[239, 249], "v1", "process-drawable"] + ], + "(method 14 process-drawable)": [ + [[124, 129], "s5", "collide-shape"], + [111, "v1", "vector"] + ], + "ja-channel-push!": [ + [35, "v1", "int"], + [35, "a0", "int"] + ], + "joint-control-reset!": [ + [3, "a1", "int"], + [5, "a0", "int"], + [7, "a1", "int"], + [[11, 35], "v1", "joint-control-channel"] + ], + "ja-blend-eval": [ + [[3, 26], "s5", "joint-control-channel"] + ], + "(method 9 joint-control)": [ + [[12, 68], "s3", "joint-control-channel"], + [[13, 70], "s5", "(pointer float)"] + ], + "(method 10 top-anim-joint-control)": [ + [5, "a0", "process-drawable"], + [162, "s2", "art-joint-anim"] + ], + "transform-and-sleep": [ + [[9, 13], "a0", "collide-shape"] + ], + "transform-and-sleep-code": [ + [[9, 13], "a0", "collide-shape"] + ], + "transform-post": [ + [[2, 6], "a0", "collide-shape"] + ], + "rider-trans": [ + [[0, 4], "a0", "collide-shape"] + ], + "rider-post": [ + [[3, 17], "gp", "collide-shape"] + ], + "pusher-post": [ + [[2, 14], "gp", "collide-shape"] ] } diff --git a/goal_src/jak2/engine/anim/aligner.gc b/goal_src/jak2/engine/anim/aligner.gc index b47e4bf1a6..48e7bde6d4 100644 --- a/goal_src/jak2/engine/anim/aligner.gc +++ b/goal_src/jak2/engine/anim/aligner.gc @@ -19,7 +19,7 @@ (vf6 :class vf) ) (init-vf0-vector) - (joint-control-method-10 (-> obj process skel)) + (update-anim-data (-> obj process skel)) (let ((s5-0 (-> obj process skel active-channels))) (dotimes (s4-0 (the-as int s5-0)) (let* ((a0-4 (-> obj process skel channel s4-0)) @@ -29,23 +29,15 @@ (((joint-control-command stack) (joint-control-command stack1)) ) (else - ; TODO - support decompiling the return-from-thread - ; TODO - properly decompile the `go`to - ; (when (!= (-> v1-5 type) art-joint-anim) - ; (let - ; ((t9-0 (the-as (function object object object object) enter-state)) - ; (a0-7 "align joint-anim") - ; ) - ; (set! (-> pp next-state) process-drawable-art-error) - ; (t9-0 a0-7 (the-as none a1-0) a2-0) - ; ) - ; (.lw ra-0 return-from-thread s7-0) - ; (.jr ra-0) - ; (nop!) - ; 0 - ; ) - 0 - ) + (when (!= (-> v1-7 type) art-joint-anim) + (break!) ;; modified. + ; (go process-drawable-art-error "align joint-anim") + ; (.lw ra-0 return-from-thread s7-0) + ; (.jr ra-0) + ; (nop!) + 0 + ) + ) ) ) ) @@ -156,7 +148,7 @@ @returns the `root` of the [[process-drawable]] after the method returns @see [[process-drawable::16]]" - (when (zero? (logand (-> obj flags) (align-flags disabled))) + (when (not (logtest? (-> obj flags) (align-flags disabled))) (let* ((process (-> obj process)) (method-call (method-of-object process apply-alignment)) (transform (-> obj delta)) @@ -194,7 +186,7 @@ ) (defmethod align-vel-and-quat-only! align-control ((obj align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float)) - (when (zero? (logand (-> obj flags) (align-flags disabled))) + (when (not (logtest? (-> obj flags) (align-flags disabled))) (let ((s5-0 (-> obj delta))) (let ((a0-1 (-> obj process root transv))) (if (logtest? arg0 (align-opts adjust-y-vel)) @@ -224,7 +216,3 @@ ) (-> obj process root) ) - - - - diff --git a/goal_src/jak2/engine/anim/fma-sphere.gc b/goal_src/jak2/engine/anim/fma-sphere.gc index c1d398026d..be87910664 100644 --- a/goal_src/jak2/engine/anim/fma-sphere.gc +++ b/goal_src/jak2/engine/anim/fma-sphere.gc @@ -18,7 +18,6 @@ ;; ---fma-sphere-mode (declare-type fma-sphere process-drawable) -(define-extern fma-sphere-init-by-other (function fma-sphere-mode process-drawable int time-frame object object fma-sphere :behavior fma-sphere)) ;; DECOMP BEGINS @@ -157,6 +156,111 @@ :code (the-as (function none :behavior fma-sphere) sleep-code) ) -;; ERROR: failed type prop at 36: Could not figure out load: (set! a0 (l.q a0)) -;; WARN: Return type mismatch none vs fma-sphere. -;; ERROR: Unsupported inline assembly instruction kind - [sllv v1, v1, r0] +(defbehavior fma-sphere-init-by-other fma-sphere ((arg0 fma-sphere-mode) (arg1 process-drawable) (arg2 int) (arg3 time-frame) (arg4 vector) (arg5 vector)) + (set! (-> self mode) arg0) + (set! (-> self first-time?) #t) + (set! (-> self duration) arg3) + (cond + ((and arg1 (>= arg2 0)) + (set! (-> self track-joint) arg2) + (set! (-> self track-handle) (process->handle arg1)) + ) + (else + (set! (-> self track-joint) -1) + (set! (-> self track-handle) (the-as handle #f)) + ) + ) + (cond + (arg5 + (mem-copy! (the-as pointer (-> self danger)) (the-as pointer arg5) 54) + (cond + (arg4 + (set! (-> self sphere quad) (-> arg4 quad)) + (set! (-> self danger sphere quad) (-> arg4 quad)) + ) + (else + (set! (-> self sphere quad) (-> self danger sphere quad)) + ) + ) + ) + (arg4 + (set! (-> self sphere quad) (-> arg4 quad)) + (when (logtest? (-> self mode) (fma-sphere-mode danger)) + (set! (-> self danger sphere quad) (-> arg4 quad)) + (set! (-> self danger velocity quad) (the-as uint128 0)) + (set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r))) + (set! (-> self danger danger-level) 1.0) + (set! (-> self danger decay-rate) 0.0) + (set! (-> self danger flags) (the-as uint 1)) + (set! (-> self danger danger-type) (the-as uint 4)) + ) + ) + (else + (format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%") + (go empty-state) + ) + ) + (let ((gp-1 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere gp-1 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> gp-1 total-prims) (the-as uint 1)) + (set! (-> gp-1 root-prim) v1-24) + ) + (set! (-> gp-1 nav-radius) (* 0.75 (-> gp-1 root-prim local-sphere w))) + (let ((v1-27 (-> gp-1 root-prim))) + (set! (-> gp-1 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> gp-1 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> self root-override) gp-1) + ) + (let ((gp-2 (-> self root-override))) + (set! (-> gp-2 nav-radius) (-> self sphere r)) + (set! (-> gp-2 root-prim local-sphere w) (-> self sphere r)) + (set! (-> gp-2 trans quad) (-> self sphere quad)) + (set! (-> gp-2 trans w) 1.0) + (vector-identity! (-> gp-2 scale)) + (quaternion-identity! (-> gp-2 quat)) + (cond + ((logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (set! (-> gp-2 event-self) 'touched) + (let ((v1-35 (-> gp-2 root-prim))) + (set! (-> v1-35 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list)) + (logior! (-> v1-35 prim-core action) (collide-action deadly)) + ) + ) + (else + (let ((v1-36 (-> gp-2 root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + (update-transforms gp-2) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (when (logtest? (-> self mode) (fma-sphere-mode nav)) + (let ((a0-32 (find-nearest-nav-mesh (-> self root-override trans) #x7f800000))) + (cond + (a0-32 + (nav-mesh-method-29 a0-32 self #f) + ) + (else + (format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%") + (go empty-state) + ) + ) + ) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let* ((v1-53 *game-info*) + (a0-35 (+ (-> v1-53 attack-id) 1)) + ) + (set! (-> v1-53 attack-id) a0-35) + (set! (-> self attack-id) a0-35) + ) + ) + (go-virtual idle) + (none) + ) diff --git a/goal_src/jak2/engine/anim/joint-h.gc b/goal_src/jak2/engine/anim/joint-h.gc index 34c075e015..db34cd6a05 100644 --- a/goal_src/jak2/engine/anim/joint-h.gc +++ b/goal_src/jak2/engine/anim/joint-h.gc @@ -7,14 +7,18 @@ (defenum joint-control-command :type int64 + (zero 0) (push 1) (blend 2) + (four 4) (eight 8) (push1 19) + (thirty-two 32) (stack 36) (float 42) (stack1 52) ) + (declare-type joint-control basic) (defenum joint-control-status @@ -61,9 +65,9 @@ (base-anim-blend float :offset-assert 32) (interp float :offset-assert 36) (frame-group art-joint-anim :offset-assert 40) - (frame-group-push basic :offset-assert 44) + (frame-group-push art-joint-anim :offset-assert 44) (frame-num float :offset-assert 48) - (frame-targ basic :offset-assert 52) + (frame-targ art-joint-anim :offset-assert 52) (frame-speed float :offset-assert 56) (frame-blend float :offset-assert 60) (frame-cur-blend float :offset-assert 64) @@ -78,30 +82,31 @@ :size-assert #x68 :flag-assert #xd00000068 (:methods - (top-anim-joint-control-method-9 (_type_) none 9) - (top-anim-joint-control-method-10 (_type_) none 10) - (top-anim-joint-control-method-11 (_type_ int) joint-control-channel 11) - (top-anim-joint-control-method-12 (_type_ art-element float int int float float symbol) none 12) + (new (symbol type process-drawable) _type_ 0) + (reset (_type_) none 9) + (update (_type_) none 10) + (get-channel (_type_ int) joint-control-channel 11) + (push-anim-to-targ (_type_ art-joint-anim float int int float float symbol) none 12) ) ) (deftype joint-control (basic) - ((status joint-control-status :offset-assert 4) - (allocated-length uint8 :offset-assert 6) - (active-channels uint8 :offset-assert 7) - (root-channel (inline-array joint-control-channel) :offset 16) - (blend-index uint8 :offset-assert 20) - (active-frame-interp uint8 :offset-assert 21) - (float-channels uint8 :offset-assert 22) - (generate-frame-function function :offset-assert 24) - (prebind-function function :offset-assert 28) - (postbind-function function :offset-assert 32) - (effect effect-control :offset-assert 36) - (interp-select int64 2 :offset-assert 40) - (top-anim top-anim-joint-control :offset-assert 56) - (override (array float) :offset-assert 60) - (channel joint-control-channel :inline :dynamic :offset-assert 64) + ((status joint-control-status :offset-assert 4) + (allocated-length uint8 :offset-assert 6) + (active-channels uint8 :offset-assert 7) + (root-channel (inline-array joint-control-channel) :offset 16) + (blend-index uint8 :offset-assert 20) + (active-frame-interp uint8 :offset-assert 21) + (float-channels uint8 :offset-assert 22) + (generate-frame-function (function joint-anim-frame int joint-control int) :offset-assert 24) + (prebind-function (function joint-anim-frame int joint-control int) :offset-assert 28) + (postbind-function (function draw-control cspace-array joint-control none) :offset-assert 32) + (effect effect-control :offset-assert 36) + (interp-select int64 2 :offset-assert 40) + (top-anim top-anim-joint-control :offset-assert 56) + (override (array float) :offset-assert 60) + (channel joint-control-channel :inline :dynamic :offset-assert 64) ) :method-count-assert 12 :size-assert #x40 @@ -109,7 +114,7 @@ (:methods (new (symbol type int) _type_ 0) (current-cycle-distance (_type_) float 9) - (joint-control-method-10 (_type_) none 10) + (update-anim-data (_type_) none 10) (debug-print-channels (_type_ symbol) int 11) ) ) diff --git a/goal_src/jak2/engine/anim/joint-mod-h.gc b/goal_src/jak2/engine/anim/joint-mod-h.gc index 63f5b37a82..9e1d986f37 100644 --- a/goal_src/jak2/engine/anim/joint-mod-h.gc +++ b/goal_src/jak2/engine/anim/joint-mod-h.gc @@ -197,7 +197,7 @@ (set! (-> v0-0 angle) 0.0) (set-vector! (-> v0-0 last-position) 0.0 0.0 0.0 1.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-wheel-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-wheel-callback)) (set! (-> a0-3 param1) v0-0) ) v0-0 @@ -260,7 +260,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-set-local-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-local-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -318,7 +318,7 @@ (quaternion-copy! (-> gp-0 transform quat) *unity-quaternion*) (set! (-> gp-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-7 (-> arg0 node-list data arg1))) - (set! (-> a0-7 param0) joint-mod-add-local-callback) + (set! (-> a0-7 param0) (the-as (function cspace matrix none) joint-mod-add-local-callback)) (set! (-> a0-7 param1) gp-0) ) gp-0 @@ -357,7 +357,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-set-world-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-world-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -411,7 +411,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-blend-local-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-local-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -460,7 +460,7 @@ (set! (-> v0-0 enable) #t) (set! (-> v0-0 angle) 0.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-spinner-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-spinner-callback)) (set! (-> a0-3 param1) v0-0) ) v0-0 @@ -570,7 +570,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-blend-world-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-world-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -606,7 +606,7 @@ (set! (-> gp-0 enable) arg2) (quaternion-set! (-> gp-0 rotation) 0.0 0.0 0.0 1.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-rotate-local-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-rotate-local-callback)) (set! (-> a0-3 param1) gp-0) ) gp-0 diff --git a/goal_src/jak2/engine/anim/joint-mod.gc b/goal_src/jak2/engine/anim/joint-mod.gc index 2b6de6fae5..9285f2eb9a 100644 --- a/goal_src/jak2/engine/anim/joint-mod.gc +++ b/goal_src/jak2/engine/anim/joint-mod.gc @@ -313,7 +313,7 @@ (set! (-> v0-0 blend) 0.0) (logclear! (-> v0-0 flags) (joint-mod-ik-flags enable)) (let ((a0-5 (-> arg0 node-list data arg1))) - (set! (-> a0-5 param0) joint-mod-ik-callback) + (set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-ik-callback)) (set! (-> a0-5 param1) v0-0) (set! (-> a0-5 param2) (the-as basic arg1)) ) @@ -590,6 +590,7 @@ ) ) +;; WARN: Return type mismatch joint-mod vs none. (defmethod mode-set! joint-mod ((obj joint-mod) (arg0 joint-mod-mode)) (set! (-> obj mode) arg0) (let ((v1-0 (-> obj joint))) @@ -606,13 +607,13 @@ ) (((joint-mod-mode look-at)) (let ((a0-4 v1-0)) - (set! (-> a0-4 param0) joint-mod-look-at-handler) + (set! (-> a0-4 param0) (the-as (function cspace matrix none) joint-mod-look-at-handler)) (set! (-> a0-4 param1) obj) ) ) (((joint-mod-mode gun-look-at)) (let ((a0-5 v1-0)) - (set! (-> a0-5 param0) joint-mod-gun-look-at-handler) + (set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-gun-look-at-handler)) (set! (-> a0-5 param1) obj) ) ) @@ -620,20 +621,23 @@ (set-vector! (-> obj twist) 0.0 1.0 0.0 1.0) (let ((a0-7 v1-0)) (set! (-> a0-7 param0) - (lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none)) + (the-as + (function cspace matrix none) + (lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none)) + ) ) (set! (-> a0-7 param1) obj) ) ) (((joint-mod-mode world-look-at)) (let ((a0-8 v1-0)) - (set! (-> a0-8 param0) joint-mod-world-look-at-handler) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-world-look-at-handler)) (set! (-> a0-8 param1) obj) ) ) (((joint-mod-mode polar-look-at)) (let ((a0-9 v1-0)) - (set! (-> a0-9 param0) joint-mod-polar-look-at-handler) + (set! (-> a0-9 param0) (the-as (function cspace matrix none) joint-mod-polar-look-at-handler)) (set! (-> a0-9 param1) obj) ) (set! (-> obj polar-internal-tilt-max) 32768.0) @@ -643,21 +647,21 @@ ) (((joint-mod-mode rotate)) (let ((a0-11 v1-0)) - (set! (-> a0-11 param0) joint-mod-rotate-handler) + (set! (-> a0-11 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler)) (set! (-> a0-11 param1) obj) ) (set! (-> obj blend) 1.0) ) (((joint-mod-mode rotate2)) (let ((a0-13 v1-0)) - (set! (-> a0-13 param0) joint-mod-rotate-handler) + (set! (-> a0-13 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler)) (set! (-> a0-13 param1) obj) ) (set! (-> obj blend) 1.0) ) (((joint-mod-mode joint-set)) (let ((a0-15 v1-0)) - (set! (-> a0-15 param0) joint-mod-joint-set-handler) + (set! (-> a0-15 param0) (the-as (function cspace matrix none) joint-mod-joint-set-handler)) (set! (-> a0-15 param1) obj) ) (vector-reset! (-> obj trans)) @@ -666,7 +670,7 @@ ) (((joint-mod-mode joint-set-world)) (let ((a0-18 v1-0)) - (set! (-> a0-18 param0) joint-mod-joint-set-world-handler) + (set! (-> a0-18 param0) (the-as (function cspace matrix none) joint-mod-joint-set-world-handler)) (set! (-> a0-18 param1) obj) ) (vector-reset! (-> obj trans)) @@ -676,7 +680,7 @@ ) (((joint-mod-mode joint-set*)) (let ((a0-25 v1-0)) - (set! (-> a0-25 param0) joint-mod-joint-set*-handler) + (set! (-> a0-25 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-handler)) (set! (-> a0-25 param1) obj) ) (vector-reset! (-> obj trans)) @@ -685,7 +689,7 @@ ) (((joint-mod-mode joint-set*-world)) (let ((a0-29 v1-0)) - (set! (-> a0-29 param0) joint-mod-joint-set*-world-handler) + (set! (-> a0-29 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-world-handler)) (set! (-> a0-29 param1) obj) ) (vector-reset! (-> obj trans)) @@ -987,6 +991,7 @@ ) ) +;; WARN: Return type mismatch symbol vs none. (defbehavior joint-mod-polar-look-at-guts process ((arg0 cspace) (arg1 transformq)) (let ((gp-0 (the-as joint-mod (-> arg0 param1)))) (cspace<-parented-transformq-joint! arg0 arg1) @@ -1237,10 +1242,10 @@ ) ) ) - (if (zero? (logand (-> s5-0 track-mode) (track-mode no-trans))) + (if (not (logtest? (-> s5-0 track-mode) (track-mode no-trans))) (vector+! (-> arg1 trans) (-> arg1 trans) (-> s5-0 trans)) ) - (when (zero? (logand (-> s5-0 track-mode) (track-mode no-rotate))) + (when (not (logtest? (-> s5-0 track-mode) (track-mode no-rotate))) (let* ((v1-9 (-> s3-0 (-> s5-0 ear))) (a1-4 (quaternion-axis-angle! (new 'stack-no-clear 'quaternion) @@ -1279,7 +1284,7 @@ ) ) ) - (when (zero? (logand (-> s5-0 track-mode) (track-mode no-scale))) + (when (not (logtest? (-> s5-0 track-mode) (track-mode no-scale))) (let ((a1-9 (-> arg1 scale))) (let ((v1-22 (-> arg1 scale)) (a0-11 (-> s5-0 scale)) @@ -1333,13 +1338,13 @@ (defbehavior joint-mod-joint-set-handler process ((arg0 cspace) (arg1 transformq)) (let ((s4-0 (the-as joint-mod (-> arg0 param1)))) - (if (zero? (logand (-> s4-0 track-mode) (track-mode no-trans))) + (if (not (logtest? (-> s4-0 track-mode) (track-mode no-trans))) (set! (-> arg1 trans quad) (-> s4-0 trans quad)) ) - (if (zero? (logand (-> s4-0 track-mode) (track-mode no-rotate))) + (if (not (logtest? (-> s4-0 track-mode) (track-mode no-rotate))) (quaternion-copy! (-> arg1 quat) (-> s4-0 quat)) ) - (if (zero? (logand (-> s4-0 track-mode) (track-mode no-scale))) + (if (not (logtest? (-> s4-0 track-mode) (track-mode no-scale))) (set! (-> arg1 scale quad) (-> s4-0 scale quad)) ) ) @@ -1439,13 +1444,13 @@ ) (init-vf0-vector) (let ((s5-0 (the-as joint-mod (-> arg0 param1)))) - (if (zero? (logand (-> s5-0 track-mode) (track-mode no-trans))) + (if (not (logtest? (-> s5-0 track-mode) (track-mode no-trans))) (vector+! (-> arg1 trans) (-> arg1 trans) (-> s5-0 trans)) ) - (if (zero? (logand (-> s5-0 track-mode) (track-mode no-rotate))) + (if (not (logtest? (-> s5-0 track-mode) (track-mode no-rotate))) (quaternion-normalize! (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> s5-0 quat))) ) - (when (zero? (logand (-> s5-0 track-mode) (track-mode no-scale))) + (when (not (logtest? (-> s5-0 track-mode) (track-mode no-scale))) (let ((a1-4 (-> arg1 scale))) (let ((v1-11 (-> arg1 scale)) (a0-4 (-> s5-0 scale)) diff --git a/goal_src/jak2/engine/anim/mspace-h.gc b/goal_src/jak2/engine/anim/mspace-h.gc index 023d0bf1d1..5fc6df3e8f 100644 --- a/goal_src/jak2/engine/anim/mspace-h.gc +++ b/goal_src/jak2/engine/anim/mspace-h.gc @@ -60,14 +60,14 @@ (set! (-> skeleton heap-base) (the-as uint 80)) (deftype cspace (structure) - ((parent cspace :offset-assert 0) - (joint joint :offset-assert 4) - (joint-num int16 :offset-assert 8) - (geo basic :offset-assert 12) - (bone bone :offset-assert 16) - (param0 function :offset-assert 20) - (param1 basic :offset-assert 24) - (param2 basic :offset-assert 28) + ((parent cspace :offset-assert 0) + (joint joint :offset-assert 4) + (joint-num int16 :offset-assert 8) + (geo basic :offset-assert 12) + (bone bone :offset-assert 16) + (param0 (function cspace matrix none) :offset-assert 20) + (param1 basic :offset-assert 24) + (param2 basic :offset-assert 28) ) :method-count-assert 10 :size-assert #x20 diff --git a/goal_src/jak2/engine/common_objs/generic-obs.gc b/goal_src/jak2/engine/common_objs/generic-obs.gc index 67e4067404..2de0b9e56a 100644 --- a/goal_src/jak2/engine/common_objs/generic-obs.gc +++ b/goal_src/jak2/engine/common_objs/generic-obs.gc @@ -8,7 +8,7 @@ (define-extern ja-post (function none :behavior process-drawable)) (define-extern merc-blend-shape (function process-drawable object)) (define-extern merc-eye-anim (function process-drawable none)) -(define-extern process-grab? (function process symbol :behavior process)) +(define-extern process-grab? (function process symbol symbol :behavior process)) (define-extern process-release? (function process symbol :behavior process)) ;; NOTE - for guard-projectile @@ -63,8 +63,8 @@ (logior! (-> self draw status) (draw-control-status no-draw-temp)) ) ) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (let ((a0-22 (-> self skel effect))) (if a0-22 (effect-control-method-9 a0-22) diff --git a/goal_src/jak2/engine/common_objs/projectile.gc b/goal_src/jak2/engine/common_objs/projectile.gc index cf589ff9de..c1b0298252 100644 --- a/goal_src/jak2/engine/common_objs/projectile.gc +++ b/goal_src/jak2/engine/common_objs/projectile.gc @@ -389,7 +389,7 @@ (let ((v1-0 (-> self notify-handle))) (send-event (handle->process v1-0) 'notify 'die) ) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) diff --git a/goal_src/jak2/engine/common_objs/voicebox.gc b/goal_src/jak2/engine/common_objs/voicebox.gc index 09d8bccf04..83540ae8e0 100644 --- a/goal_src/jak2/engine/common_objs/voicebox.gc +++ b/goal_src/jak2/engine/common_objs/voicebox.gc @@ -385,7 +385,7 @@ (set! (-> self blend) 1.0) (send-event (ppointer->process (-> self parent-override)) 'change-state empty-state) (suspend) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) diff --git a/goal_src/jak2/engine/data/art-h.gc b/goal_src/jak2/engine/data/art-h.gc index b585fe50e9..ac749b3119 100644 --- a/goal_src/jak2/engine/data/art-h.gc +++ b/goal_src/jak2/engine/data/art-h.gc @@ -336,13 +336,13 @@ :size-assert #x31 :flag-assert #xa00000031 (:methods - (lod-set-method-9 () none 9) + (setup-lods! (_type_ skeleton-group art-group entity) _type_ 9) ) ) (deftype draw-control (basic) - ((process process :offset-assert 4) + ((process process-drawable :offset-assert 4) (status draw-control-status :offset-assert 8) (data-format draw-control-data-format :offset-assert 10) (global-effect draw-control-global-effect :offset-assert 11) @@ -389,11 +389,11 @@ (:methods (new (symbol type process symbol) _type_ 0) (get-skeleton-origin (_type_) vector 9) - (draw-control-method-10 () none 10) - (draw-control-method-11 () none 11) - (draw-control-method-12 (_type_ uint int) none 12) - (draw-control-method-13 () none 13) - (draw-control-method-14 (_type_ cspace-array joint-control) none 14) + (lod-set! (_type_ int) none 10) + (lods-assign! (_type_ lod-set) none 11) + (setup-masks (_type_ uint int) none 12) + (setup-cspace-and-add (_type_ art-joint-geo symbol) none 13) + (do-joint-math (_type_ cspace-array joint-control) none 14) ) ) diff --git a/goal_src/jak2/engine/game/game-h.gc b/goal_src/jak2/engine/game/game-h.gc index 6bedf1ea64..ed423a180c 100644 --- a/goal_src/jak2/engine/game/game-h.gc +++ b/goal_src/jak2/engine/game/game-h.gc @@ -108,12 +108,12 @@ :size-assert #xc8 :flag-assert #x14005000c8 (:methods - (initialize-skeleton (_type_ skeleton-group pair) none 14) + (initialize-skeleton (_type_ skeleton-group pair) draw-control 14) (initialize-skeleton-by-name (_type_ string) draw-control 15) - (apply-alignment (_type_ align-opts transformq vector) object 16) - (process-drawable-method-17 (_type_) none 17) - (process-drawable-method-18 () none 18) - (process-drawable-method-19 () none 19) + (apply-alignment (_type_ align-opts transformq vector) trsqv 16) + (cleanup-for-death (_type_) none 17) + (relocate-nav (_type_ int) none 18) + (evaluate-joint-control (_type_) none 19) ) ) diff --git a/goal_src/jak2/engine/game/task/task-arrow.gc b/goal_src/jak2/engine/game/task/task-arrow.gc index eac836ffcf..04d787bb7b 100644 --- a/goal_src/jak2/engine/game/task/task-arrow.gc +++ b/goal_src/jak2/engine/game/task/task-arrow.gc @@ -23,8 +23,8 @@ ;; DECOMP BEGINS -(defskelgroup skel-task-arrow ctywide-arrow 0 2 - ((1 (meters 999999))) +(defskelgroup skel-task-arrow ctywide-arrow ctywide-arrow-lod0-jg ctywide-arrow-idle-ja + ((ctywide-arrow-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 4) :texture-level 6 ) @@ -252,7 +252,7 @@ (while (-> self moving) (suspend) ) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) :post (behavior () @@ -264,7 +264,7 @@ (defstate die (task-arrow) :virtual #t :code (behavior () - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) diff --git a/goal_src/jak2/engine/game/task/task-control.gc b/goal_src/jak2/engine/game/task/task-control.gc index 9a6fa30770..9b77574045 100644 --- a/goal_src/jak2/engine/game/task/task-control.gc +++ b/goal_src/jak2/engine/game/task/task-control.gc @@ -555,7 +555,7 @@ (let ((node (-> game-nodes i))) (if (and (= (-> node level) (-> cur-lev info taskname)) (!= (-> node level) 'city) - (zero? (logand (game-task-node-flag no-restart) (-> node flags))) + (not (logtest? (game-task-node-flag no-restart) (-> node flags))) (open? node) ) (set! gp-1 (the-as int (-> node task))) @@ -663,7 +663,7 @@ (dotimes (i (-> game-nodes length)) (when (nonzero? i) (let ((node (-> game-nodes i))) - (when (and (zero? (logand (-> node flags) (game-task-node-flag closed))) + (when (and (not (logtest? (-> node flags) (game-task-node-flag closed))) (begin (dotimes (a3-3 4) (when (and (nonzero? (-> node parent-node a3-3)) @@ -710,7 +710,7 @@ ) (defmethod close! game-task-node-info ((obj game-task-node-info) (arg0 symbol)) - (when (zero? (logand (-> obj flags) (game-task-node-flag closed))) + (when (not (logtest? (-> obj flags) (game-task-node-flag closed))) (let ((task-node-close-func (lambda ((arg0 game-task-node-info)) (with-pp @@ -864,7 +864,7 @@ (let ((game-nodes (-> *game-info* sub-task-list)) (node-info obj) ) - (and (zero? (logand (-> node-info flags) (game-task-node-flag closed))) + (and (not (logtest? (-> node-info flags) (game-task-node-flag closed))) (begin (dotimes (pi 4) (let ((t0-0 (-> node-info parent-node pi))) @@ -994,7 +994,7 @@ ) (('try) (if (and (not (task-complete? *game-info* (-> node task))) - (or (zero? (logand (-> node flags) (game-task-node-flag save-on-life save-on-try))) + (or (not (logtest? (-> node flags) (game-task-node-flag save-on-life save-on-try))) (logtest? (-> node flags) (game-task-node-flag reset-on-try)) ) ) @@ -1416,7 +1416,7 @@ ) (defmethod print-text fail-mission ((obj fail-mission)) - (when (and (zero? (logand (-> obj flags) (fail-mission-flags famflags-6))) + (when (and (not (logtest? (-> obj flags) (fail-mission-flags famflags-6))) (= (gui-control-method-17 *gui-control* (the-as sound-id (-> obj message-id))) (gui-action playing)) ) (let ((gp-0 (new @@ -1477,8 +1477,8 @@ (defstate idle (fail-mission) :virtual #t - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('reset) (cond ((logtest? (-> self flags) (fail-mission-flags famflags-1)) @@ -1493,7 +1493,7 @@ ) ) (('query) - (case (-> arg3 param 0) + (case (-> event param 0) (('reset) (logtest? (-> self flags) (fail-mission-flags famflags-1)) ) @@ -1548,20 +1548,15 @@ ) ) (((fail-mission-message fammsg-1)) - (while (let ((t9-3 process-grab?) - (a0-17 *target*) - ) - 'dead - (not (t9-3 a0-17)) - ) + (while (not (process-grab? *target* 'dead)) (suspend) ) ) ) (logior! (-> self flags) (fail-mission-flags famflags-1)) (set! (-> self grabbed-time) (-> self clock frame-counter)) - (when (zero? (logand (-> self flags) (fail-mission-flags famflags-3))) - (when (zero? (logand (-> self flags) (fail-mission-flags famflags-5))) + (when (not (logtest? (-> self flags) (fail-mission-flags famflags-3))) + (when (not (logtest? (-> self flags) (fail-mission-flags famflags-5))) (while (< (- (-> self clock frame-counter) (-> self grabbed-time)) (seconds 1.5)) (let ((f30-0 (lerp-scale 0.0 1.0 (the float (- (-> self clock frame-counter) (-> self grabbed-time))) 0.0 450.0))) (set-filter-color! @@ -1651,14 +1646,14 @@ (defstate resetting (fail-mission) :virtual #t - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (let ((v1-0 arg2)) + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (let ((v1-0 event-type)) (the-as object (cond ((= v1-0 'reset) #t ) ((= v1-0 'query) - (case (-> arg3 param 0) + (case (-> event param 0) (('reset) #t ) @@ -1777,7 +1772,7 @@ (the-as (function gui-connection symbol) #f) (the-as process #f) ) - (when (zero? (logand (-> arg0 flags) (fail-mission-flags famflags-4))) + (when (not (logtest? (-> arg0 flags) (fail-mission-flags famflags-4))) (if (not (and *target* (logtest? (-> *target* focus-status) (focus-status dead)) (zero? (-> self message)))) (set! (-> self stinger) (the-as @@ -1792,7 +1787,7 @@ (set-setting! 'speech-control #f 0 0) (set! (-> self clock) (-> *display* base-clock)) (apply-settings *setting-control*) - (if (or (zero? (logand (-> self flags) (fail-mission-flags famflags-2))) + (if (or (not (logtest? (-> self flags) (fail-mission-flags famflags-2))) (nonzero? (-> self fail-message)) (= (-> self message) (fail-mission-message fammsg-1)) ) @@ -2065,7 +2060,7 @@ (with-pp (the-as symbol - (and (or (zero? (logand (-> obj node-info flags) (game-task-node-flag city-wait))) + (and (or (not (logtest? (-> obj node-info flags) (game-task-node-flag city-wait))) (let ((a0-2 (level-get-target-inside *level*))) (cond ((not (and a0-2 (logtest? (-> a0-2 info level-flags) 1))) @@ -2092,7 +2087,7 @@ :event task-manager-event-handler :trans (behavior () (if (or (and (nonzero? (-> self info final-node)) (task-node-closed? (-> self info final-node))) - (and (zero? (logand (-> self node-info flags) (game-task-node-flag closed))) + (and (not (logtest? (-> self node-info flags) (game-task-node-flag closed))) (not (open? (-> self node-info))) ) ) diff --git a/goal_src/jak2/engine/gfx/merc/merc-h.gc b/goal_src/jak2/engine/gfx/merc/merc-h.gc index 1686b1a1ba..c5af1a0811 100644 --- a/goal_src/jak2/engine/gfx/merc/merc-h.gc +++ b/goal_src/jak2/engine/gfx/merc/merc-h.gc @@ -21,6 +21,8 @@ :size-assert #x20 :flag-assert #x900000020 ) + + (set! (-> ripple-merc-query heap-base) (the-as uint 16)) (deftype merc-byte-header (structure) @@ -44,6 +46,7 @@ :flag-assert #x900000017 ) + (deftype merc-fragment (structure) ((header merc-byte-header :inline :offset-assert 0) (rest uint8 1 :offset-assert 23) @@ -56,6 +59,7 @@ ) ) + (deftype merc-vtx (structure) ((mat-0 uint8 :offset-assert 0) (mat-1 uint8 :offset-assert 1) @@ -75,6 +79,7 @@ :flag-assert #x90000000c ) + (deftype merc-fp-header (structure) ((x-add float :offset-assert 0) (y-add float :offset-assert 4) @@ -89,6 +94,8 @@ :flag-assert #x900000010 ) + +;; WARN: Return type mismatch int vs merc-fp-header. (defun merc-fragment-fp-data ((arg0 merc-fragment)) (the-as merc-fp-header (+ (the-as uint arg0) (* (-> arg0 header mm-quadword-fp-off) 16))) ) @@ -103,6 +110,7 @@ :flag-assert #x900000002 ) + (deftype merc-fragment-control (structure) ((unsigned-four-count uint8 :offset-assert 0) (lump-four-count uint8 :offset-assert 1) @@ -115,6 +123,7 @@ :flag-assert #x900000004 ) + (deftype merc-blend-data (structure) ((int8-data int8 :dynamic :offset-assert 0) ) @@ -123,6 +132,7 @@ :flag-assert #x900000000 ) + (deftype merc-blend-ctrl (structure) ((blend-vtx-count uint8 :offset-assert 0) (nonzero-index-count uint8 :offset-assert 1) @@ -133,6 +143,7 @@ :flag-assert #x900000002 ) + (deftype mei-envmap-tint (structure) ((fade0 float :offset-assert 0) (fade1 float :offset-assert 4) @@ -144,6 +155,7 @@ :flag-assert #x900000010 ) + (deftype mei-texture-scroll (structure) ((max-dist float :offset-assert 0) (st-int-scale uint8 :offset-assert 4) @@ -158,6 +170,7 @@ :flag-assert #x900000010 ) + (deftype mei-ripple (structure) ((x-base float :offset-assert 0) (z-base float :offset-assert 4) @@ -169,6 +182,7 @@ :flag-assert #x900000010 ) + (deftype merc-extra-info (structure) ((envmap-tint-offset uint8 :offset-assert 0) (shader-offset uint8 :offset-assert 1) @@ -181,6 +195,7 @@ :flag-assert #x900000010 ) + (deftype merc-effect (structure) ((frag-geo merc-fragment :offset-assert 0) (frag-ctrl merc-fragment-control :offset-assert 4) @@ -204,6 +219,7 @@ ) ) + (deftype merc-eye-ctrl (structure) ((eye-slot int8 :offset-assert 0) (shader-offset int8 :offset-assert 1) @@ -221,6 +237,7 @@ :flag-assert #x9000001f0 ) + (deftype merc-eye-anim-frame (structure) ((pupil-trans-x int8 :offset-assert 0) (pupil-trans-y int8 :offset-assert 1) @@ -236,6 +253,7 @@ :flag-assert #x900000008 ) + (deftype merc-eye-anim-block (structure) ((max-frame int16 :offset-assert 0) (data merc-eye-anim-frame :inline :dynamic :offset-assert 8) @@ -245,6 +263,7 @@ :flag-assert #x900000008 ) + (deftype texture-usage-group (structure) ((data texture-masks 7 :inline :offset-assert 0) ) @@ -253,6 +272,7 @@ :flag-assert #x900000150 ) + (deftype merc-ctrl-header (structure) ((xyz-scale float :offset-assert 0) (st-magic uint32 :offset-assert 4) @@ -307,9 +327,10 @@ :flag-assert #x900000080 ) + (deftype merc-ctrl (art-element) ((num-joints int32 :offset 20) - (seg-table basic :offset 24) + (seg-table (array uint64) :offset 24) (header merc-ctrl-header :inline :offset-assert 32) (effect merc-effect :inline :dynamic :offset-assert 160) ) @@ -318,6 +339,7 @@ :flag-assert #xd000000a0 ) + (deftype merc-vu1-low-mem (structure) ((tri-strip-gif gs-gif-tag :inline :offset-assert 0) (ad-gif gs-gif-tag :inline :offset-assert 16) @@ -330,6 +352,7 @@ :flag-assert #x900000080 ) + (deftype emerc-vu1-low-mem (structure) ((tri-strip-gif gs-gif-tag :inline :offset-assert 0) (ad-gif gs-gif-tag :inline :offset-assert 16) @@ -343,6 +366,7 @@ :flag-assert #x900000090 ) + (deftype ripple-wave (structure) ((scale float :offset-assert 0) (offs float :offset-assert 4) @@ -359,6 +383,7 @@ :flag-assert #x90000001c ) + (deftype ripple-wave-set (basic) ((count int32 :offset-assert 4) (converted basic :offset-assert 8) @@ -371,6 +396,7 @@ :flag-assert #x900000088 ) + (deftype ripple-control (basic) ((global-scale float :offset-assert 4) (last-frame-scale float :offset-assert 8) @@ -382,14 +408,15 @@ (send-query symbol :offset-assert 32) (query ripple-merc-query :offset-assert 36) ) - (:methods - (new (symbol type) _type_ 0) - ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 + (:methods + (new (symbol type) _type_ 0) + ) ) + (defmethod new ripple-control ((allocation symbol) (type-to-make type)) (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> v0-0 global-scale) 0.0) diff --git a/goal_src/jak2/engine/level/region.gc b/goal_src/jak2/engine/level/region.gc index 1806e1b8d9..79d34e8ca6 100644 --- a/goal_src/jak2/engine/level/region.gc +++ b/goal_src/jak2/engine/level/region.gc @@ -437,13 +437,13 @@ ) (defmethod drawable-tree-region-prim-method-17 drawable-tree-region-prim ((obj drawable-tree-region-prim) (arg0 vector)) - (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) arg0 0.0) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area (scratchpad-object region-prim-area)) pos)) arg0 0.0) (let* ((s5-0 (-> obj data2 (+ (-> obj length) -1) length)) (s4-0 0) (a0-8 (the-as object (+ (+ (* s4-0 32) 32) (the-as int (-> obj data2 (+ (-> obj length) -1)))))) ) (while (< s4-0 s5-0) - (if (within-area? (the-as drawable-region-prim a0-8) (the-as region-prim-area (+ #x70000000 0))) + (if (within-area? (the-as drawable-region-prim a0-8) (scratchpad-object region-prim-area)) (return #t) ) (+! s4-0 1) @@ -456,7 +456,7 @@ ;; WARN: Return type mismatch int vs symbol. (defmethod region-method-9 region ((obj region) (arg0 vector)) (local-vars (sv-16 int) (sv-32 int)) - (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) arg0 0.0) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area (scratchpad-object region-prim-area)) pos)) arg0 0.0) (dotimes (s5-0 (-> *level* length)) (let ((s4-0 (-> *level* level s5-0))) (when (= (-> s4-0 status) 'active) @@ -473,7 +473,7 @@ (if (and (= (-> (the-as drawable-region-prim sv-32) region) obj) (within-area? (the-as drawable-region-prim sv-32) - (the-as region-prim-area (-> (the-as region-prim-area #x70000000) region-prim-list)) + (the-as region-prim-area (-> (the-as region-prim-area (scratchpad-object region-prim-area)) region-prim-list)) ) ) (return (the-as symbol sv-32)) @@ -494,13 +494,13 @@ ) (defmethod debug-print drawable-tree-region-prim ((obj drawable-tree-region-prim) (arg0 vector) (arg1 object)) - (sphere<-vector+r! (the-as sphere (+ 1296 #x70000000)) arg0 0.0) + (sphere<-vector+r! (the-as sphere (+ 1296 (scratchpad-object int))) arg0 0.0) (let* ((s4-0 (-> obj data2 (+ (-> obj length) -1) length)) (s3-0 0) (s2-0 (the-as object (+ (+ (* s3-0 32) 32) (the-as int (-> obj data2 (+ (-> obj length) -1)))))) ) (while (< s3-0 s4-0) - (if (within-area? (the-as drawable-region-prim s2-0) (the-as region-prim-area (+ #x70000000 0))) + (if (within-area? (the-as drawable-region-prim s2-0) (the-as region-prim-area (+ (scratchpad-object int) 0))) (format arg1 " splitbox-~D ~A~%" @@ -521,15 +521,15 @@ (with-pp (set! sv-32 (vector-average! (new 'stack-no-clear 'vector) arg1 arg2)) (set! (-> sv-32 w) (* 0.5 (vector-vector-distance arg1 arg2))) - (set! (-> (the-as region-prim-area #x70000000) region-prim-list num-items) 0) - (set! (-> (the-as region-prim-area #x70000000) region-enter-count) 0) - (set! (-> (the-as region-prim-area #x70000000) region-exit-count) 0) - (set! (-> (the-as region-prim-area #x70000000) region-inside-count) 0) - (set! (-> (the-as region-prim-area #x70000000) region-start-count) 0) - (sphere<-vector+r! (the-as sphere (+ 1296 #x70000000)) arg1 0.0) - (sphere<-vector+r! (the-as sphere (+ 1312 #x70000000)) arg2 0.0) - (vector-! (the-as vector (+ 1328 #x70000000)) arg2 arg1) - (vector-! (the-as vector (+ 1344 #x70000000)) arg1 arg2) + (set! (-> (scratchpad-object region-prim-area) region-prim-list num-items) 0) + (set! (-> (scratchpad-object region-prim-area) region-enter-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-exit-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-inside-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-start-count) 0) + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) pos)) arg1 0.0) + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) unknown-vector-uiyb1)) arg2 0.0) + (vector-! (-> (scratchpad-object region-prim-area) ray) arg2 arg1) + (vector-! (-> (scratchpad-object region-prim-area) unknown-vector-t3edh) arg1 arg2) (dotimes (s5-1 (-> *level* length)) (let ((v1-17 (-> *level* level s5-1))) (when (= (-> v1-17 status) 'active) @@ -541,7 +541,7 @@ ) (while (< s2-0 s3-0) (if (= (-> a0-14 name) arg0) - (collect-regions a0-14 (the-as sphere sv-32) 0 (the-as region-prim-list (+ #x70000000 0))) + (collect-regions a0-14 (the-as sphere sv-32) 0 (-> (scratchpad-object region-prim-area) region-prim-list)) ) (+! s2-0 1) (set! a0-14 (-> s4-1 s2-0)) @@ -552,77 +552,59 @@ ) ) ) - (countdown (gp-1 (-> (the-as region-prim-area #x70000000) region-prim-list num-items)) + (countdown (gp-1 (-> (scratchpad-object region-prim-area) region-prim-list num-items)) (track-region - (-> (the-as region-prim-area (+ (* gp-1 4) #x70000000)) region-prim-list items 0) - (the-as region-prim-area (-> (the-as region-prim-area #x70000000) region-prim-list)) + (-> (scratchpad-object region-prim-area) region-prim-list items gp-1) + (the-as region-prim-area (-> (scratchpad-object region-prim-area) region-prim-list)) ) ) - (let ((gp-2 (-> (the-as region-prim-area #x70000000) region-enter-count))) + (let ((gp-2 (-> (scratchpad-object region-prim-area) region-enter-count))) (while (begin (label cfg-22) (nonzero? gp-2)) (+! gp-2 -1) - (let* ((a2-5 (-> (the-as region-prim-area (+ (* gp-2 4) #x70000000)) region-enter-list 0)) + (let* ((a2-5 (-> (scratchpad-object region-prim-area) region-enter-list gp-2)) (s5-2 (-> a2-5 region-prim-list items 0)) ) (when s5-2 - (countdown (v1-47 (-> (the-as region-prim-area #x70000000) region-start-count)) - (if (= a2-5 (-> (the-as region-prim-area #x70000000) region-start-list v1-47)) + (countdown (v1-47 (-> (scratchpad-object region-prim-area) region-start-count)) + (if (= a2-5 (-> (scratchpad-object region-prim-area) region-start-list v1-47)) (goto cfg-22) ) ) (eval! - (new - 'stack - 'script-context - (the-as basic a2-5) - pp - (-> (the-as region-prim-area (+ (* gp-2 4) #x70000000)) region-enter-prim-list 0 bsphere) - ) + (new 'stack 'script-context (the-as basic a2-5) pp (-> (scratchpad-object region-prim-area) region-enter-prim-list gp-2 bsphere)) (the-as pair s5-2) ) ) ) ) ) - (let ((gp-3 (-> (the-as region-prim-area #x70000000) region-exit-count))) + (let ((gp-3 (-> (scratchpad-object region-prim-area) region-exit-count))) (while (begin (label cfg-31) (nonzero? gp-3)) (+! gp-3 -1) - (let* ((a2-6 (-> (the-as region-prim-area (+ (* gp-3 4) #x70000000)) region-exit-list 0)) + (let* ((a2-6 (-> (scratchpad-object region-prim-area) region-exit-list gp-3)) (s5-3 (-> a2-6 region-prim-list items 2)) ) (when s5-3 - (countdown (v1-64 (-> (the-as region-prim-area #x70000000) region-inside-count)) - (if (= a2-6 (-> (the-as region-prim-area (+ (* v1-64 4) #x70000000)) region-inside-list 0)) + (countdown (v1-64 (-> (scratchpad-object region-prim-area) region-inside-count)) + (if (= a2-6 (-> (scratchpad-object region-prim-area) region-inside-list v1-64)) (goto cfg-31) ) ) (eval! - (new - 'stack - 'script-context - (the-as basic a2-6) - pp - (-> (the-as region-prim-area (+ (* gp-3 4) #x70000000)) region-exit-prim-list 0 bsphere) - ) + (new 'stack 'script-context (the-as basic a2-6) pp (-> (scratchpad-object region-prim-area) region-exit-prim-list gp-3 bsphere)) (the-as pair s5-3) ) ) ) ) ) - (countdown (gp-4 (-> (the-as region-prim-area #x70000000) region-inside-count)) - (let* ((a2-7 (-> (the-as region-prim-area (+ (* gp-4 4) #x70000000)) region-inside-list 0)) + (countdown (gp-4 (-> (scratchpad-object region-prim-area) region-inside-count)) + (let* ((a2-7 (-> (scratchpad-object region-prim-area) region-inside-list gp-4)) (s5-4 (-> a2-7 region-prim-list items 1)) ) (if s5-4 (eval! - (new - 'stack - 'script-context - (the-as basic a2-7) - pp - (-> (the-as region-prim-area (+ (* gp-4 4) #x70000000)) region-inside-prim-list 0 bsphere) - ) + (new 'stack 'script-context (the-as basic a2-7) pp (-> (scratchpad-object region-prim-area) region-inside-prim-list gp-4 bsphere)) (the-as pair s5-4) ) ) diff --git a/goal_src/jak2/engine/nav/nav-mesh-h.gc b/goal_src/jak2/engine/nav/nav-mesh-h.gc index a94fe21fa2..d88d231fb5 100644 --- a/goal_src/jak2/engine/nav/nav-mesh-h.gc +++ b/goal_src/jak2/engine/nav/nav-mesh-h.gc @@ -14,8 +14,8 @@ (declare-type grid-hash basic) (declare-type sphere-hash grid-hash) -;; NOTE - for basebutton (define-extern nav-mesh-connect-from-ent (function entity-nav-mesh none)) +(define-extern find-nearest-nav-mesh (function vector int nav-mesh)) ;; DECOMP BEGINS diff --git a/goal_src/jak2/engine/scene/scene.gc b/goal_src/jak2/engine/scene/scene.gc index c9f8cbd54d..de2712a07c 100644 --- a/goal_src/jak2/engine/scene/scene.gc +++ b/goal_src/jak2/engine/scene/scene.gc @@ -25,7 +25,7 @@ (set! (-> arg0 name) (-> obj anim)) (set! (-> arg0 anim-name) (-> obj anim)) (set! (-> arg0 parts) (the-as int (-> obj parts))) - (set! (-> arg0 command-list) (the-as pair (-> obj command-list))) + (set! (-> arg0 command-list) (-> obj command-list)) (none) ) @@ -51,7 +51,7 @@ (defmethod scene-actor-method-9 scene-actor ((obj scene-actor) (arg0 scene-player)) (local-vars (s4-0 (pointer process)) (sv-96 process) (sv-112 process)) (let ((s1-0 (if (-> obj level) - (level-get *level* (the-as symbol (-> obj level))) + (level-get *level* (-> obj level)) (-> *level* default-level) ) ) @@ -478,7 +478,7 @@ (let ((s2-0 (-> gp-0 actor s3-3))) (set! (-> s2-0 process) (the-as handle #f)) (let ((s1-0 (if (-> s2-0 level) - (level-get *level* (the-as symbol (-> s2-0 level))) + (level-get *level* (-> s2-0 level)) (-> *level* default-level) ) ) @@ -886,10 +886,11 @@ :enter (behavior ((arg0 symbol)) (set! (-> self state-time) (-> self clock frame-counter)) (when (or (-> self scene) (-> self preload-continue)) - (let ((gp-0 (scene-decode-continue (if (-> self scene) - (-> self scene load-point) - (-> self preload-continue) - ) + (let ((gp-0 (scene-decode-continue (the-as basic (if (-> self scene) + (-> self scene load-point-obj) + (-> self preload-continue) + ) + ) ) ) ) @@ -982,13 +983,9 @@ (let ((s5-0 (-> self clock frame-counter))) (when (and *target* (zero? (logand (-> *target* focus-status) (focus-status grabbed)))) (label cfg-44) - (let ((t9-3 process-grab?) - (a0-17 *target*) - ) - (when (not (t9-3 a0-17)) - (suspend) - (goto cfg-44) - ) + (when (not (process-grab? *target* #f)) + (suspend) + (goto cfg-44) ) ) (process-entity-status! self (entity-perm-status no-kill) #t) @@ -1181,8 +1178,8 @@ ) ) (cond - ((and *target* (-> self scene) (-> self scene end-point)) - (let ((gp-3 (scene-decode-continue (-> self scene end-point)))) + ((and *target* (-> self scene) (-> self scene end-point-obj)) + (let ((gp-3 (scene-decode-continue (the-as basic (-> self scene end-point-obj))))) (when gp-3 (set-continue! *game-info* gp-3 #f) (send-event *target* 'continue gp-3) @@ -1309,7 +1306,7 @@ (when (and (< (-> self scene-index) (-> self scene-list length)) (not (-> self aborted?))) (let ((v1-41 (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t))) (when v1-41 - (let ((a0-21 (scene-decode-continue (-> v1-41 load-point)))) + (let ((a0-21 (scene-decode-continue (the-as basic (-> v1-41 load-point-obj))))) (set! a0-24 (when (and a0-21 (logtest? (-> a0-21 flags) (continue-flags cf1))) (go-virtual wait a0-24) a0-24 diff --git a/goal_src/jak2/engine/spatial-hash/spatial-hash-h.gc b/goal_src/jak2/engine/spatial-hash/spatial-hash-h.gc index 5ead921ef2..d02b8dd8cd 100644 --- a/goal_src/jak2/engine/spatial-hash/spatial-hash-h.gc +++ b/goal_src/jak2/engine/spatial-hash/spatial-hash-h.gc @@ -105,7 +105,7 @@ (sphere-hash-method-30 (_type_ find-nav-sphere-ids-params) none 30) (sphere-hash-method-31 (_type_ vector int int) none 31) (sphere-hash-method-32 (_type_ vector vector float int) symbol 32) - (sphere-hash-method-33 (_type_ sphere int) none 33) + (remove-by-id (_type_ sphere int) none 33) ) ) diff --git a/goal_src/jak2/engine/target/board/target-board.gc b/goal_src/jak2/engine/target/board/target-board.gc index 43b555a63d..806f05b93a 100644 --- a/goal_src/jak2/engine/target/board/target-board.gc +++ b/goal_src/jak2/engine/target/board/target-board.gc @@ -593,7 +593,7 @@ (logclear! (-> self control root-prim prim-core action) (collide-action can-ride)) (set! (-> self control unknown-float29) 1.0) (let ((v1-82 (-> self node-list data))) - (set! (-> v1-82 0 param0) cspace<-transformq+world-trans!) + (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))) (set! (-> v1-82 0 param2) (the-as basic (-> self control cspace-offset))) ) @@ -670,7 +670,7 @@ (remove-setting! 'string-spline-max-move-player) (remove-setting! 'string-spline-accel-player) (let ((v1-43 (-> self node-list data))) - (set! (-> v1-43 0 param0) cspace<-transformq+trans!) + (set! (-> v1-43 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!)) (set! (-> v1-43 0 param1) (the-as basic (-> self control trans))) (set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset))) ) diff --git a/goal_src/jak2/engine/target/logic-target.gc b/goal_src/jak2/engine/target/logic-target.gc index 42abba948a..d8ab903bb7 100644 --- a/goal_src/jak2/engine/target/logic-target.gc +++ b/goal_src/jak2/engine/target/logic-target.gc @@ -1826,11 +1826,11 @@ (when (!= (-> self beard?) v1-248) (cond (v1-248 - (draw-control-method-12 (-> self draw) (the-as uint 2) 0) + (setup-masks (-> self draw) (the-as uint 2) 0) (set! (-> self beard?) #t) ) (else - (draw-control-method-12 (-> self draw) (the-as uint 0) 2) + (setup-masks (-> self draw) (the-as uint 0) 2) (set! (-> self beard?) #f) ) ) @@ -2176,8 +2176,8 @@ ) ) (set-quaternion! (-> self control) (-> self control dir-targ)) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) ) @@ -2240,8 +2240,8 @@ ) ) (set! (-> self control unknown-float33) 0.0) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) ) @@ -2326,8 +2326,8 @@ ) ) (set-quaternion! (-> self control) (-> self control dir-targ)) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (update-transforms (-> self control)) (none) ) @@ -3258,7 +3258,7 @@ ) (logior! (-> obj skel effect flags) (effect-control-flag ecf0 ecf1)) (let ((v1-94 (-> obj node-list data))) - (set! (-> v1-94 0 param0) cspace<-transformq+trans!) + (set! (-> v1-94 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!)) (set! (-> v1-94 0 param1) (the-as basic (-> obj control trans))) (set! (-> v1-94 0 param2) (the-as basic (-> obj control cspace-offset))) ) diff --git a/goal_src/jak2/engine/target/sidekick.gc b/goal_src/jak2/engine/target/sidekick.gc index c20fef62f8..f98855725b 100644 --- a/goal_src/jak2/engine/target/sidekick.gc +++ b/goal_src/jak2/engine/target/sidekick.gc @@ -9,7 +9,7 @@ (define-extern init-sidekick (function none :behavior sidekick)) ;; DECOMP BEGINS -;; failed to figure out what this is: + (defskelgroup skel-sidekick daxter daxter-lod0-jg -1 ((daxter-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) @@ -21,7 +21,6 @@ :shadow-joint-index 6 ) -;; failed to figure out what this is: (defskelgroup skel-sidekick-highres daxter-highres daxter-highres-lod0-jg -1 ((daxter-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) @@ -32,7 +31,6 @@ :shadow-joint-index 6 ) -;; definition for symbol *sidekick-remap*, type pair (define *sidekick-remap* '(("run-to-stance-left" "run-to-stance") ("run-to-stance-loop-left" "run-to-stance-loop") @@ -116,7 +114,6 @@ ) ) -;; definition for function cspace<-cspace+transformq! (defun cspace<-cspace+transformq! ((arg0 cspace) (arg1 cspace) (arg2 transformq)) (rlet ((acc :class vf) (Q :class vf) @@ -157,8 +154,6 @@ ) ) -;; definition for function target-sidekick-setup -;; WARN: Return type mismatch int vs none. (defbehavior target-sidekick-setup target ((arg0 symbol)) (if (zero? (-> self sidekick)) (set! (-> self sidekick) (the-as (pointer sidekick) #f)) @@ -178,7 +173,6 @@ (none) ) -;; failed to figure out what this is: (defstate sidekick-clone (sidekick) :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) (local-vars (v0-0 object)) @@ -187,7 +181,9 @@ (case (-> event param 0) (('play-anim) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (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 node-list data)) ) @@ -195,7 +191,9 @@ ) (('copy-parent) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data)) ) @@ -203,7 +201,9 @@ ) (('root) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace-normalized!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data)) ) @@ -211,7 +211,9 @@ ) (('indax) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-transformq+trans!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-transformq+trans!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 control trans)) ) @@ -221,7 +223,9 @@ ) (('board) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace-normalized!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data 25)) ) @@ -229,7 +233,9 @@ ) (else (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (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)) ) @@ -358,7 +364,7 @@ (set! (-> self offset trans y) (* 204.8 f0-3)) (set! (-> self offset trans z) (* 409.6 f0-3)) ) - (joint-control-method-10 (-> self skel)) + (update-anim-data (-> self skel)) (when *debug-segment* (let ((gp-2 (-> *display* frames (-> *display* on-screen) profile-array data 0)) (v1-132 'target-post) @@ -381,7 +387,7 @@ ) 0 ) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (when *debug-segment* (let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))) (when (and *dproc* *debug-segment*) @@ -482,7 +488,7 @@ (send-event (ppointer->process gp-4) 'mirror #t) (set! (-> self mirror) gp-4) (let ((v0-29 (-> gp-4 0 node-list data))) - (set! (-> v0-29 0 param0) cspace<-cspace!) + (set! (-> v0-29 0 param0) (the-as (function cspace matrix none) cspace<-cspace!)) (set! (-> v0-29 0 param1) (the-as basic (-> self node-list data))) (set! (-> v0-29 0 param2) #f) ) @@ -494,7 +500,6 @@ ) ) -;; definition for function init-sidekick ;; WARN: Return type mismatch object vs none. (defbehavior init-sidekick sidekick () (set! (-> self mask) (logior (process-mask sidekick) (-> self mask))) @@ -510,7 +515,7 @@ (logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim)) (set! (-> self draw light-index) (the-as uint 30)) (let ((v1-14 (-> self node-list data))) - (set! (-> v1-14 0 param0) cspace<-cspace+transformq!) + (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 param2) (the-as basic (-> self offset))) ) @@ -519,7 +524,3 @@ (go sidekick-clone) (none) ) - - - - diff --git a/goal_src/jak2/engine/target/target-gun.gc b/goal_src/jak2/engine/target/target-gun.gc index c0b9f14cd7..52df5e702f 100644 --- a/goal_src/jak2/engine/target/target-gun.gc +++ b/goal_src/jak2/engine/target/target-gun.gc @@ -166,8 +166,7 @@ (set! (-> self gun latch?) #f) (set! (-> self gun put-away?) #f) (set! (-> self gun charge-active?) (the-as handle #f)) - self - (set! (-> self skel top-anim) (new 'process 'top-anim-joint-control)) + (set! (-> self skel top-anim) (new 'process 'top-anim-joint-control self)) (set! (-> self skel interp-select 0) 0) (set! (-> self skel interp-select 1) 0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) @@ -203,7 +202,7 @@ ) (mode-set! (-> gp-0 hips) (joint-mod-mode rotate)) (set! (-> gp-0 gun-roty) (y-angle (-> self control))) - (top-anim-joint-control-method-9 (-> self skel top-anim)) + (reset (-> self skel top-anim)) (set! (-> self skel top-anim interp) 1.0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist-targ))) @@ -248,9 +247,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 229) + (the-as art-joint-anim (-> self draw art-group data 229)) 0.0 0 15 @@ -260,9 +259,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 198) + (the-as art-joint-anim (-> self draw art-group data 198)) 0.0 0 15 @@ -272,9 +271,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 230) + (the-as art-joint-anim (-> self draw art-group data 230)) 0.0 0 15 @@ -284,9 +283,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 231) + (the-as art-joint-anim (-> self draw art-group data 231)) 0.0 0 15 @@ -300,9 +299,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 265) + (the-as art-joint-anim (-> self draw art-group data 265)) 0.0 0 15 @@ -312,9 +311,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 263) + (the-as art-joint-anim (-> self draw art-group data 263)) 0.0 0 15 @@ -324,9 +323,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 266) + (the-as art-joint-anim (-> self draw art-group data 266)) 0.0 0 15 @@ -336,9 +335,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 264) + (the-as art-joint-anim (-> self draw art-group data 264)) 0.0 0 15 @@ -389,9 +388,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 229) + (the-as art-joint-anim (-> self draw art-group data 229)) 0.0 10 0 @@ -402,9 +401,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 198) + (the-as art-joint-anim (-> self draw art-group data 198)) 0.0 10 0 @@ -415,9 +414,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 230) + (the-as art-joint-anim (-> self draw art-group data 230)) 0.0 10 0 @@ -428,9 +427,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 231) + (the-as art-joint-anim (-> self draw art-group data 231)) 0.0 10 0 @@ -448,9 +447,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 265) + (the-as art-joint-anim (-> self draw art-group data 265)) 0.0 10 0 @@ -461,9 +460,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 263) + (the-as art-joint-anim (-> self draw art-group data 263)) 0.0 10 0 @@ -474,9 +473,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 266) + (the-as art-joint-anim (-> self draw art-group data 266)) 14.0 10 0 @@ -487,9 +486,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 264) + (the-as art-joint-anim (-> self draw art-group data 264)) 0.0 10 0 @@ -721,9 +720,9 @@ (let ((v1-164 arg0)) (cond ((and (= s5-0 (pickup-type eco-red)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 225) + (the-as art-joint-anim (-> self draw art-group data 225)) 0.0 30 19 @@ -733,9 +732,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 225) + (the-as art-joint-anim (-> self draw art-group data 225)) 0.0 30 0 @@ -745,9 +744,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 19 @@ -757,9 +756,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 0 @@ -769,9 +768,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 19 @@ -781,9 +780,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 0 @@ -793,9 +792,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 228) + (the-as art-joint-anim (-> self draw art-group data 228)) 0.0 30 19 @@ -805,9 +804,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 228) + (the-as art-joint-anim (-> self draw art-group data 228)) 0.0 30 0 @@ -817,9 +816,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 19 @@ -829,9 +828,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 19 @@ -841,9 +840,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 0 @@ -853,9 +852,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 0 @@ -872,9 +871,9 @@ (cond ((and (= s5-0 (pickup-type eco-red)) (= v1-227 4)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 30 19 @@ -882,9 +881,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-1")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -896,9 +895,9 @@ ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 2)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 30 19 @@ -906,9 +905,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-1")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -920,9 +919,9 @@ ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 1)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -930,9 +929,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-2")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 270) + (the-as art-joint-anim (-> self draw art-group data 270)) 0.0 19 19 @@ -944,9 +943,9 @@ ) ((and (= s5-0 (pickup-type eco-red)) (= v1-227 1)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -954,9 +953,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-2")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 270) + (the-as art-joint-anim (-> self draw art-group data 270)) 0.0 19 19 @@ -967,9 +966,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 19 19 @@ -979,9 +978,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 19 19 @@ -991,9 +990,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 19 19 @@ -1003,9 +1002,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 19 19 @@ -1015,9 +1014,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 272) + (the-as art-joint-anim (-> self draw art-group data 272)) 0.0 19 19 @@ -1027,9 +1026,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 272) + (the-as art-joint-anim (-> self draw art-group data 272)) 0.0 19 19 @@ -1039,9 +1038,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 30 19 @@ -1051,9 +1050,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 252) + (the-as art-joint-anim (-> self draw art-group data 252)) 0.0 19 19 @@ -1408,9 +1407,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 220) + (the-as art-joint-anim (-> self draw art-group data 220)) 0.0 arg0 0 @@ -1420,9 +1419,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 221) + (the-as art-joint-anim (-> self draw art-group data 221)) 0.0 arg0 0 @@ -1432,9 +1431,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 218) + (the-as art-joint-anim (-> self draw art-group data 218)) 0.0 arg0 0 @@ -1444,9 +1443,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 219) + (the-as art-joint-anim (-> self draw art-group data 219)) 0.0 arg0 0 @@ -1460,9 +1459,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 254) + (the-as art-joint-anim (-> self draw art-group data 254)) 0.0 arg0 0 @@ -1476,9 +1475,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 255) + (the-as art-joint-anim (-> self draw art-group data 255)) 0.0 arg0 0 @@ -1488,9 +1487,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 244) + (the-as art-joint-anim (-> self draw art-group data 244)) 0.0 arg0 0 @@ -1500,9 +1499,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 253) + (the-as art-joint-anim (-> self draw art-group data 253)) 0.0 arg0 0 @@ -1929,7 +1928,7 @@ ((and (and v1-17 (or (= v1-17 self) (= v1-17 (-> self draw art-group data 261)))) (< (-> self gun top-anim-low-high) 0.5) ) - (let ((s5-0 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-0 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -1953,9 +1952,9 @@ ) ) (seek! (-> self gun top-anim-low-high) 0.0 (* 6.0 (-> self clock seconds-per-frame))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 247) + (the-as art-joint-anim (-> self draw art-group data 247)) 0.0 0 60 @@ -1976,7 +1975,7 @@ (let ((v1-67 (ja-group))) (cond ((and v1-67 (or (= v1-67 self) (= v1-67 (-> self draw art-group data 12)))) - (let ((s5-1 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-1 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -2007,9 +2006,9 @@ ) ) (seek! (-> self gun top-anim-low-high) 0.0 (* 6.0 (-> self clock seconds-per-frame))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 295) + (the-as art-joint-anim (-> self draw art-group data 295)) 0.0 0 30 @@ -2031,7 +2030,7 @@ (>= (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 0.2)) ) ) - (let ((s5-2 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-2 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 262) (-> self draw art-group data 303) @@ -2054,7 +2053,7 @@ ((let ((v1-150 (ja-group))) (and v1-150 (or (= v1-150 self) (= v1-150 (-> self draw art-group data 12)))) ) - (let ((s5-3 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-3 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -2129,10 +2128,7 @@ (set! (-> self gun gun-daxter) (if (and (logtest? (-> self focus-status) (focus-status pilot-riding)) (nonzero? (-> self skel float-channels)) - (= (-> (top-anim-joint-control-method-11 (-> self skel top-anim) (the-as int (+ (-> self skel float-channels) -1))) - frame-interp - 1 - ) + (= (-> (get-channel (-> self skel top-anim) (the-as int (+ (-> self skel float-channels) -1))) frame-interp 1) 1.0 ) ) @@ -2145,7 +2141,7 @@ (set! (-> self gun gun-roty-targ) (y-angle (-> self control))) (set! (-> self gun gun-roty) (-> self gun gun-roty-targ)) (set! (-> self gun gun-roty-rel) 0.0) - (let ((v1-24 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-24 (get-channel (-> self skel top-anim) 0))) (cond ((not v1-24) ) @@ -2357,15 +2353,15 @@ (((pickup-type eco-blue)) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (let ((v1-15 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-15 (get-channel (-> self skel top-anim) 0))) (when (not (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 206)) (and v1-15 (= (-> v1-15 frame-group) (-> self draw art-group data 206))) ) ) (if (< 4096.0 (-> self control unknown-float05)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 207) + (the-as art-joint-anim (-> self draw art-group data 207)) 1.0 9 9 @@ -2373,9 +2369,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 207) + (the-as art-joint-anim (-> self draw art-group data 207)) 1.0 6 6 @@ -2388,15 +2384,15 @@ ) ) (else - (let ((v1-32 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-32 (get-channel (-> self skel top-anim) 0))) (when (not (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 257)) (and v1-32 (= (-> v1-32 frame-group) (-> self draw art-group data 257))) ) ) (if (< 4096.0 (-> self control unknown-float05)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 258) + (the-as art-joint-anim (-> self draw art-group data 258)) 1.0 9 9 @@ -2404,9 +2400,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 258) + (the-as art-joint-anim (-> self draw art-group data 258)) 1.0 6 6 @@ -2424,9 +2420,9 @@ (((pickup-type eco-yellow)) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 223) + (the-as art-joint-anim (-> self draw art-group data 223)) 0.0 15 0 @@ -2436,9 +2432,9 @@ ) ) ((< (-> self gun top-anim-low-high) 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 246) + (the-as art-joint-anim (-> self draw art-group data 246)) 0.0 15 0 @@ -2449,9 +2445,9 @@ (set! (-> self gun top-anim-low-high) 1.0) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 260) + (the-as art-joint-anim (-> self draw art-group data 260)) 0.0 0 0 @@ -2472,9 +2468,9 @@ ) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 222) + (the-as art-joint-anim (-> self draw art-group data 222)) 0.0 15 0 @@ -2487,9 +2483,9 @@ ) ) ((< 0.5 (-> self gun top-anim-low-high)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 292) + (the-as art-joint-anim (-> self draw art-group data 292)) 0.0 0 15 @@ -2500,9 +2496,9 @@ (set! (-> self gun top-anim-low-high) 0.0) ) ((and (rand-vu-percent? 0.2) (< (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 2))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 293) + (the-as art-joint-anim (-> self draw art-group data 293)) 0.0 0 15 @@ -2517,9 +2513,9 @@ ((and (or (rand-vu-percent? 0.2) (= (-> self skel top-anim frame-targ) (-> self draw art-group data 256))) (< (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 2)) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 291) + (the-as art-joint-anim (-> self draw art-group data 291)) 0.0 0 15 @@ -2530,9 +2526,9 @@ (set! (-> self gun top-anim-low-high) 1.0) ) ((logtest? (-> self game features) (game-feature gun-upgrade-speed)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 309) + (the-as art-joint-anim (-> self draw art-group data 309)) 0.0 0 15 @@ -2542,9 +2538,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 256) + (the-as art-joint-anim (-> self draw art-group data 256)) 1.0 0 15 @@ -2559,9 +2555,9 @@ ) (((pickup-type eco-dark)) (if (logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 224) + (the-as art-joint-anim (-> self draw art-group data 224)) 0.0 0 15 @@ -2569,9 +2565,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 259) + (the-as art-joint-anim (-> self draw art-group data 259)) 0.0 0 15 @@ -2734,12 +2730,13 @@ (f0-24 (- f0-23 (* (the float (the int (/ f0-23 4.0))) 4.0))) ) (set! (-> self gun top-anim-blue-cycle) f0-24) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (if (logtest? (-> self focus-status) (focus-status pilot-riding)) - (-> self draw art-group data 206) - (-> self draw art-group data 257) - ) + (the-as art-joint-anim (if (logtest? (-> self focus-status) (focus-status pilot-riding)) + (-> self draw art-group data 206) + (-> self draw art-group data 257) + ) + ) (* 6.0 f0-24) 0 5 diff --git a/goal_src/jak2/engine/target/target-util.gc b/goal_src/jak2/engine/target/target-util.gc index 4848a2863b..91f8680b54 100644 --- a/goal_src/jak2/engine/target/target-util.gc +++ b/goal_src/jak2/engine/target/target-util.gc @@ -1027,7 +1027,7 @@ ) ) -;; WARN: Return type mismatch control-info vs object. +;; WARN: Return type mismatch control-info vs trsqv. (defmethod apply-alignment target ((obj target) (arg0 align-opts) (arg1 transformq) (arg2 vector)) (with-pp (let ((s2-0 (new 'stack-no-clear 'vector))) @@ -1077,7 +1077,7 @@ (quaternion*! (-> obj control quat-for-control) (-> obj control quat-for-control) (-> arg1 quat)) ) ) - (the-as object (-> obj control)) + (the-as trsqv (-> obj control)) ) ) diff --git a/goal_src/jak2/engine/target/target.gc b/goal_src/jak2/engine/target/target.gc index 84a4de7e9a..fb24df6200 100644 --- a/goal_src/jak2/engine/target/target.gc +++ b/goal_src/jak2/engine/target/target.gc @@ -867,9 +867,9 @@ (cond ((using-gun? self) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.7))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 283) + (the-as art-joint-anim (-> self draw art-group data 283)) 0.0 0 30 @@ -971,7 +971,7 @@ (can-exit-duck? self) ) (if (and (using-gun? self) - (begin (set! v1-22 (top-anim-joint-control-method-11 (-> self skel top-anim) 0)) v1-22) + (begin (set! v1-22 (get-channel (-> self skel top-anim) 0)) v1-22) (= (-> v1-22 frame-group) (-> self draw art-group data 283)) ) (target-top-anim-base-mode 60) @@ -1063,7 +1063,7 @@ ) (defbehavior target-jump-top-anim target () - (let ((gp-0 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((gp-0 (get-channel (-> self skel top-anim) 0))) (when gp-0 (let ((s5-0 (-> gp-0 frame-group)) (f0-0 (ja-aframe-num 0)) @@ -1193,9 +1193,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 0.0 30 30 @@ -1205,9 +1205,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 0.0 30 30 @@ -1326,9 +1326,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 3.0 30 30 @@ -1338,9 +1338,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 3.0 30 30 @@ -1445,9 +1445,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 7.0 30 30 @@ -1457,9 +1457,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 7.0 30 30 @@ -1703,9 +1703,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 0.0 30 30 @@ -1715,9 +1715,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 0.0 30 30 @@ -1915,9 +1915,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 305) + (the-as art-joint-anim (-> self draw art-group data 305)) 0.0 30 30 @@ -1927,9 +1927,9 @@ ) ) (((pickup-type eco-red) (pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 301) + (the-as art-joint-anim (-> self draw art-group data 301)) 0.0 30 30 @@ -1939,9 +1939,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 301) + (the-as art-joint-anim (-> self draw art-group data 301)) 0.0 30 30 @@ -2169,9 +2169,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 248) + (the-as art-joint-anim (-> self draw art-group data 248)) 0.0 30 30 @@ -2183,9 +2183,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -3276.8) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 250) + (the-as art-joint-anim (-> self draw art-group data 250)) 0.0 30 30 @@ -2196,9 +2196,9 @@ (set! gp-0 (-> self draw art-group data 250)) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 248) + (the-as art-joint-anim (-> self draw art-group data 248)) 0.0 30 30 @@ -2263,9 +2263,9 @@ (when (zero? (-> self gun track-target-hold-time)) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 251) + (the-as art-joint-anim (-> self draw art-group data 251)) 0.0 0 60 @@ -2276,9 +2276,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -3640.889) ) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 249) + (the-as art-joint-anim (-> self draw art-group data 249)) 0.0 0 60 @@ -2289,9 +2289,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -5461.3335) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 249) + (the-as art-joint-anim (-> self draw art-group data 249)) 0.0 0 60 @@ -2563,9 +2563,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 273) + (the-as art-joint-anim (-> self draw art-group data 273)) 0.0 30 60 @@ -2576,9 +2576,9 @@ (set! gp-1 (-> self draw art-group data 275)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 275) + (the-as art-joint-anim (-> self draw art-group data 275)) 0.0 30 60 @@ -2589,9 +2589,9 @@ (set! gp-1 (-> self draw art-group data 275)) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 273) + (the-as art-joint-anim (-> self draw art-group data 273)) 0.0 30 60 @@ -2793,9 +2793,9 @@ (when (zero? (-> self gun track-target-hold-time)) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 276) + (the-as art-joint-anim (-> self draw art-group data 276)) 0.0 0 60 @@ -2805,9 +2805,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 274) + (the-as art-joint-anim (-> self draw art-group data 274)) 0.0 0 60 @@ -3118,9 +3118,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 279) + (the-as art-joint-anim (-> self draw art-group data 279)) f30-0 5 30 @@ -3138,9 +3138,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 267) + (the-as art-joint-anim (-> self draw art-group data 267)) f30-0 5 30 @@ -3316,7 +3316,7 @@ (when (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 267)) (= (-> self skel top-anim frame-group) (-> self draw art-group data 279)) ) - (let ((v1-10 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-10 (get-channel (-> self skel top-anim) 0))) (if v1-10 (set! (-> v1-10 param 1) 0.9) ) @@ -3460,7 +3460,7 @@ (none) ) :exit (behavior () - (let ((v1-2 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-2 (get-channel (-> self skel top-anim) 0))) (when v1-2 (case (-> v1-2 frame-group) (((-> self draw art-group data 286)) @@ -3561,9 +3561,9 @@ ) :code (behavior ((arg0 float) (arg1 float) (arg2 float)) (if (using-gun? self) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 286) + (the-as art-joint-anim (-> self draw art-group data 286)) 0.0 0 30 @@ -3594,7 +3594,7 @@ (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) (target-danger-set! 'flop-down #f) - (let ((v1-56 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-56 (get-channel (-> self skel top-anim) 0))) (if (and v1-56 (= (-> v1-56 frame-group) (-> self draw art-group data 286))) (set! (-> v1-56 param 1) 0.0) ) @@ -3857,9 +3857,9 @@ (cond ((using-gun? self) (set! (-> self gun top-anim-low-high) 0.0) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 282) + (the-as art-joint-anim (-> self draw art-group data 282)) 0.0 15 30 @@ -4034,9 +4034,9 @@ (ja :group! (-> self draw art-group data 61) :num! min) (when (using-gun? self) (set! (-> self gun top-anim-low-high) 0.0) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 284) + (the-as art-joint-anim (-> self draw art-group data 284)) 0.0 0 30 diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index 1573b95a84..cb94a8c9b1 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -208,11 +208,11 @@ (set! (-> self draw color-mult z) 0.8) (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) (logior! (-> self draw status) (draw-control-status hud)) - (draw-control-method-12 (-> self draw) (the-as uint 1) 0) - (draw-control-method-12 (-> self draw) (the-as uint 0) 2046) + (setup-masks (-> self draw) (the-as uint 1) 0) + (setup-masks (-> self draw) (the-as uint 0) 2046) (cond ((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-kiosk-graphic-remap* (mod @@ -224,7 +224,7 @@ ) ) ((and (= *cheat-mode* #f) (demo?)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-demo-graphic-remap* (mod @@ -236,7 +236,7 @@ ) ) (else - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-graphic-remap* (mod @@ -267,10 +267,10 @@ (-> (the-as progress (-> self parent-override 0)) node-list data (-> self joint-idx)) ) (when (-> (the-as progress (-> self parent-override 0)) main-menu) - (draw-control-method-12 (-> self draw) (the-as uint 0) 2046) + (setup-masks (-> self draw) (the-as uint 0) 2046) (cond ((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-kiosk-graphic-remap* (mod @@ -282,7 +282,7 @@ ) ) ((and (= *cheat-mode* #f) (demo?)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-demo-graphic-remap* (mod @@ -294,7 +294,7 @@ ) ) (else - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-graphic-remap* (mod @@ -1275,25 +1275,13 @@ 0 ) +;; WARN: Failed store: (s.w! (+ v1-8 8) 0) at op 19 +;; WARN: Failed store: (s.w! (+ v1-8 12) 0) at op 20 (defun end-scan ((arg0 hud-box) (arg1 float)) - (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) - (gp-0 (-> s5-0 base)) - ) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id bucket-320) + ) (hud-box-method-13 arg0 s5-0 arg1) - (let ((a3-0 (-> s5-0 base))) - (let ((v1-8 (the-as object (-> s5-0 base)))) - (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) - (set! (-> s5-0 base) (the-as pointer (&+ (the-as dma-packet v1-8) 16))) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-320) - gp-0 - (the-as (pointer dma-tag) a3-0) - ) - ) ) 0 ) diff --git a/goal_src/jak2/levels/common/cty-guard-turret-button.gc b/goal_src/jak2/levels/common/cty-guard-turret-button.gc index c0f56e2def..960c8b4f1e 100644 --- a/goal_src/jak2/levels/common/cty-guard-turret-button.gc +++ b/goal_src/jak2/levels/common/cty-guard-turret-button.gc @@ -131,18 +131,18 @@ (defmethod idle-state-transition cty-guard-turret-button ((obj cty-guard-turret-button)) "If `button-status` has [[button-status:0]] set, transition to [[basebutton::27]] otherwise, [[basebutton::30]]" - (draw-control-method-12 (-> obj draw) (the-as uint 0) -1) + (setup-masks (-> obj draw) (the-as uint 0) -1) (cond ((logtest? (-> obj button-status) (button-status pressed)) (format #t "off~%") - (draw-control-method-12 (-> obj draw) (the-as uint 4) 0) - (draw-control-method-12 (-> obj draw) (the-as uint 1) 0) + (setup-masks (-> obj draw) (the-as uint 4) 0) + (setup-masks (-> obj draw) (the-as uint 1) 0) (go (method-of-object obj down-idle)) ) (else (format #t "on~%") - (draw-control-method-12 (-> obj draw) (the-as uint 4) 0) - (draw-control-method-12 (-> obj draw) (the-as uint 2) 0) + (setup-masks (-> obj draw) (the-as uint 4) 0) + (setup-masks (-> obj draw) (the-as uint 2) 0) (go (method-of-object obj pop-up)) ) ) @@ -153,9 +153,9 @@ :enter (behavior () (sound-play "gturret-button") (format #t "going-down off~%") - (draw-control-method-12 (-> self draw) (the-as uint 0) -1) - (draw-control-method-12 (-> self draw) (the-as uint 4) 0) - (draw-control-method-12 (-> self draw) (the-as uint 1) 0) + (setup-masks (-> self draw) (the-as uint 0) -1) + (setup-masks (-> self draw) (the-as uint 4) 0) + (setup-masks (-> self draw) (the-as uint 1) 0) (press! self #t) (none) ) diff --git a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc index 8e193a9831..2932fa5da6 100644 --- a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc @@ -13,7 +13,7 @@ (vf6 :class vf) ) (init-vf0-vector) - (joint-control-method-10 (-> obj process skel)) + (update-anim-data (-> obj process skel)) (let ((s5-0 (-> obj process skel active-channels))) (dotimes (s4-0 (the-as int s5-0)) (let* ((a0-4 (-> obj process skel channel s4-0)) diff --git a/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc b/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc new file mode 100644 index 0000000000..49d345a357 --- /dev/null +++ b/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc @@ -0,0 +1,277 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fma-sphere +(deftype fma-sphere (process-drawable) + ((root-override collide-shape :offset 128) + (first-time? symbol :offset-assert 200) + (mode fma-sphere-mode :offset-assert 204) + (track-handle handle :offset-assert 208) + (track-joint int32 :offset-assert 216) + (attack-id uint32 :offset-assert 220) + (duration time-frame :offset-assert 224) + (sphere sphere :inline :offset-assert 240) + (danger traffic-danger-info :inline :offset-assert 256) + ) + :heap-base #xc0 + :method-count-assert 21 + :size-assert #x136 + :flag-assert #x1500c00136 + (:methods + (idle () _type_ :state 20) + ) + ) + +;; definition for method 3 of type fma-sphere +(defmethod inspect fma-sphere ((obj fma-sphere)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~2Tfirst-time?: ~A~%" (-> obj first-time?)) + (format #t "~2Tmode: ~D~%" (-> obj mode)) + (format #t "~2Ttrack-handle: ~D~%" (-> obj track-handle)) + (format #t "~2Ttrack-joint: ~D~%" (-> obj track-joint)) + (format #t "~2Tattack-id: ~D~%" (-> obj attack-id)) + (format #t "~2Tduration: ~D~%" (-> obj duration)) + (format #t "~2Tstate-time: ~D~%" (-> obj state-time)) + (format #t "~2Tsphere: #~%" (-> obj sphere)) + (format #t "~2Tdanger: #~%" (-> obj danger)) + (label cfg-4) + obj + ) + +;; definition for method 12 of type fma-sphere +(defmethod run-logic? fma-sphere ((obj fma-sphere)) + (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> obj mode) (fma-sphere-mode nav))) + (logtest? (-> obj mode) (fma-sphere-mode deadly-overlap)) + (>= (-> obj track-joint) 0) + (-> obj first-time?) + ) + ) + +;; failed to figure out what this is: +(defstate idle (fma-sphere) + :virtual #t + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type + (('touched) + (let ((v1-1 (-> event param 0))) + (when v1-1 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'attack) + (set! (-> a1-2 param 0) v1-1) + (let ((v1-2 (new 'static 'attack-info :mask (attack-info-mask mode id attacker-velocity damage knock)))) + (set! (-> v1-2 id) (-> self attack-id)) + (set! (-> v1-2 mode) 'eco-red) + (set! (-> v1-2 attacker-velocity quad) (-> self root-override transv quad)) + (set! (-> v1-2 damage) 2.0) + (set! (-> v1-2 knock) (the-as uint 2)) + (set! (-> a1-2 param 1) (the-as uint v1-2)) + ) + (send-event-function proc a1-2) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self state-time) (-> self clock frame-counter)) + (set! (-> self first-time?) #f) + (if (logtest? (-> self mode) (fma-sphere-mode kill-once)) + (send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere)) + ) + (none) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> self duration))) + (if (and (nonzero? v1-0) (>= (- (-> self clock frame-counter) (-> self state-time)) v1-0)) + (go empty-state) + ) + ) + (let ((v1-5 (-> self track-joint))) + (when (>= v1-5 0) + (let ((a2-0 (handle->process (-> self track-handle))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when a2-0 + (set! (-> gp-0 quad) (-> self sphere quad)) + (set! (-> gp-0 w) 1.0) + (vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform)) + (let ((v1-9 (-> self root-override))) + (vector-! (-> v1-9 transv) gp-0 (-> v1-9 trans)) + (let ((a0-12 (-> v1-9 transv))) + (.lvf vf1 (&-> (-> v1-9 transv) quad)) + (let ((f0-1 (-> self clock frames-per-second))) + (.mov at-0 f0-1) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-12 quad) vf1) + ) + ) + (move-to-point! (-> self root-override) gp-0) + (set! (-> self danger sphere x) (-> gp-0 x)) + (set! (-> self danger sphere y) (-> gp-0 y)) + (set! (-> self danger sphere z) (-> gp-0 z)) + ) + ) + ) + ) + (if (logtest? (-> self mode) (fma-sphere-mode danger)) + (send-event *traffic-manager* 'add-danger-sphere (-> self danger)) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let ((a1-10 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-10 options) (overlaps-others-options)) + (set! (-> a1-10 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-10 tlist) *touching-list*) + (find-overlapping-shapes (-> self root-override) a1-10) + ) + ) + (if (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> self mode) (fma-sphere-mode nav))) + ) + (add-debug-sphere + #t + (bucket-id debug2) + (-> self root-override trans) + (-> self sphere r) + (new 'static 'rgba :r #x80 :g #x40 :a #x80) + ) + ) + (none) + ) + ) + :code (the-as (function none :behavior fma-sphere) sleep-code) + ) + +;; definition for function fma-sphere-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior fma-sphere-init-by-other fma-sphere ((arg0 fma-sphere-mode) (arg1 process-drawable) (arg2 int) (arg3 time-frame) (arg4 vector) (arg5 vector)) + (set! (-> self mode) arg0) + (set! (-> self first-time?) #t) + (set! (-> self duration) arg3) + (cond + ((and arg1 (>= arg2 0)) + (set! (-> self track-joint) arg2) + (set! (-> self track-handle) (process->handle arg1)) + ) + (else + (set! (-> self track-joint) -1) + (set! (-> self track-handle) (the-as handle #f)) + ) + ) + (cond + (arg5 + (mem-copy! (the-as pointer (-> self danger)) (the-as pointer arg5) 54) + (cond + (arg4 + (set! (-> self sphere quad) (-> arg4 quad)) + (set! (-> self danger sphere quad) (-> arg4 quad)) + ) + (else + (set! (-> self sphere quad) (-> self danger sphere quad)) + ) + ) + ) + (arg4 + (set! (-> self sphere quad) (-> arg4 quad)) + (when (logtest? (-> self mode) (fma-sphere-mode danger)) + (set! (-> self danger sphere quad) (-> arg4 quad)) + (set! (-> self danger velocity quad) (the-as uint128 0)) + (set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r))) + (set! (-> self danger danger-level) 1.0) + (set! (-> self danger decay-rate) 0.0) + (set! (-> self danger flags) (the-as uint 1)) + (set! (-> self danger danger-type) (the-as uint 4)) + ) + ) + (else + (format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%") + (go empty-state) + ) + ) + (let ((gp-1 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere gp-1 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> gp-1 total-prims) (the-as uint 1)) + (set! (-> gp-1 root-prim) v1-24) + ) + (set! (-> gp-1 nav-radius) (* 0.75 (-> gp-1 root-prim local-sphere w))) + (let ((v1-27 (-> gp-1 root-prim))) + (set! (-> gp-1 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> gp-1 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> self root-override) gp-1) + ) + (let ((gp-2 (-> self root-override))) + (set! (-> gp-2 nav-radius) (-> self sphere r)) + (set! (-> gp-2 root-prim local-sphere w) (-> self sphere r)) + (set! (-> gp-2 trans quad) (-> self sphere quad)) + (set! (-> gp-2 trans w) 1.0) + (vector-identity! (-> gp-2 scale)) + (quaternion-identity! (-> gp-2 quat)) + (cond + ((logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (set! (-> gp-2 event-self) 'touched) + (let ((v1-35 (-> gp-2 root-prim))) + (set! (-> v1-35 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list)) + (logior! (-> v1-35 prim-core action) (collide-action deadly)) + ) + ) + (else + (let ((v1-36 (-> gp-2 root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + (update-transforms gp-2) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (when (logtest? (-> self mode) (fma-sphere-mode nav)) + (let ((a0-32 (find-nearest-nav-mesh (-> self root-override trans) #x7f800000))) + (cond + (a0-32 + (nav-mesh-method-29 a0-32 self #f) + ) + (else + (format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%") + (go empty-state) + ) + ) + ) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let* ((v1-53 *game-info*) + (a0-35 (+ (-> v1-53 attack-id) 1)) + ) + (set! (-> v1-53 attack-id) a0-35) + (set! (-> self attack-id) a0-35) + ) + ) + (go-virtual idle) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak2/engine/anim/joint-h_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-h_REF.gc index 0d405b7709..969d0710d1 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-h_REF.gc @@ -89,9 +89,9 @@ (base-anim-blend float :offset-assert 32) (interp float :offset-assert 36) (frame-group art-joint-anim :offset-assert 40) - (frame-group-push basic :offset-assert 44) + (frame-group-push art-joint-anim :offset-assert 44) (frame-num float :offset-assert 48) - (frame-targ basic :offset-assert 52) + (frame-targ art-joint-anim :offset-assert 52) (frame-speed float :offset-assert 56) (frame-blend float :offset-assert 60) (frame-cur-blend float :offset-assert 64) @@ -106,10 +106,11 @@ :size-assert #x68 :flag-assert #xd00000068 (:methods - (top-anim-joint-control-method-9 (_type_) none 9) - (top-anim-joint-control-method-10 (_type_) none 10) - (top-anim-joint-control-method-11 (_type_ int) joint-control-channel 11) - (top-anim-joint-control-method-12 (_type_ art-element float int int float float symbol) none 12) + (new (symbol type process-drawable) _type_ 0) + (reset (_type_) none 9) + (update (_type_) none 10) + (get-channel (_type_ int) joint-control-channel 11) + (push-anim-to-targ (_type_ art-joint-anim float int int float float symbol) none 12) ) ) @@ -145,21 +146,21 @@ ;; definition of type joint-control (deftype joint-control (basic) - ((status joint-control-status :offset-assert 4) - (allocated-length uint8 :offset-assert 6) - (active-channels uint8 :offset-assert 7) - (root-channel (inline-array joint-control-channel) :offset 16) - (blend-index uint8 :offset-assert 20) - (active-frame-interp uint8 :offset-assert 21) - (float-channels uint8 :offset-assert 22) - (generate-frame-function function :offset-assert 24) - (prebind-function function :offset-assert 28) - (postbind-function function :offset-assert 32) - (effect effect-control :offset-assert 36) - (interp-select int64 2 :offset-assert 40) - (top-anim top-anim-joint-control :offset-assert 56) - (override (array float) :offset-assert 60) - (channel joint-control-channel :inline :dynamic :offset-assert 64) + ((status joint-control-status :offset-assert 4) + (allocated-length uint8 :offset-assert 6) + (active-channels uint8 :offset-assert 7) + (root-channel (inline-array joint-control-channel) :offset 16) + (blend-index uint8 :offset-assert 20) + (active-frame-interp uint8 :offset-assert 21) + (float-channels uint8 :offset-assert 22) + (generate-frame-function (function joint-anim-frame int joint-control int) :offset-assert 24) + (prebind-function (function joint-anim-frame int joint-control int) :offset-assert 28) + (postbind-function (function draw-control cspace-array joint-control none) :offset-assert 32) + (effect effect-control :offset-assert 36) + (interp-select int64 2 :offset-assert 40) + (top-anim top-anim-joint-control :offset-assert 56) + (override (array float) :offset-assert 60) + (channel joint-control-channel :inline :dynamic :offset-assert 64) ) :method-count-assert 12 :size-assert #x40 @@ -167,7 +168,7 @@ (:methods (new (symbol type int) _type_ 0) (current-cycle-distance (_type_) float 9) - (joint-control-method-10 (_type_) none 10) + (update-anim-data (_type_) none 10) (debug-print-channels (_type_ symbol) int 11) ) ) diff --git a/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc index c3cec7f984..2c5af8b0b7 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc @@ -248,7 +248,7 @@ (set! (-> v0-0 angle) 0.0) (set-vector! (-> v0-0 last-position) 0.0 0.0 0.0 1.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-wheel-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-wheel-callback)) (set! (-> a0-3 param1) v0-0) ) v0-0 @@ -331,7 +331,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-set-local-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-local-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -408,7 +408,7 @@ (quaternion-copy! (-> gp-0 transform quat) *unity-quaternion*) (set! (-> gp-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-7 (-> arg0 node-list data arg1))) - (set! (-> a0-7 param0) joint-mod-add-local-callback) + (set! (-> a0-7 param0) (the-as (function cspace matrix none) joint-mod-add-local-callback)) (set! (-> a0-7 param1) gp-0) ) gp-0 @@ -464,7 +464,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-set-world-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-set-world-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -537,7 +537,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-blend-local-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-local-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -604,7 +604,7 @@ (set! (-> v0-0 enable) #t) (set! (-> v0-0 angle) 0.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-spinner-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-spinner-callback)) (set! (-> a0-3 param1) v0-0) ) v0-0 @@ -734,7 +734,7 @@ (set! (-> v0-0 transform quat vec quad) (-> *null-vector* quad)) (set! (-> v0-0 transform scale quad) (-> *identity-vector* quad)) (let ((a0-8 (-> arg0 node-list data arg1))) - (set! (-> a0-8 param0) joint-mod-blend-world-callback) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-blend-world-callback)) (set! (-> a0-8 param1) v0-0) ) v0-0 @@ -785,7 +785,7 @@ (set! (-> gp-0 enable) arg2) (quaternion-set! (-> gp-0 rotation) 0.0 0.0 0.0 1.0) (let ((a0-3 (-> arg0 node-list data arg1))) - (set! (-> a0-3 param0) joint-mod-rotate-local-callback) + (set! (-> a0-3 param0) (the-as (function cspace matrix none) joint-mod-rotate-local-callback)) (set! (-> a0-3 param1) gp-0) ) gp-0 diff --git a/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc index b7072b2ccd..0975107be3 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc @@ -297,7 +297,7 @@ (set! (-> v0-0 blend) 0.0) (logclear! (-> v0-0 flags) (joint-mod-ik-flags enable)) (let ((a0-5 (-> arg0 node-list data arg1))) - (set! (-> a0-5 param0) joint-mod-ik-callback) + (set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-ik-callback)) (set! (-> a0-5 param1) v0-0) (set! (-> a0-5 param2) (the-as basic arg1)) ) @@ -604,13 +604,13 @@ ) (((joint-mod-mode look-at)) (let ((a0-4 v1-0)) - (set! (-> a0-4 param0) joint-mod-look-at-handler) + (set! (-> a0-4 param0) (the-as (function cspace matrix none) joint-mod-look-at-handler)) (set! (-> a0-4 param1) obj) ) ) (((joint-mod-mode gun-look-at)) (let ((a0-5 v1-0)) - (set! (-> a0-5 param0) joint-mod-gun-look-at-handler) + (set! (-> a0-5 param0) (the-as (function cspace matrix none) joint-mod-gun-look-at-handler)) (set! (-> a0-5 param1) obj) ) ) @@ -618,20 +618,23 @@ (set-vector! (-> obj twist) 0.0 1.0 0.0 1.0) (let ((a0-7 v1-0)) (set! (-> a0-7 param0) - (lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none)) + (the-as + (function cspace matrix none) + (lambda ((arg0 cspace) (arg1 transformq)) (joint-mod-foot-rot-handler arg0 arg1) (none)) + ) ) (set! (-> a0-7 param1) obj) ) ) (((joint-mod-mode world-look-at)) (let ((a0-8 v1-0)) - (set! (-> a0-8 param0) joint-mod-world-look-at-handler) + (set! (-> a0-8 param0) (the-as (function cspace matrix none) joint-mod-world-look-at-handler)) (set! (-> a0-8 param1) obj) ) ) (((joint-mod-mode polar-look-at)) (let ((a0-9 v1-0)) - (set! (-> a0-9 param0) joint-mod-polar-look-at-handler) + (set! (-> a0-9 param0) (the-as (function cspace matrix none) joint-mod-polar-look-at-handler)) (set! (-> a0-9 param1) obj) ) (set! (-> obj polar-internal-tilt-max) 32768.0) @@ -641,21 +644,21 @@ ) (((joint-mod-mode rotate)) (let ((a0-11 v1-0)) - (set! (-> a0-11 param0) joint-mod-rotate-handler) + (set! (-> a0-11 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler)) (set! (-> a0-11 param1) obj) ) (set! (-> obj blend) 1.0) ) (((joint-mod-mode rotate2)) (let ((a0-13 v1-0)) - (set! (-> a0-13 param0) joint-mod-rotate-handler) + (set! (-> a0-13 param0) (the-as (function cspace matrix none) joint-mod-rotate-handler)) (set! (-> a0-13 param1) obj) ) (set! (-> obj blend) 1.0) ) (((joint-mod-mode joint-set)) (let ((a0-15 v1-0)) - (set! (-> a0-15 param0) joint-mod-joint-set-handler) + (set! (-> a0-15 param0) (the-as (function cspace matrix none) joint-mod-joint-set-handler)) (set! (-> a0-15 param1) obj) ) (vector-reset! (-> obj trans)) @@ -664,7 +667,7 @@ ) (((joint-mod-mode joint-set-world)) (let ((a0-18 v1-0)) - (set! (-> a0-18 param0) joint-mod-joint-set-world-handler) + (set! (-> a0-18 param0) (the-as (function cspace matrix none) joint-mod-joint-set-world-handler)) (set! (-> a0-18 param1) obj) ) (vector-reset! (-> obj trans)) @@ -674,7 +677,7 @@ ) (((joint-mod-mode joint-set*)) (let ((a0-25 v1-0)) - (set! (-> a0-25 param0) joint-mod-joint-set*-handler) + (set! (-> a0-25 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-handler)) (set! (-> a0-25 param1) obj) ) (vector-reset! (-> obj trans)) @@ -683,7 +686,7 @@ ) (((joint-mod-mode joint-set*-world)) (let ((a0-29 v1-0)) - (set! (-> a0-29 param0) joint-mod-joint-set*-world-handler) + (set! (-> a0-29 param0) (the-as (function cspace matrix none) joint-mod-joint-set*-world-handler)) (set! (-> a0-29 param1) obj) ) (vector-reset! (-> obj trans)) diff --git a/test/decompiler/reference/jak2/engine/anim/mspace-h_REF.gc b/test/decompiler/reference/jak2/engine/anim/mspace-h_REF.gc index 8396e24dc3..b5bc169e5c 100644 --- a/test/decompiler/reference/jak2/engine/anim/mspace-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/mspace-h_REF.gc @@ -108,14 +108,14 @@ ;; definition of type cspace (deftype cspace (structure) - ((parent cspace :offset-assert 0) - (joint joint :offset-assert 4) - (joint-num int16 :offset-assert 8) - (geo basic :offset-assert 12) - (bone bone :offset-assert 16) - (param0 function :offset-assert 20) - (param1 basic :offset-assert 24) - (param2 basic :offset-assert 28) + ((parent cspace :offset-assert 0) + (joint joint :offset-assert 4) + (joint-num int16 :offset-assert 8) + (geo basic :offset-assert 12) + (bone bone :offset-assert 16) + (param0 (function cspace matrix none) :offset-assert 20) + (param1 basic :offset-assert 24) + (param2 basic :offset-assert 28) ) :method-count-assert 10 :size-assert #x20 diff --git a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc index 2dc2ff4619..e2c14de2b9 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc @@ -418,7 +418,7 @@ (let ((v1-0 (-> self notify-handle))) (send-event (handle->process v1-0) 'notify 'die) ) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) 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 e4e5fe2ebb..60c41c5692 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc @@ -443,7 +443,7 @@ (set! (-> self blend) 1.0) (send-event (ppointer->process (-> self parent-override)) 'change-state empty-state) (suspend) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) diff --git a/test/decompiler/reference/jak2/engine/data/art-h_REF.gc b/test/decompiler/reference/jak2/engine/data/art-h_REF.gc index 250f5f9d12..d1476e0291 100644 --- a/test/decompiler/reference/jak2/engine/data/art-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/data/art-h_REF.gc @@ -544,7 +544,7 @@ :size-assert #x31 :flag-assert #xa00000031 (:methods - (lod-set-method-9 () none 9) + (setup-lods! (_type_ skeleton-group art-group entity) _type_ 9) ) ) @@ -563,7 +563,7 @@ ;; definition of type draw-control (deftype draw-control (basic) - ((process process :offset-assert 4) + ((process process-drawable :offset-assert 4) (status draw-control-status :offset-assert 8) (data-format draw-control-data-format :offset-assert 10) (global-effect draw-control-global-effect :offset-assert 11) @@ -610,11 +610,11 @@ (:methods (new (symbol type process symbol) _type_ 0) (get-skeleton-origin (_type_) vector 9) - (draw-control-method-10 () none 10) - (draw-control-method-11 () none 11) - (draw-control-method-12 (_type_ uint int) none 12) - (draw-control-method-13 () none 13) - (draw-control-method-14 (_type_ cspace-array joint-control) none 14) + (lod-set! (_type_ int) none 10) + (lods-assign! (_type_ lod-set) none 11) + (setup-masks (_type_ uint int) none 12) + (setup-cspace-and-add (_type_ art-joint-geo symbol) none 13) + (do-joint-math (_type_ cspace-array joint-control) none 14) ) ) diff --git a/test/decompiler/reference/jak2/engine/game/game-h_REF.gc b/test/decompiler/reference/jak2/engine/game/game-h_REF.gc index cde2725a06..e80cb3a4fa 100644 --- a/test/decompiler/reference/jak2/engine/game/game-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/game-h_REF.gc @@ -26,12 +26,12 @@ :size-assert #xc8 :flag-assert #x14005000c8 (:methods - (initialize-skeleton (_type_ skeleton-group pair) none 14) + (initialize-skeleton (_type_ skeleton-group pair) draw-control 14) (initialize-skeleton-by-name (_type_ string) draw-control 15) - (apply-alignment (_type_ align-opts transformq vector) object 16) - (process-drawable-method-17 (_type_) none 17) - (process-drawable-method-18 () none 18) - (process-drawable-method-19 () none 19) + (apply-alignment (_type_ align-opts transformq vector) trsqv 16) + (cleanup-for-death (_type_) none 17) + (relocate-nav (_type_ int) none 18) + (evaluate-joint-control (_type_) none 19) ) ) diff --git a/test/decompiler/reference/jak2/engine/game/task/task-arrow_REF.gc b/test/decompiler/reference/jak2/engine/game/task/task-arrow_REF.gc index 7ad3538305..ddab41334a 100644 --- a/test/decompiler/reference/jak2/engine/game/task/task-arrow_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/task/task-arrow_REF.gc @@ -1,11 +1,14 @@ +;;-*-Lisp-*- (in-package goal) +;; failed to figure out what this is: (defskelgroup skel-task-arrow ctywide-arrow 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 4) :texture-level 6 ) +;; definition of type task-arrow-params (deftype task-arrow-params (structure) ((flags task-arrow-flags :offset-assert 0) (map-icon uint16 :offset-assert 4) @@ -17,6 +20,7 @@ :flag-assert #x900000030 ) +;; definition for method 3 of type task-arrow-params (defmethod inspect task-arrow-params ((obj task-arrow-params)) (when (not obj) (set! obj obj) @@ -31,6 +35,7 @@ obj ) +;; definition of type task-arrow (deftype task-arrow (process-drawable) ((pos vector :inline :offset-assert 208) (theta float :offset-assert 224) @@ -59,6 +64,7 @@ ) ) +;; definition for method 3 of type task-arrow (defmethod inspect task-arrow ((obj task-arrow)) (when (not obj) (set! obj obj) @@ -84,6 +90,8 @@ obj ) +;; definition for method 10 of type task-arrow +;; WARN: Return type mismatch int vs none. (defmethod deactivate task-arrow ((obj task-arrow)) (send-event (handle->process (-> obj hud-dist)) 'hide-and-die) ((method-of-type process-drawable deactivate) obj) @@ -91,6 +99,9 @@ (none) ) +;; definition for method 23 of type task-arrow +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. (defmethod task-arrow-method-23 task-arrow ((obj task-arrow) (arg0 vector)) "Some weird debugging code left here, but checks for collisions on the arrow" (let ((s5-0 (new 'stack-no-clear 'collide-query-with-vec))) @@ -117,6 +128,9 @@ (none) ) +;; definition for method 24 of type task-arrow +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. (defmethod draw-arrow task-arrow ((obj task-arrow)) (cond ((logtest? (-> obj flags) (task-arrow-flags task-arrow-flag-00)) @@ -203,6 +217,7 @@ (none) ) +;; failed to figure out what this is: (defstate idle (task-arrow) :virtual #t :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) @@ -259,6 +274,7 @@ ) ) +;; failed to figure out what this is: (defstate leave (task-arrow) :virtual #t :code (behavior () @@ -266,7 +282,7 @@ (while (-> self moving) (suspend) ) - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) :post (behavior () @@ -275,14 +291,18 @@ ) ) +;; failed to figure out what this is: (defstate die (task-arrow) :virtual #t :code (behavior () - (process-drawable-method-17 self) + (cleanup-for-death self) (none) ) ) +;; definition for function task-arrow-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs task-arrow. (defbehavior task-arrow-init-by-other task-arrow ((arg0 task-arrow-params)) (set! (-> self flags) (-> arg0 flags)) (set! (-> self map-icon) (-> arg0 map-icon)) @@ -325,6 +345,7 @@ (the-as task-arrow (go-virtual idle)) ) +;; definition for function task-arrow-spawn (defun task-arrow-spawn ((arg0 task-arrow-params) (arg1 task-arrow)) (let ((gp-0 (the-as process #f))) (let ((v1-1 (process-spawn task-arrow arg0 :to arg1))) diff --git a/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc b/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc index 96f94f9877..5e7a3c52db 100644 --- a/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc @@ -1600,12 +1600,7 @@ ) ) (((fail-mission-message fammsg-1)) - (while (let ((t9-3 process-grab?) - (a0-17 *target*) - ) - 'dead - (not (t9-3 a0-17)) - ) + (while (not (process-grab? *target* 'dead)) (suspend) ) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/merc/merc-h_REF.gc b/test/decompiler/reference/jak2/engine/gfx/merc/merc-h_REF.gc index 18a2dab53e..04d7e10b37 100644 --- a/test/decompiler/reference/jak2/engine/gfx/merc/merc-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/merc/merc-h_REF.gc @@ -228,7 +228,6 @@ ) ;; definition for method 3 of type merc-fragment-control -;; INFO: this function exists in multiple non-identical object files (defmethod inspect merc-fragment-control ((obj merc-fragment-control)) (when (not obj) (set! obj obj) @@ -687,7 +686,7 @@ ;; definition of type merc-ctrl (deftype merc-ctrl (art-element) ((num-joints int32 :offset 20) - (seg-table basic :offset 24) + (seg-table (array uint64) :offset 24) (header merc-ctrl-header :inline :offset-assert 32) (effect merc-effect :inline :dynamic :offset-assert 160) ) @@ -697,7 +696,6 @@ ) ;; definition for method 3 of type merc-ctrl -;; INFO: this function exists in multiple non-identical object files (defmethod inspect merc-ctrl ((obj merc-ctrl)) (when (not obj) (set! obj obj) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc deleted file mode 100644 index 0572e07db7..0000000000 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc +++ /dev/null @@ -1,4 +0,0 @@ -;;-*-Lisp-*- -(in-package goal) - -;; ERROR: top level function was not converted to expressions. Cannot decompile. diff --git a/test/decompiler/reference/jak2/engine/scene/scene_REF.gc b/test/decompiler/reference/jak2/engine/scene/scene_REF.gc index 4ec4470855..c73ef109f5 100644 --- a/test/decompiler/reference/jak2/engine/scene/scene_REF.gc +++ b/test/decompiler/reference/jak2/engine/scene/scene_REF.gc @@ -1,5 +1,7 @@ +;;-*-Lisp-*- (in-package goal) +;; definition of type scene-stage (deftype scene-stage (process-hidden) () :method-count-assert 15 @@ -7,6 +9,7 @@ :flag-assert #xf00000080 ) +;; definition for method 3 of type scene-stage (defmethod inspect scene-stage ((obj scene-stage)) (when (not obj) (set! obj obj) @@ -144,11 +147,14 @@ obj ) +;; definition for method 2 of type scene (defmethod print scene ((obj scene)) (format #t "#" (-> obj art-group) (-> obj anim) obj) obj ) +;; definition for method 15 of type scene +;; WARN: Return type mismatch spool-anim vs none. (defmethod scene-method-15 scene ((obj scene) (arg0 spool-anim)) (set! (-> arg0 name) (-> obj anim)) (set! (-> arg0 anim-name) (-> obj anim)) @@ -157,6 +163,8 @@ (none) ) +;; definition for function scene-decode-continue +;; WARN: Return type mismatch basic vs continue-point. (defun scene-decode-continue ((arg0 basic)) (the-as continue-point (cond ((not arg0) @@ -175,6 +183,8 @@ ) ) +;; definition for method 9 of type scene-actor +;; INFO: Used lq/sq (defmethod scene-actor-method-9 scene-actor ((obj scene-actor) (arg0 scene-player)) (local-vars (s4-0 (pointer process)) (sv-96 process) (sv-112 process)) (let ((s1-0 (if (-> obj level) @@ -375,6 +385,7 @@ s4-0 ) +;; definition for method 10 of type scene-player (defmethod deactivate scene-player ((obj scene-player)) (set! *scene-player* #f) (kill-persister *setting-control* (the-as engine-pers 'blackout) 'bg-a-force) @@ -382,6 +393,8 @@ (none) ) +;; definition for method 7 of type scene-player +;; WARN: Return type mismatch process-drawable vs scene-player. (defmethod relocate scene-player ((obj scene-player) (arg0 int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) obj) @@ -401,6 +414,8 @@ (the-as scene-player ((method-of-type process-drawable relocate) obj arg0)) ) +;; definition for method 25 of type scene-player +;; WARN: Return type mismatch int vs none. (defmethod scene-player-method-25 scene-player ((obj scene-player) (arg0 float)) (local-vars (v1-11 symbol) (v1-40 symbol) (s0-0 object) (s0-1 object)) (dotimes (s4-0 (-> obj scene actor length)) @@ -469,6 +484,8 @@ (none) ) +;; definition for function scene-lookup +;; WARN: Return type mismatch basic vs scene. (defun scene-lookup ((arg0 basic)) "TODO - basic can be a string or a scene" (let ((v1-0 (-> arg0 type))) @@ -511,6 +528,8 @@ ) ) +;; definition for method 24 of type scene-player +;; WARN: Return type mismatch basic vs scene. (defmethod scene-player-method-24 scene-player ((obj scene-player) (arg0 basic) (arg1 symbol)) "TODO - arg1 can be string/scene" (when (= (-> arg0 type) string) @@ -534,6 +553,8 @@ (the-as scene arg0) ) +;; definition for method 23 of type scene-player +;; WARN: Return type mismatch int vs none. (defmethod scene-player-method-23 scene-player ((obj scene-player) (arg0 string) (arg1 symbol)) (let ((gp-0 (scene-player-method-24 obj arg0 #t))) (when (-> gp-0 peaceful) @@ -684,6 +705,7 @@ (none) ) +;; definition of type subtitle-work (deftype subtitle-work (structure) ((draw-tmpl dma-gif-packet :inline :offset-assert 0) (color0 vector4w :inline :offset-assert 32) @@ -694,6 +716,7 @@ :flag-assert #x900000040 ) +;; definition for method 3 of type subtitle-work (defmethod inspect subtitle-work ((obj subtitle-work)) (when (not obj) (set! obj obj) @@ -707,6 +730,7 @@ obj ) +;; definition for symbol *subtitle-work*, type subtitle-work (define *subtitle-work* (new 'static 'subtitle-work :draw-tmpl (new 'static 'dma-gif-packet @@ -734,6 +758,8 @@ ) ) +;; definition for function draw-subtitle-image +;; INFO: Used lq/sq (defun draw-subtitle-image ((arg0 subtitle-image) (arg1 font-context)) (local-vars (sv-16 pointer) (sv-32 int)) (let ((gp-0 (-> arg0 width)) @@ -922,6 +948,8 @@ ) ) +;; definition for function process-drawable-draw-subtitles +;; WARN: Return type mismatch int vs none. (defbehavior process-drawable-draw-subtitles process-drawable () (when (and (nonzero? (-> self skel)) (> (-> self skel active-channels) 0) @@ -1017,6 +1045,7 @@ (none) ) +;; failed to figure out what this is: (defstate wait (scene-player) :virtual #t :enter (behavior ((arg0 symbol)) @@ -1119,13 +1148,9 @@ (let ((s5-0 (-> self clock frame-counter))) (when (and *target* (zero? (logand (-> *target* focus-status) (focus-status grabbed)))) (label cfg-44) - (let ((t9-3 process-grab?) - (a0-17 *target*) - ) - (when (not (t9-3 a0-17)) - (suspend) - (goto cfg-44) - ) + (when (not (process-grab? *target* #f)) + (suspend) + (goto cfg-44) ) ) (process-entity-status! self (entity-perm-status no-kill) #t) @@ -1237,6 +1262,7 @@ ) ) +;; failed to figure out what this is: (defstate release (scene-player) :virtual #t :code (behavior () @@ -1337,6 +1363,7 @@ ) ) +;; failed to figure out what this is: (defstate play-anim (scene-player) :virtual #t :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) @@ -1757,6 +1784,11 @@ ) ) +;; definition for function scene-player-init +;; WARN: Return type mismatch object vs none. +;; WARN: Using new Jak 2 rtype-of +;; WARN: Using new Jak 2 rtype-of +;; WARN: Using new Jak 2 rtype-of (defbehavior scene-player-init scene-player ((arg0 object) (arg1 symbol) (arg2 string)) "`object` arg can be an `(array scene)`, `pair of scene` or a `scene`" (process-entity-set! self (the-as entity-actor #f)) @@ -1846,6 +1878,7 @@ (none) ) +;; definition for method 16 of type scene (defmethod scene-method-16 scene ((obj scene)) (let ((v1-1 (-> *level* loading-level))) (if v1-1 diff --git a/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash-h_REF.gc b/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash-h_REF.gc index 73846894c1..647ee810ca 100644 --- a/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash-h_REF.gc @@ -157,7 +157,7 @@ (sphere-hash-method-30 (_type_ find-nav-sphere-ids-params) none 30) (sphere-hash-method-31 (_type_ vector int int) none 31) (sphere-hash-method-32 (_type_ vector vector float int) symbol 32) - (sphere-hash-method-33 (_type_ sphere int) none 33) + (remove-by-id (_type_ sphere int) none 33) ) ) 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 844e091df8..a74d5365f4 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 @@ -561,7 +561,7 @@ (logclear! (-> self control root-prim prim-core action) (collide-action can-ride)) (set! (-> self control unknown-float29) 1.0) (let ((v1-82 (-> self node-list data))) - (set! (-> v1-82 0 param0) cspace<-transformq+world-trans!) + (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))) (set! (-> v1-82 0 param2) (the-as basic (-> self control cspace-offset))) ) @@ -640,7 +640,7 @@ (remove-setting! 'string-spline-max-move-player) (remove-setting! 'string-spline-accel-player) (let ((v1-43 (-> self node-list data))) - (set! (-> v1-43 0 param0) cspace<-transformq+trans!) + (set! (-> v1-43 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!)) (set! (-> v1-43 0 param1) (the-as basic (-> self control trans))) (set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset))) ) 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 7dfc6a86b5..62e555e49d 100644 --- a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc @@ -1851,11 +1851,11 @@ (when (!= (-> self beard?) v1-248) (cond (v1-248 - (draw-control-method-12 (-> self draw) (the-as uint 2) 0) + (setup-masks (-> self draw) (the-as uint 2) 0) (set! (-> self beard?) #t) ) (else - (draw-control-method-12 (-> self draw) (the-as uint 0) 2) + (setup-masks (-> self draw) (the-as uint 0) 2) (set! (-> self beard?) #f) ) ) @@ -2207,8 +2207,8 @@ ) ) (set-quaternion! (-> self control) (-> self control dir-targ)) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) ) @@ -2273,8 +2273,8 @@ ) ) (set! (-> self control unknown-float33) 0.0) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (none) ) @@ -2361,8 +2361,8 @@ ) ) (set-quaternion! (-> self control) (-> self control dir-targ)) - (joint-control-method-10 (-> self skel)) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (update-transforms (-> self control)) (none) ) @@ -3317,7 +3317,7 @@ ) (logior! (-> obj skel effect flags) (effect-control-flag ecf0 ecf1)) (let ((v1-94 (-> obj node-list data))) - (set! (-> v1-94 0 param0) cspace<-transformq+trans!) + (set! (-> v1-94 0 param0) (the-as (function cspace matrix none) cspace<-transformq+trans!)) (set! (-> v1-94 0 param1) (the-as basic (-> obj control trans))) (set! (-> v1-94 0 param2) (the-as basic (-> obj control cspace-offset))) ) diff --git a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc index 8a40ecb783..d95f4a807a 100644 --- a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc @@ -179,7 +179,9 @@ (case (-> event param 0) (('play-anim) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (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 node-list data)) ) @@ -187,7 +189,9 @@ ) (('copy-parent) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data)) ) @@ -195,7 +199,9 @@ ) (('root) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace-normalized!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data)) ) @@ -203,7 +209,9 @@ ) (('indax) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-transformq+trans!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-transformq+trans!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 control trans)) ) @@ -213,7 +221,9 @@ ) (('board) (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (the-as (function cspace matrix none) cspace<-cspace-normalized!) + ) (set! (-> (the-as (inline-array cspace) v0-0) 0 param1) (the-as basic (-> self parent-override 0 node-list data 25)) ) @@ -221,7 +231,9 @@ ) (else (set! v0-0 (-> self node-list data)) - (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!) + (set! (-> (the-as (inline-array cspace) v0-0) 0 param0) + (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)) ) @@ -350,7 +362,7 @@ (set! (-> self offset trans y) (* 204.8 f0-3)) (set! (-> self offset trans z) (* 409.6 f0-3)) ) - (joint-control-method-10 (-> self skel)) + (update-anim-data (-> self skel)) (when *debug-segment* (let ((gp-2 (-> *display* frames (-> *display* on-screen) profile-array data 0)) (v1-132 'target-post) @@ -373,7 +385,7 @@ ) 0 ) - (draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) (when *debug-segment* (let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))) (when (and *dproc* *debug-segment*) @@ -474,7 +486,7 @@ (send-event (ppointer->process gp-4) 'mirror #t) (set! (-> self mirror) gp-4) (let ((v0-29 (-> gp-4 0 node-list data))) - (set! (-> v0-29 0 param0) cspace<-cspace!) + (set! (-> v0-29 0 param0) (the-as (function cspace matrix none) cspace<-cspace!)) (set! (-> v0-29 0 param1) (the-as basic (-> self node-list data))) (set! (-> v0-29 0 param2) #f) ) @@ -502,7 +514,7 @@ (logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim)) (set! (-> self draw light-index) (the-as uint 30)) (let ((v1-14 (-> self node-list data))) - (set! (-> v1-14 0 param0) cspace<-cspace+transformq!) + (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 param2) (the-as basic (-> self offset))) ) 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 22becc0337..3b738d8428 100644 --- a/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc @@ -165,8 +165,7 @@ (set! (-> self gun latch?) #f) (set! (-> self gun put-away?) #f) (set! (-> self gun charge-active?) (the-as handle #f)) - self - (set! (-> self skel top-anim) (new 'process 'top-anim-joint-control)) + (set! (-> self skel top-anim) (new 'process 'top-anim-joint-control self)) (set! (-> self skel interp-select 0) 0) (set! (-> self skel interp-select 1) 0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) @@ -204,7 +203,7 @@ ) (mode-set! (-> gp-0 hips) (joint-mod-mode rotate)) (set! (-> gp-0 gun-roty) (y-angle (-> self control))) - (top-anim-joint-control-method-9 (-> self skel top-anim)) + (reset (-> self skel top-anim)) (set! (-> self skel top-anim interp) 1.0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist-targ))) @@ -249,9 +248,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 229) + (the-as art-joint-anim (-> self draw art-group data 229)) 0.0 0 15 @@ -261,9 +260,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 198) + (the-as art-joint-anim (-> self draw art-group data 198)) 0.0 0 15 @@ -273,9 +272,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 230) + (the-as art-joint-anim (-> self draw art-group data 230)) 0.0 0 15 @@ -285,9 +284,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 231) + (the-as art-joint-anim (-> self draw art-group data 231)) 0.0 0 15 @@ -301,9 +300,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 265) + (the-as art-joint-anim (-> self draw art-group data 265)) 0.0 0 15 @@ -313,9 +312,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 263) + (the-as art-joint-anim (-> self draw art-group data 263)) 0.0 0 15 @@ -325,9 +324,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 266) + (the-as art-joint-anim (-> self draw art-group data 266)) 0.0 0 15 @@ -337,9 +336,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 264) + (the-as art-joint-anim (-> self draw art-group data 264)) 0.0 0 15 @@ -392,9 +391,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 229) + (the-as art-joint-anim (-> self draw art-group data 229)) 0.0 10 0 @@ -405,9 +404,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 198) + (the-as art-joint-anim (-> self draw art-group data 198)) 0.0 10 0 @@ -418,9 +417,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 230) + (the-as art-joint-anim (-> self draw art-group data 230)) 0.0 10 0 @@ -431,9 +430,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 231) + (the-as art-joint-anim (-> self draw art-group data 231)) 0.0 10 0 @@ -451,9 +450,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 265) + (the-as art-joint-anim (-> self draw art-group data 265)) 0.0 10 0 @@ -464,9 +463,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 263) + (the-as art-joint-anim (-> self draw art-group data 263)) 0.0 10 0 @@ -477,9 +476,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 266) + (the-as art-joint-anim (-> self draw art-group data 266)) 14.0 10 0 @@ -490,9 +489,9 @@ (set! (-> self skel top-anim frame-post-put-away) (the-as basic #t)) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 264) + (the-as art-joint-anim (-> self draw art-group data 264)) 0.0 10 0 @@ -728,9 +727,9 @@ (let ((v1-164 arg0)) (cond ((and (= s5-0 (pickup-type eco-red)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 225) + (the-as art-joint-anim (-> self draw art-group data 225)) 0.0 30 19 @@ -740,9 +739,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 225) + (the-as art-joint-anim (-> self draw art-group data 225)) 0.0 30 0 @@ -752,9 +751,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 19 @@ -764,9 +763,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 0 @@ -776,9 +775,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 19 @@ -788,9 +787,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 0 @@ -800,9 +799,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 228) + (the-as art-joint-anim (-> self draw art-group data 228)) 0.0 30 19 @@ -812,9 +811,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 228) + (the-as art-joint-anim (-> self draw art-group data 228)) 0.0 30 0 @@ -824,9 +823,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 19 @@ -836,9 +835,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-164 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 19 @@ -848,9 +847,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 227) + (the-as art-joint-anim (-> self draw art-group data 227)) 0.0 30 0 @@ -860,9 +859,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-164 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 226) + (the-as art-joint-anim (-> self draw art-group data 226)) 0.0 30 0 @@ -879,9 +878,9 @@ (cond ((and (= s5-0 (pickup-type eco-red)) (= v1-227 4)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 30 19 @@ -889,9 +888,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-1")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -903,9 +902,9 @@ ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 2)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 30 19 @@ -913,9 +912,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-1")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -927,9 +926,9 @@ ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 1)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -937,9 +936,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-2")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 270) + (the-as art-joint-anim (-> self draw art-group data 270)) 0.0 19 19 @@ -951,9 +950,9 @@ ) ((and (= s5-0 (pickup-type eco-red)) (= v1-227 1)) (if (rand-vu-percent? 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 269) + (the-as art-joint-anim (-> self draw art-group data 269)) 0.0 19 19 @@ -961,9 +960,9 @@ 2.0 (the-as symbol (static-sound-spec "gun-trans-2")) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 270) + (the-as art-joint-anim (-> self draw art-group data 270)) 0.0 19 19 @@ -974,9 +973,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 19 19 @@ -986,9 +985,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 268) + (the-as art-joint-anim (-> self draw art-group data 268)) 0.0 19 19 @@ -998,9 +997,9 @@ ) ) ((and (= s5-0 (pickup-type eco-red)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 19 19 @@ -1010,9 +1009,9 @@ ) ) ((and (= s5-0 (pickup-type eco-dark)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 19 19 @@ -1022,9 +1021,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 2)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 272) + (the-as art-joint-anim (-> self draw art-group data 272)) 0.0 19 19 @@ -1034,9 +1033,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 4)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 272) + (the-as art-joint-anim (-> self draw art-group data 272)) 0.0 19 19 @@ -1046,9 +1045,9 @@ ) ) ((and (= s5-0 (pickup-type eco-yellow)) (= v1-227 3)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 271) + (the-as art-joint-anim (-> self draw art-group data 271)) 0.0 30 19 @@ -1058,9 +1057,9 @@ ) ) ((and (= s5-0 (pickup-type eco-blue)) (= v1-227 1)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 252) + (the-as art-joint-anim (-> self draw art-group data 252)) 0.0 19 19 @@ -1425,9 +1424,9 @@ ((logtest? (-> self focus-status) (focus-status pilot-riding)) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 220) + (the-as art-joint-anim (-> self draw art-group data 220)) 0.0 arg0 0 @@ -1437,9 +1436,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 221) + (the-as art-joint-anim (-> self draw art-group data 221)) 0.0 arg0 0 @@ -1449,9 +1448,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 218) + (the-as art-joint-anim (-> self draw art-group data 218)) 0.0 arg0 0 @@ -1461,9 +1460,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 219) + (the-as art-joint-anim (-> self draw art-group data 219)) 0.0 arg0 0 @@ -1477,9 +1476,9 @@ (else (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 254) + (the-as art-joint-anim (-> self draw art-group data 254)) 0.0 arg0 0 @@ -1493,9 +1492,9 @@ ) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 255) + (the-as art-joint-anim (-> self draw art-group data 255)) 0.0 arg0 0 @@ -1505,9 +1504,9 @@ ) ) (((pickup-type eco-red)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 244) + (the-as art-joint-anim (-> self draw art-group data 244)) 0.0 arg0 0 @@ -1517,9 +1516,9 @@ ) ) (((pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 253) + (the-as art-joint-anim (-> self draw art-group data 253)) 0.0 arg0 0 @@ -1953,7 +1952,7 @@ ((and (and v1-17 (or (= v1-17 self) (= v1-17 (-> self draw art-group data 261)))) (< (-> self gun top-anim-low-high) 0.5) ) - (let ((s5-0 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-0 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -1977,9 +1976,9 @@ ) ) (seek! (-> self gun top-anim-low-high) 0.0 (* 6.0 (-> self clock seconds-per-frame))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 247) + (the-as art-joint-anim (-> self draw art-group data 247)) 0.0 0 60 @@ -2000,7 +1999,7 @@ (let ((v1-67 (ja-group))) (cond ((and v1-67 (or (= v1-67 self) (= v1-67 (-> self draw art-group data 12)))) - (let ((s5-1 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-1 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -2031,9 +2030,9 @@ ) ) (seek! (-> self gun top-anim-low-high) 0.0 (* 6.0 (-> self clock seconds-per-frame))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 295) + (the-as art-joint-anim (-> self draw art-group data 295)) 0.0 0 30 @@ -2055,7 +2054,7 @@ (>= (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 0.2)) ) ) - (let ((s5-2 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-2 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 262) (-> self draw art-group data 303) @@ -2078,7 +2077,7 @@ ((let ((v1-150 (ja-group))) (and v1-150 (or (= v1-150 self) (= v1-150 (-> self draw art-group data 12)))) ) - (let ((s5-3 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((s5-3 (get-channel (-> self skel top-anim) 0))) (set! gp-0 (if (< 0.9 (-> self control unknown-float002)) (-> self draw art-group data 299) (-> self draw art-group data 298) @@ -2157,10 +2156,7 @@ (set! (-> self gun gun-daxter) (if (and (logtest? (-> self focus-status) (focus-status pilot-riding)) (nonzero? (-> self skel float-channels)) - (= (-> (top-anim-joint-control-method-11 (-> self skel top-anim) (the-as int (+ (-> self skel float-channels) -1))) - frame-interp - 1 - ) + (= (-> (get-channel (-> self skel top-anim) (the-as int (+ (-> self skel float-channels) -1))) frame-interp 1) 1.0 ) ) @@ -2173,7 +2169,7 @@ (set! (-> self gun gun-roty-targ) (y-angle (-> self control))) (set! (-> self gun gun-roty) (-> self gun gun-roty-targ)) (set! (-> self gun gun-roty-rel) 0.0) - (let ((v1-24 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-24 (get-channel (-> self skel top-anim) 0))) (cond ((not v1-24) ) @@ -2386,15 +2382,15 @@ (((pickup-type eco-blue)) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (let ((v1-15 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-15 (get-channel (-> self skel top-anim) 0))) (when (not (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 206)) (and v1-15 (= (-> v1-15 frame-group) (-> self draw art-group data 206))) ) ) (if (< 4096.0 (-> self control unknown-float05)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 207) + (the-as art-joint-anim (-> self draw art-group data 207)) 1.0 9 9 @@ -2402,9 +2398,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 207) + (the-as art-joint-anim (-> self draw art-group data 207)) 1.0 6 6 @@ -2417,15 +2413,15 @@ ) ) (else - (let ((v1-32 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-32 (get-channel (-> self skel top-anim) 0))) (when (not (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 257)) (and v1-32 (= (-> v1-32 frame-group) (-> self draw art-group data 257))) ) ) (if (< 4096.0 (-> self control unknown-float05)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 258) + (the-as art-joint-anim (-> self draw art-group data 258)) 1.0 9 9 @@ -2433,9 +2429,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 258) + (the-as art-joint-anim (-> self draw art-group data 258)) 1.0 6 6 @@ -2453,9 +2449,9 @@ (((pickup-type eco-yellow)) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 223) + (the-as art-joint-anim (-> self draw art-group data 223)) 0.0 15 0 @@ -2465,9 +2461,9 @@ ) ) ((< (-> self gun top-anim-low-high) 0.5) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 246) + (the-as art-joint-anim (-> self draw art-group data 246)) 0.0 15 0 @@ -2478,9 +2474,9 @@ (set! (-> self gun top-anim-low-high) 1.0) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 260) + (the-as art-joint-anim (-> self draw art-group data 260)) 0.0 0 0 @@ -2501,9 +2497,9 @@ ) (cond ((logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 222) + (the-as art-joint-anim (-> self draw art-group data 222)) 0.0 15 0 @@ -2516,9 +2512,9 @@ ) ) ((< 0.5 (-> self gun top-anim-low-high)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 292) + (the-as art-joint-anim (-> self draw art-group data 292)) 0.0 0 15 @@ -2529,9 +2525,9 @@ (set! (-> self gun top-anim-low-high) 0.0) ) ((and (rand-vu-percent? 0.2) (< (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 2))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 293) + (the-as art-joint-anim (-> self draw art-group data 293)) 0.0 0 15 @@ -2546,9 +2542,9 @@ ((and (or (rand-vu-percent? 0.2) (= (-> self skel top-anim frame-targ) (-> self draw art-group data 256))) (< (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 2)) ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 291) + (the-as art-joint-anim (-> self draw art-group data 291)) 0.0 0 15 @@ -2559,9 +2555,9 @@ (set! (-> self gun top-anim-low-high) 1.0) ) ((logtest? (-> self game features) (game-feature gun-upgrade-speed)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 309) + (the-as art-joint-anim (-> self draw art-group data 309)) 0.0 0 15 @@ -2571,9 +2567,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 256) + (the-as art-joint-anim (-> self draw art-group data 256)) 1.0 0 15 @@ -2588,9 +2584,9 @@ ) (((pickup-type eco-dark)) (if (logtest? (-> self focus-status) (focus-status pilot-riding)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 224) + (the-as art-joint-anim (-> self draw art-group data 224)) 0.0 0 15 @@ -2598,9 +2594,9 @@ 0.0 #f ) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 259) + (the-as art-joint-anim (-> self draw art-group data 259)) 0.0 0 15 @@ -2765,12 +2761,13 @@ (f0-24 (- f0-23 (* (the float (the int (/ f0-23 4.0))) 4.0))) ) (set! (-> self gun top-anim-blue-cycle) f0-24) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (if (logtest? (-> self focus-status) (focus-status pilot-riding)) - (-> self draw art-group data 206) - (-> self draw art-group data 257) - ) + (the-as art-joint-anim (if (logtest? (-> self focus-status) (focus-status pilot-riding)) + (-> self draw art-group data 206) + (-> self draw art-group data 257) + ) + ) (* 6.0 f0-24) 0 5 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 0df2af7fc2..974a4a18ab 100644 --- a/test/decompiler/reference/jak2/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-util_REF.gc @@ -1154,7 +1154,7 @@ ;; definition for method 16 of type target ;; INFO: Used lq/sq -;; WARN: Return type mismatch control-info vs object. +;; WARN: Return type mismatch control-info vs trsqv. (defmethod apply-alignment target ((obj target) (arg0 align-opts) (arg1 transformq) (arg2 vector)) (with-pp (let ((s2-0 (new 'stack-no-clear 'vector))) @@ -1204,7 +1204,7 @@ (quaternion*! (-> obj control quat-for-control) (-> obj control quat-for-control) (-> arg1 quat)) ) ) - (the-as object (-> obj control)) + (the-as trsqv (-> obj control)) ) ) diff --git a/test/decompiler/reference/jak2/engine/target/target_REF.gc b/test/decompiler/reference/jak2/engine/target/target_REF.gc index 7020b2a0b7..e303f3d1d2 100644 --- a/test/decompiler/reference/jak2/engine/target/target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target_REF.gc @@ -877,9 +877,9 @@ (cond ((using-gun? self) (set! (-> self gun surpress-time) (+ (-> self clock frame-counter) (seconds 0.7))) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 283) + (the-as art-joint-anim (-> self draw art-group data 283)) 0.0 0 30 @@ -982,7 +982,7 @@ (can-exit-duck? self) ) (if (and (using-gun? self) - (begin (set! v1-22 (top-anim-joint-control-method-11 (-> self skel top-anim) 0)) v1-22) + (begin (set! v1-22 (get-channel (-> self skel top-anim) 0)) v1-22) (= (-> v1-22 frame-group) (-> self draw art-group data 283)) ) (target-top-anim-base-mode 60) @@ -1076,7 +1076,7 @@ ;; definition for function target-jump-top-anim ;; WARN: Return type mismatch int vs none. (defbehavior target-jump-top-anim target () - (let ((gp-0 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((gp-0 (get-channel (-> self skel top-anim) 0))) (when gp-0 (let ((s5-0 (-> gp-0 frame-group)) (f0-0 (ja-aframe-num 0)) @@ -1207,9 +1207,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 0.0 30 30 @@ -1219,9 +1219,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 0.0 30 30 @@ -1341,9 +1341,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 3.0 30 30 @@ -1353,9 +1353,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 3.0 30 30 @@ -1461,9 +1461,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 7.0 30 30 @@ -1473,9 +1473,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 7.0 30 30 @@ -1722,9 +1722,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 304) + (the-as art-joint-anim (-> self draw art-group data 304)) 0.0 30 30 @@ -1734,9 +1734,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 300) + (the-as art-joint-anim (-> self draw art-group data 300)) 0.0 30 30 @@ -1936,9 +1936,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 305) + (the-as art-joint-anim (-> self draw art-group data 305)) 0.0 30 30 @@ -1948,9 +1948,9 @@ ) ) (((pickup-type eco-red) (pickup-type eco-dark)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 301) + (the-as art-joint-anim (-> self draw art-group data 301)) 0.0 30 30 @@ -1960,9 +1960,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 301) + (the-as art-joint-anim (-> self draw art-group data 301)) 0.0 30 30 @@ -2193,9 +2193,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 248) + (the-as art-joint-anim (-> self draw art-group data 248)) 0.0 30 30 @@ -2207,9 +2207,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -3276.8) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 250) + (the-as art-joint-anim (-> self draw art-group data 250)) 0.0 30 30 @@ -2220,9 +2220,9 @@ (set! gp-0 (-> self draw art-group data 250)) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 248) + (the-as art-joint-anim (-> self draw art-group data 248)) 0.0 30 30 @@ -2287,9 +2287,9 @@ (when (zero? (-> self gun track-target-hold-time)) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 251) + (the-as art-joint-anim (-> self draw art-group data 251)) 0.0 0 60 @@ -2300,9 +2300,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -3640.889) ) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 249) + (the-as art-joint-anim (-> self draw art-group data 249)) 0.0 0 60 @@ -2313,9 +2313,9 @@ (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -5461.3335) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 249) + (the-as art-joint-anim (-> self draw art-group data 249)) 0.0 0 60 @@ -2589,9 +2589,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-yellow)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 273) + (the-as art-joint-anim (-> self draw art-group data 273)) 0.0 30 60 @@ -2602,9 +2602,9 @@ (set! gp-1 (-> self draw art-group data 275)) ) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 275) + (the-as art-joint-anim (-> self draw art-group data 275)) 0.0 30 60 @@ -2615,9 +2615,9 @@ (set! gp-1 (-> self draw art-group data 275)) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 273) + (the-as art-joint-anim (-> self draw art-group data 273)) 0.0 30 60 @@ -2819,9 +2819,9 @@ (when (zero? (-> self gun track-target-hold-time)) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 276) + (the-as art-joint-anim (-> self draw art-group data 276)) 0.0 0 60 @@ -2831,9 +2831,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 274) + (the-as art-joint-anim (-> self draw art-group data 274)) 0.0 0 60 @@ -3149,9 +3149,9 @@ (set! (-> self gun top-anim-low-high) 0.0) (case (-> self gun gun-type) (((pickup-type eco-blue)) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 279) + (the-as art-joint-anim (-> self draw art-group data 279)) f30-0 5 30 @@ -3169,9 +3169,9 @@ ) ) (else - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 267) + (the-as art-joint-anim (-> self draw art-group data 267)) f30-0 5 30 @@ -3348,7 +3348,7 @@ (when (or (= (-> self skel top-anim frame-group) (-> self draw art-group data 267)) (= (-> self skel top-anim frame-group) (-> self draw art-group data 279)) ) - (let ((v1-10 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-10 (get-channel (-> self skel top-anim) 0))) (if v1-10 (set! (-> v1-10 param 1) 0.9) ) @@ -3493,7 +3493,7 @@ (none) ) :exit (behavior () - (let ((v1-2 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-2 (get-channel (-> self skel top-anim) 0))) (when v1-2 (case (-> v1-2 frame-group) (((-> self draw art-group data 286)) @@ -3594,9 +3594,9 @@ ) :code (behavior ((arg0 float) (arg1 float) (arg2 float)) (if (using-gun? self) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 286) + (the-as art-joint-anim (-> self draw art-group data 286)) 0.0 0 30 @@ -3627,7 +3627,7 @@ (set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length)) (set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad)) (target-danger-set! 'flop-down #f) - (let ((v1-56 (top-anim-joint-control-method-11 (-> self skel top-anim) 0))) + (let ((v1-56 (get-channel (-> self skel top-anim) 0))) (if (and v1-56 (= (-> v1-56 frame-group) (-> self draw art-group data 286))) (set! (-> v1-56 param 1) 0.0) ) @@ -3892,9 +3892,9 @@ (cond ((using-gun? self) (set! (-> self gun top-anim-low-high) 0.0) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 282) + (the-as art-joint-anim (-> self draw art-group data 282)) 0.0 15 30 @@ -4070,9 +4070,9 @@ (ja :group! (-> self draw art-group data 61) :num! min) (when (using-gun? self) (set! (-> self gun top-anim-low-high) 0.0) - (top-anim-joint-control-method-12 + (push-anim-to-targ (-> self skel top-anim) - (-> self draw art-group data 284) + (the-as art-joint-anim (-> self draw art-group data 284)) 0.0 0 30 diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc index d3892494c8..a5c6378c00 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc @@ -1,5 +1,7 @@ +;;-*-Lisp-*- (in-package goal) +;; definition of type progress-global-state (deftype progress-global-state (basic) ((aspect-ratio-choice symbol :offset-assert 4) (video-mode-choice symbol :offset-assert 8) @@ -54,6 +56,7 @@ :flag-assert #x9000000e8 ) +;; definition for method 3 of type progress-global-state (defmethod inspect progress-global-state ((obj progress-global-state)) (when (not obj) (set! obj obj) @@ -111,18 +114,25 @@ obj ) +;; definition for symbol *progress-stack*, type (pointer uint8) (define *progress-stack* (the-as (pointer uint8) (malloc 'global #x3800))) +;; definition for symbol *progress-process*, type (pointer progress) (define *progress-process* (the-as (pointer progress) #f)) +;; definition for symbol *progress-state*, type progress-global-state (define *progress-state* (new 'static 'progress-global-state :which-slot -1 :last-slot-saved -1)) +;; failed to figure out what this is: (kmemopen global "mc-slot-info") +;; definition for symbol *progress-save-info*, type mc-slot-info (define *progress-save-info* (new 'global 'mc-slot-info)) +;; failed to figure out what this is: (kmemclose) +;; definition for function min-max-wrap-around (defun min-max-wrap-around ((arg0 int) (arg1 int) (arg2 int)) (let ((v1-2 (+ (- 1 arg1) arg2))) (while (< arg0 arg1) @@ -135,6 +145,7 @@ arg0 ) +;; definition for function progress-intro-start (defun progress-intro-start ((arg0 symbol)) (set! (-> *game-info* mode) 'play) (if arg0 @@ -145,6 +156,7 @@ 0 ) +;; definition for method 24 of type progress (defmethod init-defaults progress ((obj progress)) "Initialize default menu settings." (set! (-> *progress-state* aspect-ratio-choice) (get-aspect-ratio)) @@ -214,6 +226,7 @@ (set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0) ) +;; definition of type hud-ring-cell (deftype hud-ring-cell (process-drawable) ((parent-override (pointer progress) :offset 16) (joint-idx int32 :offset-assert 200) @@ -229,6 +242,7 @@ ) ) +;; definition for method 3 of type hud-ring-cell (defmethod inspect hud-ring-cell ((obj hud-ring-cell)) (when (not obj) (set! obj obj) @@ -244,6 +258,8 @@ obj ) +;; definition for function hud-ring-cell-init-by-other +;; INFO: Used lq/sq (defbehavior hud-ring-cell-init-by-other hud-ring-cell ((arg0 int) (arg1 float) (arg2 int)) (set! (-> self root) (new 'process 'trsqv)) (initialize-skeleton @@ -269,11 +285,11 @@ (set! (-> self draw color-mult z) 0.8) (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) (logior! (-> self draw status) (draw-control-status hud)) - (draw-control-method-12 (-> self draw) (the-as uint 1) 0) - (draw-control-method-12 (-> self draw) (the-as uint 0) 2046) + (setup-masks (-> self draw) (the-as uint 1) 0) + (setup-masks (-> self draw) (the-as uint 0) 2046) (cond ((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-kiosk-graphic-remap* (mod @@ -285,7 +301,7 @@ ) ) ((and (= *cheat-mode* #f) (demo?)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-demo-graphic-remap* (mod @@ -297,7 +313,7 @@ ) ) (else - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-graphic-remap* (mod @@ -312,6 +328,7 @@ (go-virtual idle) ) +;; failed to figure out what this is: (defstate idle (hud-ring-cell) :virtual #t :code (behavior () @@ -328,10 +345,10 @@ (-> (the-as progress (-> self parent-override 0)) node-list data (-> self joint-idx)) ) (when (-> (the-as progress (-> self parent-override 0)) main-menu) - (draw-control-method-12 (-> self draw) (the-as uint 0) 2046) + (setup-masks (-> self draw) (the-as uint 0) 2046) (cond ((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-kiosk-graphic-remap* (mod @@ -343,7 +360,7 @@ ) ) ((and (= *cheat-mode* #f) (demo?)) - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-demo-graphic-remap* (mod @@ -355,7 +372,7 @@ ) ) (else - (draw-control-method-12 + (setup-masks (-> self draw) (-> *hud-ring-graphic-remap* (mod @@ -402,6 +419,7 @@ ) ) +;; definition for function progress-init-by-other (defbehavior progress-init-by-other progress ((arg0 symbol)) (hide-hud #f) (disable-level-text-file-loading) @@ -462,6 +480,8 @@ (go-virtual come-in) ) +;; definition for function set-ring-position +;; INFO: Used lq/sq (defun set-ring-position ((arg0 progress)) (let ((s3-0 (new-stack-vector0)) (s4-0 (new 'stack-no-clear 'vector)) @@ -485,6 +505,8 @@ ) ) +;; definition for function activate-progress +;; WARN: Return type mismatch int vs none. (defun activate-progress ((arg0 process) (arg1 symbol)) (when *target* (when (progress-allowed?) @@ -517,6 +539,7 @@ (none) ) +;; definition for method 10 of type progress (defmethod deactivate progress ((obj progress)) (remove-setting-by-arg0 *setting-control* 'extra-bank) ((method-of-object *bigmap* bigmap-method-15)) @@ -529,6 +552,8 @@ (none) ) +;; definition for function deactivate-progress +;; WARN: Return type mismatch int vs none. (defun deactivate-progress () (if *progress-process* (deactivate (-> *progress-process* 0)) @@ -537,6 +562,8 @@ (none) ) +;; definition for function hide-progress-screen +;; WARN: Return type mismatch int vs none. (defun hide-progress-screen () (if (and *progress-process* *progress-state* (!= (-> *progress-state* starting-state) 'title)) (set-next-state (-> *progress-process* 0) 'go-away 0) @@ -545,6 +572,7 @@ (none) ) +;; definition for method 26 of type progress (defmethod progress-method-26 progress ((obj progress)) (and *progress-process* (-> *progress-process* 0 next-state) @@ -552,6 +580,7 @@ ) ) +;; definition for function progress-allowed? (defun progress-allowed? () (not (or (-> *setting-control* user-current talking) (-> *setting-control* user-current movie) @@ -577,6 +606,7 @@ ) ) +;; definition for method 27 of type progress (defmethod can-go-back? progress ((obj progress)) (and (= (-> obj menu-transition) 0.0) (not (-> obj selected-option)) @@ -601,6 +631,8 @@ ) ) +;; definition for function menu-update-purchase-secrets +;; WARN: Return type mismatch symbol vs none. (defun menu-update-purchase-secrets ((arg0 menu-secret-option)) (let* ((a1-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) (v1-3 (if (not a1-1) @@ -634,6 +666,7 @@ (none) ) +;; definition for method 28 of type progress (defmethod progress-method-28 progress ((obj progress) (arg0 symbol)) (let ((v1-0 *progress-save-info*) (v0-0 arg0) @@ -731,6 +764,7 @@ ) ) +;; definition for method 29 of type progress (defmethod progress-method-29 progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond @@ -747,6 +781,7 @@ 0 ) +;; definition for method 30 of type progress (defmethod progress-method-30 progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond @@ -770,6 +805,7 @@ 0 ) +;; definition for method 31 of type progress (defmethod set-next-state progress ((obj progress) (arg0 symbol) (arg1 int)) "Set the next menu state specified by arg0 at the index specified by arg1." (set! (-> *progress-state* clear-screen) #f) @@ -816,6 +852,7 @@ 0 ) +;; definition for method 32 of type progress (defmethod set-menu-options progress ((obj progress) (arg0 symbol)) "Set the menu options for the menu state specified by arg0." (set! (-> obj current-options) #f) @@ -1023,6 +1060,8 @@ 0 ) +;; definition for method 25 of type progress +;; WARN: Return type mismatch int vs none. (defmethod progress-method-25 progress ((obj progress)) (mc-get-slot-info 0 *progress-save-info*) (when (-> obj current-options) @@ -1118,6 +1157,8 @@ (none) ) +;; definition for function progress-trans +;; WARN: Return type mismatch int vs none. (defbehavior progress-trans progress () (cond ((and (= (-> self next) 'none) @@ -1301,6 +1342,7 @@ (none) ) +;; definition for function begin-scan (defun begin-scan ((arg0 hud-box) (arg1 progress)) (cond ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) @@ -1335,6 +1377,9 @@ 0 ) +;; definition for function end-scan +;; WARN: Failed store: (s.w! (+ v1-8 8) 0) at op 19 +;; WARN: Failed store: (s.w! (+ v1-8 12) 0) at op 20 (defun end-scan ((arg0 hud-box) (arg1 float)) (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id bucket-320) @@ -1344,6 +1389,24 @@ 0 ) +;; definition for function progress-post +;; INFO: Used lq/sq +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Return type mismatch int vs none. (defbehavior progress-post progress () (local-vars (sv-144 font-context) (sv-148 int) (sv-152 hud-box) (sv-156 symbol)) (when (-> self current-options) @@ -1452,6 +1515,7 @@ (none) ) +;; failed to figure out what this is: (defstate come-in (progress) :virtual #t :enter (behavior () @@ -1496,6 +1560,7 @@ :post (the-as (function none :behavior progress) ja-post) ) +;; failed to figure out what this is: (defstate idle (progress) :virtual #t :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) @@ -1718,6 +1783,7 @@ :post progress-post ) +;; failed to figure out what this is: (defstate go-away (progress) :virtual #t :enter (behavior () @@ -1761,6 +1827,7 @@ :post (the-as (function none :behavior progress) ja-post) ) +;; failed to figure out what this is: (defstate gone (progress) :virtual #t :code (behavior () @@ -1778,11 +1845,13 @@ ) ) +;; definition for method 9 of type menu-option (defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." 0 ) +;; definition for method 9 of type menu-on-off-option (defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* on-off-choice)) @@ -1833,6 +1902,7 @@ 0 ) +;; definition for method 9 of type menu-yes-no-option (defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -1874,6 +1944,7 @@ 0 ) +;; definition for method 9 of type menu-slider-option (defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) @@ -1956,6 +2027,7 @@ 0 ) +;; definition for method 9 of type menu-stereo-mode-sound-option (defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) @@ -1994,6 +2066,7 @@ 0 ) +;; definition for method 9 of type menu-main-menu-option (defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (cond @@ -2089,6 +2162,7 @@ 0 ) +;; definition for method 9 of type menu-sub-menu-option (defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (and (-> *progress-state* secrets-unlocked) @@ -2149,6 +2223,7 @@ 0 ) +;; definition for method 9 of type menu-unlocked-menu-option (defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (memcard-unlocked-secrets? #t))) @@ -2290,6 +2365,7 @@ 0 ) +;; definition for method 9 of type menu-memcard-slot-option (defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (memcard-unlocked-secrets? #t) @@ -2335,6 +2411,7 @@ 0 ) +;; definition for method 9 of type menu-already-exists-option (defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2377,6 +2454,7 @@ 0 ) +;; definition for method 9 of type menu-create-game-option (defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2422,6 +2500,7 @@ 0 ) +;; definition for method 9 of type menu-insufficient-space-option (defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s5-0 (&-> *progress-state* yes-no-choice)) @@ -2517,6 +2596,7 @@ 0 ) +;; definition for method 9 of type menu-secrets-insufficient-space-option (defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (&-> *progress-state* yes-no-choice) @@ -2535,6 +2615,7 @@ 0 ) +;; definition for method 9 of type menu-video-mode-warning-option (defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2573,6 +2654,7 @@ 0 ) +;; definition for method 9 of type menu-video-mode-ok-option (defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2619,6 +2701,7 @@ 0 ) +;; definition for method 9 of type menu-progressive-mode-warning-option (defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2664,6 +2747,7 @@ 0 ) +;; definition for method 9 of type menu-progressive-mode-ok-option (defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2712,6 +2796,7 @@ 0 ) +;; definition for method 9 of type menu-card-removed-option (defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2723,6 +2808,7 @@ 0 ) +;; definition for method 9 of type menu-insert-card-option (defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." *progress-save-info* @@ -2740,6 +2826,7 @@ 0 ) +;; definition for method 9 of type menu-error-loading-option (defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2751,6 +2838,7 @@ 0 ) +;; definition for method 9 of type menu-error-auto-saving-option (defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2762,6 +2850,7 @@ 0 ) +;; definition for method 9 of type menu-error-disc-removed-option (defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2775,6 +2864,7 @@ 0 ) +;; definition for method 9 of type menu-error-reading-option (defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2786,6 +2876,7 @@ 0 ) +;; definition for method 9 of type menu-icon-info-option (defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2797,6 +2888,7 @@ 0 ) +;; definition for method 9 of type menu-quit-option (defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2841,6 +2933,7 @@ 0 ) +;; definition for method 9 of type menu-format-card-option (defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2885,6 +2978,8 @@ 0 ) +;; definition for method 9 of type menu-select-start-option +;; WARN: disable def twice: 110. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease @@ -2984,6 +3079,7 @@ 0 ) +;; definition for method 9 of type menu-select-scene-option (defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease @@ -3063,6 +3159,7 @@ 0 ) +;; definition for method 9 of type menu-bigmap-option (defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." ((method-of-object *bigmap* bigmap-method-12)) @@ -3071,6 +3168,7 @@ 0 ) +;; definition for method 9 of type menu-missions-option (defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease @@ -3124,6 +3222,7 @@ 0 ) +;; definition for method 9 of type menu-highscores-option (defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding) (seek-ease @@ -3195,6 +3294,7 @@ 0 ) +;; definition for method 9 of type menu-secret-option (defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let* ((s5-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) @@ -3317,6 +3417,7 @@ 0 ) +;; definition for method 9 of type menu-game-option (defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* game-options-vibrations) @@ -3502,6 +3603,7 @@ 0 ) +;; definition for function update-center-screen (defun update-center-screen () (with-pp (let ((v1-0 #f)) @@ -3556,6 +3658,7 @@ ) ) +;; definition for method 9 of type menu-graphic-option (defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* graphic-options-aspect-ratio) @@ -3752,6 +3855,7 @@ 0 ) +;; definition for function update-restart-quit (defun update-restart-quit ((arg0 menu-option) (arg1 progress) (arg2 symbol)) (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -3792,6 +3896,7 @@ 0 ) +;; definition for method 9 of type menu-qr-option (defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* qr-options-restart) diff --git a/test/decompiler/reference/jak2/levels/common/cty-guard-turret-button_REF.gc b/test/decompiler/reference/jak2/levels/common/cty-guard-turret-button_REF.gc index 7bf8952355..9351ab4f3d 100644 --- a/test/decompiler/reference/jak2/levels/common/cty-guard-turret-button_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/cty-guard-turret-button_REF.gc @@ -145,18 +145,18 @@ ;; definition for method 32 of type cty-guard-turret-button (defmethod idle-state-transition cty-guard-turret-button ((obj cty-guard-turret-button)) "If `button-status` has [[button-status:0]] set, transition to [[basebutton::27]] otherwise, [[basebutton::30]]" - (draw-control-method-12 (-> obj draw) (the-as uint 0) -1) + (setup-masks (-> obj draw) (the-as uint 0) -1) (cond ((logtest? (-> obj button-status) (button-status pressed)) (format #t "off~%") - (draw-control-method-12 (-> obj draw) (the-as uint 4) 0) - (draw-control-method-12 (-> obj draw) (the-as uint 1) 0) + (setup-masks (-> obj draw) (the-as uint 4) 0) + (setup-masks (-> obj draw) (the-as uint 1) 0) (go (method-of-object obj down-idle)) ) (else (format #t "on~%") - (draw-control-method-12 (-> obj draw) (the-as uint 4) 0) - (draw-control-method-12 (-> obj draw) (the-as uint 2) 0) + (setup-masks (-> obj draw) (the-as uint 4) 0) + (setup-masks (-> obj draw) (the-as uint 2) 0) (go (method-of-object obj pop-up)) ) ) @@ -168,9 +168,9 @@ :enter (behavior () (sound-play "gturret-button") (format #t "going-down off~%") - (draw-control-method-12 (-> self draw) (the-as uint 0) -1) - (draw-control-method-12 (-> self draw) (the-as uint 4) 0) - (draw-control-method-12 (-> self draw) (the-as uint 1) 0) + (setup-masks (-> self draw) (the-as uint 0) -1) + (setup-masks (-> self draw) (the-as uint 4) 0) + (setup-masks (-> self draw) (the-as uint 1) 0) (press! self #t) (none) )