Files
jak-project/test/decompiler/reference/levels/village1/assistant_REF.gc
T
Tyler Wilding 5f1ed7ab60 decomp: decompile *-obs files (#856)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

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

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* decomp: start working on beach-obs

* blocked: `beach-obs` mostly finished, but handle cast issues and unknown `prebind` func signature

* blocked: `villagep-obs` done, `s6` not being referred to as `self`

* decomp: finish `citadel-obs`

* decomp: finish `darkcave-obs`

* blocked: need to allow `hud-h` to decompile properly (#f as static pointer)

* decomp: finish `jungle-obs`

* decomp: finish `village-obs`

* blocked: `misty-obs` handle cast issues

* decomp: finish `village2-obs`

* decomp: 1 function left in `swamp-obs`, particle related -- maybe we know now?

* decomp: finish `swamp-obs`

* blocked: `maincave-obs` handle casts

* decomp: finish `sunken-obs`

* blocked: `rolling-obs` handle casts and hud-parts

* decomp: finish `firecanyon-obs`

* decomp: finish `ogre-obs`

* blocked: `village3-obs` gives up type analysis!

* blocked: `snow-obs` has hud-parts and handle casts code

* decomp: finish `snow-flutflut-obs`

* blocked: `lavatube-obs` has s6-1 issue

* blocked: `title-obs` handle cast issues

* fixed post merge problems

* decomp: finish `jungleb-obs`

* blocked: `training-obs` has `s6-1` issue

* fix type consistency

* scripts: Extend update script to handle the game-text-id enum as well

* git: Update git attributes to effectively halve PR burden

* fixed `sound-play-by-name` signature

* fix particle definitions in firecanyon-obs

* fix func signature in racer-states

* update ref tests

* tests: update current ref tests

* tests: add `joint` to ref-tests

* tests: add `process-drawable` to ref-tests

* updated gsrc

* add back manual fix

* address most feedback, update source files

* get rid of forward declarations in `darkcave-obs`

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-11-05 21:29:32 -04:00

1043 lines
27 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type assistant
(deftype assistant (process-taskable)
((sound-id sound-id :offset-assert 380)
)
:heap-base #x110
:method-count-assert 53
:size-assert #x180
:flag-assert #x3501100180
)
;; definition for method 3 of type assistant
(defmethod inspect assistant ((obj assistant))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
(format #t "~T~Tsound-id: ~D~%" (-> obj sound-id))
obj
)
;; failed to figure out what this is:
(defskelgroup *assistant-sg* assistant
0
3
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 2)
:longest-edge (meters 0)
:shadow 2
)
;; definition for method 52 of type assistant
;; INFO: Return type mismatch int vs none.
(defmethod dummy-52 assistant ((obj assistant))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(when v1-1
(let ((f0-0 (-> obj root-override trans y)))
(let ((a0-2 v1-1))
(set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0)))
)
0
(let ((a0-4 v1-1))
(set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0)))
)
)
0
(set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags)))
)
)
(none)
)
;; definition for method 48 of type assistant
(defmethod draw-npc-shadow assistant ((obj assistant))
(-> obj draw shadow-ctrl)
(cond
((and
(-> obj draw shadow)
(zero? (-> obj draw cur-lod))
(logtest? (-> obj draw status) 8)
)
(let ((v1-9 (-> obj draw shadow-ctrl)))
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
)
0
(dummy-14 (-> obj draw shadow-ctrl))
)
(else
(let ((v1-14 (-> obj draw shadow-ctrl)))
(logior! (-> v1-14 settings flags) 32)
)
0
)
)
(none)
)
;; definition for method 32 of type assistant
(defmethod play-anim! assistant ((obj assistant) (arg0 symbol))
(with-pp
(case (current-status (-> obj tasks))
(((task-status need-hint) (task-status need-introduction))
(case (current-task (-> obj tasks))
(((game-task jungle-eggtop))
(when arg0
(let* ((s5-1 (-> obj tasks))
(s4-0 (method-of-object s5-1 save-reminder))
(a1-3 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-3 from) pp)
(set! (-> a1-3 num-params) 2)
(set! (-> a1-3 message) 'query)
(set! (-> a1-3 param 0) (the-as uint 'pickup))
(set! (-> a1-3 param 1) (the-as uint 6))
(s4-0
s5-1
(the int (the-as float (send-event-function *target* a1-3)))
1
)
)
(close-status! (-> obj tasks) (task-status need-introduction))
)
(new 'static 'spool-anim
:name
"assistant-introduction-blue-eco-switch"
:index 10
:parts 11
:command-list
'(
(0
want-levels
village1
beach
)
((the binteger 128)
joint
"cameraB"
)
((the binteger 312)
joint
"camera"
)
((the binteger 492)
joint
"cameraB"
)
((the binteger 537)
joint
"camera"
)
((the binteger 734)
display-level
beach
movie
)
((the binteger 734)
want-force-vis
beach
#t
)
((the binteger 735)
alive
"ecovent-48"
)
((the binteger 742)
blackout
(the binteger 10)
)
((the binteger 743)
joint
"cameraB"
)
((the binteger 745)
blackout
0
)
((the binteger 839)
alive
"ecovent-200"
)
((the binteger 841)
joint
"camera"
)
((the binteger 842)
dead
"ecovent-48"
)
((the binteger 942)
blackout
(the binteger 10)
)
((the binteger 944)
joint
"cameraB"
)
((the binteger 945)
blackout
0
)
((the binteger 945)
dead
"ecovent-200"
)
((the binteger 945)
display-level
beach
#f
)
((the binteger 1049)
blackout
(the binteger 10)
)
((the binteger 1051)
joint
"camera"
)
((the binteger 1052)
blackout
0
)
((the binteger 1135)
blackout
(the binteger 10)
)
((the binteger 1137)
joint
"cameraB"
)
((the binteger 1138)
blackout
0
)
((the binteger 1216) joint "camera")
)
)
)
(else
(if arg0
(close-status! (-> obj tasks) (task-status need-introduction))
)
(new 'static 'spool-anim
:name "assistant-introduction-race-bike"
:index 12
:parts 6
:command-list
'(
(0
want-levels
village1
beach
)
((the binteger 129)
joint
"cameraB"
)
((the binteger 319)
joint
"camera"
)
((the binteger 505) joint "cameraB")
)
)
)
)
)
(((task-status need-reminder) (task-status need-reminder-a))
(set! (-> obj skippable) #t)
(cond
((= (current-task (-> obj tasks)) (game-task none))
(new 'static 'spool-anim
:name "assistant-reminder-1-generic"
:index 14
:parts 2
:command-list '()
)
)
((closed?
(-> obj tasks)
(game-task jungle-eggtop)
(task-status need-resolution)
)
(new 'static 'spool-anim
:name "assistant-reminder-1-race-bike"
:index 13
:parts 3
:command-list '()
)
)
((or
(closed?
(-> obj tasks)
(game-task misty-bike)
(task-status need-resolution)
)
(not
(closed?
(-> obj tasks)
(game-task misty-bike)
(task-status need-introduction)
)
)
)
(new 'static 'spool-anim
:name "assistant-reminder-1-blue-eco-switch"
:index 11
:parts 3
:command-list '()
)
)
((zero? (get-reminder (-> obj tasks) 2))
(if arg0
(save-reminder (-> obj tasks) 1 2)
)
(new 'static 'spool-anim
:name "assistant-reminder-1-race-bike"
:index 13
:parts 3
:command-list '()
)
)
(else
(if arg0
(save-reminder (-> obj tasks) 0 2)
)
(new 'static 'spool-anim
:name "assistant-reminder-1-blue-eco-switch"
:index 11
:parts 3
:command-list '()
)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string (current-status (-> obj tasks)))
)
)
(-> obj draw art-group data 3)
)
)
)
)
;; definition for method 31 of type assistant
(defmethod get-art-elem assistant ((obj assistant))
(-> obj draw art-group data 3)
)
;; definition for method 43 of type assistant
(defmethod TODO-RENAME-43 assistant ((obj assistant))
(let
((s5-0
(TODO-RENAME-10
(-> obj ambient)
(new 'stack-no-clear 'vector)
9000
122880.0
obj
)
)
)
(when s5-0
(let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-3 (the-as number (logior #x3f800000 v1-2)))
(f0-2 (+ -1.0 (the-as float v1-3)))
)
(cond
((< 16384.0 (-> s5-0 y))
#f
)
((< 0.8 f0-2)
(play-ambient
(-> obj ambient)
"ASSTLP01"
#f
(-> obj root-override trans)
)
)
((< 0.6 f0-2)
(play-ambient
(-> obj ambient)
"ASSTLP04"
#f
(-> obj root-override trans)
)
)
((< 0.4 f0-2)
(play-ambient
(-> obj ambient)
"ASSTLP05"
#f
(-> obj root-override trans)
)
)
((< 0.2 f0-2)
(play-ambient
(-> obj ambient)
"ASSTLP02"
#f
(-> obj root-override trans)
)
)
(else
(play-ambient
(-> obj ambient)
"ASSTLP03"
#f
(-> obj root-override trans)
)
)
)
)
)
)
)
;; failed to figure out what this is:
(defstate idle (assistant)
:virtual #t
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 3)
)
(ja-channel-push! 1 60)
)
(while #t
(TODO-RENAME-43 self)
(let ((v1-9 (-> self skel root-channel 0)))
(set!
(-> v1-9 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
)
(let* ((v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-12 (the-as number (logior #x3f800000 v1-11)))
)
(countdown (gp-0 (+ (the int (+ -1.0 (the-as float v1-12))) 2))
(let ((a0-12 (-> self skel root-channel 0)))
(set! (-> a0-12 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-12 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group!
a0-12
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set!
(-> a0-13 param 0)
(the float (+ (-> a0-13 frame-group data 0 length) -1))
)
(set! (-> a0-13 param 1) 1.0)
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let* ((v1-46 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-47 (the-as number (logior #x3f800000 v1-46)))
)
(cond
((< (+ -1.0 (the-as float v1-47)) 0.66)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-17 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-17 param 1) 1.0)
(set! (-> a0-17 frame-num) 0.0)
(joint-control-channel-group!
a0-17
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-18 (-> self skel root-channel 0)))
(set!
(-> a0-18 param 0)
(the float (+ (-> a0-18 frame-group data 0 length) -1))
)
(set! (-> a0-18 param 1) 1.0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(sound-play-by-name
(static-sound-name "welding-loop")
(-> self sound-id)
1024
0
0
1
(the-as symbol (target-pos 0))
)
(let ((v1-74 (-> self skel root-channel 0)))
(set!
(-> v1-74 frame-group)
(the-as art-joint-anim (-> self draw art-group data 9))
)
)
(let* ((f30-0 4.0)
(v1-76 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-77 (the-as number (logior #x3f800000 v1-76)))
)
(countdown
(gp-2 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-77)))) 4))
(let ((a0-28 (-> self skel root-channel 0)))
(set! (-> a0-28 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set!
(-> a0-28 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-28 param 1) 1.0)
(set! (-> a0-28 frame-num) 0.0)
(joint-control-channel-group!
a0-28
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(spawn
(-> self part)
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> self node-list data 30)
)
)
(suspend)
(let ((a0-31 (-> self skel root-channel 0)))
(set!
(-> a0-31 param 0)
(the float (+ (-> a0-31 frame-group data 0 length) -1))
)
(set! (-> a0-31 param 1) 1.0)
(joint-control-channel-group-eval!
a0-31
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-33 (-> self skel root-channel 0)))
(set! (-> a0-33 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set! (-> a0-33 param 0) 0.0)
(set! (-> a0-33 param 1) 1.0)
(set!
(-> a0-33 frame-num)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-33
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(spawn
(-> self part)
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> self node-list data 30)
)
)
(suspend)
(let ((a0-36 (-> self skel root-channel 0)))
(set! (-> a0-36 param 0) 0.0)
(set! (-> a0-36 param 1) 1.0)
(joint-control-channel-group-eval!
a0-36
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(sound-stop (-> self sound-id))
(let ((a0-39 (-> self skel root-channel 0)))
(set!
(-> a0-39 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set! (-> a0-39 param 0) 0.0)
(set! (-> a0-39 param 1) 1.0)
(set!
(-> a0-39 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-39
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-40 (-> self skel root-channel 0)))
(set! (-> a0-40 param 0) 0.0)
(set! (-> a0-40 param 1) 1.0)
(joint-control-channel-group-eval!
a0-40
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let* ((v1-159 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-160 (the-as number (logior #x3f800000 v1-159)))
)
(when (< (+ -1.0 (the-as float v1-160)) 0.66)
(let ((a0-44 (-> self skel root-channel 0)))
(set!
(-> a0-44 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> a0-44 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
data
0
length
)
-1
)
)
)
(set! (-> a0-44 param 1) 1.0)
(set! (-> a0-44 frame-num) 0.0)
(joint-control-channel-group!
a0-44
(the-as art-joint-anim (-> self draw art-group data 7))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-45 (-> self skel root-channel 0)))
(set!
(-> a0-45 param 0)
(the float (+ (-> a0-45 frame-group data 0 length) -1))
)
(set! (-> a0-45 param 1) 1.0)
(joint-control-channel-group-eval!
a0-45
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(else
(let ((a0-47 (-> self skel root-channel 0)))
(set!
(-> a0-47 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-47 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-47 param 1) 1.0)
(set! (-> a0-47 frame-num) 0.0)
(joint-control-channel-group!
a0-47
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-48 (-> self skel root-channel 0)))
(set!
(-> a0-48 param 0)
(the float (+ (-> a0-48 frame-group data 0 length) -1))
)
(set! (-> a0-48 param 1) 1.0)
(joint-control-channel-group-eval!
a0-48
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let* ((v1-208 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-209 (the-as number (logior #x3f800000 v1-208)))
)
(countdown (gp-3 (+ (the int (+ -1.0 (the-as float v1-209))) 1))
(let ((a0-52 (-> self skel root-channel 0)))
(set!
(-> a0-52 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-52 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-52 param 1) 1.0)
(set! (-> a0-52 frame-num) 0.0)
(joint-control-channel-group!
a0-52
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-53 (-> self skel root-channel 0)))
(set!
(-> a0-53 param 0)
(the float (+ (-> a0-53 frame-group data 0 length) -1))
)
(set! (-> a0-53 param 1) 1.0)
(joint-control-channel-group-eval!
a0-53
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-55 (-> self skel root-channel 0)))
(set!
(-> a0-55 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-55 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-55 param 1) 1.0)
(set! (-> a0-55 frame-num) 0.0)
(joint-control-channel-group!
a0-55
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-56 (-> self skel root-channel 0)))
(set!
(-> a0-56 param 0)
(the float (+ (-> a0-56 frame-group data 0 length) -1))
)
(set! (-> a0-56 param 1) 1.0)
(joint-control-channel-group-eval!
a0-56
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(set!
(-> *part-group-id-table* 122)
(new 'static 'sparticle-launch-group
:length 2
:duration #xbb8
:linger-duration #x5dc
:name "group-assistant-torch"
:launcher
(new 'static 'inline-array sparticle-group-item 2
(sp-item 365 :fade-after (meters 30.0) :falloff-to (meters 30.0))
(sp-item 366 :fade-after (meters 60.0) :falloff-to (meters 80.0))
)
:bounds (new 'static 'sphere :w 61440.0)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 365)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 13
(sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
(sp-rnd-flt spt-num 0.1 1.0 1.0)
(sp-rnd-flt spt-scale-x (meters 1.0) (meters 3.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 100.0 28.0 1.0)
(sp-flt spt-g 100.0)
(sp-flt spt-b 80.0)
(sp-rnd-flt spt-a 32.0 64.0 1.0)
(sp-flt spt-fade-a -6.4)
(sp-int spt-timer 10)
(sp-cpuinfo-flags bit2 bit3)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 366)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 22
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-rnd-flt spt-num 0.1 1.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.1) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 128.0 1.0)
(sp-flt spt-g 128.0)
(sp-flt spt-b 64.0)
(sp-rnd-flt spt-a 32.0 96.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.013333334) (meters 0.08) 1.0)
(sp-flt spt-scalevel-x (meters -0.00016666666))
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-g -0.2)
(sp-flt spt-fade-b -0.2)
(sp-flt spt-accel-y -8.192)
(sp-flt spt-friction 0.93)
(sp-int spt-timer 1200)
(sp-cpuinfo-flags bit2)
(sp-flt spt-userdata 140288.0)
(sp-func spt-func 'check-drop-level-assistant)
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 180.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 45.0) (degrees 180.0) 1.0)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 367)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 15
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-rnd-flt spt-num 3.0 1.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.075) (meters 0.075) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 64.0 1.0)
(sp-flt spt-g 96.0)
(sp-rnd-flt spt-a 32.0 96.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.011666667) (meters 0.0033333334) 1.0)
(sp-flt spt-fade-a -0.85333335)
(sp-flt spt-accel-y -0.68266666)
(sp-int spt-timer 300)
(sp-cpuinfo-flags bit2)
(sp-rnd-flt spt-conerot-x (degrees 50.000004) (degrees 30.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
;; definition for function check-drop-level-assistant
(defun
check-drop-level-assistant
((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(when (< (-> arg2 y) (-> arg1 user-float))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-2 (the-as number (logior #x3f800000 v1-1)))
)
(if (< (+ -1.0 (the-as float v1-2)) 0.25)
(sound-play-by-name
(static-sound-name "water-drop")
(new-sound-id)
1024
0
0
1
#t
)
)
)
(set-vector! gp-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 367)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
)
(none)
)
;; definition for method 11 of type assistant
(defmethod copy-defaults! assistant ((obj assistant) (arg0 res-lump))
(dummy-40 obj arg0 *assistant-sg* 3 31 (new 'static 'vector :w 4096.0) 5)
(set! (-> obj bounce-away) #f)
(set!
(-> obj part)
(create-launch-control (-> *part-group-id-table* 122) obj)
)
(set! (-> obj tasks) (get-task-control (game-task jungle-eggtop)))
(set! (-> obj sound-id) (new-sound-id))
(set! (-> obj draw light-index) (the-as uint 1))
(case (get-task-status (game-task firecanyon-assistant))
(((task-status unknown))
(go (method-of-object obj idle))
)
(else
(dummy-18 obj)
(deactivate obj)
)
)
(none)
)