mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -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:
@@ -139,7 +139,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)
|
||||
(TODO.VRGET vf1)
|
||||
(.sqrt.vf Q vf1 :ftf #b0)
|
||||
(.add.vf vf2 vf0 Q :mask #b1)
|
||||
@@ -158,7 +158,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)
|
||||
(TODO.VRGET vf1)
|
||||
(.sub.w.vf vf1 vf1 vf0)
|
||||
(.mov v0-0 vf1)
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
(vf4 :class vf)
|
||||
(vf8 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(matrix-transpose! dst src)
|
||||
(.lvf vf1 (&-> dst vector 0 quad))
|
||||
(.lvf vf2 (&-> dst vector 1 quad))
|
||||
@@ -380,7 +380,7 @@
|
||||
(vf8 :class vf)
|
||||
(vf9 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(.lvf vf23 (&-> src vector 0 quad))
|
||||
@@ -1101,7 +1101,7 @@
|
||||
(vf14 :class vf)
|
||||
(vf15 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf10 (&-> src vector 0 quad))
|
||||
(.lvf vf11 (&-> src vector 1 quad))
|
||||
(.lvf vf12 (&-> src vector 2 quad))
|
||||
|
||||
@@ -226,7 +226,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 vec quad))
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.add.z.vf acc vf1 vf1 :mask #b1000)
|
||||
@@ -245,7 +245,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 vec quad))
|
||||
(.mul.vf vf1 vf1 vf1)
|
||||
(.add.z.vf acc vf1 vf1 :mask #b1000)
|
||||
@@ -265,7 +265,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 vec quad))
|
||||
(.mul.vf vf2 vf1 vf1)
|
||||
(.add.z.vf acc vf2 vf2 :mask #b1000)
|
||||
@@ -291,7 +291,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 (&-> arg1 vec quad))
|
||||
(.mul.vf vf2 vf1 vf1)
|
||||
(.sub.vf vf3 vf3 vf3)
|
||||
@@ -318,7 +318,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 vec quad))
|
||||
(.lvf vf2 (&-> arg1 vec quad))
|
||||
(.mul.vf vf1 vf1 vf2)
|
||||
@@ -340,7 +340,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 (&-> arg1 vec quad))
|
||||
(.lvf vf2 (&-> arg2 vec quad))
|
||||
(.sub.vf vf4 vf0 vf0 :mask #b1000)
|
||||
@@ -423,7 +423,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)
|
||||
(.lvf vf1 (&-> arg1 vec quad))
|
||||
(.add.vf vf5 vf1 vf1)
|
||||
(.add.w.vf vf2 vf0 vf1 :mask #b1)
|
||||
@@ -866,7 +866,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)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
|
||||
@@ -105,7 +105,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)
|
||||
(let ((t9-0 vector-y-angle)
|
||||
(v1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -128,7 +128,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)
|
||||
(let ((gp-0 deg-diff)
|
||||
(s3-0 (y-angle obj))
|
||||
(t9-1 vector-y-angle)
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
(vf6 :class vf)
|
||||
(vf9 :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 vf2 vf2 vf2)
|
||||
(.lvf vf9 (&-> *cos-poly-vec* quad))
|
||||
@@ -360,7 +360,7 @@
|
||||
(vf8 :class vf)
|
||||
(vf9 :class vf)
|
||||
)
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg2 quad))
|
||||
(.sub.vf vf14 vf14 vf14)
|
||||
(.lvf vf11 (&-> *sin-poly-vec2* quad))
|
||||
|
||||
@@ -890,7 +890,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))
|
||||
(.mul.vf vf1 vf1 vf2)
|
||||
@@ -911,7 +911,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.vf vf6 vf0 :mask #b1000)
|
||||
(.lvf vf4 (&-> arg1 quad))
|
||||
(.lvf vf5 (&-> arg2 quad))
|
||||
@@ -928,7 +928,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))
|
||||
(.mov.vf vf6 vf0 :mask #b1000)
|
||||
@@ -948,7 +948,7 @@
|
||||
;; definition for function vector-reset!
|
||||
(defun vector-reset! ((arg0 vector))
|
||||
(rlet ((vf0 :class vf))
|
||||
(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))
|
||||
(init-vf0-vector)
|
||||
(.svf (&-> arg0 quad) vf0)
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -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