[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
@@ -553,7 +553,7 @@
(set! (-> self try-counted) #t)
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(set! (-> self try-count) (the-as uint (-> gp-0 user-int8 0)))
)
)
+2 -6
View File
@@ -641,18 +641,14 @@
)
)
(let ((f30-1 (-> self idle-y-offset)))
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
(if (= (-> self float-height-offset) f30-1)
(go-virtual rigid-body-platform-idle)
)
)
)
(else
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) (-> self float-y-offset) (* 32768.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) (-> self float-y-offset) (* 32768.0 (-> *display* seconds-per-frame)))
)
)
(none)
+4 -10
View File
@@ -719,9 +719,7 @@
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> self draw art-group data 43)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self joint blend)
(seek (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
(let* ((f1-1 (/ (- (ja-frame-num 0) (ja-aframe (the-as float 54.0) 0))
(- (the float (ja-num-frames 0)) (ja-aframe (the-as float 54.0) 0))
)
@@ -758,9 +756,7 @@
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> self draw art-group data 42)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self joint blend)
(seek (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
(let* ((f1-1 (/ (- (ja-frame-num 0) (ja-aframe (the-as float 32.0) 0))
(- (the float (ja-num-frames 0)) (ja-aframe (the-as float 32.0) 0))
)
@@ -1119,9 +1115,7 @@
)
(until (ja-done? 0)
(if (>= (ja-frame-num 0) (ja-aframe (the-as float 235.0) 0))
(set! (-> self side-pos)
(seek (-> self side-pos) (the-as float 0.0) (* 20480.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self side-pos) (the-as float 0.0) (* 20480.0 (-> *display* seconds-per-frame)))
)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
@@ -1297,7 +1291,7 @@
(set! (-> self try-counted) #t)
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(set! (-> self try-count) (the-as uint (-> gp-0 user-int8 0)))
)
)