[decompiler] detect seek! and seekl! macros (#1317)

* detect `seek!` and `seekl!`

* fancy struct instead of pair mess

* fixes

* i think this was wrong?

* update refs

* update source

* More logical branching

* even better branching
This commit is contained in:
ManDude
2022-04-18 20:01:44 +01:00
committed by GitHub
parent cbc6987351
commit 66e395d547
109 changed files with 952 additions and 1398 deletions
+11
View File
@@ -929,3 +929,14 @@
(fake-asm .mtc0 dest src)
(fake-asm .mtpc dest src)
(fake-asm .mfpc dest src)
;; math
(defmacro seek! (place target rate)
"Macro to use seek in-place. place is the base, and where the result is stored."
`(set! ,place (seek ,place ,target ,rate))
)
(defmacro seekl! (place target rate)
"Macro to use seekl in-place. place is the base, and where the result is stored."
`(set! ,place (seekl ,place ,target ,rate))
)
+2 -6
View File
@@ -1633,13 +1633,9 @@
(when (not (paused?))
(let ((s5-1 (-> *display* frames (-> *display* last-screen) frame run-time)))
(let ((f0-5 (fmax 327680.0 (fmin (+ 327680.0 (* 204.8 (the float (- 7000 s5-1)))) (-> *ACTOR-bank* birth-dist)))))
(set! (-> *ACTOR-bank* pause-dist)
(seek (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (-> *display* seconds-per-frame)))
)
(seek! (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (-> *display* seconds-per-frame)))
)
(set! (-> *ACTOR-bank* birth-max)
(seekl (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 1.0 (the float s5-1) 2000.0 7000.0)) 10)
)
(seekl! (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 1.0 (the float s5-1) 2000.0 7000.0)) 10)
)
(if (movie?)
(set! (-> *ACTOR-bank* birth-max) 1000)
+5 -5
View File
@@ -294,8 +294,8 @@
(case item
(('life)
(if (>= amount 0.0)
(set! (-> obj life) (seek (-> obj life) (-> obj life-max) amount))
(set! (-> obj life) (seek (-> obj life) 0.0 (- amount)))
(seek! (-> obj life) (-> obj life-max) amount)
(seek! (-> obj life) 0.0 (- amount))
)
(-> obj life)
)
@@ -466,10 +466,10 @@
)
)
(set! (-> obj health-pickup-time) (-> *display* base-frame-counter))
(set! (-> obj health) (seek (-> obj health) (-> obj health-max) amount))
(seek! (-> obj health) (-> obj health-max) amount)
)
(else
(set! (-> obj health) (seek (-> obj health) 0.0 (- amount)))
(seek! (-> obj health) 0.0 (- amount))
(if (>= amount -10.0)
(pickup-collectable! obj (pickup-type eco-pill) 0.0 source-handle)
)
@@ -491,7 +491,7 @@
(((pickup-type eco-pill))
(when (>= amount 0.0)
(set! (-> obj eco-pill-pickup-time) (-> *display* base-frame-counter))
(set! (-> obj eco-pill) (seek (-> obj eco-pill) (-> obj eco-pill-max) amount))
(seek! (-> obj eco-pill) (-> obj eco-pill-max) amount)
(when (and (>= (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)) (< (-> obj health) (-> obj health-max)))
(set! (-> obj eco-pill) (- (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)))
(pickup-collectable!
+1 -1
View File
@@ -1645,7 +1645,7 @@ auto-save-post
(else
(case (-> self mode)
(('auto-save)
(set! (-> *game-info* auto-save-count) (seekl (-> *game-info* auto-save-count) 0 1))
(seekl! (-> *game-info* auto-save-count) 0 1)
)
)
(go-virtual error (-> self result))
+1 -3
View File
@@ -650,9 +650,7 @@
)
(set! f0-8 (* 0.75 f0-8))
)
(set! (-> self control unknown-float141)
(seek (-> self control unknown-float141) f0-8 (* 100.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self control unknown-float141) f0-8 (* 100.0 (-> *display* seconds-per-frame)))
)
(let ((f30-0 (-> self control unknown-float141))
(f0-13 (lerp-scale -0.3 0.3 (-> self control unknown-float01) 0.0 81920.0))
+3 -3
View File
@@ -739,14 +739,14 @@
(dummy-28 self)
((-> self update-velocity) self)
(when (logtest? (-> self options) 2)
(set! (-> self tween) (seek (-> self tween) 1.0 (* 0.5 (-> *display* seconds-per-frame))))
(seek! (-> self tween) 1.0 (* 0.5 (-> *display* seconds-per-frame)))
(let ((f0-6 (vector-vector-distance (-> self root-override trans) (-> self target))))
(cond
((< f0-6 20480.0)
(set! (-> self tween) (seek (-> self tween) 1.0 (* 3.0 (-> *display* seconds-per-frame))))
(seek! (-> self tween) 1.0 (* 3.0 (-> *display* seconds-per-frame)))
)
((< f0-6 40960.0)
(set! (-> self tween) (seek (-> self tween) 1.0 (-> *display* seconds-per-frame)))
(seek! (-> self tween) 1.0 (-> *display* seconds-per-frame))
)
)
)
+5 -15
View File
@@ -269,27 +269,19 @@
(let ((s5-1 (-> obj target)))
(when *sound-player-enable*
(when (!= (-> gp-0 sfx-volume) (-> s5-1 sfx-volume))
(set! (-> gp-0 sfx-volume)
(seek (-> gp-0 sfx-volume) (-> s5-1 sfx-volume) (* 100.0 (-> *display* seconds-per-frame)))
)
(seek! (-> gp-0 sfx-volume) (-> s5-1 sfx-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 1) (-> gp-0 sfx-volume))
)
(when (!= (-> gp-0 music-volume) (-> s5-1 music-volume))
(set! (-> gp-0 music-volume)
(seek (-> gp-0 music-volume) (-> s5-1 music-volume) (* 100.0 (-> *display* seconds-per-frame)))
)
(seek! (-> gp-0 music-volume) (-> s5-1 music-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 2) (-> gp-0 music-volume))
)
(when (!= (-> gp-0 dialog-volume) (-> s5-1 dialog-volume))
(set! (-> gp-0 dialog-volume)
(seek (-> gp-0 dialog-volume) (-> s5-1 dialog-volume) (* 100.0 (-> *display* seconds-per-frame)))
)
(seek! (-> gp-0 dialog-volume) (-> s5-1 dialog-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 4) (-> gp-0 dialog-volume))
)
(when (!= (-> gp-0 ambient-volume) (-> s5-1 ambient-volume))
(set! (-> gp-0 ambient-volume)
(seek (-> gp-0 ambient-volume) (-> s5-1 ambient-volume) (* 100.0 (-> *display* seconds-per-frame)))
)
(seek! (-> gp-0 ambient-volume) (-> s5-1 ambient-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 16) (-> gp-0 ambient-volume))
)
)
@@ -342,9 +334,7 @@
(set! (-> gp-0 bg-r) (-> s5-1 bg-r))
(set! (-> gp-0 bg-g) (-> s5-1 bg-g))
(set! (-> gp-0 bg-b) (-> s5-1 bg-b))
(set! (-> gp-0 bg-a)
(seek (-> gp-0 bg-a) (-> s5-1 bg-a) (* (-> s5-1 bg-a-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> gp-0 bg-a) (-> s5-1 bg-a) (* (-> s5-1 bg-a-speed) (-> *display* seconds-per-frame)))
)
(let ((v1-60 (-> *display* frames (-> *display* on-screen) display))
(f0-39 (-> gp-0 bg-a))
+2 -4
View File
@@ -329,9 +329,7 @@
(defun increment-success-for-hint ((arg0 game-text-id))
(let ((gp-0 (find-hint-control-index arg0)))
(when (>= gp-0 0)
(set! (-> *game-info* hint-control gp-0 num-success)
(seekl (-> *game-info* hint-control gp-0 num-success) 127 1)
)
(seekl! (-> *game-info* hint-control gp-0 num-success) 127 1)
0
)
)
@@ -398,7 +396,7 @@
)
(cond
(v1-21
(set! (-> gp-1 num-attempts) (seekl (-> gp-1 num-attempts) 127 1))
(seekl! (-> gp-1 num-attempts) 127 1)
(and (>= (-> gp-1 num-attempts) (-> gp-1 num-attempts-before-playing))
(or (= (-> gp-1 num-success-before-killing) -1)
(< (-> gp-1 num-success) (-> gp-1 num-success-before-killing))
+2 -2
View File
@@ -104,8 +104,8 @@
)
)
(if (< 0.0 f0-8)
(set! (-> self twist) (seek (-> self twist) -0.4 (* 0.3 (-> *display* seconds-per-frame))))
(set! (-> self twist) (seek (-> self twist) 0.4 (* 0.3 (-> *display* seconds-per-frame))))
(seek! (-> self twist) -0.4 (* 0.3 (-> *display* seconds-per-frame)))
(seek! (-> self twist) 0.4 (* 0.3 (-> *display* seconds-per-frame)))
)
)
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
+1 -1
View File
@@ -1087,7 +1087,7 @@
)
(set! (-> obj drip-time) (-> *display* base-frame-counter))
(set! (-> obj flags) (logand -32769 (-> obj flags)))
(set! (-> obj drip-wetness) (seek (-> obj drip-wetness) 0.0 (* 0.001 (-> obj drip-speed))))
(seek! (-> obj drip-wetness) 0.0 (* 0.001 (-> obj drip-speed)))
(set! (-> obj drip-speed) (* 1.05 (-> obj drip-speed)))
(if (= (-> obj drip-wetness) 0.0)
(set! (-> obj drip-height) 0.0)
+1 -1
View File
@@ -3250,7 +3250,7 @@
(defmethod dummy-11 nav-control ((obj nav-control) (arg0 vector))
(set! (-> obj old-travel quad) (-> obj travel quad))
(-> obj block-count)
(set! (-> obj block-count) (seek (-> obj block-count) 0.0 0.016666668))
(seek! (-> obj block-count) 0.0 0.016666668)
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
(TODO-RENAME-27 obj)
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
+5 -7
View File
@@ -1201,13 +1201,11 @@
)
)
)
(set! (-> self control unknown-float80)
(seek
(-> self control unknown-float80)
f0-2
(* (-> self control unknown-float82) (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control unknown-float80)
f0-2
(* (-> self control unknown-float82) (-> *display* seconds-per-frame))
)
)
(vector-deg-slerp
(-> self control dynam gravity-normal)
+15 -28
View File
@@ -396,9 +396,7 @@
:code
(behavior ()
(while #t
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 0 (the int (* 350.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self in-out-position) 0 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(if (zero? (-> self in-out-position))
(go hud-normal)
)
@@ -424,12 +422,8 @@
(= (-> *progress-process* 0 next-state name) 'progress-going-out)
(= (-> *progress-process* 0 next-state name) 'progress-gone)
)
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 0 (the int (* 150.0 (-> *display* time-adjust-ratio))))
)
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 4096 (the int (* 200.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self in-out-position) 0 (the int (* 150.0 (-> *display* time-adjust-ratio))))
(seekl! (-> self in-out-position) 4096 (the int (* 200.0 (-> *display* time-adjust-ratio))))
)
(suspend)
)
@@ -442,9 +436,7 @@
:code
(behavior ()
(while #t
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 4096 (the int (* 350.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self in-out-position) 4096 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(if (= (-> self in-out-position) 4096)
(deactivate self)
)
@@ -2567,13 +2559,11 @@
(fmin 1.0 (* arg0 (/ (-> self control unknown-float01) (-> self control unknown-surface01 target-speed))))
)
)
(set! (-> self control unknown-float130)
(seek
(-> self control unknown-float130)
(fmax (fmin (* (+ f0-1 arg2) (fmax 0.5 (+ 0.5 (vector-dot gp-0 v1-2)))) arg3) (- arg3))
(* arg1 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control unknown-float130)
(fmax (fmin (* (+ f0-1 arg2) (fmax 0.5 (+ 0.5 (vector-dot gp-0 v1-2)))) arg3) (- arg3))
(* arg1 (-> *display* seconds-per-frame))
)
)
(let ((a2-2 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control unknown-quaternion00))))
(forward-up-nopitch->quaternion (-> self control unknown-quaternion01) gp-0 a2-2)
@@ -2590,15 +2580,12 @@
)
(set! (-> self control unknown-float00) (fabs (-> self control unknown-float130)))
(if (= (-> self next-state name) 'target-swim-down)
(set! (-> self control unknown-float131)
(seek (-> self control unknown-float131) (the-as float -6144.0) (* 4096.0 (-> *display* seconds-per-frame)))
)
(set! (-> self control unknown-float131) (seek
(-> self control unknown-float131)
(the-as float (-> (new 'static 'array int32 1 0) 0))
(* 2048.0 (-> *display* seconds-per-frame))
)
)
(seek! (-> self control unknown-float131) (the-as float -6144.0) (* 4096.0 (-> *display* seconds-per-frame)))
(seek!
(-> self control unknown-float131)
(the-as float (-> (new 'static 'array int32 1 0) 0))
(* 2048.0 (-> *display* seconds-per-frame))
)
)
(let ((f0-20 (-> self control unknown-float131)))
(set! (-> self control unknown-vector11 y) f0-20)
+21 -30
View File
@@ -806,9 +806,7 @@
)
)
(until (ja-done? 0)
(set! (-> self control unknown-float81)
(seek (-> self control unknown-float81) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(seek! (-> self control unknown-float81) (the-as float 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)))
@@ -2287,13 +2285,11 @@
)
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
(slide-down-test)
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -2486,13 +2482,11 @@
(if (!= (-> self state-time) (-> *display* base-frame-counter))
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
)
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -2620,13 +2614,11 @@
)
)
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -3434,12 +3426,11 @@
(go target-hit-ground #f)
)
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
(set! (-> self control dynam gravity-length) (seek
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 245760.0 (-> *display* seconds-per-frame))
)
)
(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)) (seconds 0.05))
(< (vector-dot (-> self control dynam gravity-normal) (-> self control unknown-vector10))
+2 -4
View File
@@ -364,7 +364,7 @@
(behavior ()
(while #t
(if (not (paused?))
(set! (-> self offset) (seekl (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio)))))
(seekl! (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio))))
)
(dummy-17 self)
(if (<= (-> self offset) 0)
@@ -428,9 +428,7 @@
(behavior ((arg0 int))
(while #t
(if (not (paused?))
(set! (-> self offset)
(seekl (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio))))
)
(seekl! (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio))))
)
(dummy-17 self)
(when (movie?)
+1 -3
View File
@@ -1758,9 +1758,7 @@
(set! sv-464 6)
)
(if (-> obj language-transition)
(set! (-> obj language-x-offset)
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
)
(when (>= (-> obj language-x-offset) 100)
(set! (-> obj language-selection) (the-as language-enum sv-448))
+32 -42
View File
@@ -2136,30 +2136,26 @@
(if (and (= (-> self display-state) (-> self next-display-state))
(= (-> self display-level-index) (-> self next-level-index))
)
(set! (-> self transition-offset)
(seekl
(-> self transition-offset)
0
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
2
1
)
)
)
)
(set! (-> self transition-offset)
(seekl
(-> self transition-offset)
512
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
2
1
)
)
)
)
(seekl!
(-> self transition-offset)
0
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
2
1
)
)
)
(seekl!
(-> self transition-offset)
512
(* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
(if (or (-> self stat-transition) (nonzero? (-> self level-transition)))
2
1
)
)
)
)
(set-transition-progress! self (-> self transition-offset))
(set! (-> self in-transition) (or (-> self force-transition) (nonzero? (-> self transition-offset))))
@@ -2457,16 +2453,13 @@
:code
(behavior ()
(while #t
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
(when (< (-> self in-out-position) 2867)
(set! (-> self transition-offset) (seekl
(-> self transition-offset)
0
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
)
)
(seekl!
(-> self transition-offset)
0
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
)
(set-transition-progress! self (-> self transition-offset))
)
(if (zero? (-> self in-out-position))
@@ -2498,17 +2491,14 @@
:code
(behavior ()
(while #t
(set! (-> self transition-offset) (seekl
(-> self transition-offset)
512
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
)
)
(seekl!
(-> self transition-offset)
512
(the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))
)
(set-transition-progress! self (-> self transition-offset))
(when (< 153 (-> self transition-offset))
(set! (-> self in-out-position)
(seekl (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio))))
(if (= (-> self in-out-position) 4096)
(go progress-gone)
)
+1 -1
View File
@@ -243,7 +243,7 @@
(let* ((f0-5 (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))))
(f0-6 (atan (-> s5-0 y) f0-5))
)
(set! (-> obj head-tilt) (seek (-> obj head-tilt) f0-6 (* 5461.3335 (-> *display* seconds-per-frame))))
(seek! (-> obj head-tilt) f0-6 (* 5461.3335 (-> *display* seconds-per-frame)))
)
)
(set! (-> obj head-tilt) (fmin 8192.0 (fmax -5461.3335 (-> obj head-tilt))))
+4 -12
View File
@@ -495,9 +495,7 @@
(go pelican-fly-to-end (-> self path-to-nest2) (-> *PELICAN-bank* run-away-time))
)
(pelican-path-update 364088.88 30 0.0 0.0 #t)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
(if (= (-> self path-pos) (-> self path-max))
(go pelican-to-nest (-> self path-cache) (the-as int (-> self time-cache)))
)
@@ -581,9 +579,7 @@
:trans
(behavior ()
(pelican-path-update 546133.3 30 0.0 0.0 #f)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
(if (= (-> self path-pos) (-> self path-max))
(go pelican-wait-at-nest #f)
)
@@ -983,9 +979,7 @@
:trans
(behavior ()
(pelican-path-update 131072.0 150 0.0 0.0 #f)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
(if (= (-> self path-pos) (-> self path-max))
(go pelican-dive (-> self path-dive1) (-> self path-to-nest1) (-> *PELICAN-bank* to-nest1-time))
)
@@ -1028,9 +1022,7 @@
:trans
(behavior ()
(pelican-path-update 546133.3 30 0.0 0.0 #f)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
(if (= (-> self path-pos) (-> self path-max))
(go pelican-wait-at-end #f)
)
+5 -10
View File
@@ -605,10 +605,9 @@
:trans
(behavior ()
(cond
((and (and *target*
(>= (-> self info idle-distance)
(vector-vector-distance (-> self root-overlay trans) (-> *target* control trans))
)
((and (and *target* (>= (-> self info idle-distance)
(vector-vector-distance (-> self root-overlay trans) (-> *target* control trans))
)
)
(send-event *target* 'query 'powerup 3)
)
@@ -617,17 +616,13 @@
(spawn-projectile-blue *target*)
)
)
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) (-> self float-offset) (* 8192.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) (-> self float-offset) (* 8192.0 (-> *display* seconds-per-frame)))
(draw-eco-beam (-> self root-overlay trans) (-> self beam-end))
(update-trans! (-> self sound) (-> self root-overlay trans))
(update! (-> self sound))
)
(else
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) (-> self idle-offset) (* 16384.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) (-> self idle-offset) (* 16384.0 (-> *display* seconds-per-frame)))
(stop! (-> self sound))
(if (= (-> self float-height-offset) (-> self idle-offset))
(go citb-chain-plat-settle)
+1 -1
View File
@@ -1964,7 +1964,7 @@ nav-enemy-default-event-handler
(defbehavior nav-enemy-jump-land-post nav-enemy ()
(TODO-RENAME-9 (-> self align))
(dummy-11 (-> self nav) (-> self nav target-pos))
(set! (-> self target-speed) (seek (-> self target-speed) (-> self nav-info run-travel-speed) 2048.0))
(seek! (-> self target-speed) (-> self nav-info run-travel-speed) 2048.0)
(set! (-> self momentum-speed) (-> self target-speed))
(let* ((f0-7
(fmin
+6 -9
View File
@@ -198,9 +198,7 @@
)
(set! s3-0 #f)
)
(set! (-> obj basetrans y)
(seek (-> obj basetrans y) (+ (-> obj root-pos) f30-0) (* 40960.0 (-> *display* seconds-per-frame)))
)
(seek! (-> obj basetrans y) (+ (-> obj root-pos) f30-0) (* 40960.0 (-> *display* seconds-per-frame)))
(if (not (= (-> obj basetrans y) (+ (-> obj root-pos) f30-0)))
(set! s5-1 #f)
)
@@ -209,12 +207,11 @@
(set! (-> s4-1 quad)
(-> (the-as process-drawable (handle->process (-> obj money-list s2-0))) root trans quad)
)
(set! (-> obj money-pos-actual s2-0) (seek
(-> obj money-pos-actual s2-0)
(-> obj money-pos-list s2-0)
(* 40960.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> obj money-pos-actual s2-0)
(-> obj money-pos-list s2-0)
(* 40960.0 (-> *display* seconds-per-frame))
)
(if (not (= (-> obj money-pos-actual s2-0) (-> obj money-pos-list s2-0)))
(set! s5-1 #f)
)
+1 -7
View File
@@ -269,9 +269,7 @@
:trans
(behavior ()
(when (!= (-> self sync-offset-faux) (-> self sync-offset-dest))
(set! (-> self sync-offset-faux)
(seek (-> self sync-offset-faux) (-> self sync-offset-dest) (* 12.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self sync-offset-faux) (-> self sync-offset-dest) (* 12.0 (-> *display* seconds-per-frame)))
(let* ((f0-7 (the float (-> self sync period)))
(f1-3 (+ (-> self sync-offset-faux) f0-7))
)
@@ -361,7 +359,3 @@
)
(none)
)
+9 -17
View File
@@ -336,10 +336,8 @@ nav-enemy-default-event-handler
(set! (-> a0-7 param 0) (-> self anim-speed))
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-loop!)
)
(set! (-> self anim-speed) (seek (-> self anim-speed) 1.0 0.05))
(set! (-> self collide-info trans y)
(seek (-> self collide-info trans y) (-> self y-min) (* (-> self y-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self anim-speed) 1.0 0.05)
(seek! (-> self collide-info trans y) (-> self y-min) (* (-> self y-speed) (-> *display* seconds-per-frame)))
(dummy-10 (-> self water))
(ja-post)
(suspend)
@@ -390,12 +388,10 @@ nav-enemy-default-event-handler
)
)
(until (ja-done? 0)
(set! (-> self anim-speed) (seek (-> self anim-speed) 1.0 0.05))
(seek! (-> self anim-speed) 1.0 0.05)
(cond
((-> self enable-patrol)
(set! (-> self collide-info trans y)
(seek (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
)
(else
(if (< (- (-> self collide-info trans y) (-> self y-min)) 409.6)
@@ -646,7 +642,7 @@ nav-enemy-default-event-handler
)
)
(until (ja-done? 0)
(set! (-> self anim-speed) (seek (-> self anim-speed) 1.0 (* 3.0 (-> *display* seconds-per-frame))))
(seek! (-> self anim-speed) 1.0 (* 3.0 (-> *display* seconds-per-frame)))
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set! (-> a0-5 param 0) (the float (+ (-> a0-5 frame-group data 0 length) -1)))
@@ -709,10 +705,8 @@ nav-enemy-default-event-handler
)
)
(until (ja-done? 0)
(set! (-> self anim-speed) (seek (-> self anim-speed) 1.0 0.05))
(set! (-> self collide-info trans y)
(seek (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self anim-speed) 1.0 0.05)
(seek! (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group data 0 length) -1)))
@@ -760,10 +754,8 @@ nav-enemy-default-event-handler
(set! (-> a0-7 param 0) (-> self anim-speed))
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-loop!)
)
(set! (-> self anim-speed) (seek (-> self anim-speed) 1.0 0.05))
(set! (-> self collide-info trans y)
(seek (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self anim-speed) 1.0 0.05)
(seek! (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (-> *display* seconds-per-frame)))
(suspend)
)
(none)
+1 -1
View File
@@ -3975,7 +3975,7 @@
0
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(let ((v1-5 (-> gp-0 user-int8 0)))
(set! (-> self dda) (cond
((< 15 v1-5)
+1 -3
View File
@@ -167,9 +167,7 @@
(if (= (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self path-pos) (-> self dest))
)
(set! (-> self path-pos)
(seek (-> self path-pos) (-> self dest) (* (-> self speed) (-> *display* seconds-per-frame)))
)
(seek! (-> self path-pos) (-> self dest) (* (-> self speed) (-> *display* seconds-per-frame)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name
+56 -72
View File
@@ -875,18 +875,16 @@
)
)
(if (and (= (-> self control surf name) '*tar-surface*) (< 8192.0 f30-1))
(set! (-> self control unknown-surface00 target-speed) (seek
(-> self control unknown-surface00 target-speed)
(the-as float 4096.0)
(* 245760.0 (-> *display* seconds-per-frame))
)
)
(set! (-> self control unknown-surface00 target-speed) (seek
(-> self control unknown-surface00 target-speed)
(the-as float (-> self control unknown-uint30))
(* 81920.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control unknown-surface00 target-speed)
(the-as float 4096.0)
(* 245760.0 (-> *display* seconds-per-frame))
)
(seek!
(-> self control unknown-surface00 target-speed)
(the-as float (-> self control unknown-uint30))
(* 81920.0 (-> *display* seconds-per-frame))
)
)
)
(none)
@@ -1126,13 +1124,11 @@
(go target-flut-hit-ground)
)
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -1297,13 +1293,11 @@
)
(sound-play-by-name (static-sound-name "flut-flap") (-> self flut flap-sound-id) 1024 0 0 1 #t)
)
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -1361,18 +1355,16 @@
(set! (-> gp-1 frame-num) (ja-aframe (the-as float 14.0) 0))
)
)
(set! (-> self control dynam gravity-max) (seek
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
(* 163840.0 (-> *display* seconds-per-frame))
)
)
(set! (-> self control dynam gravity-length) (seek
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 163840.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
(* 163840.0 (-> *display* seconds-per-frame))
)
(seek!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 163840.0 (-> *display* seconds-per-frame))
)
)
(-> *display* base-frame-counter)
(ja-channel-push! 2 30)
@@ -1393,18 +1385,16 @@
)
(while #t
(suspend)
(set! (-> self control dynam gravity-max) (seek
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
(* 163840.0 (-> *display* seconds-per-frame))
)
)
(set! (-> self control dynam gravity-length) (seek
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 163840.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
(* 163840.0 (-> *display* seconds-per-frame))
)
(seek!
(-> self control dynam gravity-length)
(-> self control unknown-dynamics00 gravity-length)
(* 163840.0 (-> *display* seconds-per-frame))
)
(let ((a0-23 (-> self skel root-channel 0)))
(set! (-> a0-23 param 0) (the float (+ (-> a0-23 frame-group data 0 length) -1)))
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-loop!)
@@ -1516,13 +1506,11 @@
(logior! (-> self control status) 1)
(go target-flut-hit-ground)
)
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
@@ -2073,21 +2061,17 @@
)
)
(send-event (ppointer->process gp-2) 'event 'attack 'flut-attack)
(send-event
(ppointer->process gp-2)
'function
(lambda :behavior target
((arg0 nav-enemy))
(set! (-> arg0 collide-info root-prim local-sphere w) (seek
(-> arg0 collide-info root-prim local-sphere w)
(the-as float 28672.0)
(* 286720.0 (-> *display* seconds-per-frame))
)
)
(update-transforms! (-> arg0 collide-info))
(none)
)
)
(send-event (ppointer->process gp-2) 'function (lambda :behavior target
((arg0 nav-enemy))
(seek!
(-> arg0 collide-info root-prim local-sphere w)
(the-as float 28672.0)
(* 286720.0 (-> *display* seconds-per-frame))
)
(update-transforms! (-> arg0 collide-info))
(none)
)
)
)
(none)
)
+1 -1
View File
@@ -1698,7 +1698,7 @@
(let ((f1-14 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 28.0)))
(+! (-> self paddle-vel) (* f1-14 (-> *display* seconds-per-frame)))
)
(set! (-> self paddle-vel) (seek (-> self paddle-vel) 0.0 (* 15.0 (-> *display* seconds-per-frame))))
(seek! (-> self paddle-vel) 0.0 (* 15.0 (-> *display* seconds-per-frame)))
(set! (-> self paddle-vel) (fmax -2.0 (fmin 2.0 (-> self paddle-vel))))
(+! (-> self paddle) (* (-> self paddle-vel) (-> *display* seconds-per-frame)))
(set! (-> self paddle) (fmax 0.0 (fmin 1.0 (-> self paddle))))
+7 -21
View File
@@ -1463,15 +1463,9 @@
1
(the-as symbol (-> self base))
)
(set! (-> self y-offset)
(seek (-> self y-offset) (-> self height) (* 16384.0 (-> *display* seconds-per-frame)))
)
(set! (-> self turn)
(seek (-> self turn) (-> self target-turn) (* 7281.778 (-> *display* seconds-per-frame)))
)
(set! (-> self tilt)
(seek (-> self tilt) (-> self target-tilt) (* 7281.778 (-> *display* seconds-per-frame)))
)
(seek! (-> self y-offset) (-> self height) (* 16384.0 (-> *display* seconds-per-frame)))
(seek! (-> self turn) (-> self target-turn) (* 7281.778 (-> *display* seconds-per-frame)))
(seek! (-> self tilt) (-> self target-tilt) (* 7281.778 (-> *display* seconds-per-frame)))
(set! (-> self raised?) (< (+ -12288.0 (-> self height)) (-> self y-offset)))
(periscope-update-joints)
(suspend)
@@ -1493,9 +1487,7 @@
(set! (-> self raised?) #t)
(let ((f30-0 (+ -20480.0 (-> self height))))
(until (= (-> self y-offset-grips) f30-0)
(set! (-> self y-offset-grips)
(seek (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
(periscope-update-joints)
(suspend)
)
@@ -1582,9 +1574,7 @@
1
(the-as symbol (-> self grips transform))
)
(set! (-> self y-offset-grips)
(seek (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
(periscope-update-joints)
(suspend)
)
@@ -1604,9 +1594,7 @@
(when (and *target* (>= f30-1 (vector-vector-distance a0-10 (-> *target* control trans))))
(when (logtest? (-> *target* control status) 1)
(let ((f0-7 (fmax 4096.0 (fmin 12288.0 (+ (- 5120.0 (-> self base y)) (-> *target* control trans y))))))
(set! (-> self y-offset-grips)
(seek (-> self y-offset-grips) f0-7 (* 16384.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self y-offset-grips) f0-7 (* 16384.0 (-> *display* seconds-per-frame)))
)
)
(vector-! gp-1 (target-pos 0) (-> self base))
@@ -1935,9 +1923,7 @@
(set! (-> self tilt) (-> self target-tilt))
(let ((f30-0 (+ -20480.0 (-> self height))))
(until (= (-> self y-offset-grips) f30-0)
(set! (-> self y-offset-grips)
(seek (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
(periscope-update-joints)
(sound-play-by-name
(static-sound-name "site-moves")
+15 -29
View File
@@ -1458,7 +1458,7 @@
(joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 9)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self energy) (seek (-> self energy) (the-as float 0.25) (-> *display* seconds-per-frame)))
(seek! (-> self energy) (the-as float 0.25) (-> *display* seconds-per-frame))
(if (and (and *target*
(>= 245760.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
)
@@ -1501,7 +1501,7 @@
)
(b! #t cfg-3 :delay (nop!))
(label cfg-2)
(set! (-> self energy) (seek (-> self energy) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(suspend)
(label cfg-3)
(let ((v1-22 (-> self skel channel)))
@@ -1581,7 +1581,7 @@
(joint-control-channel-group! gp-2 (the-as art-joint-anim (-> self draw art-group data 10)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self energy) (seek (-> self energy) (the-as float 1.0) (* 0.2 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 1.0) (* 0.2 (-> *display* seconds-per-frame)))
(ja-blend-eval)
(suspend)
(let ((gp-3 (-> self skel root-channel 0)))
@@ -1813,7 +1813,7 @@
(when (not (-> self try-inc))
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(set! (-> self try) (-> gp-0 user-int8 0))
)
(set! (-> self try-inc) #t)
@@ -1873,7 +1873,7 @@
(-> gp-1 ppointer)
)
(+! (-> self aphid-count) 1)
(set! (-> self want-aphid-count) (seekl (-> self want-aphid-count) 0 1))
(seekl! (-> self want-aphid-count) 0 1)
(set! (-> self aphid-spawn-time) (-> *display* base-frame-counter))
)
)
@@ -2126,12 +2126,8 @@
)
)
(until (or v1-64 (ja-done? 0))
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 0.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self body flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(seek! (-> self neck flex-blend) (the-as float 0.0) (* 2.0 (-> *display* seconds-per-frame)))
(set! f30-0 (seek
f30-0
(lerp-scale
@@ -2216,7 +2212,7 @@
)
(until (>= (ja-aframe-num 0) 285.0)
(try-preload-stream *art-control* "$GAMCAM29" 0 self (the-as float -99.0))
(set! (-> self energy) (seek (-> self energy) (the-as float 0.5) (* 0.2 (-> *display* seconds-per-frame))))
(seek! (-> self energy) (the-as float 0.5) (* 0.2 (-> *display* seconds-per-frame)))
(when (and (>= (ja-aframe-num 0) 175.0) (zero? gp-0))
(set! gp-0 1)
(let ((s5-2 (get-process *default-dead-pool* othercam #x4000)))
@@ -2238,10 +2234,8 @@
(set! gp-0 2)
(send-event (handle->process (-> self camera)) 'joint "camera2")
)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(set! (-> self interp) (seek (-> self interp) (the-as float 0.0) (-> *display* seconds-per-frame)))
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(seek! (-> self interp) (the-as float 0.0) (-> *display* seconds-per-frame))
(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) 0.66)
@@ -2312,13 +2306,9 @@
)
(until (ja-done? 0)
(ja-blend-eval)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(if (>= 1 arg0)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 1.0) (-> *display* seconds-per-frame))
)
(seek! (-> self neck flex-blend) (the-as float 1.0) (-> *display* seconds-per-frame))
)
(suspend)
(let ((s4-1 (-> self skel root-channel 0)))
@@ -2338,12 +2328,8 @@
(joint-control-channel-group! s5-1 (the-as art-joint-anim (-> self draw art-group data 7)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self body flex-blend)
(seek (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
)
(set! (-> self neck flex-blend)
(seek (-> self neck flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self body flex-blend) (the-as float 0.0) (-> *display* seconds-per-frame))
(seek! (-> self neck flex-blend) (the-as float 1.0) (* 2.0 (-> *display* seconds-per-frame)))
(suspend)
(let ((s5-2 (-> self skel root-channel 0)))
(set! (-> s5-2 param 0) (ja-aframe (the-as float 240.0) 0))
@@ -2379,7 +2365,7 @@
(set! s5-0 (-> s5-0 0 brother))
)
)
(set! (-> self health) (seek (-> self health) (the-as float 0.0) (the-as float 1.0)))
(seek! (-> self health) (the-as float 0.0) (the-as float 1.0))
(send-event (ppointer->process (-> self leaf 1)) 'kill 0)
(send-event (ppointer->process (-> self leaf 0)) 'kill 0)
(let ((a0-5 (-> self skel root-channel 0)))
+1 -1
View File
@@ -436,7 +436,7 @@
(deg-seek (-> self facing-rot z) 16384.0 (* (-> self facing-rotv z) (-> *display* seconds-per-frame)))
)
(quaternion-zxy! (-> self root quat) (-> self facing-rot))
(set! (-> self root scale x) (seek (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame))))
(seek! (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame)))
(set! (-> self root scale y) (-> self root scale x))
(set! (-> self root scale z) (-> self root scale x))
(none)
+2 -2
View File
@@ -139,7 +139,7 @@
(deg-seek (-> self facing-rot z) 16384.0 (* (-> self facing-rotv z) (-> *display* seconds-per-frame)))
)
(quaternion-zxy! (-> self root quat) (-> self facing-rot))
(set! (-> self root scale x) (seek (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame))))
(seek! (-> self root scale x) 0.0 (* 0.5 (-> *display* seconds-per-frame)))
(set! (-> self root scale y) (-> self root scale x))
(set! (-> self root scale z) (-> self root scale x))
(none)
@@ -830,7 +830,7 @@
(let ((f0-44 (+ (-> obj orient-rot y) (* (-> obj spin-vel) (-> *display* seconds-per-frame)))))
(set! (-> obj orient-rot y) (- f0-44 (* (the float (the int (/ f0-44 65536.0))) 65536.0)))
)
(set! (-> obj spin-vel) (seek (-> obj spin-vel) 0.0 (* 91022.22 (-> *display* seconds-per-frame))))
(seek! (-> obj spin-vel) 0.0 (* 91022.22 (-> *display* seconds-per-frame)))
(when (< (fabs (-> obj spin-vel)) 69176.89)
(if (>= (-> obj spin-vel) 0.0)
(set! (-> obj spin-vel) 69176.89)
+13 -17
View File
@@ -744,12 +744,11 @@
(let ((f0-4 (- (vector-dot s4-0 (-> self dest-point)) (vector-dot s4-0 gp-0)))
(f2-2 (- (vector-dot (the-as vector s5-0) (-> self dest-point)) (vector-dot (the-as vector s5-0) gp-0)))
)
(set! (-> self rudder-control) (seek
(-> self rudder-control)
(fmax -1.0 (fmin 1.0 (/ f2-2 (fmax 4096.0 f0-4))))
(* 4.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self rudder-control)
(fmax -1.0 (fmin 1.0 (/ f2-2 (fmax 4096.0 f0-4))))
(* 4.0 (-> *display* seconds-per-frame))
)
)
(let ((f0-12 0.0)
(f1-7 1.0)
@@ -763,22 +762,19 @@
)
(else
(let ((f0-14 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0)))
(set! (-> self rudder-control) (seek (-> self rudder-control) f0-14 (* 2.0 (-> *display* seconds-per-frame))))
(seek! (-> self rudder-control) f0-14 (* 2.0 (-> *display* seconds-per-frame)))
)
(if (cpad-hold? 1 x)
(set! (-> self throttle-control) (seek (-> self throttle-control) 1.0 (-> *display* seconds-per-frame)))
(set! (-> self throttle-control)
(seek (-> self throttle-control) 0.0 (* 0.25 (-> *display* seconds-per-frame)))
)
(seek! (-> self throttle-control) 1.0 (-> *display* seconds-per-frame))
(seek! (-> self throttle-control) 0.0 (* 0.25 (-> *display* seconds-per-frame)))
)
)
)
(set! (-> self engine-thrust) (seek
(-> self engine-thrust)
(* (-> self throttle-control) (-> *BALLOONLURKER-bank* max-engine-thrust))
(* 0.005 (-> *BALLOONLURKER-bank* max-engine-thrust))
)
)
(seek!
(-> self engine-thrust)
(* (-> self throttle-control) (-> *BALLOONLURKER-bank* max-engine-thrust))
(* 0.005 (-> *BALLOONLURKER-bank* max-engine-thrust))
)
(let ((f0-31 60.0)
(f1-14 1820.4445)
(f2-6 6735.6445)
+2 -6
View File
@@ -1991,18 +1991,14 @@
)
)
(let ((f30-1 -4096.0))
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
(if (= (-> self float-height-offset) f30-1)
(go-virtual rigid-body-platform-idle)
)
)
)
(else
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) 4096.0 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) 4096.0 (* 2048.0 (-> *display* seconds-per-frame)))
)
)
(none)
+3 -9
View File
@@ -956,15 +956,9 @@
(-> self root-override transv)
(-> self root-override root-prim collide-with)
)
(set! (-> self root-override scale x)
(seek (-> self root-override scale x) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
)
(set! (-> self root-override scale y)
(seek (-> self root-override scale y) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
)
(set! (-> self root-override scale z)
(seek (-> self root-override scale z) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
)
(seek! (-> self root-override scale x) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
(seek! (-> self root-override scale y) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
(seek! (-> self root-override scale z) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
(when (< 0.05 (-> self root-override scale x))
(suspend)
(goto cfg-3)
+5 -10
View File
@@ -236,9 +236,7 @@ nav-enemy-default-event-handler
)
:trans
(behavior ()
(set! (-> self sprint-distance)
(seek (-> self sprint-distance) 61440.0 (* 8192.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self sprint-distance) 61440.0 (* 8192.0 (-> *display* seconds-per-frame)))
(if (and *target* (>= 102400.0 (vector-vector-distance (-> self collide-info trans) (-> *target* control trans))))
(level-hint-spawn (game-text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none))
)
@@ -329,10 +327,9 @@ nav-enemy-default-event-handler
(go muse-idle)
)
)
((or (not *target*)
(< (-> self sprint-distance)
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
)
((or (not *target*) (< (-> self sprint-distance)
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
)
)
(set! (-> self target-speed) 40960.0)
)
@@ -340,9 +337,7 @@ nav-enemy-default-event-handler
(set! (-> self target-speed) 61440.0)
)
)
(set! (-> self sprint-distance)
(seek (-> self sprint-distance) 0.0 (* 4096.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self sprint-distance) 0.0 (* 4096.0 (-> *display* seconds-per-frame)))
(muse-check-dest-point)
(none)
)
+2 -2
View File
@@ -722,13 +722,13 @@
((or (not *target*)
(< 163840.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
)
(set! (-> self y-offset) (seek (-> self y-offset) -6553.6 (* 20480.0 (-> *display* seconds-per-frame))))
(seek! (-> self y-offset) -6553.6 (* 20480.0 (-> *display* seconds-per-frame)))
(if (= (-> self y-offset) -6553.6)
(go quicksandlurker-idle)
)
)
(else
(set! (-> self y-offset) (seek (-> self y-offset) 1228.8 (* 20480.0 (-> *display* seconds-per-frame))))
(seek! (-> self y-offset) 1228.8 (* 20480.0 (-> *display* seconds-per-frame)))
)
)
(none)
+1 -1
View File
@@ -553,7 +553,7 @@
(set! (-> self try-counted) #t)
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(set! (-> self try-count) (the-as uint (-> gp-0 user-int8 0)))
)
)
+2 -6
View File
@@ -641,18 +641,14 @@
)
)
(let ((f30-1 (-> self idle-y-offset)))
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
(if (= (-> self float-height-offset) f30-1)
(go-virtual rigid-body-platform-idle)
)
)
)
(else
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) (-> self float-y-offset) (* 32768.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) (-> self float-y-offset) (* 32768.0 (-> *display* seconds-per-frame)))
)
)
(none)
+4 -10
View File
@@ -719,9 +719,7 @@
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> self draw art-group data 43)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self joint blend)
(seek (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
(let* ((f1-1 (/ (- (ja-frame-num 0) (ja-aframe (the-as float 54.0) 0))
(- (the float (ja-num-frames 0)) (ja-aframe (the-as float 54.0) 0))
)
@@ -758,9 +756,7 @@
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> self draw art-group data 42)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self joint blend)
(seek (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self joint blend) (the-as float 0.0) (* 5.0 (-> *display* seconds-per-frame)))
(let* ((f1-1 (/ (- (ja-frame-num 0) (ja-aframe (the-as float 32.0) 0))
(- (the float (ja-num-frames 0)) (ja-aframe (the-as float 32.0) 0))
)
@@ -1119,9 +1115,7 @@
)
(until (ja-done? 0)
(if (>= (ja-frame-num 0) (ja-aframe (the-as float 235.0) 0))
(set! (-> self side-pos)
(seek (-> self side-pos) (the-as float 0.0) (* 20480.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self side-pos) (the-as float 0.0) (* 20480.0 (-> *display* seconds-per-frame)))
)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
@@ -1297,7 +1291,7 @@
(set! (-> self try-counted) #t)
(let ((gp-0 (-> self entity extra perm)))
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
(set! (-> gp-0 user-int8 0) (seekl (-> gp-0 user-int8 0) 255 1))
(seekl! (-> gp-0 user-int8 0) 255 1)
(set! (-> self try-count) (the-as uint (-> gp-0 user-int8 0)))
)
)
+5 -15
View File
@@ -1178,9 +1178,7 @@
)
(until (ja-done? 0)
(set! (-> self racer stick-lock) #t)
(set! (-> self control unknown-vector11 y)
(seek (-> self control unknown-vector11 y) 6144.0 (* 12288.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self control unknown-vector11 y) 6144.0 (* 12288.0 (-> *display* seconds-per-frame)))
(send-event *camera* 'joystick 0.0 1.0)
(suspend)
(let ((gp-3 (-> self skel root-channel 0)))
@@ -1203,9 +1201,7 @@
(until (ja-done? 0)
(set! (-> self racer stick-lock) #t)
(send-event *camera* 'joystick 0.0 1.0)
(set! (-> self control unknown-vector11 y)
(seek (-> self control unknown-vector11 y) 6144.0 (* 12288.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self control unknown-vector11 y) 6144.0 (* 12288.0 (-> *display* seconds-per-frame)))
(if (>= (ja-aframe-num 0) 245.0)
(set-forward-vel (* 0.5 (-> self control unknown-float01)))
)
@@ -1563,9 +1559,7 @@
(set! (-> self racer turn-anim-targ) 0.0)
(set! (-> self racer turn-anim-targ) 0.0)
(target-racing-turn-anim)
(set! (-> self control unknown-vector11 y)
(seek (-> self control unknown-vector11 y) 6144.0 (* 3.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self control unknown-vector11 y) 6144.0 (* 3.0 (-> *display* seconds-per-frame)))
(suspend)
)
)
@@ -1656,9 +1650,7 @@
)
)
)
(set! (-> self racer front-rotv)
(seek (-> self racer front-rotv) f0-5 (* 54613.332 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer front-rotv) f0-5 (* 54613.332 (-> *display* seconds-per-frame)))
)
(set! (-> self racer front-rot)
(the float
@@ -1897,9 +1889,7 @@
:post
(behavior ()
(racer-sounds)
(set! (-> self racer heat)
(seek (-> self racer heat) 0.0 (* (-> *RACER-bank* surface-heat-inc) (-> *display* seconds-per-frame)))
)
(seek! (-> self racer heat) 0.0 (* (-> *RACER-bank* surface-heat-inc) (-> *display* seconds-per-frame)))
(vector+! (-> self racer bike-trans) (-> self control trans) (-> self control unknown-vector12))
(quaternion-copy! (the-as quaternion (-> self racer bike-quat)) (-> self control quat))
(set! (-> self racer bike-scale quad) (-> self control scale quad))
+105 -145
View File
@@ -155,7 +155,7 @@
)
)
)
(set! (-> self racer slide-amp) (seek (-> self racer slide-amp) 0.0 (* 0.3 (-> *display* seconds-per-frame))))
(seek! (-> self racer slide-amp) 0.0 (* 0.3 (-> *display* seconds-per-frame)))
(if (= (-> self racer slide-amp) 0.0)
(set! (-> self racer slide-mode) -1)
)
@@ -168,7 +168,7 @@
;; Used lq/sq
(defbehavior racer-xz target ((arg0 float) (arg1 float))
(set! (-> self racer slide-shift-x) arg1)
(set! (-> self racer slide-interp) (seek (-> self racer slide-interp) 0.0 (-> *display* seconds-per-frame)))
(seek! (-> self racer slide-interp) 0.0 (-> *display* seconds-per-frame))
(let ((f30-1
(if (or (< (* arg1 arg0) 0.0) (not (racer-on-ground?)))
1.0
@@ -182,9 +182,7 @@
(lerp-scale 91022.22 236657.78 (-> self control unknown-float01) 0.0 (* 0.125 (-> self racer transv-max)))
)
)
(set! (-> self racer rotv y)
(seek (-> self racer rotv y) (* arg0 f30-1 (- f28-1)) (* f0-18 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer rotv y) (* arg0 f30-1 (- f28-1)) (* f0-18 (-> *display* seconds-per-frame)))
)
(set! (-> self racer rotv y)
(* (-> self racer rotv y)
@@ -199,9 +197,7 @@
(set! (-> self racer slide-grip-mult) 1.0)
)
(s5-1
(set! (-> self racer slide-grip-mult)
(seek (-> self racer slide-grip-mult) 1.0 (-> *display* seconds-per-frame))
)
(seek! (-> self racer slide-grip-mult) 1.0 (-> *display* seconds-per-frame))
)
)
(let ((f30-4 (* (deg-diff f30-3 0.0) (-> self racer slide-grip-mult))))
@@ -288,13 +284,11 @@
(+! (-> self control unknown-vector00 z) (* f1-4 (-> *display* seconds-per-frame)))
)
)
(set! (-> self racer front-rotv)
(seek
(-> self racer front-rotv)
(+ 65536.0 (* 364088.88 (+ f0-0 (* 0.1 arg1))))
(* 364088.88 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self racer front-rotv)
(+ 65536.0 (* 364088.88 (+ f0-0 (* 0.1 arg1))))
(* 364088.88 (-> *display* seconds-per-frame))
)
)
(set! (-> self racer front-rot)
(the float
@@ -363,13 +357,11 @@
(defbehavior racer-cushion target ((arg0 float))
(let ((f30-0 (-> self racer bob-period)))
(let ((f28-0 1.0))
(set! (-> self racer bob-meta-timer)
(seek
(-> self racer bob-meta-timer)
(-> self racer bob-meta-meta-timer)
(* 4.0 (-> *display* seconds-per-frame))
)
)
(seek!
(-> self racer bob-meta-timer)
(-> self racer bob-meta-meta-timer)
(* 4.0 (-> *display* seconds-per-frame))
)
(let* ((f0-8 (sin (/ (* 65536.0 (-> self racer bob-timer)) f30-0)))
(f0-9 (* 1228.8 (-> self racer bob-mult-trans) f28-0 f0-8))
)
@@ -412,9 +404,7 @@
(set! (-> self racer hill-offset) (lerp (-> self racer hill-offset) 0.0 0.05))
)
)
(set! (-> self racer hill-boost)
(seek (-> self racer hill-boost) 0.0 (* 81920.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer hill-boost) 0.0 (* 81920.0 (-> *display* seconds-per-frame)))
(set! (-> self racer hill-offset) 0.0)
0
(none)
@@ -566,13 +556,11 @@
)
)
)
(set! (-> self control unknown-float80)
(seek
(-> self control unknown-float80)
f0-2
(* (-> self control unknown-float82) (-> *display* seconds-per-frame))
)
)
(seek!
(-> self control unknown-float80)
f0-2
(* (-> self control unknown-float82) (-> *display* seconds-per-frame))
)
)
(vector-deg-slerp
(-> self control dynam gravity-normal)
@@ -598,11 +586,10 @@
100.0
(let ((f0-6
(+ (* 2.0 f0-1)
(if (< 4096.0
(vector-dot
(-> self control dynam gravity-normal)
(vector-! (new 'stack-no-clear 'vector) (-> self control trans) (-> self control shadow-pos))
)
(if (< 4096.0 (vector-dot
(-> self control dynam gravity-normal)
(vector-! (new 'stack-no-clear 'vector) (-> self control trans) (-> self control shadow-pos))
)
)
0.7
0.0
@@ -614,9 +601,7 @@
(if (< 2.5 f0-6)
(set! f0-6 2.5)
)
(set! (-> self racer engine-sound-pitch)
(seek (-> self racer engine-sound-pitch) f0-6 (* 4.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer engine-sound-pitch) f0-6 (* 4.0 (-> *display* seconds-per-frame)))
)
)
(let ((f0-11 (lerp-scale 100.0 60.0 (-> self racer engine-sound-pitch) 0.8 2.0)))
@@ -731,73 +716,72 @@
(let* ((gp-4 #f)
(s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self manipy 0 node-list data 10)))
(v1-61 (-> self control ground-pat material))
(a1-13
(cond
((= v1-61 (pat-material waterbottom))
(when (and (logtest? (-> self draw status) (draw-status was-drawn)) (zero? (-> self draw cur-lod)))
(let ((f1-3 (y-angle (-> self control)))
(f0-17 (-> self control unknown-float01))
(s4-2 s5-2)
)
(set! (-> s4-2 y) (-> self water height))
(set! (-> *part-id-table* 2275 init-specs 4 initial-valuef) (+ 24576.0 f1-3))
(set! (-> *part-id-table* 2275 init-specs 19 initial-valuef) (+ 49152.0 f1-3))
(set! (-> *part-id-table* 2275 init-specs 1 initial-valuef) (* 0.0000036621095 f0-17))
(set! (-> *part-id-table* 2275 init-specs 2 initial-valuef) (* 0.1 f0-17))
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 2275)
s4-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 2276)
s4-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
(a1-13 (cond
((= v1-61 (pat-material waterbottom))
(when (and (logtest? (-> self draw status) (draw-status was-drawn)) (zero? (-> self draw cur-lod)))
(let ((f1-3 (y-angle (-> self control)))
(f0-17 (-> self control unknown-float01))
(s4-2 s5-2)
)
(set! (-> s4-2 y) (-> self water height))
(set! (-> *part-id-table* 2275 init-specs 4 initial-valuef) (+ 24576.0 f1-3))
(set! (-> *part-id-table* 2275 init-specs 19 initial-valuef) (+ 49152.0 f1-3))
(set! (-> *part-id-table* 2275 init-specs 1 initial-valuef) (* 0.0000036621095 f0-17))
(set! (-> *part-id-table* 2275 init-specs 2 initial-valuef) (* 0.1 f0-17))
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 2275)
s4-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 2276)
s4-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
)
(-> *part-id-table* 2208)
)
((= v1-61 (pat-material lava))
(-> *part-id-table* 2213)
)
((= v1-61 (pat-material hotcoals))
(-> *part-id-table* 2214)
)
((or (= v1-61 (pat-material pcmetal))
(= v1-61 (pat-material metal))
(= v1-61 (pat-material tube))
(= v1-61 (pat-material rotate))
)
(-> *part-id-table* 2215)
)
((= v1-61 (pat-material grass))
(-> *part-id-table* 2207)
)
((or (= v1-61 (pat-material dirt))
(= v1-61 (pat-material sand))
(= v1-61 (pat-material straw))
(= v1-61 (pat-material gravel))
)
(-> *part-id-table* 2216)
)
((or (= v1-61 (pat-material wood)) (= v1-61 (pat-material crwood)))
(-> *part-id-table* 2217)
)
((= v1-61 (pat-material stone))
(-> *part-id-table* 2831)
)
(else
(-> *part-id-table* 2211)
)
)
)
(-> *part-id-table* 2208)
)
((= v1-61 (pat-material lava))
(-> *part-id-table* 2213)
)
((= v1-61 (pat-material hotcoals))
(-> *part-id-table* 2214)
)
((or (= v1-61 (pat-material pcmetal))
(= v1-61 (pat-material metal))
(= v1-61 (pat-material tube))
(= v1-61 (pat-material rotate))
)
(-> *part-id-table* 2215)
)
((= v1-61 (pat-material grass))
(-> *part-id-table* 2207)
)
((or (= v1-61 (pat-material dirt))
(= v1-61 (pat-material sand))
(= v1-61 (pat-material straw))
(= v1-61 (pat-material gravel))
)
(-> *part-id-table* 2216)
)
((or (= v1-61 (pat-material wood)) (= v1-61 (pat-material crwood)))
(-> *part-id-table* 2217)
)
((= v1-61 (pat-material stone))
(-> *part-id-table* 2831)
)
(else
(-> *part-id-table* 2211)
)
)
)
)
(set! (-> s5-2 y) (-> self control shadow-pos y))
(if (nonzero? a1-13)
@@ -909,30 +893,24 @@
)
(case (-> self control poly-pat material)
(((pat-material hotcoals))
(set! (-> self racer heat)
(seek (-> self racer heat) (-> *RACER-bank* heat-max) (* f22-1 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer heat) (-> *RACER-bank* heat-max) (* f22-1 (-> *display* seconds-per-frame)))
)
(((pat-material lava))
(if (racer-on-ground?)
(set! (-> self racer heat)
(seek (-> self racer heat) (-> *RACER-bank* heat-max) (* f24-1 (-> *display* seconds-per-frame)))
)
(set! (-> self racer heat)
(seek (-> self racer heat) (-> *RACER-bank* heat-max) (* f28-2 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer heat) (-> *RACER-bank* heat-max) (* f24-1 (-> *display* seconds-per-frame)))
(seek! (-> self racer heat) (-> *RACER-bank* heat-max) (* f28-2 (-> *display* seconds-per-frame)))
)
)
(else
(if (not (racer-on-ground?))
(set! (-> self racer heat) (seek (-> self racer heat) 0.0 (* f26-0 (-> *display* seconds-per-frame))))
(seek! (-> self racer heat) 0.0 (* f26-0 (-> *display* seconds-per-frame)))
)
)
)
)
(let ((v1-189 (- (-> *display* base-frame-counter) (-> self control unknown-dword11))))
(if (and (>= v1-189 (seconds 0.9)) (>= (seconds 3) v1-189))
(set! (-> self racer heat) (seek (-> self racer heat) 0.0 (* f30-2 (-> *display* seconds-per-frame))))
(seek! (-> self racer heat) 0.0 (* f30-2 (-> *display* seconds-per-frame)))
)
)
)
@@ -984,9 +962,7 @@
(set! (-> self racer boost-level) 0.0)
)
(set! (-> self racer boost-target) (+ (-> self racer boost-curve) (-> self racer boost-level)))
(set! (-> self racer boost-output)
(seek (-> self racer boost-output) (-> self racer boost-target) (* 40960.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer boost-output) (-> self racer boost-target) (* 40960.0 (-> *display* seconds-per-frame)))
(when (!= (-> self racer boost-output) 0.0)
(dotimes (gp-7 8)
(let ((v1-258 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
@@ -1496,10 +1472,8 @@
)
(cond
((racer-on-ground?)
(set! (-> self control unknown-float81)
(seek (-> self control unknown-float81) 1.0 (* 8.0 (-> *display* seconds-per-frame)))
)
(set! (-> self racer mult-rotx) (seek (-> self racer mult-rotx) 0.0 (* 2.0 (-> *display* seconds-per-frame))))
(seek! (-> self control unknown-float81) 1.0 (* 8.0 (-> *display* seconds-per-frame)))
(seek! (-> self racer mult-rotx) 0.0 (* 2.0 (-> *display* seconds-per-frame)))
(set! (-> self racer targ-rotx) 0.0)
(set! (-> self racer hill-rotx) 0.0)
(set! (-> self racer speed-rotx) 0.25)
@@ -1512,9 +1486,9 @@
(when (!= (the int (/ f0-52 (* 0.5 (-> self racer bob-period))))
(the int (/ (-> self racer bob-timer) (* 0.5 (-> self racer bob-period))))
)
(set! (-> self racer bob-mult-trans) (seek (-> self racer bob-mult-trans) 1.0 0.75))
(seek! (-> self racer bob-mult-trans) 1.0 0.75)
(if (< 1.5 (-> self racer bob-meta-meta-timer))
(set! (-> self racer bob-meta-meta-timer) (seek (-> self racer bob-meta-meta-timer) 1.0 0.5))
(seek! (-> self racer bob-meta-meta-timer) 1.0 0.5)
)
(when (>= (- (-> *display* base-frame-counter) (-> self racer bob-meta-time)) (seconds 2.2))
(set! (-> self racer bob-meta-time) (-> *display* base-frame-counter))
@@ -1523,9 +1497,7 @@
)
)
(let ((f0-63 (lerp-scale -1.0 -0.33 (-> self control unknown-float01) 0.0 (-> self racer transv-max))))
(set! (-> self racer bob-mult-rot)
(seek (-> self racer bob-mult-rot) f0-63 (* 8.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer bob-mult-rot) f0-63 (* 8.0 (-> *display* seconds-per-frame)))
)
(if (< 0.0 f30-1)
(set! f30-1 0.0)
@@ -1533,12 +1505,8 @@
(set! (-> self racer stick-lock) #f)
)
(else
(set! (-> self control unknown-float81)
(seek (-> self control unknown-float81) 0.0 (* 2.0 (-> *display* seconds-per-frame)))
)
(set! (-> self racer mult-rotx)
(seek (-> self racer mult-rotx) 1.0 (* 16.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self control unknown-float81) 0.0 (* 2.0 (-> *display* seconds-per-frame)))
(seek! (-> self racer mult-rotx) 1.0 (* 16.0 (-> *display* seconds-per-frame)))
(let ((f0-77 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
(vector-! (new 'stack-no-clear 'vector) (-> self control trans) (the-as vector (-> self control trans-old)))
(let* ((v1-128 (-> self racer bounce))
@@ -1573,9 +1541,7 @@
)
(set! (-> self racer speed-rotx) 0.5)
(when (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.1))
(set! (-> self racer hill-rotx)
(seek (-> self racer hill-rotx) 0.0 (* 65536.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer hill-rotx) 0.0 (* 65536.0 (-> *display* seconds-per-frame)))
(set! (-> self racer speed-rotx) 0.6)
)
)
@@ -1583,9 +1549,7 @@
(set! (-> self racer speed-rotx) 0.25)
)
)
(set! (-> self racer mult-rotx)
(seek (-> self racer mult-rotx) 1.0 (* 64.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer mult-rotx) 1.0 (* 64.0 (-> *display* seconds-per-frame)))
)
(else
(set! (-> self racer speed-rotx) 0.025)
@@ -1597,12 +1561,8 @@
)
(set! (-> self racer bob-timer) (- f0-91 (* (the float (the int (/ f0-91 f1-44))) f1-44)))
)
(set! (-> self racer bob-mult-rot)
(seek (-> self racer bob-mult-rot) 0.0 (* 16.0 (-> *display* seconds-per-frame)))
)
(set! (-> self racer bob-mult-trans)
(seek (-> self racer bob-mult-trans) 0.0 (* 16.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self racer bob-mult-rot) 0.0 (* 16.0 (-> *display* seconds-per-frame)))
(seek! (-> self racer bob-mult-trans) 0.0 (* 16.0 (-> *display* seconds-per-frame)))
(set! f30-1
(lerp-scale
f30-1
+5 -15
View File
@@ -1627,9 +1627,7 @@
(suspend)
(set! (-> self state-time) (-> *display* base-frame-counter))
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
(set! (-> self timer-pos-offset)
(seekl (-> self timer-pos-offset) 100 (the int (* 3.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self timer-pos-offset) 100 (the int (* 3.0 (-> *display* time-adjust-ratio))))
(when (= (-> self timer-pos-offset) 100)
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable)
(send-event (ppointer->process (-> *hud-parts* money)) 'enable)
@@ -1656,9 +1654,7 @@
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
(set! (-> self timer-pos-offset)
(seekl (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
(when (= (-> self timer-pos-offset) 100)
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable)
(send-event (ppointer->process (-> *hud-parts* money)) 'enable)
@@ -1847,9 +1843,7 @@
(set! (-> self state-time) (-> *display* game-frame-counter))
(while #t
(seconds->race-time (-> self this-time) (- (-> *display* game-frame-counter) (-> self state-time)))
(set! (-> self timer-pos-offset)
(seekl (-> self timer-pos-offset) 0 (the int (* 5.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self timer-pos-offset) 0 (the int (* 5.0 (-> *display* time-adjust-ratio))))
(completed? (-> self ticker))
(gorge-start-draw-time #f #f)
(suspend)
@@ -1869,9 +1863,7 @@
(behavior ()
(while #t
(suspend)
(set! (-> self timer-pos-offset)
(seekl (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
(when (= (-> self timer-pos-offset) 100)
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable)
(send-event (ppointer->process (-> *hud-parts* money)) 'enable)
@@ -1916,9 +1908,7 @@
(behavior ()
(while #t
(suspend)
(set! (-> self timer-pos-offset)
(seekl (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
)
(seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio))))
(when (= (-> self timer-pos-offset) 100)
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable)
(send-event (ppointer->process (-> *hud-parts* money)) 'enable)
+2 -2
View File
@@ -970,7 +970,7 @@
(dummy-22 self)
(go elevator-idle-at-fort)
)
(set! (-> self path-pos) (seek (-> self path-pos) 1.0 (* 0.06666667 (-> *display* seconds-per-frame))))
(seek! (-> self path-pos) 1.0 (* 0.06666667 (-> *display* seconds-per-frame)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(plat-trans)
(dummy-20 self)
@@ -1038,7 +1038,7 @@
(dummy-22 self)
(go elevator-idle-at-cave)
)
(set! (-> self path-pos) (seek (-> self path-pos) 0.0 (* 0.06666667 (-> *display* seconds-per-frame))))
(seek! (-> self path-pos) 0.0 (* 0.06666667 (-> *display* seconds-per-frame)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(plat-trans)
(dummy-20 self)
+1 -3
View File
@@ -223,9 +223,7 @@
)
)
(until (ja-done? 0)
(set! (-> self control unknown-float81)
(seek (-> self control unknown-float81) 0.0 (-> *display* seconds-per-frame))
)
(seek! (-> self control unknown-float81) 0.0 (-> *display* seconds-per-frame))
(suspend)
(let ((a0-49 (-> self skel root-channel 0)))
(set! (-> a0-49 param 0) (the float (+ (-> a0-49 frame-group data 0 length) -1)))
+2 -2
View File
@@ -767,13 +767,13 @@
)
(cond
((>= (- (-> *display* base-frame-counter) (-> self start-spin-time)) (-> self slow-down))
(set! (-> self speed-u) (seek (-> self speed-u) 0.0 (* 0.5555556 (-> *display* seconds-per-frame))))
(seek! (-> self speed-u) 0.0 (* 0.5555556 (-> *display* seconds-per-frame)))
(if (= (-> self speed-u) 0.0)
(go bully-stop-spinning)
)
)
(else
(set! (-> self speed-u) (seek (-> self speed-u) 1.0 (* 0.5555556 (-> *display* seconds-per-frame))))
(seek! (-> self speed-u) 1.0 (* 0.5555556 (-> *display* seconds-per-frame)))
)
)
(set! (-> self spin-vel) (* 196608.0 (-> self speed-u)))
+1 -1
View File
@@ -745,7 +745,7 @@
)
:trans
(behavior ()
(set! (-> self root scale y) (seek (-> self root scale y) 0.8 (* 0.667 (-> *display* seconds-per-frame))))
(seek! (-> self root scale y) 0.8 (* 0.667 (-> *display* seconds-per-frame)))
(when *target*
(let ((f0-4 (-> (target-pos 0) y)))
(when (zero? (logand (-> *target* state-flags) 256))
+4 -4
View File
@@ -1095,7 +1095,7 @@
(joint-control-channel-group! a0-32 (the-as art-joint-anim (-> self draw art-group data 6)) num-func-seek!)
)
(until (ja-done? 0)
(set! (-> self wave-scale) (seek (-> self wave-scale) 1.0 0.0016666667))
(seek! (-> self wave-scale) 1.0 0.0016666667)
(dummy-20 self (-> self wave-scale))
(if (and (-> self move-player?) (>= (ja-aframe-num 0) 310.0))
(set! (-> self move-player?) #f)
@@ -1130,7 +1130,7 @@
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
(set! (-> self wave-scale) (seek (-> self wave-scale) 1.0 0.0016666667))
(seek! (-> self wave-scale) 1.0 0.0016666667)
(dummy-20 self (-> self wave-scale))
(suspend)
)
@@ -1139,7 +1139,7 @@
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 2.5))
(set! (-> self wave-scale) (seek (-> self wave-scale) 1.0 0.0016666667))
(seek! (-> self wave-scale) 1.0 0.0016666667)
(dummy-20 self (-> self wave-scale))
(suspend)
)
@@ -1264,7 +1264,7 @@
(if (not (-> self move-player?))
(rider-trans)
)
(set! (-> self wave-scale) (seek (-> self wave-scale) 0.0 0.0016666667))
(seek! (-> self wave-scale) 0.0 0.0016666667)
(dummy-20 self (-> self wave-scale))
(none)
)
+2 -2
View File
@@ -141,7 +141,7 @@
(cond
((< (get-current-phase (-> self sync)) (-> self deadly-time))
(when (!= (-> self deadly-fade) 1.0)
(set! (-> self deadly-fade) (seek (-> self deadly-fade) 1.0 (* 8.0 (-> *display* seconds-per-frame))))
(seek! (-> self deadly-fade) 1.0 (* 8.0 (-> *display* seconds-per-frame)))
(let ((f30-0 (-> self deadly-fade)))
(vector-lerp! (-> self draw color-mult) (-> self safe-color-mult) (-> self deadly-color-mult) f30-0)
(vector-lerp!
@@ -166,7 +166,7 @@
(else
(set! (-> self flags) (logand -524289 (-> self flags)))
(when (!= (-> self deadly-fade) 0.0)
(set! (-> self deadly-fade) (seek (-> self deadly-fade) 0.0 (* 8.0 (-> *display* seconds-per-frame))))
(seek! (-> self deadly-fade) 0.0 (* 8.0 (-> *display* seconds-per-frame)))
(let ((f30-1 (-> self deadly-fade)))
(vector-lerp! (-> self draw color-mult) (-> self safe-color-mult) (-> self deadly-color-mult) f30-1)
(vector-lerp!
+12 -15
View File
@@ -180,15 +180,14 @@
;; definition for function tube-sounds
(defbehavior tube-sounds target ()
(set! (-> self tube tube-sound-vol) (seek
(-> self tube tube-sound-vol)
(if (logtest? (-> self control status) 1)
100.0
0.0
)
(* 200.0 (-> *display* seconds-per-frame))
)
(seek!
(-> self tube tube-sound-vol)
(if (logtest? (-> self control status) 1)
100.0
0.0
)
(* 200.0 (-> *display* seconds-per-frame))
)
(let ((f30-0 (-> self tube tube-sound-vol))
(f0-5 (lerp-scale -0.3 0.3 (-> self control unknown-float01) 0.0 122880.0))
)
@@ -727,13 +726,11 @@
(go target-tube)
)
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
(set! (-> self control unknown-float122)
(seek
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
)
(seek!
(-> self control unknown-float122)
(fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control unknown-float01)))))
(-> *display* seconds-per-frame)
)
(none)
)
:code
+2 -2
View File
@@ -93,7 +93,7 @@
(restore-collide-with-as (-> self root-override))
(set! (-> self state-time) (-> *display* base-frame-counter))
(while #t
(set! (-> self extended-amount) (seek (-> self extended-amount) 1.0 (* 2.5 (-> *display* seconds-per-frame))))
(seek! (-> self extended-amount) 1.0 (* 2.5 (-> *display* seconds-per-frame)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-lerp! gp-0 (-> self in-trans) (-> self out-trans) (-> self extended-amount))
(move-to-point! (-> self root-override) gp-0)
@@ -155,7 +155,7 @@
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(while #t
(set! (-> self extended-amount) (seek (-> self extended-amount) 0.0 (* 2.5 (-> *display* seconds-per-frame))))
(seek! (-> self extended-amount) 0.0 (* 2.5 (-> *display* seconds-per-frame)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-lerp! gp-0 (-> self in-trans) (-> self out-trans) (-> self extended-amount))
(move-to-point! (-> self root-override) gp-0)
+3 -9
View File
@@ -1459,9 +1459,7 @@ nav-enemy-default-event-handler
(if (and (not gp-0) (= (-> self tongue-control forward-scale-control) f30-0))
(go kermit-retract-tongue)
)
(set! (-> self tongue-control forward-scale-control)
(seek (-> self tongue-control forward-scale-control) f30-0 0.25)
)
(seek! (-> self tongue-control forward-scale-control) f30-0 0.25)
)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
@@ -1536,9 +1534,7 @@ nav-enemy-default-event-handler
)
(go kermit-retract-tongue)
)
(set! (-> self tongue-pulse-pos)
(seek (-> self tongue-pulse-pos) 1.0 (* 0.3 (-> *display* seconds-per-frame)))
)
(seek! (-> self tongue-pulse-pos) 1.0 (* 0.3 (-> *display* seconds-per-frame)))
(when (and (-> self child-override) (let ((v1-9 (-> self child-override)))
(= (-> (if v1-9
(-> v1-9 0 self-override)
@@ -1651,9 +1647,7 @@ nav-enemy-default-event-handler
)
(until (ja-done? 0)
(if (>= (ja-aframe-num 0) 3.0)
(set! (-> self tongue-control forward-scale-control)
(seek (-> self tongue-control forward-scale-control) 0.0 0.125)
)
(seek! (-> self tongue-control forward-scale-control) 0.0 0.125)
)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
+6 -9
View File
@@ -183,16 +183,13 @@ swamp-bat-slave-event-handler
(TODO-RENAME-12 s2-0 gp-0 f30-0)
(vector-cross! s4-0 gp-0 s3-0)
(vector-normalize! s4-0 1.0)
(let ((f0-4
(fmax
(fmin (- (vector-dot (target-pos 0) s4-0) (vector-dot s5-0 s4-0)) (-> self strafe-envelope))
(- (-> self strafe-envelope))
)
)
(let ((f0-4 (fmax
(fmin (- (vector-dot (target-pos 0) s4-0) (vector-dot s5-0 s4-0)) (-> self strafe-envelope))
(- (-> self strafe-envelope))
)
)
)
(set! (-> self strafe-distance)
(seek (-> self strafe-distance) f0-4 (* 20480.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self strafe-distance) f0-4 (* 20480.0 (-> *display* seconds-per-frame)))
)
(vector-float*! s4-0 s4-0 (-> self strafe-distance))
(vector+! (-> self root-override trans) s5-0 s4-0)
+2 -6
View File
@@ -988,18 +988,14 @@
)
)
(let ((f30-1 -2048.0))
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) f30-1 (* 2048.0 (-> *display* seconds-per-frame)))
(if (= (-> self float-height-offset) f30-1)
(go-virtual rigid-body-platform-idle)
)
)
)
(else
(set! (-> self float-height-offset)
(seek (-> self float-height-offset) 4096.0 (* 2048.0 (-> *display* seconds-per-frame)))
)
(seek! (-> self float-height-offset) 4096.0 (* 2048.0 (-> *display* seconds-per-frame)))
)
)
(none)
+7 -17
View File
@@ -843,12 +843,8 @@
;; INFO: Return type mismatch int vs none.
(defbehavior fishermans-boat-play-sounds fishermans-boat ()
(if (-> self ignition)
(set! (-> self engine-sound-envelope)
(seek (-> self engine-sound-envelope) 1.0 (* 2.0 (-> *display* seconds-per-frame)))
)
(set! (-> self engine-sound-envelope)
(seek (-> self engine-sound-envelope) 0.0 (-> *display* seconds-per-frame))
)
(seek! (-> self engine-sound-envelope) 1.0 (* 2.0 (-> *display* seconds-per-frame)))
(seek! (-> self engine-sound-envelope) 0.0 (-> *display* seconds-per-frame))
)
(cond
((< 0.0 (-> self engine-sound-envelope))
@@ -910,15 +906,11 @@
(else
(when (not (-> self measure-parameters))
(let ((f0-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)))
(set! (-> self controller steering)
(seek (-> self controller steering) (fmax -1.0 (fmin 1.0 f0-0)) (-> *display* seconds-per-frame))
)
(seek! (-> self controller steering) (fmax -1.0 (fmin 1.0 f0-0)) (-> *display* seconds-per-frame))
)
(if (cpad-hold? 0 x)
(set! (-> self controller throttle) (seek (-> self controller throttle) 0.8 (-> *display* seconds-per-frame)))
(set! (-> self controller throttle)
(seek (-> self controller throttle) 0.0 (* 0.25 (-> *display* seconds-per-frame)))
)
(seek! (-> self controller throttle) 0.8 (-> *display* seconds-per-frame))
(seek! (-> self controller throttle) 0.0 (* 0.25 (-> *display* seconds-per-frame)))
)
0
)
@@ -939,9 +931,7 @@
)
)
(if (-> self ignition)
(set! (-> self engine-thrust)
(seek (-> self engine-thrust) (* 1228800.0 (-> self controller throttle)) 6144.0)
)
(seek! (-> self engine-thrust) (* 1228800.0 (-> self controller throttle)) 6144.0)
(set! (-> self engine-thrust) 0.0)
)
(cond
@@ -955,7 +945,7 @@
)
)
(else
(set! (-> self propeller spin-rate) (seek (-> self propeller spin-rate) 0.0 218.45334))
(seek! (-> self propeller spin-rate) 0.0 218.45334)
)
)
(TODO-RENAME-28 self)
+38 -40
View File
@@ -333,13 +333,11 @@ yakow-default-event-handler
)
)
)
(set! (-> self walk-turn-blend)
(seek
(-> self walk-turn-blend)
f30-0
(* (-> *YAKOW-bank* walk-turn-blend-rate) (-> *display* seconds-per-frame))
)
)
(seek!
(-> self walk-turn-blend)
f30-0
(* (-> *YAKOW-bank* walk-turn-blend-rate) (-> *display* seconds-per-frame))
)
)
(set! (-> self final-speed)
(fmin (-> self travel-speed) (* (vector-length (-> self nav travel)) (-> *display* frames-per-second)))
@@ -507,12 +505,16 @@ yakow-default-event-handler
)
)
(if (-> self run-mode)
(set! (-> self walk-run-blend)
(seek (-> self walk-run-blend) 1.0 (* (-> *YAKOW-bank* walk-run-blend-rate) (-> *display* seconds-per-frame)))
)
(set! (-> self walk-run-blend)
(seek (-> self walk-run-blend) 0.0 (* (-> *YAKOW-bank* walk-run-blend-rate) (-> *display* seconds-per-frame)))
)
(seek!
(-> self walk-run-blend)
1.0
(* (-> *YAKOW-bank* walk-run-blend-rate) (-> *display* seconds-per-frame))
)
(seek!
(-> self walk-run-blend)
0.0
(* (-> *YAKOW-bank* walk-run-blend-rate) (-> *display* seconds-per-frame))
)
)
(let ((v1-68 (-> self skel root-channel 1)))
(set! (-> v1-68 frame-interp) (fabs (-> self walk-turn-blend)))
@@ -701,9 +703,10 @@ yakow-default-event-handler
(behavior ()
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> *YAKOW-bank* default-patrol-time))
(not (-> self in-pen))
(and *target* (>= (-> self fact-override idle-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(and *target*
(>= (-> self fact-override idle-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
)
(not (yakow-facing-player? 21845.334))
)
@@ -719,12 +722,11 @@ yakow-default-event-handler
)
)
)
(set! (-> self travel-speed) (seek
(-> self travel-speed)
(-> *YAKOW-bank* walk-speed)
(* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame))
)
)
(seek!
(-> self travel-speed)
(-> *YAKOW-bank* walk-speed)
(* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame))
)
(none)
)
:code
@@ -895,23 +897,20 @@ yakow-default-event-handler
(vector-vector-distance (-> self root-override trans) (target-pos 0))
)
)
(f30-2
(lerp-scale
(-> *YAKOW-bank* run-speed)
(-> *YAKOW-bank* walk-speed)
f0-2
(-> *YAKOW-bank* run-away-dist)
(-> *YAKOW-bank* walk-away-dist)
)
)
(f30-2 (lerp-scale
(-> *YAKOW-bank* run-speed)
(-> *YAKOW-bank* walk-speed)
f0-2
(-> *YAKOW-bank* run-away-dist)
(-> *YAKOW-bank* walk-away-dist)
)
)
)
(if (yakow-facing-player? 21845.334)
(set! f30-2 0.0)
)
(set! (-> self enable-turn-around) (< (-> *YAKOW-bank* run-speed) f30-2))
(set! (-> self travel-speed)
(seek (-> self travel-speed) f30-2 (* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame)))
)
(seek! (-> self travel-speed) f30-2 (* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame)))
)
(none)
)
@@ -947,12 +946,11 @@ yakow-default-event-handler
:trans
(behavior ()
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.2))
(set! (-> self travel-speed) (seek
(-> self travel-speed)
(-> *YAKOW-bank* run-speed)
(* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame))
)
)
(seek!
(-> self travel-speed)
(-> *YAKOW-bank* run-speed)
(* (-> *YAKOW-bank* acceleration) (-> *display* seconds-per-frame))
)
)
0
(none)