mirror of
https://github.com/open-goal/jak-project
synced 2026-06-01 09:48:00 -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:
+2
-4
@@ -364,7 +364,7 @@
|
||||
(behavior ()
|
||||
(while #t
|
||||
(if (not (paused?))
|
||||
(set! (-> self offset) (seekl (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio)))))
|
||||
(seekl! (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(dummy-17 self)
|
||||
(if (<= (-> self offset) 0)
|
||||
@@ -428,9 +428,7 @@
|
||||
(behavior ((arg0 int))
|
||||
(while #t
|
||||
(if (not (paused?))
|
||||
(set! (-> self offset)
|
||||
(seekl (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(seekl! (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(dummy-17 self)
|
||||
(when (movie?)
|
||||
|
||||
+1
-3
@@ -1758,9 +1758,7 @@
|
||||
(set! sv-464 6)
|
||||
)
|
||||
(if (-> obj language-transition)
|
||||
(set! (-> obj language-x-offset)
|
||||
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(seekl! (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(when (>= (-> obj language-x-offset) 100)
|
||||
(set! (-> obj language-selection) (the-as language-enum sv-448))
|
||||
|
||||
+32
-42
@@ -2136,30 +2136,26 @@
|
||||
(if (and (= (-> self display-state) (-> self next-display-state))
|
||||
(= (-> self display-level-index) (-> self next-level-index))
|
||||
)
|
||||
(set! (-> self transition-offset)
|
||||
(seekl
|
||||
(-> self transition-offset)
|
||||
0
|
||||
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
|
||||
2
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self transition-offset)
|
||||
(seekl
|
||||
(-> self transition-offset)
|
||||
512
|
||||
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
|
||||
2
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(seekl!
|
||||
(-> self transition-offset)
|
||||
0
|
||||
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
|
||||
2
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
(seekl!
|
||||
(-> self transition-offset)
|
||||
512
|
||||
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
|
||||
2
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-transition-progress! self (-> self transition-offset))
|
||||
(set! (-> self in-transition) (or (-> self force-transition) (nonzero? (-> self transition-offset))))
|
||||
@@ -2457,16 +2453,13 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(while #t
|
||||
(set! (-> self in-out-position)
|
||||
(seekl (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(seekl! (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
|
||||
(when (< (-> self in-out-position) 2867)
|
||||
(set! (-> self transition-offset) (seekl
|
||||
(-> self transition-offset)
|
||||
0
|
||||
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
)
|
||||
)
|
||||
(seekl!
|
||||
(-> self transition-offset)
|
||||
0
|
||||
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
)
|
||||
(set-transition-progress! self (-> self transition-offset))
|
||||
)
|
||||
(if (zero? (-> self in-out-position))
|
||||
@@ -2498,17 +2491,14 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(while #t
|
||||
(set! (-> self transition-offset) (seekl
|
||||
(-> self transition-offset)
|
||||
512
|
||||
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
)
|
||||
)
|
||||
(seekl!
|
||||
(-> self transition-offset)
|
||||
512
|
||||
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
|
||||
)
|
||||
(set-transition-progress! self (-> self transition-offset))
|
||||
(when (< 153 (-> self transition-offset))
|
||||
(set! (-> self in-out-position)
|
||||
(seekl (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
(seekl! (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio))))
|
||||
(if (= (-> self in-out-position) 4096)
|
||||
(go progress-gone)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user