[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
+15 -29
View File
@@ -1458,7 +1458,7 @@
(joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 9)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self energy) (seek (-> self energy) (the-as float 0.25) (-> *display* seconds-per-frame)))
(seek! (-> self energy) (the-as float 0.25) (-> *display* seconds-per-frame))
(if (and (and *target*
(>= 245760.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
)
@@ -1501,7 +1501,7 @@
)
(b! #t cfg-3 :delay (nop!))
(label cfg-2)
(set! (-> self energy) (seek (-> self energy) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(suspend)
(label cfg-3)
(let ((v1-22 (-> self skel channel)))
@@ -1581,7 +1581,7 @@
(joint-control-channel-group! gp-2 (the-as art-joint-anim (-> self draw art-group data 10)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self energy) (seek (-> self energy) (the-as float 1.0) (* 0.2 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 1.0) (* 0.2 (-> *display* seconds-per-frame)))
(ja-blend-eval)
(suspend)
(let ((gp-3 (-> self skel root-channel 0)))
@@ -1813,7 +1813,7 @@
(when (not (-> self try-inc))
(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) (-> gp-0 user-int8 0))
)
(set! (-> self try-inc) #t)
@@ -1873,7 +1873,7 @@
(-> gp-1 ppointer)
)
(+! (-> self aphid-count) 1)
(set! (-> self want-aphid-count) (seekl (-> self want-aphid-count) 0 1))
(seekl! (-> self want-aphid-count) 0 1)
(set! (-> self aphid-spawn-time) (-> *display* base-frame-counter))
)
)
@@ -2126,12 +2126,8 @@
)
)
(until (or v1-64 (ja-done? 0))
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 0.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self body flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(seek! (-> self neck flex-blend) (the-as float 0.0) (* 2.0 (-> *display* seconds-per-frame)))
(set! f30-0 (seek
f30-0
(lerp-scale
@@ -2216,7 +2212,7 @@
)
(until (>= (ja-aframe-num 0) 285.0)
(try-preload-stream *art-control* "$GAMCAM29" 0 self (the-as float -99.0))
(set! (-> self energy) (seek (-> self energy) (the-as float 0.5) (* 0.2 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 0.5) (* 0.2 (-> *display* seconds-per-frame)))
(when (and (>= (ja-aframe-num 0) 175.0) (zero? gp-0))
(set! gp-0 1)
(let ((s5-2 (get-process *default-dead-pool* othercam #x4000)))
@@ -2238,10 +2234,8 @@
(set! gp-0 2)
(send-event (handle->process (-> self camera)) 'joint "camera2")
)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(set! (-> self interp) (seek (-> self interp) (the-as float 0.0) (-> *display* seconds-per-frame)))
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(seek! (-> self interp) (the-as float 0.0) (-> *display* seconds-per-frame))
(let ((a0-31 (-> self skel root-channel 0)))
(set! (-> a0-31 param 0) (the float (+ (-> a0-31 frame-group data 0 length) -1)))
(set! (-> a0-31 param 1) 0.66)
@@ -2312,13 +2306,9 @@
)
(until (ja-done? 0)
(ja-blend-eval)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(if (>= 1 arg0)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 1.0) (-> *display* seconds-per-frame))
)
(seek! (-> self neck flex-blend) (the-as float 1.0) (-> *display* seconds-per-frame))
)
(suspend)
(let ((s4-1 (-> self skel root-channel 0)))
@@ -2338,12 +2328,8 @@
(joint-control-channel-group! s5-1 (the-as art-joint-anim (-> self draw art-group data 7)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(seek! (-> self neck flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(suspend)
(let ((s5-2 (-> self skel root-channel 0)))
(set! (-> s5-2 param 0) (ja-aframe (the-as float 240.0) 0))
@@ -2379,7 +2365,7 @@
(set! s5-0 (-> s5-0 0 brother))
)
)
(set! (-> self health) (seek (-> self health) (the-as float 0.0) (the-as float 1.0)))
(seek! (-> self health) (the-as float 0.0) (the-as float 1.0))
(send-event (ppointer->process (-> self leaf 1)) 'kill 0)
(send-event (ppointer->process (-> self leaf 0)) 'kill 0)
(let ((a0-5 (-> self skel root-channel 0)))