(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:
Tyler Wilding
2021-05-16 13:49:24 -04:00
committed by GitHub
parent bf6e9fc9e9
commit b75a64fc29
23 changed files with 129 additions and 123 deletions
@@ -319,7 +319,7 @@
;; definition for method 0 of type math-camera
(defmethod new math-camera ((allocation symbol) (type-to-make type))
(rlet ((vf0 :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
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
@@ -371,7 +371,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 ((local-trans (new 'stack-no-clear 'vector)))
(set! (-> local-trans quad) (the-as uint128 0))
(set! (-> local-trans x) (cond
@@ -504,7 +504,7 @@
(vf30 :class vf)
(vf31 :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 0))
)
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
@@ -552,7 +552,7 @@
(vf30 :class vf)
(vf31 :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 0))
)
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
@@ -600,7 +600,7 @@
(vf30 :class vf)
(vf31 :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 0))
)
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))