[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
+2 -2
View File
@@ -2178,7 +2178,7 @@
(vector-! s5-0 (-> self entity extra trans) s5-0)
(dotimes (v1-53 6)
(vector+! (the-as vector (-> arg0 info v1-53)) (the-as vector (-> arg0 info v1-53)) s5-0)
(set! (-> arg0 info v1-53 dest y) (+ (-> (new 'static 'array float 1 2048.0) 0) (-> arg0 info v1-53 dest y)))
(set! (-> arg0 info v1-53 dest y) (+ 2048.0 (-> arg0 info v1-53 dest y)))
)
)
(none)
@@ -3907,7 +3907,7 @@
0
(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)
(let ((v1-5 (-> gp-0 user-int8 0)))
(set! (-> self dda) (cond
((< 15 v1-5)
+1 -3
View File
@@ -151,9 +151,7 @@
(if (= (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self path-pos) (-> self dest))
)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self dest) (* (-> self speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self dest) (* (-> self speed) (-> *display* seconds-per-frame)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name