jak-project/goal_src/engine/target/target.gc
Tyler Wilding 111af1ec19
decomp: finish the remainder of untouched gameplay code (#893)
* decomp: finish `sidekick`

* decomp: got a lot of `target` done

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: finish `target` mostly

* decomp: finish `water`

* decomp: finished `robotboss-weapon`

* decomp: finish `robotboss-misc`

* decomp: finish the majority of `robotboss`

* blocked: `racer` has an issue around entering a state

* blocked: `target-racer` done mostly, but NYI case in one function

* blocked: `racer-states` mostly finished, but bitfield issue

* blocked: `billy` on state decomping

* blocked: `bully` on state decomping

* waiting: `rolling-lightning-mole` waiting on navigate for 2 funcs

* blocked: `rolling-robber` finished but `s6-1` issue

* blocked: `ogreboss` uint64's for types cant label load em!

* blocked: `mother-spider` state decompilation

* half-done `target-flut`

* blocked: `target-flut` some sort of new bitfield state

* some improvements in `racer-states` with my new-found knowledge

* progress: started on `target-death`

* blocked: `target-death` handle casts

* decomp: finish `collide-reaction-racer`

* blocked: `target-handler` handler forced to return `none`

* decomp: 99% of `target2` finished

* decomp: finish `target2`

* gsrc: update

* update post merge

* address feedback

* scripts: add script to detect decomp issues

* fix wide-spread `collide-shape` method missing arg

* some small things i changed from master

* address feedback

* fix typeconsistency issue
2021-11-24 00:33:10 -05:00

7584 lines
202 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: target.gc
;; name in dgo: target
;; dgos: GAME, ENGINE
;; TODO - almost all of these are in target-handler or target2, temporary
(define-extern target-attack-air (state symbol target)) ;; unknown type
(define-extern target-jump (state float float surface target)) ;; unknown type
(define-extern target-hit-ground (state symbol target)) ;; unknown type
(define-extern target-high-jump (state float float basic target)) ;; unknown type
(define-extern target-stance (state target)) ;; unknown type
(define-extern target-state-hook-exit (function none :behavior target))
(define-extern target-wade-stance (state target)) ;; unknown type
(define-extern target-ice-stance (state target)) ;; unknown type
(define-extern target-walk (state target)) ;; unknown type
(define-extern target-duck-stance (state target)) ;; unknown type
(define-extern target-attack (state target)) ;; unknown type
(define-extern target-running-attack (state target)) ;; unknown type
(define-extern target-stance-ambient (state target)) ;; unknown type
(define-extern target-effect-exit (function none :behavior target))
(define-extern target-ice-walk (state target)) ;; unknown type
(define-extern target-wheel (state target)) ;; unknown type
(define-extern target-duck-walk (state target)) ;; unknown type
(define-extern target-turn-around (state target)) ;; unknown type
(define-extern target-post (function none))
(define-extern target-walk-event-handler (function process int symbol event-message-block object :behavior target))
(define-extern target-attack-uppercut (state float float target)) ;; unknown type
(define-extern target-double-jump (state float float target)) ;; unknown type
(define-extern target-flop (state float float float target)) ;; unknown type
(define-extern target-launch (state float symbol vector int target)) ;; unknown type
(define-extern target-duck-high-jump (state float float symbol target)) ;; unknown type
(define-extern target-duck-high-jump-jump (state float float symbol target)) ;; unknown type
(define-extern target-wade-walk (state target)) ;; unknown type
(define-extern target-hit-ground-hard (state float target)) ;; unknown type
(define-extern target-land-effect (function none :behavior target))
(define-extern target-dangerous-event-handler (function process int symbol event-message-block object :behavior target))
(define-extern target-standard-event-handler (function process int symbol event-message-block object :behavior target))
(define-extern target-jump-event-handler (function process int symbol event-message-block object :behavior target))
(define-extern target-hit (state symbol attack-info target)) ;; unknown type
(define-extern target-shoved (function meters meters process (state target) object :behavior target))
(define-extern target-send-attack (function process uint uint int int symbol :behavior target)) ;; i suspect the uints are actually structures/basics
(define-extern target-yellow-blast (state target)) ;; unknown type
(define-extern target-bonk-event-handler (function process int symbol event-message-block object :behavior target))
(define-extern target-attack-uppercut-jump (state float float target)) ;; unknown type
(define-extern target-flop-hit-ground (state symbol target)) ;; unknown type
(define-extern target-swim-down (state target)) ;; unknown type
(define-extern target-yellow-jump-blast (state target)) ;; unknown type
(define-extern target-wheel-flip (state float float target)) ;; unknown type
;; DECOMP BEGINS
(defbehavior target-falling-anim target ((arg0 int) (arg1 int))
(let ((v1-2 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(cond
((or
(= v1-2 (-> self draw art-group data 38))
(= v1-2 (-> self draw art-group data 62))
)
)
((let ((v1-8 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-8 (-> self draw art-group data 44))
(= v1-8 (-> self draw art-group data 45))
)
)
(ja-channel-push! 1 45)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 frame-group)
(the-as art-joint-anim (-> self draw art-group data 50))
)
(set!
(-> a0-16 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 50))
data
0
length
)
-1
)
)
)
(set! (-> a0-16 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-16 frame-num) 0.0)
(joint-control-channel-group!
a0-16
(the-as art-joint-anim (-> self draw art-group data 50))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 param 0)
(the float (+ (-> a0-17 frame-group data 0 length) -1))
)
(set! (-> a0-17 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-17
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 50)
)
(until (ja-done? 0)
(suspend)
(let ((a0-23 (-> self skel root-channel 0)))
(set!
(-> a0-23 param 0)
(the float (+ (-> a0-23 frame-group data 0 length) -1))
)
(set! (-> a0-23 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-23
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 45)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 86)
)
(ja-channel-push! 1 45)
(let ((s5-0 (-> self skel root-channel 0)))
(set!
(-> s5-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 34))
)
(set!
(-> s5-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 34))
data
0
length
)
-1
)
)
)
(set! (-> s5-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> s5-0 frame-num) (ja-aframe (the-as float 20.0) 0))
(joint-control-channel-group!
s5-0
(the-as art-joint-anim (-> self draw art-group data 34))
num-func-seek!
)
)
(until (ja-done? 0)
(let ((a0-33 (-> self skel root-channel 0)))
(set!
(-> a0-33 param 0)
(the float (+ (-> a0-33 frame-group data 0 length) -1))
)
(set! (-> a0-33 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-33
(the-as art-joint-anim #f)
num-func-seek!
)
)
(suspend)
)
)
(else
(ja-channel-push! 1 arg1)
(let ((v1-82 (-> self skel root-channel 0)))
(set!
(-> v1-82 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
)
(while (!= (-> self skel root-channel 0) (-> self skel channel))
(suspend)
)
)
)
)
(let ((a0-42 (-> self skel root-channel 0)))
(set!
(-> a0-42 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-42 param 0) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-42 frame-num) 0.0)
(joint-control-channel-group!
a0-42
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
(let ((s5-1 (-> *display* base-frame-counter)))
(while (or (= arg0 -1) (< (- (-> *display* base-frame-counter) s5-1) arg0))
(suspend)
(let ((a0-43 (-> self skel root-channel 0)))
(set!
(-> a0-43 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-43 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-43
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
)
)
#f
)
;; ERROR: function was not converted to expressions. Cannot decompile.
(defbehavior target-falling-trans target ((arg0 basic) (arg1 cpad-list))
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack-air #f)
)
(when (= arg0 'target-eco-powerup)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(zero? (logand (-> self water flags) 512))
(< (- (-> *display* base-frame-counter) (-> self state-time)) 900)
(zero? (logand (-> self state-flags) 2048))
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
)
(if (logtest? (-> self control status) 1)
(go target-hit-ground #f)
)
(when
(if
(and
(<
(target-move-dist (the-as int (-> *TARGET-bank* stuck-time)))
(-> *TARGET-bank* stuck-distance)
)
(>= (the-as int arg1) 0)
(>=
(- (-> *display* base-frame-counter) (-> self state-time))
(the-as int arg1)
)
(not
(and
*cheat-mode*
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons r2)
)
)
)
)
#t
)
(logior! (-> self control status) 1)
(go target-hit-ground 'stuck)
)
(if (!= (-> self state-time) (-> *display* base-frame-counter))
(slide-down-test)
)
0
(none)
)
(defbehavior target-hit-ground-anim target ((arg0 symbol))
(let ((v1-2 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(cond
((or
(= v1-2 (-> self draw art-group data 63))
(= v1-2 (-> self draw art-group data 64))
(= v1-2 (-> self draw art-group data 66))
(= v1-2 (-> self draw art-group data 67))
)
(let
((gp-0
(or
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(<
(-> self control unknown-float01)
(-> (new 'static 'array float 1 61440.0) 0)
)
)
)
(f30-0 (if (= arg0 'swim)
(-> (new 'static 'array float 1 0.4) 0)
(-> (new 'static 'array float 1 1.0) 0)
)
)
)
(ja-channel-set! 1)
(let ((s5-0 (-> self skel root-channel 0)))
(set! (-> s5-0 frame-group) (the-as art-joint-anim (if gp-0
(->
self
draw
art-group
data
65
)
(->
self
draw
art-group
data
68
)
)
)
)
(set! (-> s5-0 param 0) (the float (+ (-> (the-as art-joint-anim (if gp-0
(->
self
draw
art-group
data
65
)
(->
self
draw
art-group
data
68
)
)
)
data 0 length
)
-1
)
)
)
(let
((f30-1
(seek
f30-0
(-> (new 'static 'array float 1 1.0) 0)
(* 0.5 (-> *display* seconds-per-frame))
)
)
)
(set! (-> s5-0 param 1) f30-1)
(set! (-> s5-0 frame-num) 0.0)
(joint-control-channel-group! s5-0 (the-as art-joint-anim (if gp-0
(->
self
draw
art-group
data
65
)
(->
self
draw
art-group
data
68
)
)
)
num-func-seek!
)
(until (ja-done? 0)
(TODO-RENAME-9 (-> self align))
(TODO-RENAME-10 (-> self align) (if gp-0
2
6
)
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(the-as float 1.5)
)
(when
(and
(>= 25.0 (ja-aframe-num 0))
(and
(>= (ja-aframe-num 0) 21.0)
(= (-> self next-state name) 'target-flop-hit-ground)
(!= (-> self control unknown-spoolanim00) 'stuck)
)
)
(set! (-> self event-hook) target-jump-event-handler)
(when
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons x)
)
(can-jump? #f)
)
(ja-channel-set! 0)
(go
target-high-jump
(-> *TARGET-bank* flop-jump-height-min)
(-> *TARGET-bank* flop-jump-height-max)
(if gp-0
'flop
'flop-forward
)
)
)
)
(suspend)
(let ((s5-1 (-> self skel root-channel 0)))
(set!
(-> s5-1 param 0)
(the float (+ (-> s5-1 frame-group data 0 length) -1))
)
(set!
f30-1
(seek
f30-1
(-> (new 'static 'array float 1 1.0) 0)
(* 0.5 (-> *display* seconds-per-frame))
)
)
(set! (-> s5-1 param 1) f30-1)
(joint-control-channel-group-eval!
s5-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
#f
)
((and
(= (-> self control ground-pat material) (pat-material ice))
(< 16384.0 (-> self control unknown-float01))
)
#f
)
((let ((v1-95 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(or
(= v1-95 (-> self draw art-group data 38))
(= v1-95 (-> self draw art-group data 42))
(= v1-95 (-> self draw art-group data 43))
)
(and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 34)
)
(>= (ja-aframe-num 0) 38.0)
)
)
)
(ja-channel-push! 1 6)
(let ((a0-35 (-> self skel root-channel 0)))
(set!
(-> a0-35 frame-group)
(the-as art-joint-anim (-> self draw art-group data 35))
)
(set!
(-> a0-35 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 35))
data
0
length
)
-1
)
)
)
(set! (-> a0-35 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-35 frame-num) 0.0)
(joint-control-channel-group!
a0-35
(the-as art-joint-anim (-> self draw art-group data 35))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-36 (-> self skel root-channel 0)))
(set!
(-> a0-36 param 0)
(the float (+ (-> a0-36 frame-group data 0 length) -1))
)
(set! (-> a0-36 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-36
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
#f
)
((and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 34)
)
(>= (ja-aframe-num 0) 35.0)
)
(ja-channel-set! 1)
(let ((a0-44 (-> self skel root-channel 0)))
(set!
(-> a0-44 frame-group)
(the-as art-joint-anim (-> self draw art-group data 39))
)
(set!
(-> a0-44 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 39))
data
0
length
)
-1
)
)
)
(set! (-> a0-44 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-44 frame-num) 0.0)
(joint-control-channel-group!
a0-44
(the-as art-joint-anim (-> self draw art-group data 39))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-45 (-> self skel root-channel 0)))
(set!
(-> a0-45 param 0)
(the float (+ (-> a0-45 frame-group data 0 length) -1))
)
(set! (-> a0-45 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-45
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((gp-1 (-> self skel root-channel 0)))
(set!
(-> gp-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 35))
)
(set!
(-> gp-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 35))
data
0
length
)
-1
)
)
)
(set! (-> gp-1 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-1 frame-num) (ja-aframe (the-as float 50.0) 0))
(joint-control-channel-group!
gp-1
(the-as art-joint-anim (-> self draw art-group data 35))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-49 (-> self skel root-channel 0)))
(set!
(-> a0-49 param 0)
(the float (+ (-> a0-49 frame-group data 0 length) -1))
)
(set! (-> a0-49 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-49
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
#f
)
((let ((v1-187 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-187 (-> self draw art-group data 34))
(= v1-187 (-> self draw art-group data 41))
)
)
(ja-channel-set! 1)
(let ((gp-2 (-> self skel root-channel 0)))
(set!
(-> gp-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 39))
)
(set!
(-> gp-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 39))
data
0
length
)
-1
)
)
)
(set! (-> gp-2 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-2 frame-num) (ja-aframe (the-as float 38.0) 0))
(joint-control-channel-group!
gp-2
(the-as art-joint-anim (-> self draw art-group data 39))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-61 (-> self skel root-channel 0)))
(set!
(-> a0-61 param 0)
(the float (+ (-> a0-61 frame-group data 0 length) -1))
)
(set! (-> a0-61 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-61
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((gp-3 (-> self skel root-channel 0)))
(set!
(-> gp-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 35))
)
(set!
(-> gp-3 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 35))
data
0
length
)
-1
)
)
)
(set! (-> gp-3 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-3 frame-num) (ja-aframe (the-as float 50.0) 0))
(joint-control-channel-group!
gp-3
(the-as art-joint-anim (-> self draw art-group data 35))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-65 (-> self skel root-channel 0)))
(set!
(-> a0-65 param 0)
(the float (+ (-> a0-65 frame-group data 0 length) -1))
)
(set! (-> a0-65 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-65
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
#f
)
((let ((v1-242 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-242 (-> self draw art-group data 73))
(= v1-242 (-> self draw art-group data 74))
)
)
(let ((f30-2 (if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 74)
)
(-> (new 'static 'array float 1 24576.0) 0)
(-> (new 'static 'array float 1 -24576.0) 0)
)
)
)
(ja-channel-push! 1 12)
(let ((gp-4 (-> self skel root-channel 0)))
(set!
(-> gp-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 39))
)
(set!
(-> gp-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 39))
data
0
length
)
-1
)
)
)
(set! (-> gp-4 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-4 frame-num) (ja-aframe (the-as float 38.0) 0))
(joint-control-channel-group!
gp-4
(the-as art-joint-anim (-> self draw art-group data 39))
num-func-seek!
)
)
(until (ja-done? 0)
(set-forward-vel f30-2)
(suspend)
(let ((a0-82 (-> self skel root-channel 0)))
(set!
(-> a0-82 param 0)
(the float (+ (-> a0-82 frame-group data 0 length) -1))
)
(set! (-> a0-82 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-82
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let ((gp-5 (-> self skel root-channel 0)))
(set!
(-> gp-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 35))
)
(set!
(-> gp-5 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 35))
data
0
length
)
-1
)
)
)
(set! (-> gp-5 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-5 frame-num) (ja-aframe (the-as float 50.0) 0))
(joint-control-channel-group!
gp-5
(the-as art-joint-anim (-> self draw art-group data 35))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-86 (-> self skel root-channel 0)))
(set!
(-> a0-86 param 0)
(the float (+ (-> a0-86 frame-group data 0 length) -1))
)
(set! (-> a0-86 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-86
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
#f
)
((let ((v1-305 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-305 (-> self draw art-group data 34))
(= v1-305 (-> self draw art-group data 56))
(= v1-305 (-> self draw art-group data 57))
(= v1-305 (-> self draw art-group data 58))
(= v1-305 (-> self draw art-group data 68))
(= v1-305 (-> self draw art-group data 65))
(= v1-305 (-> self draw art-group data 62))
)
)
(ja-channel-push! 1 12)
(let ((gp-6 (-> self skel root-channel 0)))
(set!
(-> gp-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 35))
)
(set!
(-> gp-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 35))
data
0
length
)
-1
)
)
)
(set! (-> gp-6 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-6 frame-num) (ja-aframe (the-as float 42.0) 0))
(joint-control-channel-group!
gp-6
(the-as art-joint-anim (-> self draw art-group data 35))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-113 (-> self skel root-channel 0)))
(set!
(-> a0-113 param 0)
(the float (+ (-> a0-113 frame-group data 0 length) -1))
)
(set! (-> a0-113 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-113
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
#f
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 35)
)
(let ((a0-119 (-> self skel root-channel 0)))
(set!
(-> a0-119 param 0)
(the float (+ (-> a0-119 frame-group data 0 length) -1))
)
(set! (-> a0-119 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group!
a0-119
(the-as art-joint-anim #f)
num-func-seek!
)
)
(while (not (ja-done? 0))
(suspend)
(ja-eval)
)
#f
)
)
)
)
(defstate target-startup (target)
:event
target-standard-event-handler
:code
(behavior ()
(suspend)
(suspend)
(go target-stance)
(none)
)
:post
target-no-move-post
)
(defstate target-stance (target)
:event
target-standard-event-handler
:enter
(behavior ()
(set! (-> self control unknown-surface00) *walk-mods*)
(set! (-> self state-time) (-> *display* base-frame-counter))
(none)
)
:exit
(behavior ()
(set! (-> self control unknown-float81) 0.0)
(target-state-hook-exit)
(none)
)
:trans
(behavior ()
((-> self state-hook))
(if (logtest? (-> self water flags) 1024)
(go target-wade-stance)
)
(when (= (-> self control ground-pat material) (pat-material ice))
(set! (-> self control unknown-float81) 0.0)
(remove-exit)
(go target-ice-stance)
)
(when (move-legs?)
(set! (-> self control unknown-float81) 0.0)
(remove-exit)
(go target-walk)
)
(when
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons l1 r1)
)
(can-duck?)
)
(set! (-> self control unknown-float81) 0.0)
(remove-exit)
(go target-duck-stance)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack)
)
(if (can-hands? #t)
(go target-running-attack)
)
(slide-down-test)
(fall-test)
(none)
)
:code
(behavior ()
(let ((s5-0 22)
(gp-0 (new 'stack 'ground-tween-info))
)
(let ((v1-3 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(cond
((or
(= v1-3 (-> self draw art-group data 89))
(= v1-3 (-> self draw art-group data 90))
)
(set! s5-0 45)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 71)
)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 frame-group)
(the-as art-joint-anim (-> self draw art-group data 72))
)
(set!
(-> a0-12 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 72))
data
0
length
)
-1
)
)
)
(set! (-> a0-12 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group!
a0-12
(the-as art-joint-anim (-> self draw art-group data 72))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set!
(-> a0-13 param 0)
(the float (+ (-> a0-13 frame-group data 0 length) -1))
)
(set! (-> a0-13 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 51)
)
(cond
((rand-vu-percent? (the-as float 0.3))
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 frame-group)
(the-as art-joint-anim (-> self draw art-group data 53))
)
(set!
(-> a0-20 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 53))
data
0
length
)
-1
)
)
)
(set! (-> a0-20 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-20 frame-num) 0.0)
(joint-control-channel-group!
a0-20
(the-as art-joint-anim (-> self draw art-group data 53))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set!
(-> a0-21 param 0)
(the float (+ (-> a0-21 frame-group data 0 length) -1))
)
(set! (-> a0-21 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((a0-23 (-> self skel root-channel 0)))
(set!
(-> a0-23 frame-group)
(the-as art-joint-anim (-> self draw art-group data 52))
)
(set!
(-> a0-23 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 52))
data
0
length
)
-1
)
)
)
(set! (-> a0-23 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-23 frame-num) 0.0)
(joint-control-channel-group!
a0-23
(the-as art-joint-anim (-> self draw art-group data 52))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-24 (-> self skel root-channel 0)))
(set!
(-> a0-24 param 0)
(the float (+ (-> a0-24 frame-group data 0 length) -1))
)
(set! (-> a0-24 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-24
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 78)
)
(let ((a0-30 (-> self skel root-channel 0)))
(set!
(-> a0-30 frame-group)
(the-as art-joint-anim (-> self draw art-group data 79))
)
(set!
(-> a0-30 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 79))
data
0
length
)
-1
)
)
)
(set! (-> a0-30 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-30 frame-num) 0.0)
(joint-control-channel-group!
a0-30
(the-as art-joint-anim (-> self draw art-group data 79))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(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) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-31
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 84)
)
(let ((a0-37 (-> self skel root-channel 0)))
(set!
(-> a0-37 frame-group)
(the-as art-joint-anim (-> self draw art-group data 85))
)
(set!
(-> a0-37 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 85))
data
0
length
)
-1
)
)
)
(set! (-> a0-37 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-37 frame-num) 0.0)
(joint-control-channel-group!
a0-37
(the-as art-joint-anim (-> self draw art-group data 85))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-38 (-> self skel root-channel 0)))
(set!
(-> a0-38 param 0)
(the float (+ (-> a0-38 frame-group data 0 length) -1))
)
(set! (-> a0-38 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-38
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! s5-0 0)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 59)
)
(set!
(-> self control unknown-float81)
(-> self control unknown-float80)
)
(set! (-> self control unknown-surface00) *walk-no-turn-mods*)
(let ((s4-0 (-> self skel root-channel 0)))
(set!
(-> s4-0 frame-group)
(the-as art-joint-anim (if (rand-vu-percent? (the-as float 0.3))
(-> self draw art-group data 61)
(-> self draw art-group data 60)
)
)
)
(set!
(-> s4-0 param 0)
(the
float
(+
(-> (the-as art-joint-anim (if (rand-vu-percent? (the-as float 0.3))
(-> self draw art-group data 61)
(-> self draw art-group data 60)
)
)
data 0 length
)
-1
)
)
)
(set! (-> s4-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> s4-0 frame-num) 0.0)
(joint-control-channel-group!
s4-0
(the-as art-joint-anim (if (rand-vu-percent? (the-as float 0.3))
(-> self draw art-group data 61)
(-> self draw art-group data 60)
)
)
num-func-seek!
)
)
(until (ja-done? 0)
(set!
(-> self control unknown-float81)
(seek
(-> self control unknown-float81)
(-> (new 'static 'array float 1 0.0) 0)
(-> *display* seconds-per-frame)
)
)
(suspend)
(let ((a0-50 (-> self skel root-channel 0)))
(set!
(-> a0-50 param 0)
(the float (+ (-> a0-50 frame-group data 0 length) -1))
)
(set! (-> a0-50 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-50
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! (-> self control unknown-surface00) *walk-mods*)
(set! (-> self control unknown-float81) 0.0)
(rot->dir-targ! (-> self control))
)
((let ((v1-206 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-206 (-> self draw art-group data 31))
(= v1-206 (-> self draw art-group data 32))
)
)
(ja-channel-push! 1 12)
(let ((a0-62 (-> self skel root-channel 0)))
(set!
(-> a0-62 frame-group)
(the-as art-joint-anim (-> self draw art-group data 30))
)
(set! (-> a0-62 param 0) 0.0)
(set! (-> a0-62 param 1) 1.2)
(set!
(-> a0-62 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 30))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-62
(the-as art-joint-anim (-> self draw art-group data 30))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-63 (-> self skel root-channel 0)))
(set! (-> a0-63 param 0) 0.0)
(set! (-> a0-63 param 1) 1.2)
(joint-control-channel-group-eval!
a0-63
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! s5-0 12)
)
((or (and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 23)
)
(begin
(set! s5-0 45)
(< 0.5 (-> self skel root-channel 6 frame-interp))
)
)
(let ((v1-243 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-243 (-> self draw art-group data 28))
(= v1-243 (-> self draw art-group data 29))
(= v1-243 (-> self draw art-group data 54))
(= v1-243 (-> self draw art-group data 55))
)
)
)
(let ((f30-1 (cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 23)
)
(let
((f0-57
(+ 50.0 (* 0.8333333 (+ -25.0 (ja-aframe-num 0))))
)
)
(- f0-57 (* (the float (the int (/ f0-57 50.0))) 50.0))
)
)
(else
(-> (new 'static 'array float 1 0.0) 0)
)
)
)
)
(set! s5-0 45)
(ja-channel-push! 3 s5-0)
(ground-tween-initialize
gp-0
(the-as uint 0)
(the-as uint (-> self draw art-group data 4))
(the-as uint (-> self draw art-group data 13))
(the-as uint (-> self draw art-group data 16))
(the-as uint (-> self draw art-group data 7))
(the-as uint (-> self draw art-group data 10))
)
(let ((s4-1 (-> self skel root-channel 0)))
(set! (-> s4-1 num-func) num-func-identity)
(set! (-> s4-1 frame-num) (ja-aframe f30-1 0))
)
)
(let ((a0-89 (-> self skel root-channel 1)))
(set! (-> a0-89 param 0) 0.0)
(joint-control-channel-group-eval!
a0-89
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-90 (-> self skel root-channel 2)))
(set! (-> a0-90 param 0) 0.0)
(joint-control-channel-group-eval!
a0-90
(the-as art-joint-anim #f)
num-func-chan
)
)
(dotimes (s4-2 3)
(until (ja-done? 0)
(ground-tween-update
gp-0
(-> self control unknown-float61)
(-> self control unknown-float62)
)
(suspend)
(let ((a0-92 (-> self skel root-channel 0)))
(set!
(-> a0-92 param 0)
(the float (+ (-> a0-92 frame-group data 0 length) -1))
)
(set! (-> a0-92 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-92
(the-as art-joint-anim #f)
num-func-seek!
)
)
(let ((a0-93 (-> self skel root-channel 1)))
(set! (-> a0-93 param 0) 0.0)
(joint-control-channel-group-eval!
a0-93
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-94 (-> self skel root-channel 2)))
(set! (-> a0-94 param 0) 0.0)
(joint-control-channel-group-eval!
a0-94
(the-as art-joint-anim #f)
num-func-chan
)
)
)
(let ((v1-298 (-> self skel root-channel 0)))
(set! (-> v1-298 num-func) num-func-identity)
(set! (-> v1-298 frame-num) 0.0)
)
)
(ground-tween-initialize
gp-0
(the-as uint 0)
(the-as uint (-> self draw art-group data 3))
(the-as uint (-> self draw art-group data 12))
(the-as uint (-> self draw art-group data 15))
(the-as uint (-> self draw art-group data 6))
(the-as uint (-> self draw art-group data 9))
)
(until (ja-done? 0)
(ground-tween-update
gp-0
(-> self control unknown-float61)
(-> self control unknown-float62)
)
(suspend)
(let ((a0-99 (-> self skel root-channel 0)))
(set!
(-> a0-99 param 0)
(the float (+ (-> a0-99 frame-group data 0 length) -1))
)
(set! (-> a0-99 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-99
(the-as art-joint-anim #f)
num-func-seek!
)
)
(let ((a0-100 (-> self skel root-channel 1)))
(set! (-> a0-100 param 0) 0.0)
(joint-control-channel-group-eval!
a0-100
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-101 (-> self skel root-channel 2)))
(set! (-> a0-101 param 0) 0.0)
(joint-control-channel-group-eval!
a0-101
(the-as art-joint-anim #f)
num-func-chan
)
)
)
)
((and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 23)
)
(>= (-> self control unknown-float01) 5734.4)
)
(set! s5-0 45)
)
)
)
(if (not (and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 5)
)
(= (ja-group-size) 3)
)
)
(ja-channel-push! 3 s5-0)
)
(ground-tween-initialize
gp-0
(the-as uint 0)
(the-as uint (-> self draw art-group data 5))
(the-as uint (-> self draw art-group data 14))
(the-as uint (-> self draw art-group data 17))
(the-as uint (-> self draw art-group data 8))
(the-as uint (-> self draw art-group data 11))
)
(while #t
(ground-tween-update
gp-0
(-> self control unknown-float61)
(-> self control unknown-float62)
)
(suspend)
(let ((a0-115 (-> self skel root-channel 0)))
(set! (-> a0-115 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-115
(the-as art-joint-anim #f)
num-func-loop!
)
)
(let ((a0-116 (-> self skel root-channel 1)))
(set! (-> a0-116 param 0) 0.0)
(joint-control-channel-group-eval!
a0-116
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-117 (-> self skel root-channel 2)))
(set! (-> a0-117 param 0) 0.0)
(joint-control-channel-group-eval!
a0-117
(the-as art-joint-anim #f)
num-func-chan
)
)
(if (can-play-stance-amibent?)
(go target-stance-ambient)
)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-walk (target)
:event
target-walk-event-handler
:enter
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control unknown-surface00) *walk-mods*)
(none)
)
:exit
(behavior ()
(target-effect-exit)
(target-state-hook-exit)
(none)
)
:trans
(behavior ()
((-> self state-hook))
(when (= (-> self control ground-pat material) (pat-material ice))
(target-effect-exit)
(remove-exit)
(go target-ice-walk)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons l1 r1)
)
(and
(>=
(-
(-> *display* base-frame-counter)
(the-as int (-> *TARGET-bank* wheel-timeout))
)
(-> self control unknown-dword30)
)
(and
(!=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(can-wheel?)
)
)
)
(go target-wheel)
)
(when
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons l1 r1)
)
(can-duck?)
)
(target-effect-exit)
(remove-exit)
(go target-duck-walk)
)
(when (not (move-legs?))
(target-effect-exit)
(remove-exit)
(go target-stance)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack)
)
(if (can-hands? #t)
(go target-running-attack)
)
(when
(and
(turn-around?)
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 90)
)
(set!
(-> self control transv quad)
(->
self
control
unknown-vector-array10
(-> self control unknown-int10)
quad
)
)
(set! (-> self control transv w) (-> (new 'static 'array float 1 1.0) 0))
(go target-turn-around)
)
(slide-down-test)
(fall-test)
(none)
)
:code
(behavior ()
(let ((f28-0 0.0)
(f30-0
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (+ -16384.0 (-> self control unknown-float01)))
)
)
)
(gp-0 #f)
)
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 33)
)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
(ja-channel-push! 7 15)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 69)
)
(ja-channel-push! 7 22)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 51)
)
(let
((f30-1
(fmax
0.8
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (-> self control unknown-float01))
)
)
)
)
(cond
((and
(rand-vu-percent? (the-as float 0.3))
(< 20480.0 (-> self control unknown-float01))
)
(let ((s5-0 (-> self skel root-channel 0)))
(set!
(-> s5-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 53))
)
(set! (-> s5-0 param 0) (ja-aframe (the-as float 29.0) 0))
(set! (-> s5-0 param 1) f30-1)
(set! (-> s5-0 frame-num) 0.0)
(joint-control-channel-group!
s5-0
(the-as art-joint-anim (-> self draw art-group data 53))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s5-1 (-> self skel root-channel 0)))
(set! (-> s5-1 param 0) (ja-aframe (the-as float 29.0) 0))
(set! (-> s5-1 param 1) f30-1)
(joint-control-channel-group-eval!
s5-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 frame-group)
(the-as art-joint-anim (-> self draw art-group data 55))
)
(set!
(-> a0-20 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 55))
data
0
length
)
-1
)
)
)
(set! (-> a0-20 param 1) f30-1)
(set! (-> a0-20 frame-num) 0.0)
(joint-control-channel-group!
a0-20
(the-as art-joint-anim (-> self draw art-group data 55))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set!
(-> a0-21 param 0)
(the float (+ (-> a0-21 frame-group data 0 length) -1))
)
(set! (-> a0-21 param 1) f30-1)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((s5-2 (-> self skel root-channel 0)))
(set!
(-> s5-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 52))
)
(set! (-> s5-2 param 0) (ja-aframe (the-as float 29.0) 0))
(set! (-> s5-2 param 1) f30-1)
(set! (-> s5-2 frame-num) 0.0)
(joint-control-channel-group!
s5-2
(the-as art-joint-anim (-> self draw art-group data 52))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s5-3 (-> self skel root-channel 0)))
(set! (-> s5-3 param 0) (ja-aframe (the-as float 29.0) 0))
(set! (-> s5-3 param 1) f30-1)
(joint-control-channel-group-eval!
s5-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-28 (-> self skel root-channel 0)))
(set!
(-> a0-28 frame-group)
(the-as art-joint-anim (-> self draw art-group data 54))
)
(set!
(-> a0-28 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 54))
data
0
length
)
-1
)
)
)
(set! (-> a0-28 param 1) f30-1)
(set! (-> a0-28 frame-num) 0.0)
(joint-control-channel-group!
a0-28
(the-as art-joint-anim (-> self draw art-group data 54))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-29 (-> self skel root-channel 0)))
(set!
(-> a0-29 param 0)
(the float (+ (-> a0-29 frame-group data 0 length) -1))
)
(set! (-> a0-29 param 1) f30-1)
(joint-control-channel-group-eval!
a0-29
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(ja-channel-push! 7 15)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
(set! f28-0 30.0)
)
(else
(let ((v1-108 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(cond
((or
(= v1-108 (-> self draw art-group data 59))
(= v1-108 (-> self draw art-group data 60))
)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
(set! f28-0 30.0)
(ja-channel-push! 7 45)
)
((let ((v1-116 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-116 (-> self draw art-group data 84))
(= v1-116 (-> self draw art-group data 85))
)
)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
(set! f28-0 26.0)
(ja-channel-push! 7 30)
)
((and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 23)
)
(= (-> self skel root-channel 0) (-> self skel channel))
)
(set! f28-0 (ja-aframe-num 0))
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 102)
)
(set! f28-0 (ja-aframe-num 0))
(ja-channel-push! 7 30)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 89)
)
(set! f28-0 (ja-aframe-num 0))
(ja-channel-push! 7 15)
)
((let ((v1-146 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(and
(or
(or
(= v1-146 (-> self draw art-group data 38))
(= v1-146 (-> self draw art-group data 71))
(= v1-146 (-> self draw art-group data 58))
(= v1-146 (-> self draw art-group data 62))
(= v1-146 (-> self draw art-group data 65))
(= v1-146 (-> self draw art-group data 68))
)
(and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 34)
)
(< 30.0 (ja-aframe-num 0))
)
)
(< 12288.0 (-> self control unknown-float01))
)
)
(let ((s5-4 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(f30-2 (-> self control ground-impact-vel))
)
(case (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(((-> self draw art-group data 71) (-> self draw art-group data 58))
(ja-channel-push! 1 15)
)
(else
(ja-channel-set! 1)
)
)
(cond
((< (if (= s5-4 (-> self draw art-group data 34))
(-> (new 'static 'array float 1 77824.0) 0)
(-> (new 'static 'array float 1 102400.0) 0)
)
f30-2
)
(let ((s5-5 (-> self skel root-channel 0)))
(set!
(-> s5-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 28))
)
(set!
(-> s5-5 param 0)
(ja-aframe (-> (new 'static 'array float 1 3.0) 0) 0)
)
(set! (-> s5-5 param 1) 1.00001)
(set! (-> s5-5 frame-num) 0.0)
(joint-control-channel-group!
s5-5
(the-as art-joint-anim (-> self draw art-group data 28))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s5-6 (-> self skel root-channel 0)))
(set!
(-> s5-6 param 0)
(ja-aframe (-> (new 'static 'array float 1 3.0) 0) 0)
)
(set! (-> s5-6 param 1) 1.00001)
(joint-control-channel-group-eval!
s5-6
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
((< (if (= s5-4 (-> self draw art-group data 34))
(-> (new 'static 'array float 1 61440.0) 0)
(-> (new 'static 'array float 1 102400.0) 0)
)
f30-2
)
(let ((s5-7 (-> self skel root-channel 0)))
(set!
(-> s5-7 frame-group)
(the-as art-joint-anim (-> self draw art-group data 28))
)
(set!
(-> s5-7 param 0)
(ja-aframe (-> (new 'static 'array float 1 3.0) 0) 0)
)
(set! (-> s5-7 param 1) 1.00001)
(set!
(-> s5-7 frame-num)
(ja-aframe (-> (new 'static 'array float 1 -1.0) 0) 0)
)
(joint-control-channel-group!
s5-7
(the-as art-joint-anim (-> self draw art-group data 28))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s5-8 (-> self skel root-channel 0)))
(set!
(-> s5-8 param 0)
(ja-aframe (-> (new 'static 'array float 1 3.0) 0) 0)
)
(set! (-> s5-8 param 1) 1.00001)
(joint-control-channel-group-eval!
s5-8
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((s5-9 (-> self skel root-channel 0)))
(set!
(-> s5-9 frame-group)
(the-as art-joint-anim (-> self draw art-group data 29))
)
(set! (-> s5-9 param 0) (ja-aframe (the-as float 4.0) 0))
(set! (-> s5-9 param 1) 1.00001)
(set! (-> s5-9 frame-num) 0.0)
(joint-control-channel-group!
s5-9
(the-as art-joint-anim (-> self draw art-group data 29))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s5-10 (-> self skel root-channel 0)))
(set! (-> s5-10 param 0) (ja-aframe (the-as float 4.0) 0))
(set! (-> s5-10 param 1) 1.00001)
(joint-control-channel-group-eval!
s5-10
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-116 (-> self skel root-channel 0)))
(set!
(-> a0-116 param 0)
(the float (+ (-> a0-116 frame-group data 0 length) -1))
)
(set!
(-> a0-116 param 1)
(/
(*
(fmax 20480.0 (-> self control unknown-float01))
(-> *display* seconds-per-frame)
)
(/
(-> *TARGET-bank* run-up-cycle-dist)
(-> *TARGET-bank* run-cycle-length)
)
)
)
(joint-control-channel-group-eval!
a0-116
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! f28-0 30.0)
(set! f30-0 (-> (new 'static 'array float 1 1.0) 0))
(ja-channel-set! 7)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 34)
)
(ja-channel-push! 7 15)
(set! gp-0 #t)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 78)
)
(ja-channel-push! 7 45)
)
(else
(ja-channel-push! 7 15)
)
)
)
)
)
(set! (-> self skel root-channel 3 command) 'push)
(set! (-> self skel root-channel 6 command) 'stack)
(let ((v1-265 (-> self skel root-channel 0)))
(set!
(-> v1-265 frame-group)
(the-as art-joint-anim (-> self draw art-group data 23))
)
)
(let ((f28-1 (ja-aframe f28-0 0)))
(let ((s5-11 (-> self skel root-channel 0)))
(set! (-> s5-11 frame-interp) 0.0)
(set! (-> s5-11 dist) (-> *TARGET-bank* walk-cycle-dist))
(joint-control-channel-group-eval!
s5-11
(the-as art-joint-anim (-> self draw art-group data 23))
num-func-identity
)
(set! (-> s5-11 frame-num) f28-1)
)
(let ((s5-12 (-> self skel root-channel 1)))
(set! (-> s5-12 frame-interp) 0.0)
(set! (-> s5-12 dist) (-> *TARGET-bank* walk-down-cycle-dist))
(joint-control-channel-group-eval!
s5-12
(the-as art-joint-anim (-> self draw art-group data 25))
num-func-identity
)
(set! (-> s5-12 frame-num) f28-1)
)
(let ((s5-13 (-> self skel root-channel 2)))
(set! (-> s5-13 frame-interp) 0.0)
(set! (-> s5-13 dist) (-> *TARGET-bank* walk-side-cycle-dist))
(joint-control-channel-group-eval!
s5-13
(the-as art-joint-anim (-> self draw art-group data 27))
num-func-identity
)
(set! (-> s5-13 frame-num) f28-1)
)
(let ((s5-14 (-> self skel root-channel 4)))
(set! (-> s5-14 frame-interp) 0.0)
(set! (-> s5-14 dist) (-> *TARGET-bank* run-down-cycle-dist))
(joint-control-channel-group-eval!
s5-14
(the-as art-joint-anim (-> self draw art-group data 20))
num-func-identity
)
(set! (-> s5-14 frame-num) f28-1)
)
(let ((s5-15 (-> self skel root-channel 5)))
(set! (-> s5-15 frame-interp) 0.0)
(set! (-> s5-15 dist) (-> *TARGET-bank* run-side-cycle-dist))
(joint-control-channel-group-eval!
s5-15
(the-as art-joint-anim (-> self draw art-group data 22))
num-func-identity
)
(set! (-> s5-15 frame-num) f28-1)
)
(let ((s5-16 (-> self skel root-channel 3)))
(set! (-> s5-16 frame-interp) 0.0)
(set! (-> s5-16 dist) (-> *TARGET-bank* run-cycle-dist))
(joint-control-channel-group-eval!
s5-16
(the-as art-joint-anim (-> self draw art-group data 18))
num-func-identity
)
(set! (-> s5-16 frame-num) f28-1)
)
)
(let ((f28-2 0.0)
(f26-1 0.0)
)
(while #t
(let
((f22-0
(fmax
(-> (new 'static 'array float 1 -1.0) 0)
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 2.0 (-> self control unknown-float61))
)
)
)
(f24-0
(fmax
(-> (new 'static 'array float 1 -1.0) 0)
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 1.6 (-> self control unknown-float62))
)
)
)
)
(set!
f30-0
(seek
f30-0
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (+ -16384.0 (-> self control unknown-float01)))
)
)
(* 2.0 (-> *display* seconds-per-frame))
)
)
(let ((v1-317 (-> self skel effect)))
(set! (-> v1-317 channel-offset) (if (< 0.5 f30-0)
3
0
)
)
)
0
(let ((f0-64 (fabs (- f22-0 f28-2))))
(set! f28-2 (seek f28-2 f22-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-64)))))
)
(let ((f0-69 (fabs (- f24-0 f26-1))))
(set! f26-1 (seek f26-1 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-69)))))
)
)
(cond
((>= f28-2 0.0)
(let ((v1-329 (-> self skel root-channel 1)))
(set! (-> v1-329 frame-interp) (fabs f28-2))
(set! (-> v1-329 dist) (-> *TARGET-bank* walk-up-cycle-dist))
(set!
(-> v1-329 frame-group)
(the-as art-joint-anim (-> self draw art-group data 24))
)
)
(let ((v1-332 (-> self skel root-channel 4)))
(set! (-> v1-332 frame-interp) (fabs f28-2))
(set! (-> v1-332 dist) (-> *TARGET-bank* run-up-cycle-dist))
(set!
(-> v1-332 frame-group)
(the-as art-joint-anim (-> self draw art-group data 19))
)
)
)
(else
(let ((v1-335 (-> self skel root-channel 1)))
(set! (-> v1-335 frame-interp) (fabs f28-2))
(set! (-> v1-335 dist) (-> *TARGET-bank* walk-down-cycle-dist))
(set!
(-> v1-335 frame-group)
(the-as art-joint-anim (-> self draw art-group data 25))
)
)
(let ((v1-338 (-> self skel root-channel 4)))
(set! (-> v1-338 frame-interp) (fabs f28-2))
(set! (-> v1-338 dist) (-> *TARGET-bank* run-down-cycle-dist))
(set!
(-> v1-338 frame-group)
(the-as art-joint-anim (-> self draw art-group data 20))
)
)
)
)
(cond
((>= f26-1 0.0)
(let ((v1-341 (-> self skel root-channel 2)))
(set! (-> v1-341 frame-interp) (fabs f26-1))
(set! (-> v1-341 dist) (-> *TARGET-bank* walk-side-cycle-dist))
(set!
(-> v1-341 frame-group)
(the-as art-joint-anim (-> self draw art-group data 26))
)
)
(let ((v1-344 (-> self skel root-channel 5)))
(set! (-> v1-344 frame-interp) (fabs f26-1))
(set! (-> v1-344 dist) (-> *TARGET-bank* run-side-cycle-dist))
(set!
(-> v1-344 frame-group)
(the-as art-joint-anim (-> self draw art-group data 21))
)
)
)
(else
(let ((v1-347 (-> self skel root-channel 2)))
(set! (-> v1-347 frame-interp) (fabs f26-1))
(set! (-> v1-347 dist) (-> *TARGET-bank* walk-side-cycle-dist))
(set!
(-> v1-347 frame-group)
(the-as art-joint-anim (-> self draw art-group data 27))
)
)
(let ((v1-350 (-> self skel root-channel 5)))
(set! (-> v1-350 frame-interp) (fabs f26-1))
(set! (-> v1-350 dist) (-> *TARGET-bank* run-side-cycle-dist))
(set!
(-> v1-350 frame-group)
(the-as art-joint-anim (-> self draw art-group data 22))
)
)
)
)
(set! (-> self skel root-channel 6 frame-interp) f30-0)
(let* ((f1-19 (dummy-9 (-> self skel)))
(f0-92
(/
(-> self control unknown-float01)
(* 60.0 (/ f1-19 (-> *TARGET-bank* run-cycle-length)))
)
)
(a0-182 (-> self skel root-channel 0))
)
(set! (-> a0-182 param 0) f0-92)
(joint-control-channel-group-eval!
a0-182
(the-as art-joint-anim #f)
num-func-loop!
)
)
(let ((a0-183 (-> self skel root-channel 1)))
(set! (-> a0-183 param 0) 0.0)
(joint-control-channel-group-eval!
a0-183
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-184 (-> self skel root-channel 2)))
(set! (-> a0-184 param 0) 0.0)
(joint-control-channel-group-eval!
a0-184
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-185 (-> self skel root-channel 3)))
(set! (-> a0-185 param 0) 0.0)
(joint-control-channel-group-eval!
a0-185
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-186 (-> self skel root-channel 4)))
(set! (-> a0-186 param 0) 0.0)
(joint-control-channel-group-eval!
a0-186
(the-as art-joint-anim #f)
num-func-chan
)
)
(let ((a0-187 (-> self skel root-channel 5)))
(set! (-> a0-187 param 0) 0.0)
(joint-control-channel-group-eval!
a0-187
(the-as art-joint-anim #f)
num-func-chan
)
)
(if (and gp-0 (!= (-> self skel root-channel 0) (-> self skel channel)))
(ja-blend-eval)
)
(suspend)
)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-turn-around (target)
:event
target-standard-event-handler
:enter
(behavior ()
(vector-turn-to (-> self control transv))
(set! (-> self control unknown-surface00) *turn-around-mods*)
(set!
(-> self control unknown-float81)
(-> (new 'static 'array float 1 1.0) 0)
)
(none)
)
:exit
(behavior ()
(target-state-hook-exit)
(set-forward-vel (-> (new 'static 'array float 1 0.0) 0))
(set! (-> self control unknown-float01) 0.0)
(set-quaternion! (-> self control) (-> self control dir-targ))
(set! (-> self control unknown-float81) 0.0)
(none)
)
:trans
(behavior ()
((-> self state-hook))
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack)
)
(if (can-hands? #t)
(go target-running-attack)
)
(if
(and
(zero? (logand (-> self control status) 1))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
24
)
)
(go target-falling #f)
)
(slide-down-test)
(none)
)
:code
(behavior ()
(ja-channel-push! 1 12)
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 33))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(quaternion-rotate-y!
(-> self control dir-targ)
(-> self control dir-targ)
(the-as float 32768.0)
)
(TODO-RENAME-9 (-> self align))
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) 2.0)
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
(TODO-RENAME-9 (-> self align))
(TODO-RENAME-10
(-> self align)
16
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(remove-exit)
(set! (-> self control unknown-float81) 0.0)
(set-forward-vel (the-as float 40960.0))
(set! (-> self control unknown-float01) 40960.0)
(target-state-hook-exit)
(go target-walk)
(none)
)
:post
target-no-stick-post
)
(defstate target-slide-down (target)
:event
target-walk-event-handler
:enter
(behavior ()
(set! (-> self control unknown-surface00) *jump-mods*)
(none)
)
:exit
(behavior ()
(set! (-> self control unknown-dword35) (-> *display* base-frame-counter))
(none)
)
:trans
(behavior ()
(when
(or
(logtest? (-> self control status) 1)
(if
(<
(target-move-dist (the-as int (-> *TARGET-bank* stuck-time)))
(-> *TARGET-bank* stuck-distance)
)
#t
)
)
(logior! (-> self control status) 1)
(go target-duck-stance)
)
(none)
)
:code
(behavior ()
(if (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 31)
)
)
(ja-channel-push! 1 30)
)
(while #t
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 31))
)
(set!
(-> a0-5 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 31))
data
0
length
)
-1
)
)
)
(set! (-> a0-5 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(the-as art-joint-anim (-> self draw art-group data 31))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 param 0)
(the float (+ (-> a0-6 frame-group data 0 length) -1))
)
(set! (-> a0-6 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-6
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defbehavior
init-var-jump target
((arg0 float) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector))
(set! (-> self control status) (logand -16385 (-> self control status)))
(delete-back-vel)
(when
(<
(-
(-> *display* base-frame-counter)
(the-as int (-> self control rider-time))
)
15
)
(let
((f0-1
(fmax
0.0
(fmin
28672.0
(*
0.5
(vector-dot
(-> self control dynam gravity-normal)
(-> self control rider-last-move)
)
)
)
)
)
)
(set! arg0 (+ arg0 f0-1))
(set! arg1 (+ arg1 f0-1))
)
(when
(or
(logtest? (-> self control unknown-surface01 flags) #x4000)
(= (-> self control poly-pat material) (pat-material rotate))
)
(+! (-> self control transv x) (-> self control rider-last-move x))
(+! (-> self control transv z) (-> self control rider-last-move z))
)
)
(set! (-> self control unknown-float123) 0.0)
(set! (-> self control unknown-float124) 0.0)
(cond
(arg3
(set!
(-> self control unknown-uint20)
(the-as uint (- arg0 (+ -409.6 (-> *TARGET-bank* jump-collide-offset))))
)
(set!
(-> self control unknown-int21)
(the-as int (- arg1 (-> *TARGET-bank* jump-collide-offset)))
)
)
(else
(set! (-> self control unknown-uint20) (the-as uint arg0))
(set! (-> self control unknown-int21) (the-as int arg1))
)
)
(when arg2
(let ((s4-1 (new-stack-vector0)))
(let ((f0-16 (vector-dot (-> self control dynam gravity-normal) arg4)))
0.0
(vector-!
s4-1
arg4
(vector-float*! s4-1 (-> self control dynam gravity-normal) f0-16)
)
)
(let* ((f0-17 (vector-length s4-1))
(f1-11 f0-17)
(f2-7
(-
(sqrtf (* 2.0 (-> self control dynam gravity-length) arg0))
(* 0.008333334 (- (-> self control dynam gravity-length)))
)
)
)
(vector+!
arg4
(vector-float*! arg4 (-> self control dynam gravity-normal) f2-7)
(vector-float*! s4-1 s4-1 (/ f0-17 f1-11))
)
)
)
)
(let ((v0-2 (-> self control unknown-vector102)))
(set! (-> v0-2 quad) (-> self control trans quad))
v0-2
)
)
(defbehavior
mod-var-jump target
((arg0 symbol) (arg1 symbol) (arg2 symbol) (arg3 vector))
(local-vars (v0-2 vector))
(let
((f30-0
(*
0.033333335
(the float (- (-> *display* base-frame-counter) (-> self state-time)))
)
)
)
(cond
((or
(< (-> (new 'static 'array float 1 1.0) 0) f30-0)
(< (-> self control unknown-float123) 0.0)
(not arg2)
)
(set!
(-> self control unknown-float123)
(-> (new 'static 'array float 1 -1.0) 0)
)
)
(else
(set! (-> self control unknown-float123) f30-0)
(set! (-> self control unknown-float124) f30-0)
(when arg0
(let
((s3-1
(vector-!
(new-stack-vector0)
(-> self control trans)
(-> self control unknown-vector102)
)
)
(s4-0 (new-stack-vector0))
)
(let ((f0-5 (vector-dot (-> self control dynam gravity-normal) arg3)))
0.0
(vector-!
s4-0
arg3
(vector-float*! s4-0 (-> self control dynam gravity-normal) f0-5)
)
)
(let* ((f28-0 (vector-length s4-0))
(f26-0 f28-0)
(f0-13
(-
(sqrtf
(*
2.0
(-> self control dynam gravity-length)
(-
(lerp-scale
(the-as float (-> self control unknown-uint20))
(the-as float (-> self control unknown-uint30))
f30-0
(-> (new 'static 'array float 1 0.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
)
(vector-dot (-> self control dynam gravity-normal) s3-1)
)
)
)
(* 0.008333334 (- (-> self control dynam gravity-length)))
)
)
)
(vector+!
arg3
(vector-float*! arg3 (-> self control dynam gravity-normal) f0-13)
(vector-float*! s4-0 s4-0 (/ f28-0 f26-0))
)
)
)
)
)
)
)
0
(when (and arg1 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(and (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
extra
)
#t
)
)
(let ((v1-57 (res-lump-struct (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
extra
)
'collide-offset vector :time (ja-frame-num 0)
)
)
)
(cond
(v1-57
(set! v0-2 (-> self control unknown-vector13))
(set! (-> v0-2 quad) (-> v1-57 quad))
)
(else
(set! v0-2 (-> self control unknown-vector13))
(set! (-> v0-2 quad) (the-as uint128 0))
)
)
)
v0-2
)
)
(defstate target-duck-stance (target)
:event
target-standard-event-handler
:enter
(behavior ()
(set!
(-> self control unknown-float81)
(-> (new 'static 'array float 1 1.0) 0)
)
(set! (-> self control unknown-surface00) *duck-mods*)
(target-collide-set! 'duck (-> (new 'static 'array float 1 1.0) 0))
(none)
)
:exit
(behavior ()
(if
(not
(or
(= (-> self next-state name) 'target-duck-walk)
(= (-> self next-state name) 'target-duck-stance)
(= (-> self next-state name) 'target-walk)
(= (-> self next-state name) 'target-stance)
(= (-> self next-state name) 'target-stance-look-around)
)
)
(target-state-hook-exit)
)
(target-exit)
(target-collide-set! 'normal (-> (new 'static 'array float 1 0.0) 0))
(none)
)
:trans
(behavior ()
((-> self state-hook))
(if
(and
(or
(zero?
(logand
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons l1 r1)
)
)
(logtest? (-> self state-flags) 8192)
)
(let ((v1-13 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(and
(not
(or
(= v1-13 (-> self draw art-group data 70))
(= v1-13 (-> self draw art-group data 69))
)
)
(can-exit-duck?)
)
)
)
(go target-stance)
)
(if (move-legs?)
(go target-duck-walk)
)
(when
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(go
target-high-jump
(-> *TARGET-bank* duck-jump-height-min)
(-> *TARGET-bank* duck-jump-height-max)
'duck
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
)
(if (and (can-hands? #t) (can-exit-duck?))
(go
target-attack-uppercut
(-> *TARGET-bank* attack-jump-height-min)
(-> *TARGET-bank* attack-jump-height-max)
)
)
(fall-test)
(slide-down-test)
(none)
)
:code
(behavior ()
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 69)
)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 70))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 70))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 70))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
((and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 31)
)
(= (-> self skel root-channel 0) (-> self skel channel))
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 32)
)
(ja-channel-push! 1 30)
)
(else
(ja-channel-push! 1 12)
(let ((a0-19 (-> self skel root-channel 0)))
(set!
(-> a0-19 frame-group)
(the-as art-joint-anim (-> self draw art-group data 30))
)
(set!
(-> a0-19 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 30))
data
0
length
)
-1
)
)
)
(set! (-> a0-19 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-19 frame-num) 0.0)
(joint-control-channel-group!
a0-19
(the-as art-joint-anim (-> self draw art-group data 30))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 param 0)
(the float (+ (-> a0-20 frame-group data 0 length) -1))
)
(set! (-> a0-20 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-20
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(while #t
(let ((a0-22 (-> self skel root-channel 0)))
(set!
(-> a0-22 frame-group)
(the-as art-joint-anim (-> self draw art-group data 31))
)
(set!
(-> a0-22 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 31))
data
0
length
)
-1
)
)
)
(set! (-> a0-22 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-22 frame-num) 0.0)
(joint-control-channel-group!
a0-22
(the-as art-joint-anim (-> self draw art-group data 31))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-23 (-> self skel root-channel 0)))
(set!
(-> a0-23 param 0)
(the float (+ (-> a0-23 frame-group data 0 length) -1))
)
(set! (-> a0-23 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-23
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-duck-walk (target)
:event
target-standard-event-handler
:enter
(behavior ()
(set!
(-> self control unknown-float81)
(-> (new 'static 'array float 1 1.0) 0)
)
(target-collide-set! 'duck (-> (new 'static 'array float 1 1.0) 0))
(if (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 69)
)
)
(set! (-> self control unknown-surface00) *duck-mods*)
)
(none)
)
:exit
(-> target-duck-stance exit)
:trans
(behavior ()
((-> self state-hook))
(if
(and
(or
(zero?
(logand
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons l1 r1)
)
)
(logtest? (-> self state-flags) 8192)
(and
(logtest? (-> self water flags) 1024)
(>=
(-
(-
(-> self control trans y)
(- (-> self water base-height) (-> self water wade-height))
)
)
2457.6
)
)
)
(can-exit-duck?)
)
(go target-walk)
)
(if (not (move-legs?))
(go target-duck-stance)
)
(when
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(go
target-high-jump
(-> *TARGET-bank* duck-jump-height-min)
(-> *TARGET-bank* duck-jump-height-max)
'duck
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
)
(if (and (can-hands? #t) (can-exit-duck?))
(go
target-attack-uppercut
(-> *TARGET-bank* attack-jump-height-min)
(-> *TARGET-bank* attack-jump-height-max)
)
)
(fall-test)
(slide-down-test)
(none)
)
:code
(behavior ()
(cond
((and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 32)
)
(= (-> self skel root-channel 0) (-> self skel channel))
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 31)
)
(ja-channel-push! 1 135)
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 32))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
)
(else
(ja-channel-push! 1 30)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 32))
num-func-identity
)
(set! (-> gp-1 frame-num) 0.0)
)
)
)
(while #t
(if (= (-> self skel root-channel 0) (-> self skel channel))
(set! (-> self control unknown-surface00) *duck-mods*)
)
(let ((a0-18 (-> self skel root-channel 0)))
(set!
(-> a0-18 param 0)
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(/
(-> self control unknown-float01)
(*
60.0
(/
(-> *TARGET-bank* duck-walk-cycle-dist)
(-> *TARGET-bank* run-cycle-length)
)
)
)
)
)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-loop!
)
)
(suspend)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-jump (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 float) (arg1 float) (arg2 surface))
(when (= (-> self control unknown-symbol40) 'launch)
(level-hint-spawn
(game-text-id daxter-screaming-jump)
"sksp009d"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(level-hint-spawn
(game-text-id daxter-wahoo-jump)
"sksp009e"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(case (-> (level-get-target-inside *level*) name)
(('citadel)
(level-hint-spawn
(game-text-id daxter-land-on-the-next-launcher)
"sksp0393"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(level-hint-spawn
(game-text-id daxter-dont-miss-the-next-launcher)
"sksp0388"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
)
enter-state
(let ((a0-9 (-> self control unknown-dword60))
(a1-5 (-> self control unknown-dword61))
(a2-5 (-> self control unknown-vector102))
)
(set!
(-> a2-5 quad)
(-> (the-as vector (-> self control unknown-dword62)) quad)
)
(go
target-launch
(the-as float a0-9)
(the-as symbol a1-5)
a2-5
(-> self control unknown-dword63)
)
)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 716 0 0 1 #t)
(init-var-jump
arg0
arg1
(the-as vector #t)
(the-as vector #t)
(-> self control transv)
)
(set! (-> self control status) (logand -8 (-> self control status)))
(set! arg2 (cond
(arg2
(empty)
arg2
)
(else
*jump-mods*
)
)
)
(set! (-> self control unknown-surface00) arg2)
(set!
(-> self control unknown-float123)
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.00004359654 (+ -11468.8 (-> self control unknown-float01)))
)
)
)
(set!
(-> self control unknown-float122)
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))
)
)
)
(none)
)
:exit
target-exit
:trans
(behavior ()
(set!
(-> self control unknown-float123)
(fmax
(-> self control unknown-float123)
(*
0.003921569
(the
float
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
abutton
6
)
)
)
)
)
(target-falling-trans
#f
(the-as cpad-list (if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
15
-1
)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons x)
)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
12288.0
)
(and
(<
-61440.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(zero? (logand (-> self water flags) 512))
(zero? (logand (-> self state-flags) 2048))
)
)
(go
target-double-jump
(-> *TARGET-bank* double-jump-height-min)
(-> *TARGET-bank* double-jump-height-max)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons square)
)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
26624.0
)
(and
(<
-61440.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword36))
(the-as int (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) 4096))
(zero? (logand (-> self control unknown-surface01 flags) 384))
)
)
(go
target-flop
(the-as float 65502.96)
(the-as float -163840.0)
(the-as
float
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(-> (new 'static 'array float 1 0.0) 0)
68812.8
)
)
)
)
(mod-var-jump
#t
#t
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons x)
)
(-> self control transv)
)
(slide-down-test)
(set!
(-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))
)
)
(-> *display* seconds-per-frame)
)
)
(none)
)
:code
(behavior ((arg0 float) (arg1 float) (arg2 surface))
(ja-channel-push! 2 15)
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 34))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(let ((a0-3 (-> self skel root-channel 1)))
(set! (-> a0-3 frame-interp) (-> self control unknown-float122))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 40))
)
(set! (-> a0-3 param 0) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> self draw art-group data 40))
num-func-chan
)
)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 34))
)
(set! (-> a0-4 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim (-> self draw art-group data 34))
num-func-+!
)
)
(let ((a0-5 (-> self skel root-channel 1)))
(set! (-> a0-5 frame-interp) (-> self control unknown-float122))
(set!
(-> a0-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 40))
)
(set! (-> a0-5 param 0) 0.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim (-> self draw art-group data 40))
num-func-chan
)
)
(suspend)
(until (ja-done? 0)
(let
((f30-0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(f0-8 (- 20.0 (ja-aframe-num 0)))
(gp-1 (-> self skel root-channel 0))
)
(set!
(-> gp-1 param 0)
(the float (+ (-> gp-1 frame-group data 0 length) -1))
)
(let ((v1-45 (and (< 0.0 f30-0) (< 0.0 f0-8))))
(set! (-> gp-1 param 1) (if v1-45
(fmin
(fmin
(-> (new 'static 'array float 1 3.0) 0)
f0-8
)
(/
(* 5.0 f0-8)
(the
float
(time-to-apex f30-0 (the-as float -245760.0))
)
)
)
(-> (new 'static 'array float 1 1.0) 0)
)
)
)
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
(let ((a0-10 (-> self skel root-channel 1)))
(set! (-> a0-10 frame-interp) (-> self control unknown-float122))
(set! (-> a0-10 param 0) 0.0)
(joint-control-channel-group-eval!
a0-10
(the-as art-joint-anim #f)
num-func-chan
)
)
(suspend)
)
(target-falling-anim -1 60)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-jump-forward (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 float) (arg1 float))
((-> target-jump enter) arg0 arg1 (the-as surface #f))
(set! (-> self control unknown-surface00) *forward-jump-mods*)
(none)
)
:exit
target-exit
:trans
(-> target-jump trans)
:code
(behavior ((arg0 float) (arg1 float))
(ja-channel-set! 1)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 34))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 34))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set!
(-> gp-0 frame-num)
(ja-aframe (-> (new 'static 'array float 1 3.0) 0) 0)
)
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 34))
num-func-seek!
)
)
(until (ja-done? 0)
(set! (-> self control unknown-dword70) 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-6 param 0) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
(while #t
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-7 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-double-jump (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 float) (arg1 float))
(when (= (-> self control unknown-symbol40) 'launch)
enter-state
(let ((a0-3 (-> self control unknown-dword60))
(a1-1 (-> self control unknown-dword61))
(a2-0 (-> self control unknown-vector102))
)
(set!
(-> a2-0 quad)
(-> (the-as vector (-> self control unknown-dword62)) quad)
)
(go
target-launch
(the-as float a0-3)
(the-as symbol a1-1)
a2-0
(-> self control unknown-dword63)
)
)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(init-var-jump
arg0
arg1
(the-as vector #t)
(the-as vector #t)
(-> self control transv)
)
(set! (-> self control status) (logand -8 (-> self control status)))
(set! (-> self control unknown-surface00) *double-jump-mods*)
(none)
)
:exit
target-exit
:trans
(behavior ()
(target-falling-trans
#f
(the-as cpad-list (if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
15
-1
)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons square)
)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
22118.4
)
(and
(<
-61440.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword36))
(the-as int (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) 4096))
(zero? (logand (-> self control unknown-surface01 flags) 384))
)
)
(go
target-flop
(the-as float 33775.48)
(the-as float -122880.0)
(the-as
float
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(-> (new 'static 'array float 1 0.0) 0)
68812.8
)
)
)
)
(if (!= (-> self state-time) (-> *display* base-frame-counter))
(mod-var-jump
#t
#t
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons x)
)
(-> self control transv)
)
)
(set!
(-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))
)
)
(-> *display* seconds-per-frame)
)
)
(none)
)
:code
(behavior ((arg0 float) (arg1 float))
(ja-channel-push! 2 15)
(dummy-10
(-> self skel effect)
'jump-double
(-> (new 'static 'array float 1 -1.0) 0)
-1
)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 34))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 34))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> gp-0 frame-num) (ja-aframe (the-as float 5.0) 0))
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 34))
num-func-seek!
)
)
(let ((a0-5 (-> self skel root-channel 1)))
(set!
(-> a0-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 40))
)
(set! (-> a0-5 param 0) 0.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim (-> self draw art-group data 40))
num-func-chan
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 param 0)
(the float (+ (-> a0-6 frame-group data 0 length) -1))
)
(set! (-> a0-6 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-6
(the-as art-joint-anim #f)
num-func-seek!
)
)
(let ((a0-7 (-> self skel root-channel 1)))
(set! (-> a0-7 frame-interp) (-> self control unknown-float122))
(set! (-> a0-7 param 0) 0.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-chan
)
)
)
(target-falling-anim -1 60)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-high-jump (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 float) (arg1 float) (arg2 basic))
(when (and (= (-> self control unknown-symbol40) 'launch) (!= arg2 'launch))
enter-state
(let ((a0-3 (-> self control unknown-dword60))
(a1-1 (-> self control unknown-dword61))
(a2-1 (-> self control unknown-vector102))
)
(set!
(-> a2-1 quad)
(-> (the-as vector (-> self control unknown-dword62)) quad)
)
(go
target-launch
(the-as float a0-3)
(the-as symbol a1-1)
a2-1
(-> self control unknown-dword63)
)
)
)
(set! (-> self control unknown-uint31) (the-as uint arg2))
(if (or (= arg2 'duck) (= arg2 'launch))
(go target-duck-high-jump arg0 arg1 (the-as symbol arg2))
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control status) (logand -8 (-> self control status)))
(sound-play-by-name
(static-sound-name "jump")
(new-sound-id)
1024
457
0
1
#t
)
(init-var-jump
arg0
arg1
(the-as vector #t)
(the-as vector #t)
(-> self control transv)
)
(set! (-> self control unknown-surface00) (cond
((= arg2 'flip)
*flip-jump-mods*
)
((= arg2 'flop-forward)
*forward-high-jump-mods*
)
(else
*high-jump-mods*
)
)
)
(set!
(-> self control unknown-float122)
(fmax
0.0
(fmin 0.5 (* 0.00008138021 (+ -409.6 (-> self control unknown-float01))))
)
)
(none)
)
:exit
target-exit
:trans
(behavior ()
(target-falling-trans
#f
(the-as cpad-list (if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
15
-1
)
)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons square)
)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
73728.0
)
(and
(<
-61440.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword36))
(the-as int (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) 4096))
(zero? (logand (-> self control unknown-surface01 flags) 384))
)
)
(go
target-flop
(the-as float 33775.48)
(the-as float -122880.0)
(the-as
float
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(-> (new 'static 'array float 1 0.0) 0)
68812.8
)
)
)
)
(mod-var-jump
#t
#t
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons x)
)
(-> self control transv)
)
(set!
(-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax
0.0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(* 0.00012207031 (+ -2048.0 (-> self control unknown-float01)))
)
)
(-> *display* seconds-per-frame)
)
)
(none)
)
:code
(-> target-jump code)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-duck-high-jump (target)
:event
target-standard-event-handler
:enter
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control status) (logand -8 (-> self control status)))
(set! (-> self control unknown-surface00) *turn-around-mods*)
(none)
)
:exit
target-exit
:code
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
(if (not (and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 31)
)
(= (-> self skel root-channel 0) (-> self skel channel))
)
)
(ja-channel-push! 1 12)
)
(case arg2
(('launch)
(let ((s3-0 (-> self skel root-channel 0)))
(set!
(-> s3-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 42))
)
(set! (-> s3-0 param 0) (ja-aframe (the-as float 16.0) 0))
(set! (-> s3-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> s3-0 frame-num) 0.0)
(joint-control-channel-group!
s3-0
(the-as art-joint-anim (-> self draw art-group data 42))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s3-1 (-> self skel root-channel 0)))
(set! (-> s3-1 param 0) (ja-aframe (the-as float 16.0) 0))
(set! (-> s3-1 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
s3-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((s3-2 (-> self skel root-channel 0)))
(set!
(-> s3-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 41))
)
(set! (-> s3-2 param 0) (ja-aframe (the-as float 16.0) 0))
(set! (-> s3-2 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> s3-2 frame-num) 0.0)
(joint-control-channel-group!
s3-2
(the-as art-joint-anim (-> self draw art-group data 41))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s3-3 (-> self skel root-channel 0)))
(set! (-> s3-3 param 0) (ja-aframe (the-as float 16.0) 0))
(set! (-> s3-3 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
s3-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(go target-duck-high-jump-jump arg0 arg1 arg2)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-duck-high-jump-jump (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name
(static-sound-name "jump")
(new-sound-id)
819
-609
0
1
#t
)
(init-var-jump
arg0
arg1
(the-as vector #t)
(the-as vector #f)
(-> self control transv)
)
(set! (-> self control status) (logand -8 (-> self control status)))
(cond
((= arg2 'launch)
(set! (-> self neck flex-blend) 0.0)
(set! (-> self control unknown-surface00) *launch-jump-mods*)
)
(else
(set! (-> self control unknown-surface00) *high-jump-mods*)
)
)
(none)
)
:exit
target-exit
:trans
(-> target-high-jump trans)
:code
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
(let ((f30-0 (the-as float (if (= arg2 'launch)
110.0
35.0
)
)
)
(f28-0 (-> (new 'static 'array float 1 1.0) 0))
)
(until (ja-done? 0)
(let*
((f24-0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(f26-0 (- f30-0 (ja-aframe-num 0)))
(f22-1
(fmin
(fmin (-> (new 'static 'array float 1 3.0) 0) f26-0)
(/
(* 5.0 f26-0)
(the float (time-to-apex f24-0 (the-as float -245760.0)))
)
)
)
(s5-0 (-> self skel root-channel 0))
)
(set!
(-> s5-0 param 0)
(the float (+ (-> s5-0 frame-group data 0 length) -1))
)
(let ((v1-26 (cond
((and (< 0.0 f24-0) (< 0.0 f26-0))
(if (= arg2 'launch)
(set!
f28-0
(lerp f28-0 (* 4.0 f22-1) (the-as float 0.25))
)
)
f22-1
)
(else
f28-0
)
)
)
)
(set! (-> s5-0 param 1) v1-26)
)
(joint-control-channel-group-eval!
s5-0
(the-as art-joint-anim #f)
num-func-seek!
)
)
(suspend)
)
(cond
((= arg2 'launch)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 frame-group)
(the-as art-joint-anim (-> self draw art-group data 43))
)
(set! (-> a0-7 param 0) f28-0)
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim (-> self draw art-group data 43))
num-func-loop!
)
)
(while #t
(suspend)
(let ((a0-8 (-> self skel root-channel 0)))
(set!
(-> a0-8 frame-group)
(the-as art-joint-anim (-> self draw art-group data 43))
)
(set! (-> a0-8 param 0) f28-0)
(joint-control-channel-group-eval!
a0-8
(the-as art-joint-anim (-> self draw art-group data 43))
num-func-loop!
)
)
)
)
(else
(let ((a0-9 (-> self skel root-channel 0)))
(set!
(-> a0-9 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-9 param 0) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-9 frame-num) 0.0)
(joint-control-channel-group!
a0-9
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
(while #t
(suspend)
(let ((a0-10 (-> self skel root-channel 0)))
(set!
(-> a0-10 frame-group)
(the-as art-joint-anim (-> self draw art-group data 38))
)
(set! (-> a0-10 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-10
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-loop!
)
)
)
)
)
)
(the-as none 0)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-falling (target)
:event
target-jump-event-handler
:enter
(behavior ((arg0 symbol))
(set! (-> self control unknown-surface00) *jump-mods*)
(set! (-> self control unknown-uint20) (the-as uint arg0))
(set! (-> self state-time) (-> *display* base-frame-counter))
(none)
)
:trans
(behavior ()
(target-falling-trans
(-> self control unknown-spoolanim00)
(the-as cpad-list (if (= (-> self control unknown-spoolanim00) #f)
0
(/ (the-as int (-> *TARGET-bank* stuck-time)) 2)
)
)
)
(none)
)
:code
(behavior ((arg0 symbol))
(target-falling-anim -1 99)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-hit-ground (target)
:event
target-walk-event-handler
:enter
(behavior ((arg0 symbol))
(cond
((= arg0 'stuck)
)
((let ((v1-4 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-4 (-> self draw art-group data 42))
(= v1-4 (-> self draw art-group data 43))
)
)
(dummy-10
(-> self skel effect)
'group-blue-hit-ground-effect
(-> (new 'static 'array float 1 0.0) 0)
-1
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 90)
)
(else
(let
((f0-1
(vector-dot
(-> self control dynam gravity-normal)
(vector-!
(new 'stack-no-clear 'vector)
(-> self control unknown-vector52)
(-> self control trans)
)
)
)
)
(if
(and
(< (-> *TARGET-bank* fall-far) f0-1)
(zero? (logand (-> self control status) 1024))
)
(go target-hit-ground-hard f0-1)
)
)
)
)
(cond
((= arg0 'stuck)
)
(else
(target-land-effect)
)
)
(set! (-> self control unknown-dword31) 0)
(set! (-> self control unknown-dword33) 0)
(if
(>=
(-> self control ground-impact-vel)
(-> *TARGET-bank* fall-stumble-threshold)
)
(set-forward-vel (-> (new 'static 'array float 1 0.0) 0))
)
(if (!= (-> self control ground-pat material) (pat-material ice))
(delete-back-vel)
)
(set! (-> self control unknown-surface00) *walk-mods*)
(start-bobbing!
(-> self water)
(lerp-scale
(-> (new 'static 'array float 1 0.0) 0)
(the-as float 4096.0)
(-> self control ground-impact-vel)
(the-as float 40960.0)
(-> (new 'static 'array float 1 102400.0) 0)
)
600
1500
)
(none)
)
:trans
(behavior ()
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
(if (and (not (can-exit-duck?)) (can-duck?))
(go target-duck-stance)
)
(when
(!=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(if (logtest? (-> self water flags) 1024)
(go target-wade-walk)
(go target-walk)
)
)
(if
(and
(or
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons l1 r1)
)
(not (can-exit-duck?))
)
(can-duck?)
)
(go target-duck-stance)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack)
)
(if (can-hands? #t)
(go target-running-attack)
)
(fall-test)
(slide-down-test)
(none)
)
:code
(behavior ((arg0 symbol))
(target-hit-ground-anim #f)
(go target-stance)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-attack (target)
:event
target-dangerous-event-handler
:enter
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(target-start-attack)
(target-danger-set! 'spin #f)
(set! (-> self control unknown-surface00) *attack-mods*)
(set! (-> self water drip-mult) 4.0)
(set! (-> self neck flex-blend) 0.0)
(none)
)
:exit
(behavior ()
(set! (-> self control unknown-dword33) (-> *display* base-frame-counter))
(target-exit)
(none)
)
:code
(behavior ()
(ja-channel-push! 1 15)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 51))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 51))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) (-> self control unknown-surface01 align-speed))
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 51))
num-func-seek!
)
)
(until (ja-done? 0)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(dummy-10
(-> self skel effect)
'group-red-eco-spinkick
(ja-frame-num 0)
74
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
(level-hint-spawn
(game-text-id red-eco-tutorial)
"sksp0072"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-jump
(-> *TARGET-bank* jump-height-min)
(-> *TARGET-bank* jump-height-max)
(the-as surface #f)
)
)
(suspend)
(let ((a0-24 (-> self skel root-channel 0)))
(set!
(-> a0-24 param 0)
(the float (+ (-> a0-24 frame-group data 0 length) -1))
)
(set! (-> a0-24 param 1) (-> self control unknown-surface01 align-speed))
(joint-control-channel-group-eval!
a0-24
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go target-stance)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-running-attack (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('touched)
(cond
(((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg3 param 0))
(-> self control)
(the-as uint 224)
)
(let
((gp-1
(target-send-attack
arg0
(the-as uint (-> self control unknown-symbol30))
(-> arg3 param 0)
(-> self control unknown-dword50)
(-> self control unknown-dword51)
)
)
)
(when gp-1
(set!
(-> self control unknown-uint20)
(the-as uint (-> *display* base-frame-counter))
)
(let
((v1-9
(if
(and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
arg0
)
)
)
(when v1-9
(let* ((s5-1 (-> (the-as process-drawable v1-9) root))
(v1-11
(if
(and
(nonzero? s5-1)
(type-type? (-> s5-1 type) collide-shape)
)
(the-as collide-shape s5-1)
)
)
)
(if
(and
v1-11
(or
(logtest? (-> v1-11 root-prim prim-core collide-as) 256)
(logtest? (-> v1-11 root-prim prim-core action) 1024)
)
)
(set! (-> self control unknown-uint31) (the-as uint 1))
)
)
)
)
(when (or (= gp-1 'die) (= gp-1 'push))
(let ((v0-2 (the-as object (-> *display* base-frame-counter))))
(set! (-> self control unknown-int21) (the-as int v0-2))
v0-2
)
)
)
)
)
(else
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
)
)
)
(else
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
)
)
)
:enter
(behavior ()
(if
(or
(and
(= (-> self fact-info-target eco-type) 1)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(<
(- (-> *display* base-frame-counter) (-> self control unknown-dword82))
450
)
)
(go target-yellow-blast)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control unknown-uint20) (the-as uint 0))
(set! (-> self control unknown-int21) 0)
(set! (-> self control unknown-uint31) (the-as uint 0))
(set! (-> self control unknown-surface00) *run-attack-mods*)
(set! (-> *run-attack-mods* turnv) 655360.0)
(set! (-> *run-attack-mods* turnvv) 655360.0)
(target-start-attack)
(target-danger-set! 'punch #f)
(if
(or
(< (fabs (-> self control unknown-float62)) 0.3)
(< 0.3 (fabs (-> self control unknown-float61)))
)
(set!
(-> self control unknown-float81)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(none)
)
:exit
(behavior ()
(set!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
)
(set!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
)
(set! (-> *run-attack-mods* turnv) 0.0)
(set! (-> *run-attack-mods* turnvv) 0.0)
(set! (-> self control unknown-dword31) (-> *display* base-frame-counter))
(target-exit)
(none)
)
:trans
(behavior ()
(when (!= (-> self state-time) (-> *display* base-frame-counter))
(if
(and
(or
(smack-surface? #t)
(and
(>= (-> self control unknown-float63) 0.7)
(zero? (logand (-> self control status) 32))
)
)
(begin
(set! (-> self control unknown-int21) (-> *display* base-frame-counter))
(set! (-> self control unknown-float81) 0.0)
(let ((gp-0 (new-stack-vector0))
(f30-0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-0
(-> self control transv)
(vector-float*! gp-0 (-> self control dynam gravity-normal) f30-0)
)
(let* ((f0-5 (vector-length gp-0))
(f1-1 f0-5)
(f2-1 (fmin 0.0 f30-0))
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f2-1
)
(vector-float*! gp-0 gp-0 (/ f0-5 f1-1))
)
)
)
#t
)
(or
(zero? (-> self control unknown-uint20))
(>=
(the-as
uint
(-
(-> *display* base-frame-counter)
(the-as int (-> self control unknown-uint20))
)
)
(the-as uint 12)
)
)
(!= (-> self control unknown-uint31) 1)
)
(target-shoved
(-> *TARGET-bank* smack-surface-dist)
(-> *TARGET-bank* smack-surface-height)
(the-as process #f)
(the-as (state target) target-hit)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons x)
)
(and
(< 4096.0 (-> self control unknown-float01))
(or
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 30)
(zero?
(logand
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons square)
)
)
)
(zero? (logand (-> self state-flags) 6144))
(zero? (logand (-> self control unknown-surface01 flags) 128))
)
)
(go
target-attack-uppercut
(-> *TARGET-bank* attack-jump-height-min)
(-> *TARGET-bank* attack-jump-height-max)
)
)
(if
(and
(logtest? (-> self water flags) 512)
(zero?
(mod (- (-> *display* base-frame-counter) (-> self state-time)) 21)
)
)
(dummy-13
(-> self water)
(the-as float 0.6)
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> self node-list data 37)
)
0
(-> self control transv)
)
)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(dummy-10
(-> self skel effect)
'group-red-eco-spinkick
(ja-frame-num 0)
23
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
(level-hint-spawn
(game-text-id red-eco-tutorial)
"sksp0072"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
)
(none)
)
:code
(behavior ()
(if (logtest? (-> self water flags) 512)
(sound-play-by-name
(static-sound-name "swim-stroke")
(new-sound-id)
1024
0
0
1
#t
)
)
(ja-channel-push! 1 6)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 59))
num-func-identity
)
(set! (-> gp-1 frame-num) 0.0)
)
(set! (-> self control dynam gravity-max) 368640.0)
(set! (-> self control dynam gravity-length) 368640.0)
(let ((f28-0 0.0)
(f30-0 (-> (new 'static 'array float 1 1.0) 0))
(gp-2 0)
)
(until (ja-done? 0)
(TODO-RENAME-9 (-> self align))
(when (not (ja-min? 0))
(cond
((and
(>= (ja-aframe-num 0) 20.0)
(and
(and
(zero? (logand (-> self control status) 1))
(>=
(-
(-> *display* base-frame-counter)
(-> self control unknown-dword11)
)
(the-as int (-> *TARGET-bank* ground-timeout))
)
(>=
0.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(let ((v1-39 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(not
(or
(= v1-39 (-> self draw art-group data 59))
(= v1-39 (-> self draw art-group data 60))
(= v1-39 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(>=
(the-as
uint
(-
(-> *display* base-frame-counter)
(the-as int (-> self control unknown-uint20))
)
)
(the-as uint 12)
)
)
)
(go target-falling #f)
)
((and
(nonzero? (-> self control unknown-uint30))
(>=
(the-as
uint
(-
(-> *display* base-frame-counter)
(the-as int (-> self control unknown-uint30))
)
)
(the-as uint 12)
)
)
(set-forward-vel (-> (new 'static 'array float 1 0.0) 0))
)
((and
(zero?
(logand
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons square)
)
)
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 15)
)
(if (= (-> self control ground-pat material) (pat-material ice))
(set-forward-vel
(fmax 32768.0 (* 0.8 (-> self control unknown-float01)))
)
(set-forward-vel (* 0.8 (-> self control unknown-float01)))
)
)
((ja-done? 0)
(set-forward-vel f28-0)
)
(else
(set!
f28-0
(*
(target-align-vel-z-adjust (-> self align delta trans z))
(-> *display* frames-per-second)
f30-0
)
)
(set-forward-vel f28-0)
)
)
)
(let ((s5-1 (new-stack-vector0)))
(vector-matrix*!
s5-1
(-> self control transv)
(-> self control unknown-matrix00)
)
(set! (-> s5-1 y) 0.0)
(vector-matrix*!
(-> self control unknown-vector120)
s5-1
(-> self control unknown-matrix01)
)
)
(suspend)
(let ((a0-44 (-> self skel root-channel 0)))
(set!
(-> a0-44 param 0)
(the float (+ (-> a0-44 frame-group data 0 length) -1))
)
(set! (-> a0-44 param 1) (-> self control unknown-surface01 align-speed))
(joint-control-channel-group-eval!
a0-44
(the-as art-joint-anim #f)
num-func-seek!
)
)
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 30)
(set! (-> *run-attack-mods* turnvv) 0.0)
)
(if (< 2 gp-2)
(set!
f30-0
(*
f30-0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float140)
)
)
)
)
(+! gp-2 1)
)
)
(if
(and
(zero? (logand (-> self control status) 1))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(>=
0.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(let ((v1-121 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(not
(or
(= v1-121 (-> self draw art-group data 59))
(= v1-121 (-> self draw art-group data 60))
(= v1-121 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(go target-falling #f)
)
(go target-stance)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-attack-air (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
(cond
(v0-0
(empty)
v0-0
)
(else
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
)
)
)
)
:enter
(behavior ((arg0 symbol))
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control status) (logand -8 (-> self control status)))
(target-start-attack)
(target-danger-set! 'spin-air #f)
(set! (-> self control unknown-surface00) *jump-attack-mods*)
(let
((f0-1
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
(cond
((or (>= 0.0 f0-1) (= arg0 'flop))
(let ((gp-1 (new-stack-vector0)))
(let
((f0-3
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-1
(-> self control transv)
(vector-float*! gp-1 (-> self control dynam gravity-normal) f0-3)
)
)
(let* ((f0-4 (vector-length gp-1))
(f1-2 f0-4)
(f2-0 33775.48)
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f2-0
)
(vector-float*! gp-1 gp-1 (/ f0-4 f1-2))
)
)
)
)
(else
(let*
((f1-5
(/
f0-1
(*
(-> self control dynam gravity-length)
(-> *display* seconds-per-frame)
)
)
)
(f30-0 (* 0.5 f1-5 (-> *display* seconds-per-frame) f0-1))
)
(if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 62)
)
(set!
f30-0
(fmax
0.0
(-
(-> *TARGET-bank* attack-jump-height-max)
(vector-dot
(-> self control dynam gravity-normal)
(vector-!
(new 'stack-no-clear 'vector)
(-> self control trans)
(-> self control unknown-vector52)
)
)
)
)
)
)
(let ((gp-2 (new-stack-vector0)))
(let
((f0-8
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-2
(-> self control transv)
(vector-float*! gp-2 (-> self control dynam gravity-normal) f0-8)
)
)
(let* ((f0-9 (vector-length gp-2))
(f1-11 f0-9)
(f2-7 (+ 1024.0 (sqrtf (* 245760.0 (+ 2048.0 f30-0)))))
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f2-7
)
(vector-float*! gp-2 gp-2 (/ f0-9 f1-11))
)
)
)
)
)
)
)
(set! (-> self control dynam gravity-length) 122880.0)
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
(none)
)
:exit
(behavior ()
(set!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
)
(set!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
)
((-> target-attack exit))
(none)
)
:trans
(behavior ()
(when (logtest? (-> self control status) 1)
(set-quaternion! (-> self control) (-> self control dir-targ))
(go target-hit-ground #f)
)
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 150)
(set!
(-> self control dynam gravity-length)
(seek
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 245760.0 (-> *display* seconds-per-frame))
)
)
)
(when
(and
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 15)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control unknown-vector10)
)
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
(set!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
)
(set!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
)
)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 70)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
(level-hint-spawn
(game-text-id red-eco-tutorial)
"sksp0072"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
(none)
)
:code
(behavior ((arg0 symbol))
(ja-channel-push! 1 22)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 56))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 56))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 56))
num-func-seek!
)
)
(until (ja-done? 0)
(TODO-RENAME-9 (-> self align))
(TODO-RENAME-10
(-> self align)
16
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 57))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(let ((f30-0 393216.0))
(let ((f0-8 (target-height-above-ground))
(f1-1
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
(while
(not
(or
(and (< (fabs (/ f0-8 (* 0.0033333334 f1-1))) 150.0) (< f1-1 0.0))
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 510)
)
)
(quaternion-rotate-y!
(-> self control unknown-quaternion00)
(-> self control unknown-quaternion00)
(* f30-0 (-> *display* seconds-per-frame))
)
(suspend)
(let ((a0-10 (-> self skel root-channel 0)))
(set! (-> a0-10 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-10
(the-as art-joint-anim #f)
num-func-loop!
)
)
(set! f0-8 (target-height-above-ground))
(set!
f1-1
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
)
(let ((a0-13 (-> self skel root-channel 0)))
(set!
(-> a0-13 frame-group)
(the-as art-joint-anim (-> self draw art-group data 58))
)
(set!
(-> a0-13 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 58))
data
0
length
)
-1
)
)
)
(set! (-> a0-13 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-13 frame-num) 0.0)
(joint-control-channel-group!
a0-13
(the-as art-joint-anim (-> self draw art-group data 58))
num-func-seek!
)
)
(until (ja-done? 0)
(cond
((< (ja-aframe-num 0) 32.0)
(quaternion-rotate-y!
(-> self control unknown-quaternion00)
(-> self control unknown-quaternion00)
(* f30-0 (-> *display* seconds-per-frame))
)
)
(else
(let
((f0-22
(deg-diff
(quaternion-y-angle (-> self control unknown-quaternion00))
(quaternion-y-angle (-> self control dir-targ))
)
)
)
(quaternion-rotate-y!
(-> self control unknown-quaternion00)
(-> self control unknown-quaternion00)
(* 0.2 (fabs f0-22))
)
)
)
)
(suspend)
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 param 0)
(the float (+ (-> a0-20 frame-group data 0 length) -1))
)
(set! (-> a0-20 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-20
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(go target-falling #f)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-attack-uppercut (target)
:event
target-dangerous-event-handler
:enter
(behavior ((arg0 float) (arg1 float))
(set! (-> self state-time) (-> *display* base-frame-counter))
(target-start-attack)
(target-danger-set! 'uppercut #f)
(set! (-> self control unknown-surface00) *turn-around-mods*)
(none)
)
:exit
target-exit
:code
(behavior ((arg0 float) (arg1 float))
(let ((s3-0 (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 31)
)
)
(s4-0 (-> self skel root-channel 0))
)
(set!
(-> s4-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 62))
)
(set! (-> s4-0 param 0) (ja-aframe (the-as float 7.0) 0))
(set! (-> s4-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> s4-0 frame-num) (if s3-0
(ja-aframe (the-as float 5.0) 0)
(-> (new 'static 'array float 1 0.0) 0)
)
)
(joint-control-channel-group!
s4-0
(the-as art-joint-anim (-> self draw art-group data 62))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s4-1 (-> self skel root-channel 0)))
(set! (-> s4-1 param 0) (ja-aframe (the-as float 7.0) 0))
(set! (-> s4-1 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
s4-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go target-attack-uppercut-jump arg0 arg1)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-attack-uppercut-jump (target)
:event
target-dangerous-event-handler
:enter
(behavior ((arg0 float) (arg1 float))
(if
(and
(= (-> self control ground-pat material) (pat-material ice))
(< 32768.0 (-> self control unknown-float01))
)
(set-forward-vel (the-as float 32768.0))
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(init-var-jump
arg0
arg1
(the-as vector #t)
(the-as vector #f)
(-> self control transv)
)
(set! (-> self control status) (logand -8 (-> self control status)))
(set! (-> self control unknown-surface00) *uppercut-jump-mods*)
(target-start-attack)
(target-danger-set! 'uppercut #f)
(none)
)
:exit
target-exit
:trans
(behavior ()
(if (logtest? (-> self control status) 1)
(go target-hit-ground #f)
)
(when
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons square)
)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
22118.4
)
(and
(<
-61440.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword36))
(the-as int (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) 4096))
(zero? (logand (-> self control unknown-surface01 flags) 384))
)
)
(set-quaternion! (-> self control) (-> self control dir-targ))
(build-conversions (-> self control transv))
(go
target-flop
(the-as float 65502.96)
(the-as float -163840.0)
(the-as
float
(if
(=
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
stick0-speed
)
0.0
)
(-> (new 'static 'array float 1 0.0) 0)
68812.8
)
)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
(= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 62)
)
(>= (ja-aframe-num 0) 12.0)
)
(go target-attack-air 'uppercut)
)
(mod-var-jump
#t
#t
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons x)
)
(-> self control transv)
)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 23)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
)
(if
(and
(= (-> self control unknown-symbol30) 'uppercut)
(<
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
-8192.0
)
)
(target-danger-set! 'harmless #f)
)
(slide-down-test)
(none)
)
:code
(behavior ((arg0 float) (arg1 float))
(TODO-RENAME-9 (-> self align))
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 0.9)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
(TODO-RENAME-9 (-> self align))
(let* ((gp-0 (-> self align))
(s5-0 (method-of-object gp-0 TODO-RENAME-10))
(a1-2 (cond
((>= 30.0 (ja-aframe-num 0))
18
)
((>= 43.0 (ja-aframe-num 0))
(set! (-> self control unknown-surface00) *double-jump-mods*)
2
)
(else
0
)
)
)
)
(s5-0
gp-0
a1-2
(-> (new 'static 'array float 1 1.0) 0)
(the-as float 0.95)
(-> (new 'static 'array float 1 1.0) 0)
)
)
)
(go target-falling #f)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-flop (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
(cond
(v0-0
(empty)
v0-0
)
((let ((v1-0 arg2))
(= v1-0 'swim)
)
(cond
((< 6144.0 (target-height-above-ground))
(dummy-10
(-> self skel effect)
'swim-flop
(-> (new 'static 'array float 1 -1.0) 0)
-1
)
(let ((t9-3 enter-state))
(set! (-> self next-state) target-swim-down)
((the-as (function object :behavior target) t9-3))
)
)
(else
(let ((t9-4 enter-state)
(a0-4 'swim)
)
(set! (-> self next-state) target-flop-hit-ground)
((the-as (function symbol object :behavior target) t9-4) a0-4)
)
)
)
)
(else
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
)
)
)
)
:enter
(behavior ((arg0 float) (arg1 float) (arg2 float))
(if
(and
(= (-> self fact-info-target eco-type) 1)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(go target-yellow-jump-blast)
)
(if (= arg2 0.0)
(set-forward-vel arg2)
(set-forward-vel (-> self control unknown-float01))
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control status) (logand -8 (-> self control status)))
(set! (-> self control unknown-surface00) *flop-mods*)
(set! (-> self control unknown-uint20) (the-as uint 0))
(set! (-> self control dynam gravity-max) 245760.0)
(set! (-> self control dynam gravity-length) 245760.0)
(let ((gp-1 (new-stack-vector0)))
(let
((f0-6
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-1
(-> self control transv)
(vector-float*! gp-1 (-> self control dynam gravity-normal) f0-6)
)
)
(let* ((f0-7 (vector-length gp-1))
(f1-3 f0-7)
(f2-0 29491.2)
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f2-0
)
(vector-float*! gp-1 gp-1 (/ f0-7 f1-3))
)
)
)
(none)
)
:exit
(behavior ()
(target-danger-set! 'harmless #f)
(set!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
)
(set!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
)
(set!
(-> self control dynam gravity quad)
(-> self control unknown-dynamics00 gravity quad)
)
(none)
)
:trans
(behavior ()
(delete-back-vel)
(let ((gp-1 (logtest? (-> self control status) 1)))
(when (and (not gp-1) (let ((v1-6 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(= v1-6 (-> self draw art-group data 64))
(= v1-6 (-> self draw art-group data 66))
)
)
)
(when
(and
(or
(< (target-move-dist 30) 1638.4)
(and
(logtest? (-> self control status) 8)
(< 0.7 (-> self control poly-angle))
)
)
(zero? (logand (-> self control status) 32))
(>= (-> self control unknown-uint20) (the-as uint 2))
)
(set! (-> self control unknown-dword36) (-> *display* base-frame-counter))
(set! gp-1 'stuck)
)
)
(when gp-1
(logior! (-> self control status) 1)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 150)
(dummy-10
(-> self skel effect)
'group-red-eco-strike-ground
(ja-frame-num 0)
0
)
(let* ((s4-1 (get-process *default-dead-pool* touch-tracker #x4000))
(s5-1 (when s4-1
(let ((t9-6 (method-of-type touch-tracker activate)))
(t9-6
(the-as touch-tracker s4-1)
self
'touch-tracker
(the-as pointer #x70004000)
)
)
(run-now-in-process
s4-1
touch-tracker-init
(-> self control trans)
4096.0
30
)
(-> s4-1 ppointer)
)
)
)
(send-event (ppointer->process s5-1) 'event 'attack 'flop)
(send-event (ppointer->process s5-1) 'function (lambda ((arg0 target))
(let
((f0-3
(seek
(->
arg0
control
root-prim
local-sphere
w
)
(the-as
float
28672.0
)
(*
286720.0
(->
*display*
seconds-per-frame
)
)
)
)
)
(set!
(->
arg0
control
root-prim
local-sphere
w
)
f0-3
)
f0-3
)
)
)
)
)
(go target-flop-hit-ground gp-1)
)
)
(when
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(dummy-10
(-> self skel effect)
'group-red-eco-spinkick
(ja-frame-num 0)
(if (rand-vu-percent? (the-as float 0.5))
23
17
)
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
)
(when
(and
(not (-> self control unknown-symbol30))
(= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 63)
)
(>= (ja-aframe-num 0) 8.0)
)
(target-start-attack)
(target-danger-set! 'flop #f)
)
(none)
)
:code
(behavior ((arg0 float) (arg1 float) (arg2 float))
(ja-channel-set! 2)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 63))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 63))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) (-> (new 'static 'array float 1 1.0) 0))
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 63))
num-func-seek!
)
)
(let ((a0-3 (-> self skel root-channel 1)))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 66))
)
(set! (-> a0-3 param 0) 0.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim (-> self draw art-group data 66))
num-func-chan
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
(let ((gp-0 (-> self skel root-channel 1)))
(set!
(-> gp-0 frame-interp)
(lerp-scale
(-> (new 'static 'array float 1 0.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float01)
(-> (new 'static 'array float 1 0.0) 0)
(the-as float 40960.0)
)
)
(set!
(-> gp-0 param 0)
(the float (+ (-> gp-0 frame-group data 0 length) -1))
)
(set! (-> gp-0 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
)
(set!
(-> self control dynam gravity quad)
(-> self control unknown-dynamics00 gravity quad)
)
(target-danger-set! 'flop-down #f)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 64))
num-func-identity
)
(set! (-> gp-1 frame-num) 0.0)
)
(let ((gp-2 (-> self skel root-channel 1)))
(joint-control-channel-group-eval!
gp-2
(the-as art-joint-anim (-> self draw art-group data 67))
num-func-identity
)
(set! (-> gp-2 frame-num) 0.0)
)
(let ((f30-0 (-> (new 'static 'array float 1 1.0) 0)))
(let ((gp-3 (new-stack-vector0)))
(let
((f0-18
(vector-dot
(-> self control dynam gravity-normal)
(-> self control unknown-vector120)
)
)
)
0.0
(vector-!
gp-3
(-> self control unknown-vector120)
(vector-float*! gp-3 (-> self control dynam gravity-normal) f0-18)
)
)
(let* ((f0-19 (vector-length gp-3))
(f1-1 f0-19)
(f2-0 -368640.0)
)
(vector+!
(-> self control unknown-vector120)
(vector-float*!
(-> self control unknown-vector120)
(-> self control dynam gravity-normal)
f2-0
)
(vector-float*! gp-3 gp-3 (/ f0-19 f1-1))
)
)
)
(let ((gp-4 (new-stack-vector0)))
(let
((f0-22
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-4
(-> self control transv)
(vector-float*! gp-4 (-> self control dynam gravity-normal) f0-22)
)
)
(let* ((f0-23 (vector-length gp-4))
(f1-3 f0-23)
(f2-2 (* -368640.0 f30-0))
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f2-2
)
(vector-float*! gp-4 gp-4 (/ f0-23 f1-3))
)
)
)
(suspend)
(while #t
(+! (-> self control unknown-uint20) 1)
(let ((a0-30 (-> self skel root-channel 0)))
(set! (-> a0-30 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-30
(the-as art-joint-anim #f)
num-func-+!
)
)
(let ((gp-5 (-> self skel root-channel 1)))
(set!
(-> gp-5 frame-interp)
(lerp-scale
(-> (new 'static 'array float 1 0.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float01)
(-> (new 'static 'array float 1 0.0) 0)
(the-as float 40960.0)
)
)
(set! (-> gp-5 param 0) 0.0)
(joint-control-channel-group-eval!
gp-5
(the-as art-joint-anim #f)
num-func-chan
)
)
(set!
f30-0
(*
f30-0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float140)
)
)
)
(let ((gp-6 (new-stack-vector0))
(f28-0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-6
(-> self control transv)
(vector-float*! gp-6 (-> self control dynam gravity-normal) f28-0)
)
(let* ((f1-5 (vector-length gp-6))
(f0-34 f1-5)
)
(if (< (-> self control unknown-surface01 transv-max) f1-5)
(set! f1-5 (-> self control unknown-surface01 transv-max))
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f28-0
)
(vector-float*! gp-6 gp-6 (/ f1-5 f0-34))
)
)
)
(if
(>=
(- (-> *display* base-frame-counter) (-> self state-time))
(the-as int (-> *TARGET-bank* fall-timeout))
)
(go target-falling #f)
)
(if
(and
(= *cheat-mode* 'debug)
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-abs
0
)
(pad-buttons r2)
)
(not *pause-lock*)
)
(go target-falling #f)
)
(suspend)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-flop-hit-ground (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('swim)
#f
)
(else
(target-standard-event-handler arg0 arg1 arg2 arg3)
)
)
)
:enter
(behavior ((arg0 symbol))
(let
((f0-1
(vector-dot
(-> self control dynam gravity-normal)
(vector-!
(new 'stack-no-clear 'vector)
(-> self control unknown-vector111)
(-> self control trans)
)
)
)
)
(if (< (-> *TARGET-bank* fall-far) f0-1)
(go target-hit-ground-hard f0-1)
)
)
(target-land-effect)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 30)
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control unknown-uint20) (the-as uint arg0))
(set-forward-vel (-> (new 'static 'array float 1 0.0) 0))
(set! (-> self control unknown-surface00) *flop-land-mods*)
(set! (-> *flop-land-mods* flags) (logand -1025 (-> *flop-land-mods* flags)))
(set! (-> self state-flags) (logior #x100000 (-> self state-flags)))
(none)
)
:exit
target-exit
:trans
(behavior ()
(when (!= (-> self control unknown-spoolanim00) 'stuck)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
)
(go target-attack-air 'flop)
)
)
(when
(and
(and
(= (-> self fact-info-target eco-type) 2)
(>=
(-> self fact-info-target eco-level)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(< (- (-> *display* base-frame-counter) (-> self state-time)) 75)
)
(dummy-10
(-> self skel effect)
'group-red-eco-spinkick
(ja-frame-num 0)
(if (rand-vu-percent? (the-as float 0.5))
23
17
)
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 30)
)
(let ((v1-33 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(if
(and
(or
(= v1-33 (-> self draw art-group data 65))
(= v1-33 (-> self draw art-group data 68))
)
(>= (ja-aframe-num 0) 28.0)
)
(logior! (-> *flop-land-mods* flags) 1024)
)
)
(slide-down-test)
(none)
)
:code
(behavior ((arg0 symbol))
(target-hit-ground-anim arg0)
(go target-falling #f)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-wheel (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(if (= arg2 'touched)
(send-event arg0 'roll)
)
(target-standard-event-handler arg0 arg1 arg2 arg3)
)
:enter
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control unknown-surface00) *wheel-mods*)
(+! (-> self control unknown-int50) 1)
(rot->dir-targ! (-> self control))
(set-forward-vel
(+
(-> *TARGET-bank* wheel-speed-min)
(*
(-> *TARGET-bank* wheel-speed-inc)
(the float (+ (-> self control unknown-int50) -1))
)
)
)
(if
(or
(< (fabs (-> self control unknown-float62)) 0.3)
(< 0.3 (fabs (-> self control unknown-float61)))
)
(set!
(-> self control unknown-float81)
(-> (new 'static 'array float 1 1.0) 0)
)
)
(set! (-> self control unknown-uint20) (the-as uint 0))
(set! (-> self control unknown-int21) 0)
0
(none)
)
:exit
(behavior ()
(when (!= (-> self next-state name) 'target-wheel)
(set! (-> self control unknown-int50) 0)
(set! (-> self control unknown-dword30) (-> *display* base-frame-counter))
)
(target-exit)
(none)
)
:code
(behavior ()
(let ((gp-0 0))
0
(let ((s5-0 0)
(f30-0 (-> (new 'static 'array float 1 1.0) 0))
)
(ja-channel-push! 1 12)
(let ((s4-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
s4-0
(the-as art-joint-anim (-> self draw art-group data 69))
num-func-identity
)
(set! (-> s4-0 frame-num) 0.0)
)
(until (ja-done? 0)
(if
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons x)
)
(set! gp-0 (-> *display* base-frame-counter))
)
(when
(and
(or (smack-surface? #f) (>= (-> self control unknown-float63) 0.7))
(>=
(the-as
uint
(-
(-> *display* base-frame-counter)
(the-as int (-> self control unknown-uint20))
)
)
(the-as uint 3)
)
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 1)
)
(if (>= 6.0 (ja-aframe-num 0))
(target-shoved
(-> *TARGET-bank* smack-surface-dist)
(-> *TARGET-bank* smack-surface-height)
(the-as process #f)
(the-as (state target) target-hit)
)
)
(if (zero? s5-0)
(set! s5-0 (-> *display* base-frame-counter))
)
)
(if
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons square)
)
(-> *display* base-frame-counter)
)
(TODO-RENAME-9 (-> self align))
(cond
((nonzero? s5-0)
)
(else
(TODO-RENAME-10
(-> self align)
4
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
f30-0
)
(let ((s4-1 (new-stack-vector0)))
(vector-matrix*!
s4-1
(-> self control transv)
(-> self control unknown-matrix00)
)
(set! (-> s4-1 y) 0.0)
(vector-matrix*!
(-> self control unknown-vector120)
s4-1
(-> self control unknown-matrix01)
)
)
)
)
(suspend)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 param 0)
(the float (+ (-> a0-15 frame-group data 0 length) -1))
)
(set! (-> a0-15 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-15
(the-as art-joint-anim #f)
num-func-seek!
)
)
(set!
f30-0
(*
f30-0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float140)
)
)
)
)
)
(if
(and
(or
(<
(- (-> *display* base-frame-counter) gp-0)
(the-as int (-> *TARGET-bank* wheel-jump-pre-window))
)
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons x)
)
)
(can-jump? 'target-wheel-flip)
)
(go
target-wheel-flip
(-> *TARGET-bank* wheel-flip-height)
(-> *TARGET-bank* wheel-flip-dist)
)
)
)
(set!
(-> self state-hook-time)
(the-as uint (-> *display* base-frame-counter))
)
(set! (-> self state-hook) (lambda :behavior target () (cond
((>=
(-
(->
*display*
base-frame-counter
)
(the-as
int
(->
self
state-hook-time
)
)
)
(the-as
int
(->
*TARGET-bank*
wheel-jump-post-window
)
)
)
(set!
(->
self
state-hook
)
(the-as
(function none :behavior target)
nothing
)
)
)
(else
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
0
)
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump?
'target-wheel-flip
)
)
(go
target-wheel-flip
(->
*TARGET-bank*
wheel-flip-height
)
(->
*TARGET-bank*
wheel-flip-dist
)
)
)
)
)
(none)
)
)
(go target-duck-stance)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)
(defstate target-wheel-flip (target)
:event
target-standard-event-handler
:enter
(behavior ((arg0 float) (arg1 float))
(set! (-> self control unknown-surface00) *wheel-flip-mods*)
(none)
)
:exit
target-exit
:trans
(behavior ()
(if
(and
(or
(smack-surface? #f)
(<
(target-move-dist (the-as int (-> *TARGET-bank* stuck-time)))
(-> *TARGET-bank* stuck-distance)
)
)
(!= (-> self state-time) (-> *display* base-frame-counter))
)
(target-shoved
(-> *TARGET-bank* smack-surface-dist)
(-> *TARGET-bank* smack-surface-height)
(the-as process #f)
(the-as (state target) target-hit)
)
)
(if
(and
(logtest?
(->
*cpad-list*
cpads
(-> self control unknown-cpad-info00 number)
button0-rel
0
)
(pad-buttons circle)
)
(can-feet?)
(and (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
(= (-> self skel root-channel 0) (-> self skel channel))
)
)
(go target-attack-air #f)
)
(none)
)
:code
(behavior ((arg0 float) (arg1 float))
(ja-channel-push! 1 12)
(let ((s4-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
s4-0
(the-as art-joint-anim (-> self draw art-group data 71))
num-func-identity
)
(set! (-> s4-0 frame-num) 0.0)
)
(let ((f30-0 (-> (new 'static 'array float 1 1.0) 0)))
(until
(or
(ja-max? 0)
(and (>= (ja-aframe-num 0) 4.0) (logtest? (-> self control status) 1))
)
(when
(and
(>= (ja-aframe-num 0) (-> (new 'static 'array float 1 3.0) 0))
(not (-> self control unknown-symbol30))
)
(set! (-> self event-hook) target-dangerous-event-handler)
(target-start-attack)
(target-danger-set! 'flip #f)
)
(TODO-RENAME-9 (-> self align))
(if (not (ja-max? 0))
(TODO-RENAME-10
(-> self align)
6
(-> (new 'static 'array float 1 1.0) 0)
(/ arg0 (-> *TARGET-bank* wheel-flip-art-height))
(* f30-0 (/ arg1 (-> *TARGET-bank* wheel-flip-art-dist)))
)
(TODO-RENAME-10
(-> self align)
4
(-> (new 'static 'array float 1 1.0) 0)
(-> (new 'static 'array float 1 1.0) 0)
(* f30-0 (/ arg1 (-> *TARGET-bank* wheel-flip-art-dist)))
)
)
(let ((s4-1 (new-stack-vector0)))
(vector-matrix*!
s4-1
(-> self control transv)
(-> self control unknown-matrix00)
)
(set! (-> s4-1 y) 0.0)
(vector-matrix*!
(-> self control unknown-vector120)
s4-1
(-> self control unknown-matrix01)
)
)
(suspend)
(let ((a0-11 (-> self skel root-channel 0)))
(set!
(-> a0-11 param 0)
(the float (+ (-> a0-11 frame-group data 0 length) -1))
)
(set! (-> a0-11 param 1) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-11
(the-as art-joint-anim #f)
num-func-seek!
)
)
(set!
f30-0
(*
f30-0
(fmin
(-> (new 'static 'array float 1 1.0) 0)
(-> self control unknown-float140)
)
)
)
)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(while (zero? (logand (-> self control status) 1))
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) 3)
(when (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
)
(ja-channel-push! 1 30)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 38))
num-func-identity
)
(set! (-> gp-1 frame-num) 0.0)
)
)
)
(let ((gp-2 (new-stack-vector0))
(f30-1
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
)
0.0
(vector-!
gp-2
(-> self control transv)
(vector-float*! gp-2 (-> self control dynam gravity-normal) f30-1)
)
(let* ((f1-6 (vector-length gp-2))
(f0-21 f1-6)
(f1-7 (* 0.9 f1-6))
)
(vector+!
(-> self control transv)
(vector-float*!
(-> self control transv)
(-> self control dynam gravity-normal)
f30-1
)
(vector-float*! gp-2 gp-2 (/ f1-7 f0-21))
)
)
)
(suspend)
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
(let ((a0-35 (-> self skel root-channel 0)))
(set! (-> a0-35 param 0) (-> (new 'static 'array float 1 1.0) 0))
(joint-control-channel-group-eval!
a0-35
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(else
(let ((v1-85 (-> self skel root-channel 0)))
(set! (-> v1-85 num-func) num-func-identity)
(set!
(-> v1-85 frame-num)
(the float (+ (-> v1-85 frame-group data 0 length) -1))
)
)
)
)
)
(target-land-effect)
(set!
(-> self state-hook-time)
(the-as uint (-> *display* base-frame-counter))
)
(set! (-> self state-hook) (lambda :behavior target () (cond
((>=
(-
(->
*display*
base-frame-counter
)
(the-as
int
(->
self
state-hook-time
)
)
)
30
)
(set!
(->
self
state-hook
)
(the-as
(function none :behavior target)
nothing
)
)
)
(else
(if
(and
(logtest?
(logior
(logior
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
0
)
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
1
)
)
(->
*cpad-list*
cpads
(->
self
control
unknown-cpad-info00
number
)
button0-rel
2
)
)
(pad-buttons x)
)
(can-jump? #f)
)
(go
target-high-jump
(->
*TARGET-bank*
flip-jump-height-min
)
(->
*TARGET-bank*
flip-jump-height-max
)
'flip
)
)
)
)
(none)
)
)
(if (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 38)
)
(go target-hit-ground #f)
(go target-stance)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)