mirror of
https://github.com/open-goal/jak-project
synced 2026-07-26 22:42:29 -04:00
[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:
+56
-72
@@ -875,18 +875,16 @@
|
||||
)
|
||||
)
|
||||
(if (and (= (-> self control surf name) '*tar-surface*) (< 8192.0 f30-1))
|
||||
(set! (-> self control unknown-surface00 target-speed) (seek
|
||||
(-> self control unknown-surface00 target-speed)
|
||||
(the-as float 4096.0)
|
||||
(* 245760.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-surface00 target-speed) (seek
|
||||
(-> self control unknown-surface00 target-speed)
|
||||
(the-as float (-> self control unknown-uint30))
|
||||
(* 81920.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-surface00 target-speed)
|
||||
(the-as float 4096.0)
|
||||
(* 245760.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-surface00 target-speed)
|
||||
(the-as float (-> self control unknown-uint30))
|
||||
(* 81920.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -1126,13 +1124,11 @@
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
|
||||
(set! (-> self control unknown-float122)
|
||||
(seek
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -1297,13 +1293,11 @@
|
||||
)
|
||||
(sound-play-by-name (static-sound-name "flut-flap") (-> self flut flap-sound-id) 1024 0 0 1 #t)
|
||||
)
|
||||
(set! (-> self control unknown-float122)
|
||||
(seek
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -1361,18 +1355,16 @@
|
||||
(set! (-> gp-1 frame-num) (ja-aframe (the-as float 14.0) 0))
|
||||
)
|
||||
)
|
||||
(set! (-> self control dynam gravity-max) (seek
|
||||
(-> self control dynam gravity-max)
|
||||
(-> self control unknown-dynamics00 gravity-max)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(set! (-> self control dynam gravity-length) (seek
|
||||
(-> self control dynam gravity-length)
|
||||
(-> self control unknown-dynamics00 gravity-length)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control dynam gravity-max)
|
||||
(-> self control unknown-dynamics00 gravity-max)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
(seek!
|
||||
(-> self control dynam gravity-length)
|
||||
(-> self control unknown-dynamics00 gravity-length)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(-> *display* base-frame-counter)
|
||||
(ja-channel-push! 2 30)
|
||||
@@ -1393,18 +1385,16 @@
|
||||
)
|
||||
(while #t
|
||||
(suspend)
|
||||
(set! (-> self control dynam gravity-max) (seek
|
||||
(-> self control dynam gravity-max)
|
||||
(-> self control unknown-dynamics00 gravity-max)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(set! (-> self control dynam gravity-length) (seek
|
||||
(-> self control dynam gravity-length)
|
||||
(-> self control unknown-dynamics00 gravity-length)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control dynam gravity-max)
|
||||
(-> self control unknown-dynamics00 gravity-max)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
(seek!
|
||||
(-> self control dynam gravity-length)
|
||||
(-> self control unknown-dynamics00 gravity-length)
|
||||
(* 163840.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
(let ((a0-23 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-23 param 0) (the float (+ (-> a0-23 frame-group data 0 length) -1)))
|
||||
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@@ -1516,13 +1506,11 @@
|
||||
(logior! (-> self control status) 1)
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(set! (-> self control unknown-float122)
|
||||
(seek
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-float122)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
|
||||
(-> *display* seconds-per-frame)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -2073,21 +2061,17 @@
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-2) 'event 'attack 'flut-attack)
|
||||
(send-event
|
||||
(ppointer->process gp-2)
|
||||
'function
|
||||
(lambda :behavior target
|
||||
((arg0 nav-enemy))
|
||||
(set! (-> arg0 collide-info root-prim local-sphere w) (seek
|
||||
(-> arg0 collide-info root-prim local-sphere w)
|
||||
(the-as float 28672.0)
|
||||
(* 286720.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(update-transforms! (-> arg0 collide-info))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-2) 'function (lambda :behavior target
|
||||
((arg0 nav-enemy))
|
||||
(seek!
|
||||
(-> arg0 collide-info root-prim local-sphere w)
|
||||
(the-as float 28672.0)
|
||||
(* 286720.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
(update-transforms! (-> arg0 collide-info))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user