mirror of
https://github.com/open-goal/jak-project
synced 2026-09-01 17:59:55 -04:00
(init-vf0-vector) to make vector code a bit more readable (#494)
* decomp: Use a macro for loading VF0 (maybe should be in goal-lib.gc?) * update references * lint: format * delete now unused file
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.mov vf6 arg2)
|
||||
(.lvf vf4 (&-> arg1 quad))
|
||||
(.add.x.vf vf5 vf0 vf0 :mask #b1000)
|
||||
@@ -40,7 +40,7 @@
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf4 (&-> arg1 quad))
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
@@ -59,7 +59,7 @@
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.mov vf7 arg3)
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.lvf vf4 (&-> arg1 quad))
|
||||
@@ -80,7 +80,7 @@
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.mov vf7 arg3)
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.lvf vf4 (&-> arg1 quad))
|
||||
@@ -101,7 +101,7 @@
|
||||
(vf6 :class vf)
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
(.div.vf Q vf0 vf5 :fsf #b11 :ftf #b1)
|
||||
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
||||
@@ -130,7 +130,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.mov vf2 arg2)
|
||||
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
|
||||
@@ -149,7 +149,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 #x3f000000))
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.lvf vf2 (&-> arg2 quad))
|
||||
@@ -172,7 +172,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf2 (&-> arg2 quad))
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.mov vf3 arg3)
|
||||
@@ -193,7 +193,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf2 (&-> arg2 quad))
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.mov vf3 arg3)
|
||||
@@ -213,7 +213,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.mov vf3 arg2)
|
||||
(.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
@@ -233,7 +233,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.sub.vf vf4 vf0 vf1 :mask #b111)
|
||||
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
|
||||
@@ -247,7 +247,7 @@
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.sub.vf vf1 vf0 vf1 :mask #b111)
|
||||
(.svf (&-> arg0 quad) vf1)
|
||||
@@ -267,7 +267,7 @@
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.lvf vf2 (&-> arg1 quad))
|
||||
(.sub.vf vf1 vf2 vf1)
|
||||
@@ -290,7 +290,7 @@
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.mov vf4 arg2)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.lvf vf2 (&-> arg0 quad))
|
||||
@@ -462,7 +462,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 arg0))
|
||||
(let ((a1-0 arg0)
|
||||
(f0-0 (-> *display* seconds-per-frame))
|
||||
@@ -511,7 +511,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(let ((v0-0 delta-p))
|
||||
(let ((v1-0 velocity)
|
||||
(f0-1 (* scale (-> *display* seconds-per-frame)))
|
||||
@@ -547,7 +547,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(let ((f0-0 (-> *display* frames-per-second)))
|
||||
(.mov at-0 f0-0)
|
||||
@@ -567,7 +567,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(let ((f0-0 (-> *display* seconds-per-frame)))
|
||||
(.mov at-0 f0-0)
|
||||
@@ -588,7 +588,7 @@
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.mul.x.vf acc vf0 vf1 :mask #b1000)
|
||||
@@ -613,7 +613,7 @@
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
@@ -645,7 +645,7 @@
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf2 (&-> arg0 quad))
|
||||
(.lvf vf3 (&-> arg1 quad))
|
||||
(.sub.vf vf1 vf3 vf2)
|
||||
@@ -692,7 +692,7 @@
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf2 (&-> arg0 quad))
|
||||
(.lvf vf3 (&-> arg1 quad))
|
||||
(.sub.vf vf1 vf3 vf2)
|
||||
@@ -736,7 +736,7 @@
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.mul.vf vf2 vf1 vf1 :mask #b111)
|
||||
(let ((v1-0 arg1))
|
||||
@@ -766,7 +766,7 @@
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.mul.vf vf2 vf1 vf1 :mask #b111)
|
||||
(let ((v1-0 arg1))
|
||||
@@ -935,7 +935,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> a quad))
|
||||
(.lvf vf2 (&-> b quad))
|
||||
(.mov vf4 alpha)
|
||||
@@ -957,7 +957,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((>= 0.0 alpha)
|
||||
(set! (-> out quad) (-> a quad))
|
||||
@@ -1192,7 +1192,7 @@
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.lvf vf2 (&-> arg1 quad))
|
||||
(.sub.vf vf3 vf1 vf2 :mask #b111)
|
||||
|
||||
Reference in New Issue
Block a user