mirror of
https://github.com/open-goal/jak-project
synced 2026-06-14 14:28:25 -04:00
122de4ecf5
After spending the last month staring at and comparing Jak 3 and Jak 1 versions of a bunch of `target` code for my jetboard mod, I figured this would be a good opportunity to revive this ancient PR #1714 along with some other small misc fixes/improvements. Instead of directly replacing the old fields, I decided to opt for using overlay fields to maintain backwards compatibility with existing manual patches, files without ref tests and mods that might use these fields.
1080 lines
37 KiB
Common Lisp
Vendored
Generated
1080 lines
37 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition for symbol *footstep-surface*, type int
|
|
(define *footstep-surface* 448)
|
|
|
|
;; definition for symbol *debug-effect-control*, type symbol
|
|
(define *debug-effect-control* #f)
|
|
|
|
;; definition for function sound-name-with-material
|
|
(defun sound-name-with-material ((arg0 symbol) (arg1 pat-surface) (arg2 string))
|
|
(let ((gp-0 format)
|
|
(a0-2 (clear *temp-string*))
|
|
(a1-1 "~S-~S~S")
|
|
(v1-1 (-> arg1 material))
|
|
)
|
|
(gp-0
|
|
a0-2
|
|
a1-1
|
|
arg0
|
|
(cond
|
|
((= v1-1 (pat-material sand))
|
|
"sand"
|
|
)
|
|
((= v1-1 (pat-material wood))
|
|
"wood"
|
|
)
|
|
((= v1-1 (pat-material crwood))
|
|
"crwood"
|
|
)
|
|
((or (= v1-1 (pat-material tube)) (= v1-1 (pat-material pcmetal)))
|
|
"pcmetal"
|
|
)
|
|
((or (= v1-1 (pat-material metal)) (= v1-1 (pat-material rotate)))
|
|
"metal"
|
|
)
|
|
((= v1-1 (pat-material snow))
|
|
"snow"
|
|
)
|
|
((= v1-1 (pat-material deepsnow))
|
|
"dpsnow"
|
|
)
|
|
((= v1-1 (pat-material gravel))
|
|
"gravel"
|
|
)
|
|
((= v1-1 (pat-material dirt))
|
|
"dirt"
|
|
)
|
|
((= v1-1 (pat-material stone))
|
|
"stone"
|
|
)
|
|
((= v1-1 (pat-material waterbottom))
|
|
"water"
|
|
)
|
|
((= v1-1 (pat-material tar))
|
|
"tar"
|
|
)
|
|
((= v1-1 (pat-material straw))
|
|
"straw"
|
|
)
|
|
((= v1-1 (pat-material ice))
|
|
"ice"
|
|
)
|
|
((= v1-1 (pat-material swamp))
|
|
"swamp"
|
|
)
|
|
((= v1-1 (pat-material neutral))
|
|
"neutral"
|
|
)
|
|
(else
|
|
"grass"
|
|
)
|
|
)
|
|
arg2
|
|
)
|
|
)
|
|
(string->sound-name *temp-string*)
|
|
)
|
|
|
|
;; definition for function effect-param->sound-spec
|
|
(defun effect-param->sound-spec ((arg0 sound-spec) (arg1 (pointer float)) (arg2 int))
|
|
(while (> arg2 0)
|
|
(case (the int (-> arg1 0))
|
|
((3)
|
|
(logior! (-> arg0 mask) (sound-mask volume))
|
|
(set! (-> arg0 volume) (the int (* 10.24 (-> arg1 1))))
|
|
)
|
|
((4)
|
|
(logior! (-> arg0 mask) (sound-mask volume))
|
|
(+! (-> arg0 volume) (the int (* 10.24 (* (-> arg1 1) (rand-vu)))))
|
|
)
|
|
((5)
|
|
(logior! (-> arg0 mask) (sound-mask pitch))
|
|
(set! (-> arg0 pitch-mod) (the int (* 1524.0 (-> arg1 1))))
|
|
)
|
|
((6)
|
|
(logior! (-> arg0 mask) (sound-mask pitch))
|
|
(+! (-> arg0 pitch-mod) (the int (* 1524.0 (* (-> arg1 1) (rand-vu)))))
|
|
)
|
|
((9)
|
|
(logior! (-> arg0 mask) (sound-mask bend))
|
|
(set! (-> arg0 bend) (the int (* 327.66998 (-> arg1 1))))
|
|
)
|
|
((10)
|
|
(logior! (-> arg0 mask) (sound-mask bend))
|
|
(+! (-> arg0 bend) (the int (* 327.66998 (* (-> arg1 1) (rand-vu)))))
|
|
)
|
|
((11)
|
|
(logior! (-> arg0 mask) (sound-mask fo-min))
|
|
(set! (-> arg0 fo-min) (the int (-> arg1 1)))
|
|
)
|
|
((12)
|
|
(logior! (-> arg0 mask) (sound-mask fo-max))
|
|
(set! (-> arg0 fo-max) (the int (-> arg1 1)))
|
|
)
|
|
((13)
|
|
(logior! (-> arg0 mask) (sound-mask fo-curve))
|
|
(set! (-> arg0 fo-curve) (the int (-> arg1 1)))
|
|
)
|
|
((19)
|
|
(set! (-> arg0 priority) (the int (-> arg1 1)))
|
|
)
|
|
)
|
|
(+! arg2 -2)
|
|
(set! arg1 (&-> arg1 2))
|
|
)
|
|
arg0
|
|
)
|
|
|
|
;; definition for method 9 of type effect-control
|
|
;; INFO: Used lq/sq
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod effect-control-method-9 ((this effect-control))
|
|
(let* ((a0-1 (-> this process skel))
|
|
(v1-3 (if (< (-> this channel-offset) (-> a0-1 active-channels))
|
|
(-> a0-1 root-channel (-> this channel-offset))
|
|
(the-as joint-control-channel #f)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and v1-3 (-> v1-3 frame-group))
|
|
(let* ((s5-0 (-> v1-3 frame-group))
|
|
(f30-0 (+ (* (-> v1-3 frame-num) (-> s5-0 artist-step)) (-> s5-0 artist-base)))
|
|
)
|
|
(let ((a0-3 (-> a0-1 root-channel 0 num-func)))
|
|
(cond
|
|
((!= s5-0 (-> this last-frame-group))
|
|
(set! (-> this res) (-> s5-0 extra))
|
|
(let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo)))
|
|
(set! (-> this name) (if (>= (the-as int v1-6) 0)
|
|
(&-> s5-0 extra tag v1-6)
|
|
(the-as (pointer res-tag) #f)
|
|
)
|
|
)
|
|
)
|
|
(if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0))
|
|
(set! (-> this name) (&-> this name 1))
|
|
)
|
|
(effect-control-method-14 this f30-0 f30-0 f30-0)
|
|
)
|
|
((or (not (-> this name)) (= f30-0 (-> this last-frame-num)))
|
|
)
|
|
(else
|
|
(let ((f28-0 (-> this last-frame-num))
|
|
(f26-0 f30-0)
|
|
)
|
|
(cond
|
|
((= a0-3 num-func-seek!)
|
|
(let ((f0-6 (+ (* (-> v1-3 param 0) (-> s5-0 artist-step)) (-> s5-0 artist-base))))
|
|
(cond
|
|
((< f26-0 f28-0)
|
|
(if (>= f28-0 f0-6)
|
|
(effect-control-method-14 this f26-0 f28-0 f30-0)
|
|
)
|
|
)
|
|
(else
|
|
(if (>= f0-6 f28-0)
|
|
(effect-control-method-14 this f28-0 f26-0 f30-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= a0-3 num-func-loop!)
|
|
(cond
|
|
((>= (-> v1-3 param 0) 0.0)
|
|
(cond
|
|
((< f26-0 f28-0)
|
|
(effect-control-method-14 this f28-0 9999999.0 f30-0)
|
|
(effect-control-method-14 this -100000000.0 f26-0 9999999.0)
|
|
)
|
|
(else
|
|
(effect-control-method-14 this f28-0 f26-0 f30-0)
|
|
)
|
|
)
|
|
)
|
|
((< f28-0 f26-0)
|
|
(effect-control-method-14 this f26-0 9999999.0 f30-0)
|
|
(effect-control-method-14 this -100000000.0 f28-0 9999999.0)
|
|
)
|
|
(else
|
|
(effect-control-method-14 this f26-0 f28-0 f30-0)
|
|
)
|
|
)
|
|
)
|
|
((= a0-3 num-func-+!)
|
|
(if (>= (-> v1-3 param 0) 0.0)
|
|
(effect-control-method-14 this f28-0 f26-0 f30-0)
|
|
(effect-control-method-14 this f26-0 f28-0 f30-0)
|
|
)
|
|
)
|
|
((= a0-3 num-func-identity)
|
|
(effect-control-method-14 this f30-0 f30-0 f30-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> this last-frame-group) s5-0)
|
|
(set! (-> this last-frame-num) f30-0)
|
|
)
|
|
)
|
|
(else
|
|
(set! (-> this last-frame-group) #f)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 14 of type effect-control
|
|
;; INFO: Used lq/sq
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod effect-control-method-14 ((this effect-control) (arg0 float) (arg1 float) (arg2 float))
|
|
(let ((s2-0 (-> this name)))
|
|
(while (= (-> s2-0 0 name) 'effect-name)
|
|
(let ((f0-0 (-> s2-0 0 key-frame)))
|
|
(when (or (and (< f0-0 arg1) (< arg0 f0-0)) (= f0-0 arg2))
|
|
(let* ((a0-1 this)
|
|
(t9-0 (method-of-object a0-1 effect-control-method-10))
|
|
(v1-7 (-> this res))
|
|
(a1-1 (-> s2-0 0))
|
|
)
|
|
(t9-0
|
|
a0-1
|
|
(the-as symbol (-> (the-as (pointer uint32) (&+ (-> v1-7 data-base) (-> a1-1 data-offset)))))
|
|
f0-0
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! s2-0 (&-> s2-0 1))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 10 of type effect-control
|
|
;; INFO: Used lq/sq
|
|
;; INFO: Return type mismatch int vs object.
|
|
(defmethod effect-control-method-10 ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int))
|
|
(let ((s3-0 (-> arg0 value))
|
|
(s5-0 (cond
|
|
((< arg2 0)
|
|
(let ((v0-0 (get-property-value
|
|
(-> this res)
|
|
'effect-joint
|
|
'exact
|
|
arg1
|
|
(the-as uint128 0)
|
|
(the-as (pointer res-tag) #f)
|
|
*res-static-buf*
|
|
)
|
|
)
|
|
)
|
|
(if (zero? v0-0)
|
|
0
|
|
(the-as int (+ v0-0 1))
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(empty)
|
|
arg2
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (logtest? (-> this flags) (effect-control-flag event))
|
|
(if (send-event (-> this process) 'effect arg0 arg1 s5-0)
|
|
(return (the-as object 0))
|
|
)
|
|
)
|
|
(let ((v1-10 (symbol->string arg0)))
|
|
(cond
|
|
((and (= (-> v1-10 data 0) 101)
|
|
(= (-> v1-10 data 1) 102)
|
|
(= (-> v1-10 data 2) 102)
|
|
(= (-> v1-10 data 3) 101)
|
|
(= (-> v1-10 data 4) 99)
|
|
(= (-> v1-10 data 5) 116)
|
|
(= (-> v1-10 data 6) 45)
|
|
)
|
|
(let* ((s3-1 (-> this process root))
|
|
(v1-14 (if (and (nonzero? s3-1) (type-type? (-> s3-1 type) collide-shape-moving))
|
|
s3-1
|
|
)
|
|
)
|
|
(t1-1 (if v1-14
|
|
(the-as int (-> (the-as collide-shape-moving v1-14) ground-pat))
|
|
*footstep-surface*
|
|
)
|
|
)
|
|
)
|
|
(effect-control-method-11 this arg0 arg1 s5-0 (-> this res) (the-as pat-surface t1-1))
|
|
)
|
|
)
|
|
((let ((v1-18 (symbol->string arg0)))
|
|
(and (= (-> v1-18 data 0) 103)
|
|
(= (-> v1-18 data 1) 114)
|
|
(= (-> v1-18 data 2) 111)
|
|
(= (-> v1-18 data 3) 117)
|
|
(= (-> v1-18 data 4) 112)
|
|
(= (-> v1-18 data 5) 45)
|
|
)
|
|
)
|
|
(set! s3-0 (cond
|
|
((zero? s3-0)
|
|
(let ((v0-5 (lookup-part-group-pointer-by-name (symbol->string arg0))))
|
|
(when v0-5
|
|
(set! (-> arg0 value) v0-5)
|
|
(set! s3-0 (-> v0-5 0))
|
|
)
|
|
)
|
|
s3-0
|
|
)
|
|
(else
|
|
(-> (the-as (pointer sparticle-launch-group) s3-0) 0)
|
|
)
|
|
)
|
|
)
|
|
(when (and (nonzero? s3-0) (= (-> (the-as sparticle-launch-group s3-0) type) sparticle-launch-group))
|
|
(if *debug-effect-control*
|
|
(format
|
|
#t
|
|
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
|
|
(current-time)
|
|
(-> this process name)
|
|
arg0
|
|
arg1
|
|
s5-0
|
|
)
|
|
)
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
(the-as sparticle-launch-group s3-0)
|
|
-1
|
|
(the-as symbol #f)
|
|
(the-as symbol #f)
|
|
(the-as symbol #f)
|
|
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-0))
|
|
:to (-> this process)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 'camera-shake)
|
|
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
|
|
)
|
|
((zero? s3-0)
|
|
(effect-control-method-12 this arg0 arg1 s5-0 (-> this res) (string->sound-name (symbol->string arg0)))
|
|
)
|
|
((= (-> (the-as basic s3-0) type) sparticle-launcher)
|
|
(if *debug-effect-control*
|
|
(format
|
|
#t
|
|
"(~5D) effect part ~A ~A frame ~F joint ~D~%"
|
|
(current-time)
|
|
(-> this process name)
|
|
arg0
|
|
arg1
|
|
s5-0
|
|
)
|
|
)
|
|
(format
|
|
#t
|
|
"-----> (~5D) effect part ~A ~A frame ~F joint ~D~%"
|
|
(current-time)
|
|
(-> this process name)
|
|
arg0
|
|
arg1
|
|
s5-0
|
|
)
|
|
(launch-particles
|
|
(the-as sparticle-launcher s3-0)
|
|
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-0))
|
|
)
|
|
)
|
|
((= (-> (the-as basic s3-0) type) sparticle-launch-group)
|
|
(if *debug-effect-control*
|
|
(format
|
|
#t
|
|
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
|
|
(current-time)
|
|
(-> this process name)
|
|
arg0
|
|
arg1
|
|
s5-0
|
|
)
|
|
)
|
|
(process-spawn
|
|
part-tracker
|
|
:init part-tracker-init
|
|
s3-0
|
|
-1
|
|
(the-as symbol #f)
|
|
(the-as symbol #f)
|
|
(the-as symbol #f)
|
|
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-0))
|
|
:to (-> this process)
|
|
)
|
|
)
|
|
((= (-> (the-as basic s3-0) type) sound-spec)
|
|
(sound-play-by-spec
|
|
(the-as sound-spec s3-0)
|
|
(new-sound-id)
|
|
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-0))
|
|
)
|
|
)
|
|
((= (-> (the-as basic s3-0) type) death-info)
|
|
(let ((v1-67 (-> this process draw)))
|
|
(let ((a1-42 (-> (the-as death-info s3-0) vertex-skip))
|
|
(a0-55
|
|
(max
|
|
2
|
|
(the-as int (/ (-> (the-as death-info s3-0) timer) (the-as uint (the int (-> *display* time-factor)))))
|
|
)
|
|
)
|
|
)
|
|
(when (= (-> *setting-control* current video-mode) 'pal)
|
|
(if (< (the-as uint 1) a1-42)
|
|
(set! a1-42 (/ (the-as uint (* (the-as uint 50) a1-42)) (the-as uint 60)))
|
|
)
|
|
)
|
|
(let ((a2-29 (-> *display* frames (-> *display* last-screen) frame run-time)))
|
|
(cond
|
|
((< 9000 a2-29)
|
|
(set! a1-42 (* a1-42 4))
|
|
)
|
|
((< 7000 a2-29)
|
|
(set! a1-42 (* a1-42 2))
|
|
)
|
|
)
|
|
)
|
|
(set! (-> v1-67 death-vertex-skip) a1-42)
|
|
(set! (-> v1-67 death-effect) (-> (the-as death-info s3-0) effect))
|
|
(set! (-> v1-67 death-timer) (+ a0-55 1))
|
|
)
|
|
(set! (-> v1-67 death-timer-org) (-> v1-67 death-timer))
|
|
(set! (-> v1-67 death-draw-overlap) (-> (the-as death-info s3-0) overlap))
|
|
)
|
|
(if (-> (the-as death-info s3-0) sound)
|
|
(effect-control-method-12
|
|
this
|
|
(-> (the-as death-info s3-0) sound)
|
|
arg1
|
|
s5-0
|
|
(-> this res)
|
|
(string->sound-name (symbol->string (-> (the-as death-info s3-0) sound)))
|
|
)
|
|
)
|
|
(send-event (-> this process) 'death-start (the-as death-info s3-0))
|
|
)
|
|
(else
|
|
(effect-control-method-12 this arg0 arg1 s5-0 (-> this res) (string->sound-name (symbol->string arg0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; definition for method 11 of type effect-control
|
|
;; INFO: Used lq/sq
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod effect-control-method-11 ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
|
|
(let ((s1-0 (the-as sound-name #f)))
|
|
(let ((a0-4 (-> *display* frames (-> *display* last-screen) frame run-time)))
|
|
(case arg0
|
|
(('effect-walk-step-left 'effect-run-step-left)
|
|
(set! s1-0 (sound-name-with-material 'walk arg4 "1"))
|
|
)
|
|
(('effect-walk-step-right 'effect-run-step-right)
|
|
(set! s1-0 (sound-name-with-material 'walk arg4 "2"))
|
|
)
|
|
(('effect-roll)
|
|
(set! s1-0 (sound-name-with-material 'roll arg4 ""))
|
|
)
|
|
(('effect-slide)
|
|
(set! s1-0 (sound-name-with-material 'slide arg4 ""))
|
|
)
|
|
(('effect-land)
|
|
(set! s1-0 (sound-name-with-material 'land arg4 ""))
|
|
)
|
|
(('effect-zoom-land)
|
|
(set! s1-0 (sound-name-with-material 'zoom-land arg4 ""))
|
|
)
|
|
(('effect-zoom-hit)
|
|
(set! s1-0 (sound-name-with-material 'zoom-hit arg4 ""))
|
|
)
|
|
(('effect-flut-land)
|
|
(set! s1-0 (sound-name-with-material 'flut-land arg4 ""))
|
|
)
|
|
(('effect-land-poof)
|
|
(when (< a0-4 9000)
|
|
(let* ((a0-13 this)
|
|
(t9-8 (method-of-object a0-13 effect-control-method-10))
|
|
(v1-15 (-> arg4 material))
|
|
)
|
|
(t9-8
|
|
a0-13
|
|
(cond
|
|
((= v1-15 (pat-material sand))
|
|
'group-land-poof-sand
|
|
)
|
|
((= v1-15 (pat-material wood))
|
|
'group-land-poof-wood
|
|
)
|
|
((= v1-15 (pat-material crwood))
|
|
'group-land-poof-crwood
|
|
)
|
|
((or (= v1-15 (pat-material tube)) (= v1-15 (pat-material pcmetal)))
|
|
'group-land-poof-pcmetal
|
|
)
|
|
((or (= v1-15 (pat-material metal)) (= v1-15 (pat-material rotate)))
|
|
'group-land-poof-metal
|
|
)
|
|
((= v1-15 (pat-material ice))
|
|
'group-land-poof-ice
|
|
)
|
|
((= v1-15 (pat-material snow))
|
|
'group-land-poof-snow
|
|
)
|
|
((= v1-15 (pat-material deepsnow))
|
|
'group-land-poof-dpsnow
|
|
)
|
|
((= v1-15 (pat-material gravel))
|
|
'group-land-poof-gravel
|
|
)
|
|
((= v1-15 (pat-material dirt))
|
|
'group-land-poof-dirt
|
|
)
|
|
((= v1-15 (pat-material stone))
|
|
'group-land-poof-stone
|
|
)
|
|
((= v1-15 (pat-material waterbottom))
|
|
'group-land-poof-water
|
|
)
|
|
((= v1-15 (pat-material tar))
|
|
'group-land-poof-tar
|
|
)
|
|
((= v1-15 (pat-material straw))
|
|
'group-land-poof-straw
|
|
)
|
|
((= v1-15 (pat-material swamp))
|
|
'group-land-poof-swamp
|
|
)
|
|
((= v1-15 (pat-material neutral))
|
|
'group-land-poof-neutral
|
|
)
|
|
(else
|
|
'group-land-poof-grass
|
|
)
|
|
)
|
|
arg1
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('effect-run-poof)
|
|
(when (< a0-4 9000)
|
|
(let* ((a0-14 this)
|
|
(t9-9 (method-of-object a0-14 effect-control-method-10))
|
|
(v1-20 (-> arg4 material))
|
|
)
|
|
(t9-9
|
|
a0-14
|
|
(cond
|
|
((= v1-20 (pat-material sand))
|
|
'group-run-poof-sand
|
|
)
|
|
((= v1-20 (pat-material wood))
|
|
'group-run-poof-wood
|
|
)
|
|
((= v1-20 (pat-material crwood))
|
|
'group-run-poof-crwood
|
|
)
|
|
((or (= v1-20 (pat-material tube)) (= v1-20 (pat-material pcmetal)))
|
|
'group-run-poof-pcmetal
|
|
)
|
|
((or (= v1-20 (pat-material metal)) (= v1-20 (pat-material rotate)))
|
|
'group-run-poof-metal
|
|
)
|
|
((= v1-20 (pat-material ice))
|
|
'group-run-poof-ice
|
|
)
|
|
((= v1-20 (pat-material snow))
|
|
'group-run-poof-snow
|
|
)
|
|
((= v1-20 (pat-material deepsnow))
|
|
'group-run-poof-dpsnow
|
|
)
|
|
((= v1-20 (pat-material gravel))
|
|
'group-run-poof-gravel
|
|
)
|
|
((= v1-20 (pat-material dirt))
|
|
'group-run-poof-dirt
|
|
)
|
|
((= v1-20 (pat-material stone))
|
|
'group-run-poof-stone
|
|
)
|
|
((= v1-20 (pat-material waterbottom))
|
|
'group-run-poof-water
|
|
)
|
|
((= v1-20 (pat-material tar))
|
|
'group-run-poof-tar
|
|
)
|
|
((= v1-20 (pat-material straw))
|
|
'group-run-poof-straw
|
|
)
|
|
((= v1-20 (pat-material swamp))
|
|
'group-run-poof-swamp
|
|
)
|
|
((= v1-20 (pat-material neutral))
|
|
'group-run-poof-neutral
|
|
)
|
|
(else
|
|
'group-run-poof-grass
|
|
)
|
|
)
|
|
arg1
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('effect-just-footprint)
|
|
(let* ((a0-15 this)
|
|
(t9-10 (method-of-object a0-15 effect-control-method-10))
|
|
(v1-24 (-> arg4 material))
|
|
)
|
|
(t9-10
|
|
a0-15
|
|
(cond
|
|
((= v1-24 (pat-material sand))
|
|
'group-just-footprint-sand
|
|
)
|
|
((= v1-24 (pat-material wood))
|
|
'group-just-footprint-wood
|
|
)
|
|
((= v1-24 (pat-material crwood))
|
|
'group-just-footprint-crwood
|
|
)
|
|
((or (= v1-24 (pat-material tube)) (= v1-24 (pat-material pcmetal)))
|
|
'group-just-footprint-pcmetal
|
|
)
|
|
((or (= v1-24 (pat-material metal)) (= v1-24 (pat-material rotate)))
|
|
'group-just-footprint-metal
|
|
)
|
|
((= v1-24 (pat-material ice))
|
|
'group-just-footprint-ice
|
|
)
|
|
((= v1-24 (pat-material snow))
|
|
'group-just-footprint-snow
|
|
)
|
|
((= v1-24 (pat-material deepsnow))
|
|
'group-just-footprint-dpsnow
|
|
)
|
|
((= v1-24 (pat-material gravel))
|
|
'group-just-footprint-gravel
|
|
)
|
|
((= v1-24 (pat-material dirt))
|
|
'group-just-footprint-dirt
|
|
)
|
|
((= v1-24 (pat-material stone))
|
|
'group-just-footprint-stone
|
|
)
|
|
((= v1-24 (pat-material waterbottom))
|
|
'group-just-footprint-water
|
|
)
|
|
((= v1-24 (pat-material tar))
|
|
'group-just-footprint-tar
|
|
)
|
|
((= v1-24 (pat-material straw))
|
|
'group-just-footprint-straw
|
|
)
|
|
((= v1-24 (pat-material swamp))
|
|
'group-just-footprint-swamp
|
|
)
|
|
((= v1-24 (pat-material neutral))
|
|
'group-just-footprint-neutral
|
|
)
|
|
(else
|
|
'group-just-footprint-grass
|
|
)
|
|
)
|
|
arg1
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
(('effect-just-poof)
|
|
(when (< a0-4 9000)
|
|
(let* ((a0-16 this)
|
|
(t9-11 (method-of-object a0-16 effect-control-method-10))
|
|
(v1-29 (-> arg4 material))
|
|
)
|
|
(t9-11
|
|
a0-16
|
|
(cond
|
|
((= v1-29 (pat-material sand))
|
|
'group-just-poof-sand
|
|
)
|
|
((= v1-29 (pat-material wood))
|
|
'group-just-poof-wood
|
|
)
|
|
((= v1-29 (pat-material crwood))
|
|
'group-just-poof-crwood
|
|
)
|
|
((or (= v1-29 (pat-material tube)) (= v1-29 (pat-material pcmetal)))
|
|
'group-just-poof-pcmetal
|
|
)
|
|
((or (= v1-29 (pat-material metal)) (= v1-29 (pat-material rotate)))
|
|
'group-just-poof-metal
|
|
)
|
|
((= v1-29 (pat-material ice))
|
|
'group-just-poof-ice
|
|
)
|
|
((= v1-29 (pat-material snow))
|
|
'group-just-poof-snow
|
|
)
|
|
((= v1-29 (pat-material deepsnow))
|
|
'group-just-poof-dpsnow
|
|
)
|
|
((= v1-29 (pat-material gravel))
|
|
'group-just-poof-gravel
|
|
)
|
|
((= v1-29 (pat-material dirt))
|
|
'group-just-poof-dirt
|
|
)
|
|
((= v1-29 (pat-material stone))
|
|
'group-just-poof-stone
|
|
)
|
|
((= v1-29 (pat-material waterbottom))
|
|
'group-just-poof-water
|
|
)
|
|
((= v1-29 (pat-material tar))
|
|
'group-just-poof-tar
|
|
)
|
|
((= v1-29 (pat-material straw))
|
|
'group-just-poof-straw
|
|
)
|
|
((= v1-29 (pat-material swamp))
|
|
'group-just-poof-swamp
|
|
)
|
|
((= v1-29 (pat-material neutral))
|
|
'group-just-poof-neutral
|
|
)
|
|
(else
|
|
'group-just-poof-grass
|
|
)
|
|
)
|
|
arg1
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('effect-slide-poof)
|
|
(let* ((a0-19 this)
|
|
(t9-12 (method-of-object a0-19 effect-control-method-10))
|
|
(v1-33 (-> arg4 material))
|
|
)
|
|
(t9-12
|
|
a0-19
|
|
(cond
|
|
((= v1-33 (pat-material sand))
|
|
'group-slide-poof-sand
|
|
)
|
|
((= v1-33 (pat-material wood))
|
|
'group-slide-poof-wood
|
|
)
|
|
((= v1-33 (pat-material crwood))
|
|
'group-slide-poof-crwood
|
|
)
|
|
((or (= v1-33 (pat-material tube)) (= v1-33 (pat-material pcmetal)))
|
|
'group-slide-poof-pcmetal
|
|
)
|
|
((or (= v1-33 (pat-material metal)) (= v1-33 (pat-material rotate)))
|
|
'group-slide-poof-metal
|
|
)
|
|
((= v1-33 (pat-material ice))
|
|
'group-slide-poof-ice
|
|
)
|
|
((= v1-33 (pat-material snow))
|
|
'group-slide-poof-snow
|
|
)
|
|
((= v1-33 (pat-material deepsnow))
|
|
'group-slide-poof-dpsnow
|
|
)
|
|
((= v1-33 (pat-material gravel))
|
|
'group-slide-poof-gravel
|
|
)
|
|
((= v1-33 (pat-material dirt))
|
|
'group-slide-poof-dirt
|
|
)
|
|
((= v1-33 (pat-material stone))
|
|
'group-slide-poof-stone
|
|
)
|
|
((= v1-33 (pat-material waterbottom))
|
|
'group-slide-poof-water
|
|
)
|
|
((= v1-33 (pat-material tar))
|
|
'group-slide-poof-tar
|
|
)
|
|
((= v1-33 (pat-material straw))
|
|
'group-slide-poof-straw
|
|
)
|
|
((= v1-33 (pat-material swamp))
|
|
'group-slide-poof-swamp
|
|
)
|
|
((= v1-33 (pat-material neutral))
|
|
'group-slide-poof-neutral
|
|
)
|
|
(else
|
|
'group-slide-poof-grass
|
|
)
|
|
)
|
|
arg1
|
|
-1
|
|
)
|
|
)
|
|
)
|
|
(('effect-droppings)
|
|
(let* ((v1-36 (-> arg4 material))
|
|
(s0-0 (cond
|
|
((= v1-36 (pat-material sand))
|
|
(-> *part-id-table* 95)
|
|
)
|
|
((= v1-36 (pat-material wood))
|
|
(-> *part-id-table* 97)
|
|
)
|
|
((= v1-36 (pat-material crwood))
|
|
(-> *part-id-table* 99)
|
|
)
|
|
((or (= v1-36 (pat-material tube)) (= v1-36 (pat-material pcmetal)))
|
|
(-> *part-id-table* 2248)
|
|
)
|
|
((or (= v1-36 (pat-material metal)) (= v1-36 (pat-material rotate)))
|
|
(-> *part-id-table* 2334)
|
|
)
|
|
((= v1-36 (pat-material ice))
|
|
(-> *part-id-table* 2249)
|
|
)
|
|
((= v1-36 (pat-material snow))
|
|
(-> *part-id-table* 2250)
|
|
)
|
|
((= v1-36 (pat-material deepsnow))
|
|
(-> *part-id-table* 2251)
|
|
)
|
|
((= v1-36 (pat-material gravel))
|
|
(-> *part-id-table* 2252)
|
|
)
|
|
((= v1-36 (pat-material dirt))
|
|
(-> *part-id-table* 2253)
|
|
)
|
|
((= v1-36 (pat-material stone))
|
|
(-> *part-id-table* 98)
|
|
)
|
|
((= v1-36 (pat-material waterbottom))
|
|
(-> *part-id-table* 2254)
|
|
)
|
|
((= v1-36 (pat-material tar))
|
|
(-> *part-id-table* 2255)
|
|
)
|
|
((= v1-36 (pat-material straw))
|
|
(-> *part-id-table* 2256)
|
|
)
|
|
((= v1-36 (pat-material swamp))
|
|
(-> *part-id-table* 2257)
|
|
)
|
|
((= v1-36 (pat-material neutral))
|
|
(-> *part-id-table* 2773)
|
|
)
|
|
(else
|
|
(-> *part-id-table* 96)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (nonzero? s0-0)
|
|
(launch-particles s0-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)))
|
|
)
|
|
)
|
|
)
|
|
(('effect-jump-droppings)
|
|
(let* ((v1-61 (-> arg4 material))
|
|
(s0-1 (cond
|
|
((= v1-61 (pat-material sand))
|
|
(-> *part-id-table* 106)
|
|
)
|
|
((= v1-61 (pat-material wood))
|
|
(-> *part-id-table* 2258)
|
|
)
|
|
((= v1-61 (pat-material crwood))
|
|
(-> *part-id-table* 2259)
|
|
)
|
|
((or (= v1-61 (pat-material tube)) (= v1-61 (pat-material pcmetal)))
|
|
(-> *part-id-table* 2260)
|
|
)
|
|
((or (= v1-61 (pat-material metal)) (= v1-61 (pat-material rotate)))
|
|
(-> *part-id-table* 2335)
|
|
)
|
|
((= v1-61 (pat-material ice))
|
|
(-> *part-id-table* 2261)
|
|
)
|
|
((= v1-61 (pat-material snow))
|
|
(-> *part-id-table* 2262)
|
|
)
|
|
((= v1-61 (pat-material deepsnow))
|
|
(-> *part-id-table* 2263)
|
|
)
|
|
((= v1-61 (pat-material gravel))
|
|
(-> *part-id-table* 2264)
|
|
)
|
|
((= v1-61 (pat-material dirt))
|
|
(-> *part-id-table* 2265)
|
|
)
|
|
((= v1-61 (pat-material stone))
|
|
(-> *part-id-table* 2266)
|
|
)
|
|
((= v1-61 (pat-material waterbottom))
|
|
(-> *part-id-table* 2267)
|
|
)
|
|
((= v1-61 (pat-material tar))
|
|
(-> *part-id-table* 2268)
|
|
)
|
|
((= v1-61 (pat-material straw))
|
|
(-> *part-id-table* 2269)
|
|
)
|
|
((= v1-61 (pat-material swamp))
|
|
(-> *part-id-table* 2270)
|
|
)
|
|
((= v1-61 (pat-material neutral))
|
|
(-> *part-id-table* 2774)
|
|
)
|
|
(else
|
|
(-> *part-id-table* 107)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (nonzero? s0-1)
|
|
(launch-particles s0-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if s1-0
|
|
(effect-control-method-12 this arg0 arg1 arg2 arg3 s1-0)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 12 of type effect-control
|
|
;; INFO: Used lq/sq
|
|
(defmethod effect-control-method-12 ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
|
|
(let ((sv-144 arg3)
|
|
(s0-0 arg4)
|
|
(gp-0 (new 'stack 'sound-spec))
|
|
(s5-0 (if (< arg2 0)
|
|
(the-as vector #f)
|
|
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2))
|
|
)
|
|
)
|
|
)
|
|
(set! (-> gp-0 sound-name) s0-0)
|
|
(logior! (-> gp-0 mask) (sound-mask volume))
|
|
(set! (-> gp-0 volume) 1024)
|
|
(logior! (-> gp-0 mask) (sound-mask bend))
|
|
(set! (-> gp-0 bend) (the int (* 327.66998 (rand-vu-float-range -100.0 100.0))))
|
|
(let* ((sv-112 (new 'static 'res-tag))
|
|
(a1-7 ((method-of-type res-lump get-property-data)
|
|
(the-as res-lump sv-144)
|
|
'effect-param
|
|
'exact
|
|
arg1
|
|
(the-as pointer #f)
|
|
(& sv-112)
|
|
*res-static-buf*
|
|
)
|
|
)
|
|
)
|
|
(if a1-7
|
|
(effect-param->sound-spec gp-0 (the-as (pointer float) a1-7) (the-as int (-> sv-112 elt-count)))
|
|
)
|
|
)
|
|
(if (and (nonzero? (-> gp-0 fo-max))
|
|
(< (* 4096.0 (the float (-> gp-0 fo-max))) (vector-vector-distance (ear-trans) s5-0))
|
|
)
|
|
(return 0)
|
|
)
|
|
(when *debug-effect-control*
|
|
(let ((sv-128 s0-0))
|
|
(string<-charp (clear *temp-string*) (the-as (pointer uint8) (& sv-128)))
|
|
)
|
|
(format
|
|
#t
|
|
"(~5D) effect sound ~A ~A (~S) frame ~F joint ~D "
|
|
(current-time)
|
|
(-> this process name)
|
|
arg0
|
|
*temp-string*
|
|
arg1
|
|
arg2
|
|
)
|
|
(format
|
|
#t
|
|
"volume: ~f pitch-mod: ~f~%"
|
|
(* 0.09765625 (the float (-> gp-0 volume)))
|
|
(* 0.000656168 (the float (-> gp-0 pitch-mod)))
|
|
)
|
|
)
|
|
(sound-play-by-spec gp-0 (new-sound-id) s5-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; definition for function target-land-effect
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior target-land-effect target ()
|
|
(cond
|
|
((logtest? (-> self control root-prim prim-core action) (collide-action flut))
|
|
(effect-control-method-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
|
(effect-control-method-10 (-> self skel effect) 'effect-flut-land -1.0 -1)
|
|
)
|
|
((logtest? (-> self control root-prim prim-core action) (collide-action racer))
|
|
(sound-play-by-name
|
|
(sound-name-with-material 'zoom-land (-> self control ground-pat) "")
|
|
(new-sound-id)
|
|
(the int
|
|
(* 10.24 (* 100.0 (the float (the int (* 10.24 (/ (-> self control ground-impact-vel) (meters 15)))))))
|
|
)
|
|
0
|
|
0
|
|
(sound-group sfx)
|
|
#t
|
|
)
|
|
)
|
|
((logtest? (-> self water flag) (water-flag touch-water))
|
|
(effect-control-method-10 (-> self skel effect) 'effect-land-water -1.0 -1)
|
|
)
|
|
(else
|
|
(effect-control-method-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
|
(effect-control-method-10 (-> self skel effect) 'effect-land -1.0 -1)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|