;;-*-Lisp-*- (in-package goal) ;; failed to figure out what this is: (defskelgroup skel-drill-control-panel drill-control-panel drill-control-panel-lod0-jg drill-control-panel-idle-ja ((drill-control-panel-lod0-mg (meters 20)) (drill-control-panel-lod1-mg (meters 999999))) :bounds (static-spherem 0.5 0 -2 10.5) :origin-joint-index 26 ) ;; failed to figure out what this is: (defskelgroup skel-drill-control-panel-a drill-control-panel drill-control-panel-a-lod0-jg drill-control-panel-a-idle-ja ((drill-control-panel-a-lod0-mg (meters 20)) (drill-control-panel-a-lod1-mg (meters 999999))) :bounds (static-spherem -0.5 2 -2 10) :origin-joint-index 19 ) ;; definition of type drill-control-panel (deftype drill-control-panel (process-focusable) ((id int8) (idle-sound-id sound-id) (debris-part sparticle-launch-control) (next-warn-time time-frame :offset 224) ) (:state-methods idle (hit symbol) ) (:methods (init-collision! (_type_) none) (init-panel (_type_) none) (spawn-shock-part (_type_) none) (spawn-explode-part (_type_) none) ) ) ;; definition for method 3 of type drill-control-panel (defmethod inspect ((this drill-control-panel)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type process-focusable inspect))) (t9-0 this) ) (format #t "~2Tid: ~D~%" (-> this id)) (format #t "~2Tidle-sound-id: ~D~%" (-> this idle-sound-id)) (format #t "~2Tdebris-part: ~A~%" (-> this debris-part)) (format #t "~2Tstate-time: ~D~%" (-> this state-time)) (format #t "~2Tnext-warn-time: ~D~%" (-> this next-warn-time)) (label cfg-4) this ) ;; definition for method 7 of type drill-control-panel ;; WARN: Return type mismatch process-drawable vs drill-control-panel. (defmethod relocate ((this drill-control-panel) (offset int)) (if (nonzero? (-> this debris-part)) (&+! (-> this debris-part) offset) ) (the-as drill-control-panel ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type drill-control-panel (defmethod deactivate ((this drill-control-panel)) "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (sound-stop (-> this idle-sound-id)) (if (nonzero? (-> this debris-part)) (kill-and-free-particles (-> this debris-part)) ) ((method-of-type process-drawable deactivate) this) (none) ) ;; definition for function spawn-drill-panel-explode ;; WARN: Return type mismatch (pointer process) vs none. (defun spawn-drill-panel-explode ((arg0 drill-control-panel)) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 429) 300 #f #f #f (-> arg0 node-list data 18 bone transform) :to *entity-pool* ) (if (zero? (-> arg0 id)) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 430) 300 #f #f #f (-> arg0 node-list data 50 bone transform) :to *entity-pool* ) ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 431) 300 #f #f #f (-> arg0 node-list data 19 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 21 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 22 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 23 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 24 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 25 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 434) 300 #f #f #f (-> arg0 node-list data 8 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 434) 300 #f #f #f (-> arg0 node-list data 9 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 434) 300 #f #f #f (-> arg0 node-list data 10 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 3 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 4 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 5 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 6 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 7 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 11 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 12 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 13 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 14 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 15 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 16 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 17 bone transform) :to *entity-pool* ) (none) ) ;; definition for function spawn-drill-panel-ab-explode ;; WARN: Return type mismatch (pointer process) vs none. (defun spawn-drill-panel-ab-explode ((arg0 drill-control-panel)) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 429) 300 #f #f #f (-> arg0 node-list data 12 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 431) 300 #f #f #f (-> arg0 node-list data 13 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 14 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 15 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 16 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 17 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 432) 300 #f #f #f (-> arg0 node-list data 18 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 434) 300 #f #f #f (-> arg0 node-list data 3 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 434) 300 #f #f #f (-> arg0 node-list data 4 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 10 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 9 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 8 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 435) 300 #f #f #f (-> arg0 node-list data 11 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 5 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 6 bone transform) :to *entity-pool* ) (process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 433) 300 #f #f #f (-> arg0 node-list data 7 bone transform) :to *entity-pool* ) (none) ) ;; definition for method 32 of type drill-control-panel (defmethod spawn-explode-part ((this drill-control-panel)) "Spawn explosion particles." (let ((v1-0 (-> this id))) (if (or (zero? v1-0) (= v1-0 1)) (spawn-drill-panel-explode this) (spawn-drill-panel-ab-explode this) ) ) (none) ) ;; definition for method 31 of type drill-control-panel (defmethod spawn-shock-part ((this drill-control-panel)) "Spawn shock particles." (let ((v1-0 (-> this id))) (cond ((or (zero? v1-0) (= v1-0 1)) (set! (-> *part-id-table* 1852 init-specs 2 initial-valuef) (* 4096.0 (rand-vu-float-range -4.0 4.0))) (set! (-> *part-id-table* 1852 init-specs 3 initial-valuef) (* 4096.0 (rand-vu-float-range -2.0 2.0))) (set! (-> *part-id-table* 1852 init-specs 4 initial-valuef) (* 4096.0 (rand-vu-float-range 1.0 3.0))) (when (= (-> this id) 1) (set! (-> *part-id-table* 1870 init-specs 3 initial-valuef) 8192.0) (set! (-> *part-id-table* 1869 init-specs 3 initial-valuef) 8192.0) (set! (-> *part-id-table* 1871 init-specs 2 initial-valuef) 8192.0) (set! (-> *part-id-table* 1872 init-specs 2 initial-valuef) 8192.0) (set! (-> *part-id-table* 1873 init-specs 2 initial-valuef) 8192.0) (when (>= (current-time) (-> this next-warn-time)) (set! (-> this next-warn-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.0 2.0))))) (set! (-> *part-id-table* 1851 init-specs 4 initial-valuef) -4096.0) (set! (-> *part-id-table* 1851 init-specs 24 initial-valuef) (* 182.04445 (rand-vu-float-range -45.0 45.0))) (set! (-> *part-id-table* 1851 init-specs 25 initial-valuef) (* 182.04445 (rand-vu-float-range 0.0 45.0))) (set! (-> *part-id-table* 1851 init-specs 2 initial-valuef) (* 4096.0 (rand-vu-float-range -3.0 3.0))) (set! (-> *part-id-table* 1851 init-specs 3 initial-valuef) (* 4096.0 (rand-vu-float-range -1.0 3.0))) ) ) (spawn-with-cspace (-> this debris-part) (-> this node-list data 18)) ) (else (case (-> this id) ((3 5 7 8) (if (zero? (rand-vu-int-count 2)) (process-drawable-shock-effect this (new 'static 'lightning-spec :name #f :flags (lightning-spec-flags lsf0) :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) :fade-start-factor 0.2 :texture (new 'static 'texture-id :index #x83 :page #xc) :reduction 0.42 :num-points 16 :box-size 16384.0 :merge-factor 0.5 :merge-count 2 :radius 2048.0 :duration 30.0 :sound (static-sound-spec "shock" :volume 50.0) ) lightning-probe-callback (-> *part-id-table* 166) 12 0 12288.0 ) ) ) (else 0 ) ) (set! (-> *part-id-table* 1852 init-specs 2 initial-valuef) (* 4096.0 (rand-vu-float-range -1.0 3.0))) (set! (-> *part-id-table* 1852 init-specs 3 initial-valuef) (* 4096.0 (rand-vu-float-range -0.5 3.0))) (set! (-> *part-id-table* 1852 init-specs 4 initial-valuef) (* 4096.0 (rand-vu-float-range -1.0 -1.25))) (set! (-> *part-id-table* 1870 init-specs 3 initial-valuef) -6144.0) (set! (-> *part-id-table* 1869 init-specs 3 initial-valuef) -6144.0) (set! (-> *part-id-table* 1871 init-specs 2 initial-valuef) -6144.0) (set! (-> *part-id-table* 1872 init-specs 2 initial-valuef) -6144.0) (set! (-> *part-id-table* 1873 init-specs 2 initial-valuef) -6144.0) (when (>= (current-time) (-> this next-warn-time)) (set! (-> this next-warn-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.5 3.0))))) (set! (-> *part-id-table* 1851 init-specs 4 initial-valuef) 4096.0) (set! (-> *part-id-table* 1879 init-specs 23 initial-valuef) (* 182.04445 (rand-vu-float-range -30.0 30.0))) (set! (-> *part-id-table* 1879 init-specs 2 initial-valuef) (* 4096.0 (rand-vu-float-range -1.5 1.5))) (set! (-> *part-id-table* 1879 init-specs 3 initial-valuef) (* 4096.0 (rand-vu-float-range -1.0 3.0))) ) (spawn-with-cspace (-> this debris-part) (-> this node-list data 12)) ) ) ) (none) ) ;; failed to figure out what this is: (defstate hit (drill-control-panel) :virtual #t :enter (behavior ((arg0 symbol)) (set-time! (-> self state-time)) (set-time! (-> self next-warn-time)) (process-entity-status! self (entity-perm-status bit-12) #t) (set! (-> self draw force-lod) 0) (logior! (-> self focus-status) (focus-status disable dead ignore)) (when (not arg0) (send-event (ppointer->process *drill-mech-master*) 'drill-control-panel (-> self id)) (sound-play "crush-console") ) ) :trans (behavior () (if (time-elapsed? (-> self state-time) (seconds 1)) (spawn-shock-part self) ) ) :code (behavior ((arg0 symbol)) (when (not arg0) (spawn-explode-part self) (ja-no-eval :group! (get-art-by-name (-> self draw art-group) "break" art-joint-anim) :num! (seek!) :frame-num 0.0 ) (until (ja-done? 0) (transform-post) (suspend) (ja :num! (seek!)) ) ) (ja :group! (get-art-by-name (-> self draw art-group) "break" art-joint-anim) :num! max) (transform-post) (sleep-code) ) ) ;; failed to figure out what this is: (defstate idle (drill-control-panel) :virtual #t :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (case message (('attack) (case (-> (the-as attack-info (-> block param 1)) mode) (('mech-punch 'crush) (go-virtual hit #f) ) ) ) ) ) :enter (behavior () (when (= (level-status *level* 'drillmtn) 'active) (let ((a2-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> self root trans))))) (if (= (-> self type) drill-control-panel) (mech-target-spawn (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :y 18841.6 :z -2048.0 :w 1.0) a2-0) self (-> self root quat) (the-as entity-actor (entity-by-name "mech-5")) ) (mech-target-spawn (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :y 18841.6 :z -10240.0 :w 1.0) a2-0) self (-> self root quat) (the-as entity-actor (entity-by-name "mech-5")) ) ) ) ) ) :exit (behavior () (sound-stop (-> self idle-sound-id)) (while (-> self child) (deactivate (-> self child 0)) ) ) :code sleep-code :post (behavior () (spawn-with-cspace (-> self part) (the-as cspace (-> self node-list data))) (sound-play "small-panel" :id (-> self idle-sound-id)) ) ) ;; definition for method 29 of type drill-control-panel ;; WARN: Return type mismatch int vs none. (defmethod init-collision! ((this drill-control-panel)) "Define the collision for the panel." (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 camera-blocker)) (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) 26) (set-vector! (-> v1-6 local-sphere) 0.0 49152.0 0.0 155648.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 drill-control-panel ;; WARN: Return type mismatch int vs none. (defmethod init-panel ((this drill-control-panel)) "Init some parameters for the panel." (set! (-> this idle-sound-id) (new-sound-id)) (logior! (-> this mask) (process-mask crate)) (set! (-> this id) (res-lump-value (-> this entity) 'extra-id int :time -1000000000.0)) 0 (none) ) ;; definition for method 11 of type drill-control-panel ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-control-panel) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. This commonly includes things such as: - stack size - collision information - loading the skeleton group / bones - sounds" (init-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-drill-control-panel" (the-as (pointer uint32) #f)) ) (the-as pair 0) ) (init-panel this) (transform-post) (set! (-> this part) (create-launch-control (-> *part-group-id-table* 427) this)) (if (zero? (-> this id)) (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 436) this)) (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 437) this)) ) (if (task-node-closed? (game-task-node drill-mech-smash-consoles)) (process-entity-status! this (entity-perm-status bit-12) #t) ) (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status bit-12))) (go (method-of-object this hit) #t) (go (method-of-object this idle)) ) (none) ) ;; definition of type drill-control-panel-a (deftype drill-control-panel-a (drill-control-panel) () ) ;; definition for method 3 of type drill-control-panel-a (defmethod inspect ((this drill-control-panel-a)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type drill-control-panel inspect))) (t9-0 this) ) (label cfg-4) this ) ;; definition for method 11 of type drill-control-panel-a ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-control-panel-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. This commonly includes things such as: - stack size - collision information - loading the skeleton group / bones - sounds" (init-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-drill-control-panel-a" (the-as (pointer uint32) #f)) ) (the-as pair 0) ) (set! (-> this root root-prim transform-index) (the-as int (-> this draw origin-joint-index))) (init-panel this) (set! (-> this draw force-lod) 1) (transform-post) (set! (-> this part) (create-launch-control (-> *part-group-id-table* 428) this)) (case (-> this id) ((3 6 8) (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 438) this)) ) ((5 9) (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 440) this)) ) ((7) (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 441) this)) ) (else (set! (-> this debris-part) (create-launch-control (-> *part-group-id-table* 439) this)) ) ) (if (task-node-closed? (game-task-node drill-mech-smash-consoles)) (process-entity-status! this (entity-perm-status bit-12) #t) ) (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status bit-12))) (go (method-of-object this hit) #t) (go (method-of-object this idle)) ) (none) ) ;; failed to figure out what this is: (defstate hit (drill-control-panel-a) :virtual #t :code (behavior ((arg0 symbol)) (when (not arg0) (spawn-explode-part self) (ja-no-eval :group! drill-control-panel-a-break-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (transform-post) (suspend) (ja :num! (seek!)) ) ) (ja :group! drill-control-panel-a-break-ja :num! max) (transform-post) (sleep-code) ) ) ;; definition of type drill-control-panel-b (deftype drill-control-panel-b (drill-control-panel-a) () ) ;; definition for method 3 of type drill-control-panel-b (defmethod inspect ((this drill-control-panel-b)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type drill-control-panel-a inspect))) (t9-0 this) ) (label cfg-4) this ) ;; failed to figure out what this is: 0