mirror of
https://github.com/open-goal/jak-project
synced 2026-09-12 04:49:19 -04:00
[decomp] Split condition and body of until after building expressions (#768)
* improve until decomp * fix tests
This commit is contained in:
+65
-69
@@ -1081,6 +1081,7 @@
|
||||
(arg3 (function process-drawable symbol))
|
||||
)
|
||||
(local-vars
|
||||
(v0-39 int)
|
||||
(spool-part int)
|
||||
(sv-24 float)
|
||||
(old-skel-status uint)
|
||||
@@ -1286,75 +1287,7 @@
|
||||
)
|
||||
(set! sv-72 (current-str-pos spool-sound))
|
||||
(set! sv-40 (the-as int (-> *display* base-frame-counter)))
|
||||
(until (begin
|
||||
(let* ((a0-55 *art-control*)
|
||||
(t9-32 (method-of-object a0-55 spool-push))
|
||||
(a1-24 (-> arg0 name))
|
||||
(a2-17 spool-part)
|
||||
(t0-6 -20.0)
|
||||
)
|
||||
(t9-32 a0-55 a1-24 a2-17 self t0-6)
|
||||
)
|
||||
(cond
|
||||
((< (+ spool-part 1) (-> arg0 parts))
|
||||
(let* ((a0-57 *art-control*)
|
||||
(t9-33 (method-of-object a0-57 spool-push))
|
||||
(a1-25 (-> arg0 name))
|
||||
(a2-18 (+ spool-part 1))
|
||||
(t0-7 -10.0)
|
||||
)
|
||||
(t9-33 a0-57 a1-25 a2-18 self t0-7)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self skel status) (logand -5 (-> self skel status)))
|
||||
)
|
||||
)
|
||||
(dummy-16 *load-state* (ja-aframe-num 0))
|
||||
(cond
|
||||
((and (< sv-32 sv-72) (= (current-str-id) spool-sound))
|
||||
(set!
|
||||
sv-56
|
||||
(+
|
||||
sv-56
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> *display* old-base-frame-counter)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-40 (the-as int (-> *display* base-frame-counter)))
|
||||
)
|
||||
(else
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! sv-32 sv-72)
|
||||
(set! sv-48 (the-as int (-> *display* base-frame-counter)))
|
||||
(suspend)
|
||||
(let
|
||||
((f0-14
|
||||
(* (- (the float (current-str-pos spool-sound)) sv-24) f30-0)
|
||||
)
|
||||
(a0-69 (-> self skel root-channel 0))
|
||||
)
|
||||
(set!
|
||||
(-> a0-69 param 0)
|
||||
(the float (+ (-> a0-69 frame-group data 0 length) -1))
|
||||
)
|
||||
(set! (-> a0-69 param 1) 1.0)
|
||||
(set! (-> a0-69 frame-num) f0-14)
|
||||
(joint-control-channel-group!
|
||||
a0-69
|
||||
(the-as art-joint-anim #f)
|
||||
num-func-seek!
|
||||
)
|
||||
)
|
||||
(let ((v0-39 (current-str-pos spool-sound)))
|
||||
(set! sv-72 v0-39)
|
||||
(>= (the float v0-39) f28-0)
|
||||
)
|
||||
)
|
||||
(until (>= (the float v0-39) f28-0)
|
||||
(if (= (-> self skel root-channel 0) (-> self skel channel))
|
||||
(logior! (-> self skel status) 32)
|
||||
)
|
||||
@@ -1369,6 +1302,69 @@
|
||||
)
|
||||
(goto cfg-88)
|
||||
)
|
||||
(let* ((a0-55 *art-control*)
|
||||
(t9-32 (method-of-object a0-55 spool-push))
|
||||
(a1-24 (-> arg0 name))
|
||||
(a2-17 spool-part)
|
||||
(t0-6 -20.0)
|
||||
)
|
||||
(t9-32 a0-55 a1-24 a2-17 self t0-6)
|
||||
)
|
||||
(cond
|
||||
((< (+ spool-part 1) (-> arg0 parts))
|
||||
(let* ((a0-57 *art-control*)
|
||||
(t9-33 (method-of-object a0-57 spool-push))
|
||||
(a1-25 (-> arg0 name))
|
||||
(a2-18 (+ spool-part 1))
|
||||
(t0-7 -10.0)
|
||||
)
|
||||
(t9-33 a0-57 a1-25 a2-18 self t0-7)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self skel status) (logand -5 (-> self skel status)))
|
||||
)
|
||||
)
|
||||
(dummy-16 *load-state* (ja-aframe-num 0))
|
||||
(cond
|
||||
((and (< sv-32 sv-72) (= (current-str-id) spool-sound))
|
||||
(set!
|
||||
sv-56
|
||||
(+
|
||||
sv-56
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> *display* old-base-frame-counter)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-40 (the-as int (-> *display* base-frame-counter)))
|
||||
)
|
||||
(else
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! sv-32 sv-72)
|
||||
(set! sv-48 (the-as int (-> *display* base-frame-counter)))
|
||||
(suspend)
|
||||
(let
|
||||
((f0-14 (* (- (the float (current-str-pos spool-sound)) sv-24) f30-0))
|
||||
(a0-69 (-> self skel root-channel 0))
|
||||
)
|
||||
(set!
|
||||
(-> a0-69 param 0)
|
||||
(the float (+ (-> a0-69 frame-group data 0 length) -1))
|
||||
)
|
||||
(set! (-> a0-69 param 1) 1.0)
|
||||
(set! (-> a0-69 frame-num) f0-14)
|
||||
(joint-control-channel-group!
|
||||
a0-69
|
||||
(the-as art-joint-anim #f)
|
||||
num-func-seek!
|
||||
)
|
||||
)
|
||||
(set! v0-39 (current-str-pos spool-sound))
|
||||
(set! sv-72 v0-39)
|
||||
)
|
||||
(set! sv-24 f28-0)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user