Files
jak-project/test/decompiler/reference/jak3/levels/nest/nst-obs_REF.gc
T
Hat Kid 58a5440c8a decomp3: more misc files (#3466)
Makes a bunch of missions mostly playable, including:
- `arena-training-1`
- `arena-fight-1`
- `wascity-chase`
- `arena-fight-2`
- `arena-fight-3`
- `volcano-darkeco`
- `desert-hover`
- `nest-eggs`
- `temple-climb`
- `temple-oracle`
- `temple-tests`
- `desert-beast-battle`
- `desert-turtle-training`
- `desert-course-race`
- `desert-artifact-race1`
- `wascity-leaper-race`
- `wascity-pre-game`
- `sewer-met-hum`
- `forest-kill-plants`
- `forest-ring-chase`
- `temple-defend`
- `tower-destroy`
- `desert-glide`

---
Files:

- `ripple`
- `waswide-mood`
- `sig-rider`
- `nst-tasks`
- `nst-part`
- `nst-gas`
- `nst-eggs-h`
- `nst-obs`
- `nst-mood`
- `egg-spider`
- `wasdoors-init`
- `wasall-tasks`
- `wvehicle-race`
- `wcar-marauder`
- `wcar-marauder-b`
- `turret-control`
- `was-squad-control`
- `turtle-training`
- `kleever-rider`
- `course-race`
- `artifact-race`
- `desert-hover`
- `desbeast-path-h`
- `des-beast`
- `desertg-obs`
- `desertf-obs`
- `desertd-obs`
- `desert-dust-storm`
- `des-cactus`
- `race-hud`
- `race-info`
- `race-manager`
- `tizard`
- `flyingsaw`
- `hover-training`
- `temple-mood`
- `temple-obs`
- `temple-obs2`
- `temple-part`
- `temple-scenes`
- `templex-mood`
- `templex-obs`
- `templex-part`
- `tomb-baby-spider`
- `target-turret-shot`
- `target-turret`
- `beast-battle-path`
- `des-beast-2`
- `mh-flyer`
- `scorpion-gun`
- `hover-enemy-h`
- `hover-enemy`
- `hover-formation-h`
- `hover-formation`
- `hover-nav-control-h`
- `hover-nav-control`
- `flamer-hover`
- `hover-nav-templea`
- `robo-hover`
- `hover-nav-sewb`
- `hover-nav-sewg`
- `hover-nav-sewj`
- `hover-nav-sewl`
- `hover-nav-sewo`
- `hover-nav-towera`
- `tower-mood`
- `tower-obs`
- `tower-scenes`
- `tower-part`
- `eco-green-collider`
- `forest-bridges`
- `forest-kill-plants`
- `forest-mood`
- `forest-ring-chase`
- `forest-tasks`
- `forest-part`
- `foresta-obs`
- `hover-nav-foresta`
- `mh-plant`
- `dp-bipedal-part`
- `dp-bipedal-shot`
- `dp-bipedal`
- `neo-spawner`
- `for-turret`
- `for-turret-shot`
- `neo-wasp`
- `neo-wasp-part`
- `volcanox-scenes`
- `volcanox-mood`
- `volcano-scenes`
- `volcano-mood`
- `volcano-obs`
- `volcano-obs2`
- `chain-physics`
- `rigid-body-plat`
- `volcano-part`
- `flamer-lava`
- `flitter`
- `spiky-frog`
- `flut-wild`
- `target-indax`
- `target-indax-hang`
- `mantis`
- `volcanox-obs`
- `spyder`
- `wcar-faccar`
- `mhcity-obs2`
- `mhcity-part`
- `mhcity-obs`
- `dm-mine-spider`
- `rapid-gunner`
- `stadium-mood`
- `stadium-scenes`
- `stadiuma-mood`
- `stadiuma-part`
- `kanga-lizard`
- `marauder`
- `arena-scenes`
- `wasstada-mood`
- `wasstada-obs`
- `wasstada-part`
- `wasstadb-obs`
- `wasstadc-obs`
- `dm-flyer`
- `maker-part`
- `maker-projectile`
- `skeet-part`
- `wascity-turret`
- `wasgun-h`
- `wasgun-hud`
- `wasgun-manager`
- `nav-graph-h`
- `traffic-engine-h`
- `waswide-init`
- `cty-borrow-manager-h`
- `cty-borrow-manager`
- `desert-part`
- `height-map-h`
- `height-map`
- `traffic-height-map`
- `vehicle-control`
- `hvehicle-h`
- `hvehicle`
- `hvehicle-effects`
- `hvehicle-physics`
- `hvehicle-util`
- `glider-h`
- `glider-hud`
- `glider-manager`
- `glider-ring`
- `glider-ring-part`
- `h-glider`
- `hanga-init`
- `was-pre-game`
- `was-leaper-race`
- `flut-racer`
- `desert-scenes`
- `desert-lizard-h`
- `desert-lizard-task`
- `desert-lizard`
- `throne-scenes`
- `waspal-mood`
- `waspala-obs`
- `waspala-part`
- `deswalk-obs`
- `deswalk-part`
- `terraformer-drone`
- `terraformer-head`
- `terraformer-part`
- `terraformer-setup`
2024-04-22 18:43:51 +02:00

2785 lines
100 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type nst-water-anim
(deftype nst-water-anim (water-anim)
()
)
;; definition for method 3 of type nst-water-anim
(defmethod inspect ((this nst-water-anim))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type water-anim inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition for symbol ripple-for-nst-water-anim, type ripple-wave-set
(define ripple-for-nst-water-anim (new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave (new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for method 24 of type nst-water-anim
;; WARN: Return type mismatch ripple-wave-set vs object.
(defmethod init-water! ((this nst-water-anim))
(let ((t9-0 (method-of-type water-anim init-water!)))
(t9-0 this)
)
(let ((v1-2 (new 'process 'ripple-control)))
(set! (-> this draw ripple) v1-2)
(set! (-> v1-2 global-scale) 3072.0)
(set! (-> v1-2 close-fade-dist) 163840.0)
(set! (-> v1-2 far-fade-dist) 245760.0)
(let ((v0-2 ripple-for-nst-water-anim))
(set! (-> v1-2 waveform) v0-2)
v0-2
)
)
)
;; definition for symbol *nst-metalhead-eggs-last-sound-time*, type time-frame
(define *nst-metalhead-eggs-last-sound-time* (the-as time-frame 0))
;; definition of type nst-metalhead-eggs
(deftype nst-metalhead-eggs (process-focusable)
((actor-group actor-group)
(notify-actor entity-actor)
)
(:state-methods
idle
die
die-fast
)
(:methods
(init-skel-and-jcontrol! (_type_) none)
(init-collision! (_type_) none)
)
)
;; definition for method 3 of type nst-metalhead-eggs
(defmethod inspect ((this nst-metalhead-eggs))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 this)
)
(format #t "~2Tactor-group: ~A~%" (-> this actor-group))
(format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defstate idle (nst-metalhead-eggs)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('attack)
(let ((gp-0 (-> block param 0)))
(-> block param 1)
(let* ((s5-0 proc)
(v1-2 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(when (and gp-0 v1-2)
(logclear! (-> self mask) (process-mask actor-pause))
(go-virtual die)
)
)
)
)
(('explode)
(go-virtual die)
)
)
)
:code (behavior ()
(until #f
(ja-no-eval :group! (ja-group) :num! (seek! max (rand-vu-float-range 0.8 1.2)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (rand-vu-float-range 0.8 1.2)))
)
)
#f
)
:post ja-post
)
;; failed to figure out what this is:
(defstate die (nst-metalhead-eggs)
:virtual #t
:enter (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let* ((v1-0 (-> self notify-actor))
(a0-1 (if v1-0
(-> v1-0 extra process)
)
)
)
(if a0-1
(send-event a0-1 'egg-explode #f)
)
)
0
)
:code (behavior ()
(let ((v1-1 (-> self root root-prim)))
(set! (-> v1-1 prim-core collide-as) (collide-spec))
(set! (-> v1-1 prim-core collide-with) (collide-spec))
)
0
(logior! (-> self draw status) (draw-control-status no-draw))
(when (time-elapsed? *nst-metalhead-eggs-last-sound-time* (seconds 0.085))
(sound-play "nest-egg-blast" :position (-> self root trans))
(sound-play "nest-egg-shriek" :position (-> self root trans))
(set! *nst-metalhead-eggs-last-sound-time* (current-time))
)
(let ((v1-18 (new 'stack-no-clear 'vector)))
(set! (-> v1-18 quad) (-> self root trans quad))
(+! (-> v1-18 y) 8192.0)
(cond
((logtest? (-> *part-group-id-table* 611 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> v1-18 quad))
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 611))
)
(else
(set! (-> *launch-matrix* trans quad) (-> v1-18 quad))
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 611))
)
)
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.5))
(suspend)
)
)
(cleanup-for-death self)
)
)
;; failed to figure out what this is:
(defstate die-fast (nst-metalhead-eggs)
:virtual #t
:code (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let* ((v1-0 (-> self notify-actor))
(a0-1 (if v1-0
(-> v1-0 extra process)
)
)
)
(if a0-1
(send-event a0-1 'trigger #t)
)
)
(cleanup-for-death self)
)
)
;; definition for method 20 of type nst-metalhead-eggs
;; WARN: Return type mismatch int vs search-info-flag.
(defmethod process-mask->search-info-flag ((this nst-metalhead-eggs))
(the-as search-info-flag 24)
)
;; definition for method 11 of type nst-metalhead-eggs
;; INFO: Used lq/sq
(defmethod init-from-entity! ((this nst-metalhead-eggs) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(init-collision! this)
(process-drawable-from-entity! this arg0)
(init-skel-and-jcontrol! this)
(set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0))
(set! (-> this root pause-adjust-distance) 204800.0)
(set! sv-16 (new 'static 'res-tag))
(let ((v1-7 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16))))
(if (and v1-7 (= (-> sv-16 elt-count) 1))
(set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-7))))
(set! (-> this actor-group) #f)
)
)
(if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))
(or (task-node-closed? (game-task-node nest-eggs-resolution))
(task-closed? (the-as string ((method-of-type res-lump get-property-struct)
(-> this entity)
'task-name
'interp
-1000000000.0
"nest-eggs-resolution"
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
)
(go (method-of-object this die-fast))
)
(go (method-of-object this idle))
)
;; definition of type nst-metalhead-eggs-a
(deftype nst-metalhead-eggs-a (nst-metalhead-eggs)
()
)
;; definition for method 3 of type nst-metalhead-eggs-a
(defmethod inspect ((this nst-metalhead-eggs-a))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nst-metalhead-eggs inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition of type nst-metalhead-eggs-b
(deftype nst-metalhead-eggs-b (nst-metalhead-eggs)
()
)
;; definition for method 3 of type nst-metalhead-eggs-b
(defmethod inspect ((this nst-metalhead-eggs-b))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nst-metalhead-eggs inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition of type nst-metalhead-eggs-c
(deftype nst-metalhead-eggs-c (nst-metalhead-eggs)
()
)
;; definition for method 3 of type nst-metalhead-eggs-c
(defmethod inspect ((this nst-metalhead-eggs-c))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nst-metalhead-eggs inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-metalhead-eggs-a nst-metalhead-eggs-a nst-metalhead-eggs-a-lod0-jg nst-metalhead-eggs-a-idle-ja
((nst-metalhead-eggs-a-lod0-mg (meters 20))
(nst-metalhead-eggs-a-lod1-mg (meters 40))
(nst-metalhead-eggs-a-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 1 1 3.6)
)
;; failed to figure out what this is:
(defskelgroup skel-nst-metalhead-eggs-b nst-metalhead-eggs-b nst-metalhead-eggs-b-lod0-jg nst-metalhead-eggs-b-idle-ja
((nst-metalhead-eggs-b-lod0-mg (meters 20))
(nst-metalhead-eggs-b-lod1-mg (meters 40))
(nst-metalhead-eggs-b-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 0 0.7 2.5)
)
;; failed to figure out what this is:
(defskelgroup skel-nst-metalhead-eggs-c nst-metalhead-eggs-c nst-metalhead-eggs-c-lod0-jg nst-metalhead-eggs-c-idle-ja
((nst-metalhead-eggs-c-lod0-mg (meters 20))
(nst-metalhead-eggs-c-lod1-mg (meters 40))
(nst-metalhead-eggs-c-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 0 0.3 2)
)
;; definition for method 31 of type nst-metalhead-eggs-a
;; WARN: Return type mismatch int vs none.
(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-a))
(initialize-skeleton
this
(the-as
skeleton-group
(art-group-get-by-name *level* "skel-nst-metalhead-eggs-a" (the-as (pointer level) #f))
)
(the-as pair 0)
)
(let ((a0-3 (-> this skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4)))
(set! (-> a0-3 param 0) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!)
)
(none)
)
;; definition for method 32 of type nst-metalhead-eggs-a
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-metalhead-eggs-a))
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 3)
(set-vector! (-> v1-2 local-sphere) 0.0 4096.0 4096.0 13107.2)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-2)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-5 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 31 of type nst-metalhead-eggs-b
;; WARN: Return type mismatch int vs none.
(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-b))
(initialize-skeleton
this
(the-as
skeleton-group
(art-group-get-by-name *level* "skel-nst-metalhead-eggs-b" (the-as (pointer level) #f))
)
(the-as pair 0)
)
(let ((a0-3 (-> this skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4)))
(set! (-> a0-3 param 0) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!)
)
(none)
)
;; definition for method 32 of type nst-metalhead-eggs-b
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-metalhead-eggs-b))
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 3)
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 4096.0 9830.4)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-2)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-5 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 31 of type nst-metalhead-eggs-c
;; WARN: Return type mismatch int vs none.
(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-c))
(initialize-skeleton
this
(the-as
skeleton-group
(art-group-get-by-name *level* "skel-nst-metalhead-eggs-c" (the-as (pointer level) #f))
)
(the-as pair 0)
)
(let ((a0-3 (-> this skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4)))
(set! (-> a0-3 param 0) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!)
)
(none)
)
;; definition for method 32 of type nst-metalhead-eggs-c
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-metalhead-eggs-c))
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 transform-index) 3)
(set-vector! (-> v1-2 local-sphere) 0.0 0.0 2867.2 6553.6)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-2)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-5 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition of type nst-bridge-base
(deftype nst-bridge-base (process-drawable)
()
(:state-methods
nst-bridge-base-state
)
(:methods
(get-skel (_type_) art-group)
(init-collision! (_type_) none)
)
)
;; definition for method 3 of type nst-bridge-base
(defmethod inspect ((this nst-bridge-base))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; failed to figure out what this is:
(defstate nst-bridge-base-state (nst-bridge-base)
:virtual #t
:trans rider-trans
:code sleep-code
:post rider-post
)
;; definition for method 11 of type nst-bridge-base
;; WARN: Return type mismatch none vs object.
(defmethod init-from-entity! ((this nst-bridge-base) (arg0 entity-actor))
(init-collision! this)
(process-drawable-from-entity! this arg0)
(initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0))
(set! (-> this root pause-adjust-distance) 204800.0)
(let ((a0-5 (-> this skel root-channel 0)))
(set! (-> a0-5 frame-group) (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
(set! (-> a0-5 param 0) 1.0)
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
num-func-loop!
)
)
(ja-post)
)
;; definition of type nst-falling-stone-bridge-goo
(deftype nst-falling-stone-bridge-goo (process-drawable)
()
(:state-methods
idle
die
)
)
;; definition for method 3 of type nst-falling-stone-bridge-goo
(defmethod inspect ((this nst-falling-stone-bridge-goo))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-lod0-jg nst-falling-stone-bridge-goo-idle-ja
((nst-falling-stone-bridge-goo-lod0-mg (meters 20)) (nst-falling-stone-bridge-goo-lod1-mg (meters 999999)))
:bounds (static-spherem 0 5 0 20)
)
;; failed to figure out what this is:
(defskelgroup skel-nst-falling-stone-bridge-goo-explode nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-explode-lod0-jg nst-falling-stone-bridge-goo-explode-idle-ja
((nst-falling-stone-bridge-goo-explode-lod0-mg (meters 999999)))
:bounds (static-spherem 0 5 0 100)
)
;; definition for symbol *nst-falling-stone-bridge-goo-exploder-params*, type joint-exploder-static-params
(define *nst-falling-stone-bridge-goo-exploder-params*
(new 'static 'joint-exploder-static-params
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
(new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
)
:collide-spec (collide-spec backgnd)
)
)
;; failed to figure out what this is:
(defstate idle (nst-falling-stone-bridge-goo)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('trigger)
(go-virtual die)
)
)
)
:code (behavior ()
(until #f
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
#f
)
:post ja-post
)
;; failed to figure out what this is:
(defstate die (nst-falling-stone-bridge-goo)
:virtual #t
:enter (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
)
:code (behavior ()
(cond
((logtest? (-> *part-group-id-table* 622 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 622)
:duration (seconds 5)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 622)
:duration (seconds 5)
)
)
)
(let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
(set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0)
(set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0)
(process-spawn
joint-exploder
(art-group-get-by-name *level* "skel-nst-falling-stone-bridge-goo-explode" (the-as (pointer level) #f))
6
gp-2
*nst-falling-stone-bridge-goo-exploder-params*
:name "joint-exploder"
:to self
:unk 0
)
)
(activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
(suspend)
(ja-channel-set! 0)
(while (-> self child)
(suspend)
)
)
:post ja-post
)
;; definition for method 11 of type nst-falling-stone-bridge-goo
(defmethod init-from-entity! ((this nst-falling-stone-bridge-goo) (arg0 entity-actor))
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
this
(the-as
skeleton-group
(art-group-get-by-name *level* "skel-nst-falling-stone-bridge-goo" (the-as (pointer level) #f))
)
(the-as pair 0)
)
(set! (-> this root pause-adjust-distance) 204800.0)
(go (method-of-object this idle))
)
;; definition for function nst-falling-stone-bridge-goo-init-by-other
(defbehavior nst-falling-stone-bridge-goo-init-by-other nst-falling-stone-bridge-goo ((arg0 entity-actor))
(process-entity-set! self arg0)
(init-from-entity! self arg0)
)
;; definition of type nst-falling-stone-bridge
(deftype nst-falling-stone-bridge (nst-bridge-base)
((fall-anim int32)
(goo (pointer nst-falling-stone-bridge-goo))
(actor-group actor-group)
(egg-threshold uint8)
(stop-bridge-sound symbol)
(bridge-sound sound-id)
(minimap connection-minimap)
)
(:state-methods
idle
explode-dispatch
falling
grounded
)
)
;; definition for method 3 of type nst-falling-stone-bridge
(defmethod inspect ((this nst-falling-stone-bridge))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nst-bridge-base inspect)))
(t9-0 this)
)
(format #t "~2Tfall-anim: ~D~%" (-> this fall-anim))
(format #t "~2Tgoo: #x~X~%" (-> this goo))
(format #t "~2Tactor-group: ~A~%" (-> this actor-group))
(format #t "~2Tegg-threshold: ~D~%" (-> this egg-threshold))
(format #t "~2Tstop-bridge-sound: ~A~%" (-> this stop-bridge-sound))
(format #t "~2Tbridge-sound: ~D~%" (-> this bridge-sound))
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-falling-stone-bridge nst-falling-stone-bridge nst-falling-stone-bridge-lod0-jg nst-falling-stone-bridge-idle-ja
((nst-falling-stone-bridge-lod0-mg (meters 20)) (nst-falling-stone-bridge-lod1-mg (meters 999999)))
:bounds (static-spherem 0 25 0 40)
:origin-joint-index 3
)
;; definition for symbol *nst-falling-stone-bridge-part-nodes*, type (array int32)
(define *nst-falling-stone-bridge-part-nodes* (new 'static 'boxed-array :type int32 4 5 6 7 8 9 10 11))
;; definition for function sound-exit
;; WARN: Return type mismatch int vs none.
(defbehavior sound-exit nst-falling-stone-bridge ()
(if (-> self stop-bridge-sound)
(set-action!
*gui-control*
(gui-action stop)
(-> self bridge-sound)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(none)
)
;; failed to figure out what this is:
(defstate idle (nst-falling-stone-bridge)
:virtual #t
:parent (nst-falling-stone-bridge nst-bridge-base-state)
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('trigger)
(go-virtual falling)
)
(('egg-explode)
(+! (-> self egg-threshold) -1)
(let ((v1-5 (-> self egg-threshold)))
(cond
((= v1-5 1)
(set! (-> self stop-bridge-sound) #t)
(let ((v0-0 (the-as
object
(add-process *gui-control* self (gui-channel background) (gui-action queue) "nstbridg" -99.0 0)
)
)
)
(set! (-> self bridge-sound) (the-as sound-id v0-0))
v0-0
)
)
((zero? v1-5)
(go-virtual explode-dispatch)
)
)
)
)
)
)
:enter (behavior ()
(set! (-> self minimap) (add-icon! *minimap* self (the-as uint 126) (the-as int #f) (the-as vector #t) 0))
)
:exit (behavior ()
(when (-> self minimap)
(logior! (-> self minimap flags) (minimap-flag fade-out))
(set! (-> self minimap) #f)
)
)
)
;; failed to figure out what this is:
(defstate explode-dispatch (nst-falling-stone-bridge)
:virtual #t
:parent (nst-falling-stone-bridge nst-bridge-base-state)
:code (behavior ()
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(when (-> self actor-group)
(let ((f30-0 (* 0.0005 (the float (-> self actor-group length)))))
(dotimes (gp-8 (-> self actor-group length))
(let ((s5-0 (current-time)))
(until (time-elapsed? s5-0 (the int (* 300.0 f30-0)))
(suspend)
)
)
(let ((a1-24 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-24 from) (process->ppointer self))
(set! (-> a1-24 num-params) 0)
(set! (-> a1-24 message) 'explode)
(let ((t9-24 send-event-function)
(v1-143 (-> self actor-group data gp-8 actor))
)
(t9-24
(if v1-143
(-> v1-143 extra process)
)
a1-24
)
)
)
(when (not (logtest? gp-8 1))
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad)
(-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad)
)
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad)
(-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad)
)
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
)
(set! f30-0 (+ -0.0005 f30-0))
)
)
)
(go-virtual falling)
)
)
;; failed to figure out what this is:
(defstate falling (nst-falling-stone-bridge)
:virtual #t
:parent (nst-falling-stone-bridge nst-bridge-base-state)
:exit sound-exit
:code (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(when (-> self stop-bridge-sound)
(set! (-> self stop-bridge-sound) #f)
(sound-params-set! *gui-control* (-> self bridge-sound) #f -1 -1 -1 1.0)
(set-action!
*gui-control*
(gui-action play)
(-> self bridge-sound)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(send-event (ppointer->process (-> self goo)) 'trigger)
(activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock))
(let ((s5-0 0))
(ja-no-eval :group! (-> self draw art-group data (-> self fall-anim)) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(let ((f30-0 (ja-frame-num 0))
(gp-0 (ja-num-frames 0))
)
(when (< s5-0 (the int f30-0))
(when (= (the int f30-0) (+ gp-0 -10))
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
(cond
((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 619)
:duration (seconds 0.017)
)
)
)
)
(when (= (the int f30-0) (+ gp-0 -3))
(cond
((logtest? (-> *part-group-id-table* 621 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 621)
:duration (seconds 0.017)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 621)
:duration (seconds 0.017)
)
)
)
(activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock))
)
)
)
(set! s5-0 (the int (ja-frame-num 0)))
(suspend)
(ja :num! (seek!))
)
)
(go-virtual grounded)
)
)
;; failed to figure out what this is:
(defstate grounded (nst-falling-stone-bridge)
:virtual #t
:code (behavior ()
(ja-channel-set! 1)
(ja :group! (-> self draw art-group data (-> self fall-anim)) :num! (identity (the float (ja-num-frames 0))))
(ja-post)
(sleep-code)
)
)
;; definition for method 12 of type nst-falling-stone-bridge
(defmethod run-logic? ((this nst-falling-stone-bridge))
"Should this process be run? Checked by execute-process-tree."
#t
)
;; definition for method 21 of type nst-falling-stone-bridge
(defmethod get-skel ((this nst-falling-stone-bridge))
(art-group-get-by-name *level* "skel-nst-falling-stone-bridge" (the-as (pointer level) #f))
)
;; definition for method 22 of type nst-falling-stone-bridge
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-falling-stone-bridge))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (collide-spec pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 102400.0 0.0 163840.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) s4-0)
)
(pusher-init s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-16 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 10 of type nst-falling-stone-bridge
(defmethod deactivate ((this nst-falling-stone-bridge))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(when (-> this minimap)
(logior! (-> this minimap flags) (minimap-flag fade-out))
(set! (-> this minimap) #f)
)
((method-of-type nst-bridge-base deactivate) this)
(none)
)
;; definition for method 11 of type nst-falling-stone-bridge
;; INFO: Used lq/sq
(defmethod init-from-entity! ((this nst-falling-stone-bridge) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(stack-size-set! (-> this main-thread) 512)
(let ((t9-1 (method-of-type nst-bridge-base init-from-entity!)))
(t9-1 this arg0)
)
(let ((v1-6
(get-art-idx-by-name-method
(-> this draw art-group)
(the-as
string
((method-of-type res-lump get-property-struct)
(-> this entity)
'anim-name
'interp
-1000000000.0
"nst-falling-stone-bridge-idle"
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
art-joint-anim
)
)
)
(set! (-> this fall-anim) v1-6)
(if (not v1-6)
(set! (-> this fall-anim) 3)
)
)
(set! sv-16 (new 'static 'res-tag))
(let ((v1-10 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16))))
(if (and v1-10 (= (-> sv-16 elt-count) 1))
(set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-10))))
(set! (-> this actor-group) #f)
)
)
(set! (-> this egg-threshold) (the-as uint 2))
(set! (-> this bridge-sound) (new-sound-id))
(set! (-> this stop-bridge-sound) #f)
(set! (-> this minimap) #f)
(if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))
(or (task-node-closed? (game-task-node nest-eggs-resolution))
(task-closed?
(the-as
string
((method-of-type res-lump get-property-struct)
(-> this entity)
'task-name
'interp
-1000000000.0
"nest-eggs-resolution"
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
)
(go (method-of-object this grounded))
)
(set! (-> this goo)
(process-spawn nst-falling-stone-bridge-goo arg0 :name "nst-falling-stone-bridge-goo" :to this)
)
(go (method-of-object this idle))
)
;; definition of type nst-collapsing-stone-bridge
(deftype nst-collapsing-stone-bridge (nst-bridge-base)
((root collide-shape-moving :override)
(anim spool-anim)
(exit-anim int32)
(bridge-type uint64)
(stop-bridge-sound symbol)
(bridge-sound sound-id)
)
(:state-methods
idle
collapsing
collapsed
collapse-fast
)
)
;; definition for method 3 of type nst-collapsing-stone-bridge
(defmethod inspect ((this nst-collapsing-stone-bridge))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nst-bridge-base inspect)))
(t9-0 this)
)
(format #t "~2Tanim: ~A~%" (-> this anim))
(format #t "~2Texit-anim: ~D~%" (-> this exit-anim))
(format #t "~2Tbridge-type: ~D~%" (-> this bridge-type))
(format #t "~2Tstop-bridge-sound: ~A~%" (-> this stop-bridge-sound))
(format #t "~2Tbridge-sound: ~D~%" (-> this bridge-sound))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-collapsing-stone-bridge nst-collapsing-stone-bridge nst-collapsing-stone-bridge-lod0-jg nst-collapsing-stone-bridge-idle-ja
((nst-collapsing-stone-bridge-lod0-mg (meters 20))
(nst-collapsing-stone-bridge-lod1-mg (meters 40))
(nst-collapsing-stone-bridge-lod2-mg (meters 999999))
)
:bounds (static-spherem 0 0 0 85)
)
;; definition for symbol *nst-bridge-break-anims*, type (array spool-anim)
(define *nst-bridge-break-anims*
(new 'static 'boxed-array :type spool-anim
(new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-a" :parts 3 :command-list '())
(new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-b" :parts 3 :command-list '())
(new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-c" :parts 3 :command-list '())
(new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-d" :parts 3 :command-list '())
)
)
;; definition for symbol *nst-bridge-break-exit-anims*, type (array int32)
(define *nst-bridge-break-exit-anims* (new 'static 'boxed-array :type int32 7 9 11 13))
;; failed to figure out what this is:
(defstate idle (nst-collapsing-stone-bridge)
:virtual #t
:parent (nst-collapsing-stone-bridge nst-bridge-base-state)
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('load-anim)
(when (and (!= (-> self bridge-type) -1) (-> block param 0))
(set! (-> self anim)
(-> *nst-bridge-break-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back)
1
0
)
)
)
)
(set! (-> self exit-anim)
(-> *nst-bridge-break-exit-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back)
1
0
)
)
)
)
(add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0)
(set! (-> self stop-bridge-sound) #t)
(let ((v0-0 (the-as object (add-process
*gui-control*
self
(gui-channel background)
(gui-action queue)
(if (zero? (-> self bridge-type))
"nbridge2"
"nbridge3"
)
-99.0
0
)
)
)
)
(set! (-> self bridge-sound) (the-as sound-id v0-0))
v0-0
)
)
)
(('trigger)
(if (and (!= (-> self bridge-type) -1) (-> self anim))
(go-virtual collapsing)
)
)
)
)
)
;; failed to figure out what this is:
(defstate collapsing (nst-collapsing-stone-bridge)
:virtual #t
:parent (nst-collapsing-stone-bridge nst-bridge-base-state)
:exit (behavior ()
(when (-> self anim)
(ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1)
(remove-setting-by-arg0 *setting-control* 'string-max-length)
(remove-setting-by-arg0 *setting-control* 'string-min-length)
)
(if (-> self stop-bridge-sound)
(set-action!
*gui-control*
(gui-action stop)
(-> self bridge-sound)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
)
:code (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.2))
(suspend)
)
)
(when (-> self anim)
(-> self draw bounds w)
(set! (-> self draw bounds w) 737280.0)
(set! (-> self root root-prim local-sphere w) 737280.0)
(set! (-> self draw force-lod) 0)
(set-setting-by-param *setting-control* 'string-min-length 'abs #x47a00000 0)
(set-setting-by-param *setting-control* 'string-max-length 'abs #x47f00000 0)
(when (-> self stop-bridge-sound)
(set! (-> self stop-bridge-sound) #f)
(sound-params-set! *gui-control* (-> self bridge-sound) #t -1 150 4 1.0)
(set-action!
*gui-control*
(gui-action play)
(-> self bridge-sound)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(ja-play-spooled-anim
(-> self anim)
(ja-group)
(the-as art-joint-anim (-> self draw art-group data (-> self exit-anim)))
(the-as (function process-drawable symbol) false-func)
(spooler-flags)
)
(go-virtual collapsed)
)
)
)
;; failed to figure out what this is:
(defstate collapsed (nst-collapsing-stone-bridge)
:virtual #t
:parent (nst-collapsing-stone-bridge nst-bridge-base-state)
:code (behavior ()
(when (-> self anim)
(ja-channel-set! 1)
(ja :group! (-> self draw art-group data (-> self exit-anim)))
)
(sleep-code)
)
)
;; failed to figure out what this is:
(defstate collapse-fast (nst-collapsing-stone-bridge)
:virtual #t
:code (behavior ()
(ja-channel-set! 1)
(ja :group! nst-collapsing-stone-bridge-end-ja)
(ja-post)
(sleep-code)
)
)
;; definition for method 21 of type nst-collapsing-stone-bridge
(defmethod get-skel ((this nst-collapsing-stone-bridge))
(art-group-get-by-name *level* "skel-nst-collapsing-stone-bridge" (the-as (pointer level) #f))
)
;; definition for method 22 of type nst-collapsing-stone-bridge
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-collapsing-stone-bridge))
(local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 41) 0)))
(set! (-> s5-0 total-prims) (the-as uint 42))
(set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list))
(set! (-> s4-0 prim-core action) (collide-action solid rideable))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 348160.0)
(set! (-> s5-0 root-prim) s4-0)
(pusher-init s5-0)
(let* ((s3-0 '((0 3 122880)
(1 4 122880)
(2 5 49152)
(3 6 49152)
(4 7 49152)
(5 8 49152)
(6 9 49152)
(7 10 49152)
(8 11 49152)
(9 12 49152)
(10 13 49152)
(11 14 49152)
(12 15 49152)
(13 16 49152)
(14 17 49152)
(15 18 49152)
(16 19 49152)
(17 20 49152)
(18 21 49152)
(19 22 65536)
(20 23 65536)
(21 24 49152)
(22 25 49152)
(23 26 49152)
(24 27 49152)
(25 28 49152)
(26 29 49152)
(27 30 49152)
(28 31 65536)
(29 32 49152)
(30 33 49152)
(31 34 49152)
(32 35 49152)
(33 36 65536)
(34 37 65536)
(35 38 49152)
(36 39 49152)
(37 40 65536)
(38 41 49152)
(39 42 65536)
(40 43 49152)
)
)
(s2-0 (-> s3-0 car))
)
(while (not (null? s3-0))
(let ((s1-0 (method-of-type collide-shape-prim-mesh new))
(s0-0 'process)
)
(set! sv-32 collide-shape-prim-mesh)
(set! sv-48 s5-0)
(let ((a3-2 (command-get-int (-> (the-as pair s2-0) car) 0))
(t0-1 0)
)
(set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1)))
)
)
(let ((s1-1 sv-16))
(set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as))
(set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with))
(set! (-> s1-1 prim-core action) (-> s4-0 prim-core action))
(set! (-> s1-1 transform-index) (command-get-int (-> (the-as pair (-> (the-as pair s2-0) cdr)) car) 0))
)
(set-vector!
(-> sv-16 local-sphere)
0.0
0.0
0.0
(command-get-float (-> (the-as pair (-> (the-as pair (-> (the-as pair s2-0) cdr)) cdr)) car) 0.0)
)
(set! s3-0 (the-as pair (-> s3-0 cdr)))
(set! s2-0 (-> s3-0 car))
)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-25 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 11 of type nst-collapsing-stone-bridge
(defmethod init-from-entity! ((this nst-collapsing-stone-bridge) (arg0 entity-actor))
(stack-size-set! (-> this main-thread) 512)
(let ((t9-1 (method-of-type nst-bridge-base init-from-entity!)))
(t9-1 this arg0)
)
(set! (-> this root pause-adjust-distance) 1433600.0)
(set! (-> this bridge-type)
(res-lump-value (-> this entity) 'nst-bridge-break-type uint :default (the-as uint128 -1) :time -1000000000.0)
)
(set! (-> this anim) #f)
(set! (-> this bridge-sound) (new-sound-id))
(set! (-> this stop-bridge-sound) #f)
(if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))
(task-node-closed? (game-task-node nest-eggs-resolution))
(task-closed? (the-as string ((method-of-type res-lump get-property-struct)
(-> this entity)
'task-name
'interp
-1000000000.0
"nest-eggs-resolution"
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
(go (method-of-object this collapse-fast))
)
(go (method-of-object this idle))
)
;; definition of type cocoon-grenade-shot
(deftype cocoon-grenade-shot (metalhead-grenade-shot)
()
)
;; definition for method 3 of type cocoon-grenade-shot
(defmethod inspect ((this cocoon-grenade-shot))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type metalhead-grenade-shot inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition for method 26 of type cocoon-grenade-shot
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod projectile-method-26 ((this cocoon-grenade-shot))
(cond
((logtest? (-> *part-group-id-table* 105 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 105))
)
(else
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 105))
)
)
0
(none)
)
;; definition for method 28 of type cocoon-grenade-shot
;; WARN: Return type mismatch int vs none.
(defmethod play-impact-sound ((this cocoon-grenade-shot) (arg0 projectile-options))
(case arg0
(((projectile-options po0))
(sound-play "cocoon-hit-grnd")
)
(((projectile-options po0 po1))
(let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))
(a0-8 (static-sound-spec "cocoon-trail-by" :group 0 :volume 0.0 :mask (pitch reg0)))
)
(set! (-> a0-8 volume) 1024)
(set! (-> a0-8 pitch-mod) (the int (* 1524.0 f0-0)))
(sound-play-by-spec a0-8 (-> this sound-id) (-> this root trans))
)
)
)
0
(none)
)
;; definition for method 31 of type cocoon-grenade-shot
;; WARN: Return type mismatch sound-id vs none.
(defmethod init-proj-settings! ((this cocoon-grenade-shot))
(set! (-> this attack-mode) 'eco-yellow)
(set! (-> this blast-radius) 4096.0)
(set! (-> this max-speed) 135168.0)
(set! (-> this timeout) (seconds 4))
(set! (-> this update-velocity) projectile-update-velocity-add-gravity)
(set! (-> this move) gren-canister-move)
(set! (-> this root dynam gravity y) 102400.0)
(set! (-> this root dynam gravity-length) 102400.0)
(set! (-> this root dynam gravity-max) 102400.0)
(let ((f0-5 1092.2667))
(quaternion-axis-angle! (-> this tumble-quat) 1.0 0.0 0.0 f0-5)
)
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 634) this))
(set! (-> this sound-id) (new-sound-id))
(none)
)
;; definition of type nst-cocoon-a
(deftype nst-cocoon-a (enemy)
((alt-actor entity-actor)
(activate-distance float)
(can-shoot? symbol)
(last-attack-time time-frame)
(turret joint-mod-set-world :inline)
(dest-quat quaternion :inline)
(cycling? symbol)
(cycle-rot float)
(shots-left uint8)
(cocoon-part sparticle-launch-control)
(charge-down-part sparticle-launch-control)
(charge-up-part sparticle-launch-control)
(sound-turret-loop-id sound-id)
(sound-turret-loop sound-spec)
(palette-id int32)
(minimap connection-minimap)
)
(:methods
(fire-shot! (_type_ symbol) none)
)
)
;; definition for method 3 of type nst-cocoon-a
(defmethod inspect ((this nst-cocoon-a))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type enemy inspect)))
(t9-0 this)
)
(format #t "~2Talt-actor: ~A~%" (-> this alt-actor))
(format #t "~2Tactivate-distance: ~f~%" (-> this activate-distance))
(format #t "~2Tcan-shoot?: ~A~%" (-> this can-shoot?))
(format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time))
(format #t "~2Tturret: #<joint-mod-set-world @ #x~X>~%" (-> this turret))
(format #t "~2Tdest-quat: #<quaternion @ #x~X>~%" (-> this dest-quat))
(format #t "~2Tcycling?: ~A~%" (-> this cycling?))
(format #t "~2Tcycle-rot: ~f~%" (-> this cycle-rot))
(format #t "~2Tshots-left: ~D~%" (-> this shots-left))
(format #t "~2Tcocoon-part: ~A~%" (-> this cocoon-part))
(format #t "~2Tcharge-down-part: ~A~%" (-> this charge-down-part))
(format #t "~2Tcharge-up-part: ~A~%" (-> this charge-up-part))
(format #t "~2Tsound-turret-loop-id: ~D~%" (-> this sound-turret-loop-id))
(format #t "~2Tsound-turret-loop: ~A~%" (-> this sound-turret-loop))
(format #t "~2Tpalette-id: ~D~%" (-> this palette-id))
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-cocoon-a nst-cocoon-a nst-cocoon-a-lod0-jg nst-cocoon-a-idle-ja
((nst-cocoon-a-lod0-mg (meters 20)) (nst-cocoon-a-lod1-mg (meters 40)) (nst-cocoon-a-lod2-mg (meters 999999)))
:bounds (static-spherem 0 5 0 10)
)
;; definition for symbol *nst-cocoon-a-enemy-info*, type enemy-info
(define *nst-cocoon-a-enemy-info* (new 'static 'enemy-info
:use-die-falling #f
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #f
:hover-if-no-ground #f
:idle-anim-script (new 'static 'inline-array idle-control-frame 2
(new 'static 'idle-control-frame
:command (idle-control-cmd play)
:anim #x4
:param1 15
:param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0))
)
(new 'static 'idle-control-frame)
)
:idle-anim 4
:notice-anim 4
:hostile-anim 4
:hit-anim 4
:knocked-anim -1
:knocked-land-anim -1
:die-anim 4
:die-falling-anim -1
:victory-anim -1
:jump-wind-up-anim -1
:jump-in-air-anim -1
:jump-land-anim -1
:neck-joint -1
:bullseye-joint 10
:sound-hit (static-sound-name "cocoon-spawn")
:notice-distance (meters 200)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 200)
:default-hit-points 20.0
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:movement-gravity (meters -100)
:friction 0.8
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:knocked-can-land-timeout (seconds 0.1)
:knocked-recover-timeout (seconds 2)
:ragdoll-blend-out-time (seconds 0.25)
:ragdoll-rotate-velocity-mult 1.0
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 2730.6667
:knocked-soft-vxz-lo 72089.6
:knocked-soft-vxz-hi 108134.4
:knocked-soft-vy-lo 81920.0
:knocked-soft-vy-hi 122880.0
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 78643.2
:knocked-hard-vxz-hi 117964.8
:knocked-hard-vy-lo 183500.8
:knocked-hard-vy-hi 209715.2
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 196608.0
:knocked-red-vy-lo 94208.0
:knocked-red-vy-hi 151552.0
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 81920.0
:ragdoll-info #f
:shadow-size (meters 1)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint -1
:gem-offset (new 'static 'sphere :r 163840.0)
:knocked-off #t
)
)
;; failed to figure out what this is:
(set! (-> *nst-cocoon-a-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
;; failed to figure out what this is:
(defskelgroup skel-nst-cocoon-a-explode nst-cocoon-a nst-cocoon-a-explode-lod0-jg nst-cocoon-a-explode-idle-ja
((nst-cocoon-a-explode-lod0-mg (meters 999999)))
:bounds (static-spherem 0 5 0 100)
)
;; definition for symbol *nst-cocoon-a-goop-joints*, type (array int16)
(define *nst-cocoon-a-goop-joints* (new 'static 'boxed-array :type int16 5 6 7 8))
;; definition for symbol *nst-cocoon-a-exploder-params*, type joint-exploder-static-params
(define *nst-cocoon-a-exploder-params*
(new 'static 'joint-exploder-static-params
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
(new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1)
)
:collide-spec (collide-spec backgnd)
)
)
;; failed to figure out what this is:
(defstate notice (nst-cocoon-a)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.075))
(let ((f30-0 (rnd-float-range self 0.8 1.2)))
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
0.0
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim))
:num! (seek! max f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(go-best-state self)
)
)
;; failed to figure out what this is:
(defstate hostile (nst-cocoon-a)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type enemy hostile) enter)))
(if t9-0
(t9-0)
)
)
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self shots-left) (the-as uint 4))
(let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans))))
(quaternion<-rotate-y-vector (-> self dest-quat) (vector+float*! gp-1 gp-1 (-> *target* control transv) 1.5))
)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type enemy hostile) exit)))
(if t9-0
(t9-0)
)
)
(logior! (-> self mask) (process-mask actor-pause))
(sound-stop (-> self sound-turret-loop-id))
)
:trans (behavior ()
(when *target*
(let ((f30-0
(deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle (-> self dest-quat)))
)
)
(cond
((-> self cycling?)
(let ((a1-1 (-> self dest-quat)))
(quaternion-rotate-y! a1-1 a1-1 (-> self cycle-rot))
)
)
((< (fabs f30-0) 728.1778)
(let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)))
(gp-3
(quaternion<-rotate-y-vector
(new 'stack-no-clear 'quaternion)
(vector+float*! gp-2 gp-2 (-> *target* control transv) 1.5)
)
)
)
0.0
(when (< (-> self shots-left) (the-as uint 4))
(let ((f0-5 (* 16384.0 (the float (- 4 (the-as int (-> self shots-left)))))))
(quaternion-rotate-y! gp-3 gp-3 f0-5)
)
)
(quaternion-copy! (-> self dest-quat) gp-3)
(if (< (fabs (deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle gp-3)))
728.1778
)
(set! (-> self can-shoot?) #t)
(set! (-> self can-shoot?) #f)
)
)
)
)
(let ((a1-7 (the int (* 1024.0 (fmin 1.0 (* 0.00036621094 (fabs f30-0)))))))
(seekl! (-> self sound-turret-loop volume) a1-7 51)
)
)
(sound-play-by-spec
(-> self sound-turret-loop)
(-> self sound-turret-loop-id)
(-> self node-list data 4 bone transform trans)
)
(quaternion-smooth-seek!
(-> self turret transform quat)
(-> self turret transform quat)
(-> self dest-quat)
0.15
)
(let* ((gp-4 (-> *nst-cocoon-a-goop-joints* length))
(s5-2 0)
(v1-31 (-> *nst-cocoon-a-goop-joints* s5-2))
)
(while (< s5-2 gp-4)
(spawn-from-cspace (-> self part) (-> self node-list data v1-31))
(+! s5-2 1)
(set! v1-31 (-> *nst-cocoon-a-goop-joints* s5-2))
)
)
)
(if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory))
(go-virtual victory)
)
(if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware))))
(go-stare self)
)
(set! (-> self root penetrated-by) (get-penetrated-by self))
)
:code (behavior ()
(until #f
(cond
((-> self can-shoot?)
(cond
((zero? (-> self shots-left))
(set! (-> self cycling?) #t)
(spawn (-> self charge-up-part) (-> self node-list data 12 bone transform trans))
(set! (-> self cycle-rot) -1820.4445)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.5))
(ja :num! (loop!))
(suspend)
)
)
(set! (-> self cycle-rot) 1820.4445)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.5))
(ja :num! (loop!))
(suspend)
)
)
(set! (-> self cycling?) #f)
(set! (-> self shots-left) (the-as uint 4))
(set! (-> self can-shoot?) #f)
)
(else
(if (= (-> self shots-left) 4)
(spawn (-> self charge-down-part) (-> self node-list data 12 bone transform trans))
)
(when (time-elapsed? (-> self last-attack-time) (seconds 0.6))
(fire-shot! self #t)
(+! (-> self shots-left) -1)
(ja :num! (loop!))
(set-time! (-> self last-attack-time))
)
(set! (-> self can-shoot?) #f)
)
)
)
(else
(if (= (-> self shots-left) 4)
(spawn (-> self cocoon-part) (-> self node-list data 12 bone transform trans))
)
(ja :num! (loop!))
(suspend)
0
)
)
)
#f
)
)
;; failed to figure out what this is:
(defstate stare (nst-cocoon-a)
:virtual #t
:enter (behavior ()
(set! (-> self cycling?) #f)
(set! (-> self can-shoot?) #f)
)
:trans (behavior ()
(quaternion-smooth-seek!
(-> self turret transform quat)
(-> self turret transform quat)
(-> self dest-quat)
0.15
)
(let ((t9-1 (-> (method-of-type enemy stare) trans)))
(if t9-1
(t9-1)
)
)
)
)
;; failed to figure out what this is:
(defstate hit (nst-cocoon-a)
:virtual #t
:enter (behavior ()
(set! (-> self cycling?) #f)
(set! (-> self can-shoot?) #f)
(let ((t9-0 (-> (method-of-type enemy hit) enter)))
(if t9-0
(t9-0)
)
)
)
:trans (behavior ()
(quaternion-smooth-seek!
(-> self turret transform quat)
(-> self turret transform quat)
(-> self dest-quat)
0.15
)
(let* ((gp-0 (-> *nst-cocoon-a-goop-joints* length))
(s5-0 0)
(v1-3 (-> *nst-cocoon-a-goop-joints* s5-0))
)
(while (< s5-0 gp-0)
(spawn-from-cspace (-> self part) (-> self node-list data v1-3))
(+! s5-0 1)
(set! v1-3 (-> *nst-cocoon-a-goop-joints* s5-0))
)
)
(let ((t9-2 (-> (method-of-type enemy hit) trans)))
(if t9-2
(t9-2)
)
)
)
:code (behavior ()
(cond
((logtest? (-> *part-group-id-table* 617 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad))
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 617))
)
(else
(set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad))
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 617))
)
)
(sound-play "cocoon-shriek")
(let ((t9-8 (-> (method-of-type enemy hit) code)))
(if t9-8
((the-as (function none) t9-8))
)
)
)
)
;; failed to figure out what this is:
(defstate die (nst-cocoon-a)
:virtual #t
:enter (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((t9-1 (-> (method-of-type enemy die) enter)))
(if t9-1
(t9-1)
)
)
)
:code (behavior ()
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) (process->ppointer self))
(set! (-> a1-0 num-params) 0)
(set! (-> a1-0 message) 'trigger)
(let ((t9-0 send-event-function)
(v1-2 (-> self alt-actor))
)
(t9-0
(if v1-2
(-> v1-2 extra process)
)
a1-0
)
)
)
(kill-particles (-> self charge-down-part))
(kill-particles (-> self charge-up-part))
(cond
((logtest? (-> *part-group-id-table* 616 flags) (sp-group-flag sp13))
(set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad))
(part-tracker-spawn
part-tracker-subsampler
:to *entity-pool*
:group (-> *part-group-id-table* 616)
:duration (seconds 0.335)
)
)
(else
(set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad))
(part-tracker-spawn
part-tracker
:to *entity-pool*
:group (-> *part-group-id-table* 616)
:duration (seconds 0.335)
)
)
)
(let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
(set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0)
(set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0)
(process-spawn
joint-exploder
(art-group-get-by-name *level* "skel-nst-cocoon-a-explode" (the-as (pointer level) #f))
7
gp-2
*nst-cocoon-a-exploder-params*
:name "joint-exploder"
:to self
:unk 0
)
)
(activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
(sound-play "cocoon-explode")
(suspend)
(cleanup-for-death self)
(send-event self 'death-end)
(if (>= (-> self palette-id) 0)
(set-nstb-lights! (-> self palette-id) 4.0 8.0 #f)
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.5))
(suspend)
)
)
(if (>= (-> self palette-id) 0)
(set-nstb-lights! (-> self palette-id) 0.0 6.0 #f)
)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 0.35))
(suspend)
)
)
(let ((gp-6 (-> self child)))
(while gp-6
(send-event (ppointer->process gp-6) 'notice 'die)
(set! gp-6 (-> gp-6 0 brother))
)
)
(while (-> self child)
(suspend)
)
)
:post (behavior ()
(enemy-common-post self)
)
)
;; definition for method 82 of type nst-cocoon-a
(defmethod event-handler ((this nst-cocoon-a) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(if (not (and (= arg2 'attack) (type? arg0 cocoon-grenade-shot)))
((method-of-type nav-enemy event-handler) (the-as nav-enemy this) arg0 arg1 arg2 arg3)
)
)
;; definition for method 59 of type nst-cocoon-a
(defmethod enemy-common-post ((this nst-cocoon-a))
(let ((f0-1 (/ (-> this hit-points) (-> this enemy-info default-hit-points))))
(set-vector! (-> this draw color-mult) 1.0 f0-1 f0-1 1.0)
)
((method-of-type enemy enemy-common-post) this)
(none)
)
;; definition for method 7 of type nst-cocoon-a
;; WARN: Return type mismatch enemy vs nst-cocoon-a.
(defmethod relocate ((this nst-cocoon-a) (offset int))
(if (nonzero? (-> this cocoon-part))
(&+! (-> this cocoon-part) offset)
)
(if (nonzero? (-> this charge-down-part))
(&+! (-> this charge-down-part) offset)
)
(if (nonzero? (-> this charge-up-part))
(&+! (-> this charge-up-part) offset)
)
(the-as nst-cocoon-a ((method-of-type enemy relocate) this offset))
)
;; definition for method 10 of type nst-cocoon-a
(defmethod deactivate ((this nst-cocoon-a))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this cocoon-part))
(kill-particles (-> this cocoon-part))
)
(if (nonzero? (-> this charge-down-part))
(kill-particles (-> this charge-down-part))
)
(if (nonzero? (-> this charge-up-part))
(kill-particles (-> this charge-up-part))
)
((method-of-type enemy deactivate) this)
(none)
)
;; definition for method 155 of type nst-cocoon-a
;; INFO: Used lq/sq
;; WARN: Return type mismatch sound-id vs none.
(defmethod fire-shot! ((this nst-cocoon-a) (arg0 symbol))
(local-vars (sv-192 int) (sv-208 int) (sv-224 (function vector vector float)))
(let ((s3-0 (new 'stack-no-clear 'traj2d-params))
(s5-0 (new 'stack-no-clear 'vector))
)
0.0
(set! (-> s5-0 quad) (-> this node-list data 5 bone transform fvec quad))
(set! (-> s3-0 initial-tilt) (asin (-> s5-0 y)))
(set! (-> s3-0 gravity) 102400.0)
(let ((f30-0 4095996000.0)
(s1-0 -1)
(s2-0 (new 'stack-no-clear 'projectile-init-by-other-params))
)
(let ((s0-0 (-> *nst-cocoon-a-goop-joints* length)))
(set! sv-192 0)
(set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192))
(while (< sv-192 s0-0)
(set! sv-224 vector-vector-xz-distance)
(let* ((a0-8 (target-pos 0))
(a1-3 (-> this node-list data sv-208 bone transform trans))
(f0-4 (sv-224 a0-8 a1-3))
)
(when (< f0-4 f30-0)
(set! f30-0 f0-4)
(set! s1-0 sv-208)
)
)
(set! sv-192 (+ sv-192 1))
(set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192))
)
)
(vector-! s5-0 (target-pos 0) (-> this node-list data s1-0 bone transform trans))
(let* ((v1-28 s5-0)
(f0-13
(* (- (* (sqrtf (+ (* (-> v1-28 x) (-> v1-28 x)) (* (-> v1-28 z) (-> v1-28 z)))) (tan (-> s3-0 initial-tilt)))
(-> s5-0 y)
)
(/ 2.0 (-> s3-0 gravity))
)
)
)
(when (< 0.0 f0-13)
(let ((f0-14 (sqrtf f0-13)))
(vector+float*! s5-0 s5-0 (-> *target* control transv) f0-14)
)
)
)
(let ((v1-34 s5-0))
(set! (-> s3-0 x) (sqrtf (+ (* (-> v1-34 x) (-> v1-34 x)) (* (-> v1-34 z) (-> v1-34 z)))))
)
(set! (-> s3-0 y) (-> s5-0 y))
(when (traj2d-calc-initial-speed-using-tilt s3-0)
(set! (-> s2-0 ent) (-> this entity))
(set! (-> s2-0 charge) 1.0)
(set! (-> s2-0 options) (projectile-options))
(logclear! (-> s2-0 options) (projectile-options po14 po15 po16))
(set! (-> s2-0 pos quad) (-> this node-list data s1-0 bone transform trans quad))
(set! (-> s2-0 notify-handle) (the-as handle #f))
(set! (-> s2-0 owner-handle) (process->handle this))
(set! (-> s2-0 target-handle) (the-as handle #f))
(set! (-> s2-0 target-pos quad) (the-as uint128 0))
(set! (-> s2-0 ignore-handle) (process->handle this))
(let* ((v1-48 *game-info*)
(a0-30 (+ (-> v1-48 attack-id) 1))
)
(set! (-> v1-48 attack-id) a0-30)
(set! (-> s2-0 attack-id) a0-30)
)
(set! (-> s2-0 timeout) (seconds 4))
(set! (-> s2-0 damage) 10.0)
(logior! (-> s2-0 options) (projectile-options po14))
(set! (-> s2-0 vehicle-damage-factor) 0.333)
(logior! (-> s2-0 options) (projectile-options po15))
(set! (-> s2-0 vehicle-impulse-factor) 1.5)
(logior! (-> s2-0 options) (projectile-options po16))
(set! (-> s5-0 quad) (-> this node-list data s1-0 bone transform fvec quad))
(vector-normalize-copy! (-> s2-0 vel) s5-0 (-> s3-0 initial-speed))
(spawn-projectile cocoon-grenade-shot s2-0 this *default-dead-pool*)
)
)
)
(if arg0
(sound-play "cocoon-fire")
)
(none)
)
;; definition for method 107 of type nst-cocoon-a
(defmethod is-pfoc-in-mesh? ((this nst-cocoon-a) (arg0 process-focusable) (arg1 vector))
(cond
((= (-> this activate-distance) 0.0)
(return #t)
)
(else
(let ((f0-1 (vector-length (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans)))))
(return (and (< 0.0 f0-1) (< f0-1 (-> this activate-distance))))
)
)
)
(the-as symbol 0)
)
;; definition for method 67 of type nst-cocoon-a
(defmethod coin-flip? ((this nst-cocoon-a))
#f
)
;; definition for method 143 of type nst-cocoon-a
(defmethod on-dying ((this nst-cocoon-a))
(when (-> this minimap)
(logior! (-> this minimap flags) (minimap-flag fade-out))
(set! (-> this minimap) #f)
)
((method-of-type enemy on-dying) this)
(none)
)
;; definition for method 120 of type nst-cocoon-a
;; WARN: Return type mismatch int vs none.
(defmethod init-enemy-collision! ((this nst-cocoon-a))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
flut-attack
board
mech-punch
dark-punch
dark-smack
flut
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core action) (collide-action solid no-standon))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 40960.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core action) (collide-action solid no-standon))
(set! (-> v1-13 transform-index) 3)
(set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 12288.0)
)
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-15 prim-core action) (collide-action solid no-standon))
(set! (-> v1-15 transform-index) 3)
(set-vector! (-> v1-15 local-sphere) 0.0 32768.0 0.0 18432.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-18 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 121 of type nst-cocoon-a
;; INFO: Used lq/sq
;; WARN: Return type mismatch connection-minimap vs none.
(defmethod init-enemy! ((this nst-cocoon-a))
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-nst-cocoon-a" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set! (-> this enemy-info) *nst-cocoon-a-enemy-info*)
(init-enemy-defaults! this (-> this enemy-info))
(set! (-> this palette-id)
(res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0)
)
(set! (-> this can-shoot?) #f)
(set! (-> this cycling?) #f)
(let ((v1-9 (-> this skel root-channel 0)))
(set! (-> v1-9 frame-group) (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
)
(ja-post)
(init (-> this turret) this (the-as uint 4) (joint-mod-base-flags attached))
(quaternion-copy! (-> this turret transform quat) (-> this root quat))
(quaternion-copy! (-> this dest-quat) (-> this root quat))
(set! (-> this turret transform trans quad) (-> this root trans quad))
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 615) this))
(set! (-> this cocoon-part) (create-launch-control (-> *part-group-id-table* 612) this))
(set! (-> this charge-down-part) (create-launch-control (-> *part-group-id-table* 613) this))
(set! (-> this charge-up-part) (create-launch-control (-> *part-group-id-table* 614) this))
(set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance))
(set! (-> this root pause-adjust-distance) (-> this activate-distance))
(set! (-> this sound-turret-loop) (static-sound-spec "cocoon-wind-up" :group 0))
(set! (-> this sound-turret-loop-id) (new-sound-id))
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 125) (the-as int #f) (the-as vector #t) 0))
(none)
)
;; definition for method 11 of type nst-cocoon-a
(defmethod init-from-entity! ((this nst-cocoon-a) (arg0 entity-actor))
(stack-size-set! (-> this main-thread) 512)
(set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0))
((method-of-type enemy init-from-entity!) this arg0)
)
;; definition for method 122 of type nst-cocoon-a
(defmethod go-idle2 ((this nst-cocoon-a))
(if (or (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)))
(task-node-closed? (game-task-node nest-eggs-resolution))
)
(go (method-of-object this die-fast))
(go (method-of-object this idle))
)
)
;; definition of type nst-cocoon-b
(deftype nst-cocoon-b (process-drawable)
((sound-amb-loop-id sound-id)
(sound-amb-loop sound-spec)
(gas-sound-id sound-id)
)
(:state-methods
idle
retracting
wait-for-cocoons
releasing-poison
retracted
)
)
;; definition for method 3 of type nst-cocoon-b
(defmethod inspect ((this nst-cocoon-b))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tsound-amb-loop-id: ~D~%" (-> this sound-amb-loop-id))
(format #t "~2Tsound-amb-loop: ~A~%" (-> this sound-amb-loop))
(format #t "~2Tgas-sound-id: ~D~%" (-> this gas-sound-id))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-cocoon-b nst-cocoon-b nst-cocoon-b-lod0-jg nst-cocoon-b-idle-ja
((nst-cocoon-b-lod0-mg (meters 20)) (nst-cocoon-b-lod1-mg (meters 40)) (nst-cocoon-b-lod2-mg (meters 999999)))
:bounds (static-spherem 0 25 0 20)
)
;; failed to figure out what this is:
(defstate idle (nst-cocoon-b)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('trigger)
(go-virtual retracting)
)
)
)
:exit (behavior ()
(sound-stop (-> self sound-amb-loop-id))
)
:code (behavior ()
(until #f
(sound-play-by-spec (-> self sound-amb-loop) (-> self sound-amb-loop-id) (-> self root trans))
(sound-play "cocoon-amb-vox")
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
#f
)
:post ja-post
)
;; failed to figure out what this is:
(defstate retracting (nst-cocoon-b)
:virtual #t
:code (behavior ()
(ja-no-eval :group! nst-cocoon-b-retract-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(go-virtual wait-for-cocoons)
)
:post ja-post
)
;; failed to figure out what this is:
(defstate wait-for-cocoons (nst-cocoon-b)
:virtual #t
:trans (behavior ()
(if (task-node-closed? (game-task-node nest-eggs-resolution))
(go-virtual releasing-poison)
)
)
:code sleep-code
)
;; failed to figure out what this is:
(defstate releasing-poison (nst-cocoon-b)
:virtual #t
:enter (behavior ()
(set! (-> self gas-sound-id) (new-sound-id))
)
:exit (behavior ()
(sound-stop (-> self gas-sound-id))
)
:trans (behavior ()
(if (task-node-closed? (game-task-node nest-eggs-gas))
(go-virtual retracted)
)
)
:code (behavior ()
(ja-channel-set! 1)
(ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0))))
(ja-post)
(sleep-code)
)
:post (behavior ()
(sound-play "nest-gas-fill" :id (-> self gas-sound-id))
(spawn-from-cspace (-> self part) (joint-node nst-cocoon-b-lod0-jg goop))
)
)
;; failed to figure out what this is:
(defstate retracted (nst-cocoon-b)
:virtual #t
:code (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(ja-channel-set! 1)
(ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0))))
(ja-post)
(sleep-code)
)
)
;; definition for method 11 of type nst-cocoon-b
(defmethod init-from-entity! ((this nst-cocoon-b) (arg0 entity-actor))
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-nst-cocoon-b" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set! (-> this sound-amb-loop) (static-sound-spec "cocoon-amb-loop" :group 0))
(set! (-> this sound-amb-loop-id) (new-sound-id))
(set! (-> this root pause-adjust-distance) (res-lump-float (-> this entity) 'distance))
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 633) this))
(cond
((task-node-closed? (game-task-node nest-eggs-gas))
(go (method-of-object this retracted))
)
((task-node-closed? (game-task-node nest-eggs-resolution))
(go (method-of-object this releasing-poison))
)
(else
(go (method-of-object this idle))
)
)
)
;; definition of type nst-light-barrier
(deftype nst-light-barrier (process-focusable)
((pass int32)
(incoming-attack-id uint32)
(next-message-time time-frame)
(message int32)
(plane plane :inline)
(color vector :inline)
(target-pos vector :inline)
)
(:state-methods
idle
)
(:methods
(init-collision! (_type_) none)
(set-proc-mask! (_type_) none)
)
)
;; definition for method 3 of type nst-light-barrier
(defmethod inspect ((this nst-light-barrier))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 this)
)
(format #t "~2Tpass: ~D~%" (-> this pass))
(format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id))
(format #t "~2Tnext-message-time: ~D~%" (-> this next-message-time))
(format #t "~2Tmessage: ~D~%" (-> this message))
(format #t "~2Tplane: #<plane @ #x~X>~%" (-> this plane))
(format #t "~2Tcolor: #<vector @ #x~X>~%" (-> this color))
(format #t "~2Ttarget-pos: #<vector @ #x~X>~%" (-> this target-pos))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-nst-light-barrier nst-light-barrier 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 60.1)
)
;; failed to figure out what this is:
(defstate idle (nst-light-barrier)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('attack)
(let ((v1-1 (the-as object (-> block param 1))))
(when (!= (-> (the-as attack-info v1-1) id) (-> self incoming-attack-id))
(set! (-> self incoming-attack-id) (-> (the-as attack-info v1-1) id))
(let ((gp-0 proc))
(if (type? gp-0 process-drawable)
(empty)
)
)
#f
)
)
)
(('touched)
(let* ((gp-1 proc)
(v1-5 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(when v1-5
(let* ((gp-2 (-> (the-as process-focusable v1-5) root))
(a0-4 (if (type? gp-2 collide-shape)
gp-2
)
)
)
(if (and a0-4 (logtest? (-> a0-4 root-prim prim-core collide-as) (collide-spec jak)))
#f
)
)
)
)
)
)
)
:trans (behavior ()
'()
)
:code (behavior ()
(until #f
(suspend)
)
#f
)
)
;; definition for method 29 of type nst-light-barrier
;; WARN: Return type mismatch int vs none.
(defmethod init-collision! ((this nst-light-barrier))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec crate))
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
(set! (-> v1-6 prim-core action) (collide-action solid rideable))
(set! (-> v1-6 transform-index) 0)
(set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-6)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-9 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
)
(set! (-> this root) s5-0)
)
0
(none)
)
;; definition for method 30 of type nst-light-barrier
;; WARN: Return type mismatch int vs none.
(defmethod set-proc-mask! ((this nst-light-barrier))
(logior! (-> this mask) (process-mask crate))
0
(none)
)
;; definition for method 11 of type nst-light-barrier
;; INFO: Used lq/sq
(defmethod init-from-entity! ((this nst-light-barrier) (arg0 entity-actor))
(let ((s4-0 (new 'process 'trsqv)))
(set! (-> this root) (the-as collide-shape s4-0))
(set! (-> s4-0 trans quad) (-> arg0 extra trans quad))
(quaternion-copy! (-> s4-0 quat) (-> arg0 quat))
(vector-identity! (-> s4-0 scale))
)
(process-drawable-from-entity! this arg0)
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-nst-light-barrier" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set-proc-mask! this)
(ja-post)
(go (method-of-object this idle))
)