mirror of
https://github.com/open-goal/jak-project
synced 2026-08-09 02:49:19 -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:
+36
-63
@@ -204,66 +204,43 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun update-templed-lights ((arg0 mood-context))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0)
|
||||
(set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0)
|
||||
(set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0)
|
||||
)
|
||||
(let ((s5-0 (-> arg0 light-group 1)))
|
||||
(mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(set! (-> s5-0 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((s5-1 (-> arg0 light-group 2)))
|
||||
(let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0)))
|
||||
(mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(let ((a1-11 (-> s5-1 dir0 color)))
|
||||
(let ((v1-6 (-> s5-1 dir0 color))
|
||||
(a0-6 s4-0)
|
||||
)
|
||||
(.lvf vf4 (&-> v1-6 quad))
|
||||
(.lvf vf5 (&-> a0-6 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> a1-11 quad) vf6)
|
||||
)
|
||||
(let ((a0-7 (-> s5-1 dir1 color)))
|
||||
(.lvf vf4 (&-> (-> s5-1 dir1 color) quad))
|
||||
(.lvf vf5 (&-> s4-0 quad))
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> a0-7 quad) vf6)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((v1-10 (-> arg0 light-group 3)))
|
||||
(vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55)
|
||||
(vector+!
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0)
|
||||
)
|
||||
(set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad))
|
||||
(let ((a0-12 (-> v1-10 dir0)))
|
||||
(set! (-> a0-12 direction x) 0.0)
|
||||
(set! (-> a0-12 direction y) 1.0)
|
||||
(set! (-> a0-12 direction z) 0.0)
|
||||
(set! (-> a0-12 direction w) 0.0)
|
||||
)
|
||||
(set! (-> v1-10 ambi extra x) 0.8)
|
||||
(set! (-> v1-10 dir0 extra x) 0.8)
|
||||
(set! (-> v1-10 dir1 extra x) 0.0)
|
||||
(set! (-> v1-10 dir2 extra x) 0.0)
|
||||
)
|
||||
(none)
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0)
|
||||
(set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0)
|
||||
(set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0)
|
||||
)
|
||||
(let ((s5-0 (-> arg0 light-group 1)))
|
||||
(mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(set! (-> s5-0 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((s5-1 (-> arg0 light-group 2)))
|
||||
(let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0)))
|
||||
(mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(vector*! (the-as vector (-> s5-1 dir0 color)) (the-as vector (-> s5-1 dir0 color)) s4-0)
|
||||
(vector*! (the-as vector (-> s5-1 dir1 color)) (the-as vector (-> s5-1 dir1 color)) s4-0)
|
||||
)
|
||||
(set! (-> s5-1 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((v1-10 (-> arg0 light-group 3)))
|
||||
(vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55)
|
||||
(vector+!
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0)
|
||||
)
|
||||
(set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad))
|
||||
(let ((a0-13 (-> v1-10 dir0)))
|
||||
(set! (-> a0-13 direction x) 0.0)
|
||||
(set! (-> a0-13 direction y) 1.0)
|
||||
(set! (-> a0-13 direction z) 0.0)
|
||||
(set! (-> a0-13 direction w) 0.0)
|
||||
)
|
||||
(set! (-> v1-10 ambi extra x) 0.8)
|
||||
(set! (-> v1-10 dir0 extra x) 0.8)
|
||||
(set! (-> v1-10 dir1 extra x) 0.0)
|
||||
(set! (-> v1-10 dir2 extra x) 0.0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function init-mood-templed
|
||||
@@ -299,7 +276,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+36
-63
@@ -25,66 +25,43 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun update-templex-lights ((arg0 mood-context))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0)
|
||||
(set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0)
|
||||
(set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0)
|
||||
)
|
||||
(let ((s5-0 (-> arg0 light-group 1)))
|
||||
(mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(set! (-> s5-0 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((s5-1 (-> arg0 light-group 2)))
|
||||
(let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0)))
|
||||
(mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(let ((a1-11 (-> s5-1 dir0 color)))
|
||||
(let ((v1-6 (-> s5-1 dir0 color))
|
||||
(a0-6 s4-0)
|
||||
)
|
||||
(.lvf vf4 (&-> v1-6 quad))
|
||||
(.lvf vf5 (&-> a0-6 quad))
|
||||
)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> a1-11 quad) vf6)
|
||||
)
|
||||
(let ((a0-7 (-> s5-1 dir1 color)))
|
||||
(.lvf vf4 (&-> (-> s5-1 dir1 color) quad))
|
||||
(.lvf vf5 (&-> s4-0 quad))
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
(.mul.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> a0-7 quad) vf6)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((v1-10 (-> arg0 light-group 3)))
|
||||
(vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55)
|
||||
(vector+!
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0)
|
||||
)
|
||||
(set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad))
|
||||
(let ((a0-12 (-> v1-10 dir0)))
|
||||
(set! (-> a0-12 direction x) 0.0)
|
||||
(set! (-> a0-12 direction y) 1.0)
|
||||
(set! (-> a0-12 direction z) 0.0)
|
||||
(set! (-> a0-12 direction w) 0.0)
|
||||
)
|
||||
(set! (-> v1-10 ambi extra x) 0.8)
|
||||
(set! (-> v1-10 dir0 extra x) 0.8)
|
||||
(set! (-> v1-10 dir1 extra x) 0.0)
|
||||
(set! (-> v1-10 dir2 extra x) 0.0)
|
||||
)
|
||||
(none)
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0)
|
||||
(set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0)
|
||||
(set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0)
|
||||
)
|
||||
(let ((s5-0 (-> arg0 light-group 1)))
|
||||
(mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(set! (-> s5-0 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((s5-1 (-> arg0 light-group 2)))
|
||||
(let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0)))
|
||||
(mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192)
|
||||
(vector*! (the-as vector (-> s5-1 dir0 color)) (the-as vector (-> s5-1 dir0 color)) s4-0)
|
||||
(vector*! (the-as vector (-> s5-1 dir1 color)) (the-as vector (-> s5-1 dir1 color)) s4-0)
|
||||
)
|
||||
(set! (-> s5-1 ambi extra x) 0.8)
|
||||
)
|
||||
(let ((v1-10 (-> arg0 light-group 3)))
|
||||
(vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55)
|
||||
(vector+!
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(the-as vector (-> v1-10 ambi color))
|
||||
(new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0)
|
||||
)
|
||||
(set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad))
|
||||
(let ((a0-13 (-> v1-10 dir0)))
|
||||
(set! (-> a0-13 direction x) 0.0)
|
||||
(set! (-> a0-13 direction y) 1.0)
|
||||
(set! (-> a0-13 direction z) 0.0)
|
||||
(set! (-> a0-13 direction w) 0.0)
|
||||
)
|
||||
(set! (-> v1-10 ambi extra x) 0.8)
|
||||
(set! (-> v1-10 dir0 extra x) 0.8)
|
||||
(set! (-> v1-10 dir1 extra x) 0.0)
|
||||
(set! (-> v1-10 dir2 extra x) 0.0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function update-mood-templex
|
||||
@@ -104,7 +81,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user