mirror of
https://github.com/open-goal/jak-project
synced 2026-07-31 00:14:38 -04:00
[decompiler] Detect vector*! (#3846)
Detect use of `vector*!`, which is inlined in jak 2 and jak 3. --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
+24
-41
@@ -1080,53 +1080,36 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior ja-linear-vel process-drawable ((chan int))
|
||||
(local-vars (s4-1 vector) (sv-16 res-tag))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
(let* ((s4-0 (-> self skel root-channel chan))
|
||||
(v1-2 (-> s4-0 frame-group))
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((s4-0 (-> self skel root-channel chan))
|
||||
(v1-2 (-> s4-0 frame-group))
|
||||
)
|
||||
(cond
|
||||
((-> v1-2 extra)
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((gp-0 (res-lump-data (-> v1-2 extra) 'linear-vel pointer :tag-ptr (& sv-16))))
|
||||
(cond
|
||||
(gp-0
|
||||
(let* ((s5-0 (the int (the float (the int (-> s4-0 frame-num)))))
|
||||
(f0-5 (-> s4-0 frame-num))
|
||||
(f28-0 (- f0-5 (the float (the int f0-5))))
|
||||
)
|
||||
(set! s4-1 (new 'static 'vector))
|
||||
(let ((f30-0 (ja-rate 0)))
|
||||
(vector-lerp! s4-1 (the-as vector (&+ gp-0 (* s5-0 16))) (the-as vector (&+ gp-0 (* (+ s5-0 1) 16))) f28-0)
|
||||
(let ((a0-7 s4-1))
|
||||
(let ((v1-9 s4-1)
|
||||
(a1-3 (-> self root scale))
|
||||
)
|
||||
(.lvf vf4 (&-> v1-9 quad))
|
||||
(.lvf vf5 (&-> a1-3 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> a0-7 quad) vf6)
|
||||
)
|
||||
(vector-float*! s4-1 s4-1 f30-0)
|
||||
)
|
||||
(cond
|
||||
((-> v1-2 extra)
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((gp-0 (res-lump-data (-> v1-2 extra) 'linear-vel pointer :tag-ptr (& sv-16))))
|
||||
(cond
|
||||
(gp-0
|
||||
(let* ((s5-0 (the int (the float (the int (-> s4-0 frame-num)))))
|
||||
(f0-5 (-> s4-0 frame-num))
|
||||
(f28-0 (- f0-5 (the float (the int f0-5))))
|
||||
)
|
||||
(set! s4-1 (new 'static 'vector))
|
||||
(let ((f30-0 (ja-rate 0)))
|
||||
(vector-lerp! s4-1 (the-as vector (&+ gp-0 (* s5-0 16))) (the-as vector (&+ gp-0 (* (+ s5-0 1) 16))) f28-0)
|
||||
(vector*! s4-1 s4-1 (-> self root scale))
|
||||
(vector-float*! s4-1 s4-1 f30-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s4-1 *null-vector*)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s4-1 *null-vector*)
|
||||
)
|
||||
)
|
||||
s4-1
|
||||
)
|
||||
(else
|
||||
*null-vector*
|
||||
)
|
||||
s4-1
|
||||
)
|
||||
(else
|
||||
*null-vector*
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user