[decompiler] detect seek! and seekl! macros (#1317)

* detect `seek!` and `seekl!`

* fancy struct instead of pair mess

* fixes

* i think this was wrong?

* update refs

* update source

* More logical branching

* even better branching
This commit is contained in:
ManDude
2022-04-18 20:01:44 +01:00
committed by GitHub
parent cbc6987351
commit 66e395d547
109 changed files with 952 additions and 1398 deletions
+1 -1
View File
@@ -436,7 +436,7 @@
(deg-seek (-> self facing-rot z) 16384.0 (* (-> self facing-rotv z) (-> *display* seconds-per-frame)))
)
(quaternion-zxy! (-> self root quat) (-> self facing-rot))
(set! (-> self root scale x) (seek (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame))))
(seek! (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame)))
(set! (-> self root scale y) (-> self root scale x))
(set! (-> self root scale z) (-> self root scale x))
(none)
+2 -2
View File
@@ -139,7 +139,7 @@
(deg-seek (-> self facing-rot z) 16384.0 (* (-> self facing-rotv z) (-> *display* seconds-per-frame)))
)
(quaternion-zxy! (-> self root quat) (-> self facing-rot))
(set! (-> self root scale x) (seek (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame))))
(seek! (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame)))
(set! (-> self root scale y) (-> self root scale x))
(set! (-> self root scale z) (-> self root scale x))
(none)
@@ -830,7 +830,7 @@
(let ((f0-44 (+ (-> obj orient-rot y) (* (-> obj spin-vel) (-> *display* seconds-per-frame)))))
(set! (-> obj orient-rot y) (- f0-44 (* (the float (the int (/ f0-44 65536.0))) 65536.0)))
)
(set! (-> obj spin-vel) (seek (-> obj spin-vel) 0.0 (* 91022.22 (-> *display* seconds-per-frame))))
(seek! (-> obj spin-vel) 0.0 (* 91022.22 (-> *display* seconds-per-frame)))
(when (< (fabs (-> obj spin-vel)) 69176.89)
(if (>= (-> obj spin-vel) 0.0)
(set! (-> obj spin-vel) 69176.89)