[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:
water111
2025-01-20 12:21:28 -05:00
committed by GitHub
parent 3ee2b4423c
commit 98d6618a8b
37 changed files with 2449 additions and 3185 deletions
+31 -41
View File
@@ -1257,49 +1257,39 @@
'trans-hook
(lambda :behavior target
()
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(let* ((v1-0 (-> self parent))
(gp-0 (if v1-0
(the-as target (-> v1-0 0 self))
)
)
)
(init-vf0-vector)
(let ((gp-0 (ppointer->process (-> self parent))))
(vector-copy! (-> self control trans) (-> (the-as target gp-0) flut flut-trans))
(let ((v1-5 (-> (the-as target gp-0) flut flut-quat quad)))
(set! (-> self control quat quad) v1-5)
)
(vector-copy! (-> self control scale) (-> (the-as target gp-0) flut flut-scale))
(set! (-> self control ground-pat material)
(the-as int (-> (the-as target gp-0) control ground-pat material))
)
(set! (-> self draw light-index) (-> (the-as target gp-0) draw light-index))
(let ((t9-0 flut-color-from-index)
(v1-14 (-> self parent))
)
(t9-0 (-> (the-as target (if v1-14
(the-as target (-> v1-14 0 self))
)
)
flut
color-index
)
)
)
(let ((v1-18 (-> self draw color-mult)))
(let ((a0-19 (-> self draw color-mult))
(a1-1 (-> (the-as target gp-0) draw color-mult))
)
(.lvf vf4 (&-> a0-19 quad))
(.lvf vf5 (&-> a1-1 quad))
(vector-copy! (-> self control trans) (-> gp-0 flut flut-trans))
(let ((v1-5 (-> gp-0 flut flut-quat quad)))
(set! (-> self control quat quad) v1-5)
)
(vector-copy! (-> self control scale) (-> gp-0 flut flut-scale))
(set! (-> self control ground-pat material) (the-as int (-> gp-0 control ground-pat material)))
(set! (-> self draw light-index) (-> gp-0 draw light-index))
(let ((t9-0 flut-color-from-index)
(v1-14 (-> self parent))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.vf vf6 vf4 vf5 :mask #b111)
(.svf (&-> v1-18 quad) vf6)
)
(let ((v0-1 (-> (the-as target gp-0) draw color-emissive quad)))
(set! (-> self draw color-emissive quad) v0-1)
v0-1
)
(t9-0 (-> (the-as target (if v1-14
(the-as target (-> v1-14 0 self))
)
)
flut
color-index
)
)
)
(vector*!
(the-as vector (-> self draw color-mult))
(the-as vector (-> self draw color-mult))
(the-as vector (-> gp-0 draw color-mult))
)
(let ((v0-1 (-> gp-0 draw color-emissive quad)))
(set! (-> self draw color-emissive quad) v0-1)
v0-1
)
)
)