mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 10:34:30 -04:00
940 lines
31 KiB
Common Lisp
Vendored
Generated
940 lines
31 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 863
|
|
:init-specs ((:texture (gun-enemy-beam level-default-sprite))
|
|
(:birth-func 'birth-func-set-quat)
|
|
(:num 1.0)
|
|
(:scale-x (meters 0.25))
|
|
(:scale-y (meters 12))
|
|
(:r 128.0)
|
|
(:g 128.0)
|
|
(:b 128.0)
|
|
(:a 32.0 64.0)
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 864
|
|
:init-specs ((:texture (glow-soft level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 3))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0)
|
|
(:g 0.0)
|
|
(:b 128.0)
|
|
(:a 64.0)
|
|
(:scalevel-x (meters -0.075))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-a -1.6)
|
|
(:timer (seconds 0.135))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 865
|
|
:init-specs ((:texture (radial-gradient level-default-sprite))
|
|
(:num 16.0)
|
|
(:z (meters 0) (meters -2))
|
|
(:scale-x (meters 0.5) (meters 0.5))
|
|
(:rot-z (degrees 0) (degrees 3600))
|
|
(:scale-y (meters 0.5) (meters 0.5))
|
|
(:r 128.0)
|
|
(:g 128.0)
|
|
(:b 128.0)
|
|
(:a 64.0)
|
|
(:fade-g -3.2 -6.4)
|
|
(:fade-a -1.6 -6.4)
|
|
(:accel-y (meters -0.00016666666) (meters -0.00016666666))
|
|
(:timer (seconds 0.267))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
|
(:rotate-y (degrees 0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 866
|
|
:init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite))
|
|
(:birth-func 'birth-func-set-quat)
|
|
(:num 1.0)
|
|
(:scale-x (meters 2))
|
|
(:scale-y (meters 4.5))
|
|
(:r 128.0)
|
|
(:g 128.0)
|
|
(:b 128.0)
|
|
(:a 128.0)
|
|
(:fade-a -3.6571429)
|
|
(:timer (seconds 0.117))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 867
|
|
:init-specs ((:texture (glow level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 2))
|
|
(:rot-x (degrees 4.5))
|
|
(:rot-z (degrees 0) (degrees 3600))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0)
|
|
(:g 0.0 64.0)
|
|
(:b 128.0)
|
|
(:a 255.0)
|
|
(:omega (degrees 4515.75))
|
|
(:scalevel-x (meters 0.10666667))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-a -7.285714)
|
|
(:timer (seconds 0.117))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
|
|
(:userdata 1024.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-metalhead-shot-hit
|
|
:id 214
|
|
:duration (seconds 1)
|
|
:flags (sp0)
|
|
:bounds (static-bspherem 0 0 0 8)
|
|
:parts ((sp-item 868 :period (seconds 2) :length (seconds 0.017))
|
|
(sp-item 869 :fade-after (meters 100) :flags (sp6) :period (seconds 2) :length (seconds 0.017))
|
|
(sp-item 870 :flags (sp6) :period (seconds 2) :length (seconds 0.017))
|
|
(sp-item 871 :flags (sp6) :period (seconds 2) :length (seconds 0.017))
|
|
(sp-item 872 :period (seconds 2) :length (seconds 0.017))
|
|
(sp-item 873 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 871
|
|
:init-specs ((:texture (explosion-nebula level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 1))
|
|
(:rot-x (degrees 1.125))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 0.0 128.0)
|
|
(:b 255.0)
|
|
(:a 12.0)
|
|
(:scalevel-x (meters 0.26666668))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-a -0.34285715)
|
|
(:timer (seconds 0.135))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 4096.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 872
|
|
:init-specs ((:texture (bigpuff level-default-sprite))
|
|
(:num 8.0 8.0)
|
|
(:scale-x (meters 1) (meters 0.5))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0 128.0)
|
|
(:g 0.0 64.0)
|
|
(:b 128.0 128.0)
|
|
(:a 16.0 48.0)
|
|
(:vel-y (meters 0.013333334) (meters 0.04))
|
|
(:scalevel-x (meters 0.0016666667) (meters 0.013333334))
|
|
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-r -0.30476192)
|
|
(:fade-g -0.35555556)
|
|
(:fade-b -0.17777778)
|
|
(:fade-a -0.15238096)
|
|
(:accel-y (meters -0.00016666666) (meters -0.00016666666))
|
|
(:friction 0.9)
|
|
(:timer (seconds 1.4))
|
|
(:flags (sp-cpuinfo-flag-2))
|
|
(:conerot-x (degrees 0) (degrees 3600))
|
|
(:conerot-y (degrees 0) (degrees 3600))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 873
|
|
:init-specs ((:texture (radial-gradient level-default-sprite))
|
|
(:num 20.0 10.0)
|
|
(:y (meters 0.25))
|
|
(:scale-x (meters 0.075) (meters 0.05))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0)
|
|
(:g 0.0 128.0)
|
|
(:b 128.0)
|
|
(:a 64.0 32.0)
|
|
(:omega (degrees 0.0225) (degrees 0.0225))
|
|
(:vel-y (meters 0.033333335) (meters 0.1))
|
|
(:rotvel-z (degrees -2.4) 1 (degrees 4.8))
|
|
(:fade-g -0.85333335)
|
|
(:fade-a 0.0)
|
|
(:accel-y (meters -0.00033333333) (meters -0.0013333333))
|
|
(:friction 0.9 0.02)
|
|
(:timer (seconds 0.5))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
|
(:func 'sparticle-motion-blur)
|
|
(:next-time (seconds 0.335))
|
|
(:next-launcher 874)
|
|
(:conerot-x (degrees 0) (degrees 360))
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 874
|
|
:init-specs ((:fade-a -0.48 -0.48))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 869
|
|
:init-specs ((:texture (glow level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 4))
|
|
(:rot-x (degrees 4.5))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 128.0)
|
|
(:b 128.0 128.0)
|
|
(:a 128.0)
|
|
(:rotvel-z (degrees -0.1))
|
|
(:fade-a -1.6)
|
|
(:timer (seconds 0.267))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
|
|
(:userdata -4096.0)
|
|
(:next-launcher 875)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 875
|
|
:init-specs ((:scale-x (meters 2) (meters 0.5))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 0.0 64.0)
|
|
(:b 128.0 128.0)
|
|
(:next-time (seconds 0.017))
|
|
(:next-launcher 875)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 870
|
|
:init-specs ((:texture (glow level-default-sprite))
|
|
(:num 2.0)
|
|
(:scale-x (meters 1))
|
|
(:rot-x (degrees 4.5))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 0.0 64.0)
|
|
(:b 128.0 128.0)
|
|
(:a 48.0)
|
|
(:scalevel-x (meters 0.12857144))
|
|
(:rotvel-z (degrees -0.3) (degrees 0.6))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-g -2.1333334)
|
|
(:fade-b -2.1333334)
|
|
(:timer (seconds 0.267))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow))
|
|
(:userdata -4096.0)
|
|
(:next-time (seconds 0.067))
|
|
(:next-launcher 876)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 876
|
|
:init-specs ((:scale-x (meters 4.5))
|
|
(:scale-y :copy scale-x)
|
|
(:scalevel-x (meters -0.06666667))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-g -0.53333336)
|
|
(:fade-a -0.8)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 868
|
|
:init-specs ((:texture (glow level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 1))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 255.0)
|
|
(:b 255.0)
|
|
(:a 96.0)
|
|
(:scalevel-x (meters 0.16666667))
|
|
(:rotvel-z (degrees 0.3))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:timer (seconds 0.185))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
|
(:next-time (seconds 0.05))
|
|
(:next-launcher 877)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 877
|
|
:init-specs ((:scale-x (meters 3.5))
|
|
(:scale-y :copy scale-x)
|
|
(:scalevel-x (meters -0.0875))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-b -6.4)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-metalhead-shot-die
|
|
:id 215
|
|
:duration (seconds 0.017)
|
|
:flags (sp0)
|
|
:bounds (static-bspherem 0 0 0 8)
|
|
:parts ((sp-item 249))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 878
|
|
:init-specs ((:texture (glow-soft level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 2.5))
|
|
(:rot-x (degrees 2.25))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 192.0)
|
|
(:b 64.0)
|
|
(:a 16.0)
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 819.2)
|
|
)
|
|
)
|
|
|
|
;; definition of type metalhead-shot
|
|
(deftype metalhead-shot (projectile)
|
|
((tail-pos vector :inline)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type metalhead-shot
|
|
(defmethod inspect ((this metalhead-shot))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type projectile inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Ttail-pos: #<vector @ #x~X>~%" (-> this tail-pos))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 24 of type metalhead-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod projectile-method-24 ((this metalhead-shot))
|
|
(draw-beam (-> *part-id-table* 866) (-> this tail-pos) (-> this starting-dir) #f)
|
|
(let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0))
|
|
(v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3))
|
|
(t9-2 sp-launch-particles-var)
|
|
(a0-4 *sp-particle-system-2d*)
|
|
(a1-4 (-> *part-id-table* 867))
|
|
(a2-2 *launch-matrix*)
|
|
)
|
|
(vector-copy! (-> a2-2 trans) v1-2)
|
|
(t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 25 of type metalhead-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod projectile-method-25 ((this metalhead-shot))
|
|
(let* ((gp-0 (-> this root trans))
|
|
(a1-0 (-> this tail-pos))
|
|
(s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0))
|
|
(f30-0 (vector-length s5-1))
|
|
)
|
|
(let ((s4-1 (vector+*! (new 'stack-no-clear 'vector) a1-0 s5-1 0.8)))
|
|
(let ((f28-0 (-> *part-id-table* 863 init-specs 4 initial-valuef)))
|
|
(set! (-> *part-id-table* 863 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1)))
|
|
(draw-beam (-> *part-id-table* 863) a1-0 s5-1 #f)
|
|
(set! (-> *part-id-table* 863 init-specs 4 initial-valuef) f28-0)
|
|
)
|
|
(vector-normalize! s5-1 1.0)
|
|
(launch-particles (-> *part-id-table* 864) s4-1)
|
|
)
|
|
(let ((s4-2 (new 'stack-no-clear 'matrix))
|
|
(f26-0 (/ f30-0 (meters 12)))
|
|
(f30-1 (-> *part-id-table* 865 init-specs 3 initial-valuef))
|
|
(f28-1 (-> *part-id-table* 865 init-specs 5 initial-valuef))
|
|
)
|
|
(forward-up->inv-matrix s4-2 s5-1 *up-vector*)
|
|
(vector-copy! (-> s4-2 trans) gp-0)
|
|
(set! (-> *part-id-table* 865 init-specs 3 initial-valuef) (* f26-0 f30-1))
|
|
(set! (-> *part-id-table* 865 init-specs 5 initial-valuef) (* f26-0 f28-1))
|
|
(launch-particles (-> *part-id-table* 865) s4-2 :origin-is-matrix #t)
|
|
(set! (-> *part-id-table* 865 init-specs 3 initial-valuef) f30-1)
|
|
(set! (-> *part-id-table* 865 init-specs 5 initial-valuef) f28-1)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 26 of type metalhead-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod projectile-method-26 ((this metalhead-shot))
|
|
(let* ((gp-0 (-> this root))
|
|
(a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0))
|
|
(v1-2 (new 'stack-no-clear 'vector))
|
|
)
|
|
(vector-copy! v1-2 (-> gp-0 trans))
|
|
(vector+! v1-2 v1-2 a0-3)
|
|
(cond
|
|
((logtest? (-> group-metalhead-shot-hit flags) (sp-group-flag sp13))
|
|
(vector-copy! (-> *launch-matrix* trans) v1-2)
|
|
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group group-metalhead-shot-hit)
|
|
)
|
|
(else
|
|
(vector-copy! (-> *launch-matrix* trans) v1-2)
|
|
(part-tracker-spawn part-tracker :to *entity-pool* :group group-metalhead-shot-hit)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 28 of type metalhead-shot
|
|
;; WARN: Return type mismatch sound-id vs none.
|
|
(defmethod play-impact-sound ((this metalhead-shot) (arg0 projectile-options))
|
|
(with-pp
|
|
(case arg0
|
|
(((projectile-options po0 po1))
|
|
(when (nonzero? (-> this sound-id))
|
|
(when *sound-player-enable*
|
|
(let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
|
|
(set! (-> gp-0 command) (sound-command set-param))
|
|
(set! (-> gp-0 id) (-> this sound-id))
|
|
(let ((a1-1 (-> this root trans)))
|
|
(let ((s5-1 pp))
|
|
(when (= a1-1 #t)
|
|
(if (and s5-1 (type? s5-1 process-drawable) (nonzero? (-> (the-as process-drawable s5-1) root)))
|
|
(set! a1-1 (-> (the-as process-drawable s5-1) root trans))
|
|
(set! a1-1 (the-as vector #f))
|
|
)
|
|
)
|
|
)
|
|
(sound-trans-convert (-> gp-0 params trans) a1-1)
|
|
)
|
|
(set! (-> gp-0 params mask) (the-as uint 32))
|
|
(-> gp-0 id)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for function metalhead-shot-move
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun metalhead-shot-move ((arg0 metalhead-shot))
|
|
(projectile-move-fill-line-sphere arg0)
|
|
(let ((s5-0 (-> arg0 root)))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
|
(vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans))
|
|
(let ((f0-0 (vector-length s4-0)))
|
|
(when (< 49152.0 f0-0)
|
|
(vector-normalize! s4-0 49152.0)
|
|
(vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0)
|
|
)
|
|
)
|
|
)
|
|
(if (logtest? (-> s5-0 status) (collide-status touch-surface))
|
|
(go (method-of-object arg0 impact))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 30 of type metalhead-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod setup-collision! ((this metalhead-shot))
|
|
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
|
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
|
(set! (-> s5-0 reaction)
|
|
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
|
|
)
|
|
(set! (-> s5-0 no-reaction)
|
|
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
|
)
|
|
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
|
|
(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 projectile))
|
|
(set! (-> s4-0 prim-core collide-with)
|
|
(collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list)
|
|
)
|
|
(set! (-> s4-0 prim-core action) (collide-action solid))
|
|
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 819.2)
|
|
(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 projectile))
|
|
(set! (-> v1-13 prim-core collide-with)
|
|
(collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list)
|
|
)
|
|
(set! (-> v1-13 prim-core action) (collide-action solid deadly))
|
|
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2)
|
|
)
|
|
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-15 prim-core collide-as) (collide-spec projectile))
|
|
(set! (-> v1-15 prim-core collide-with)
|
|
(collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list)
|
|
)
|
|
(set! (-> v1-15 prim-core action) (collide-action deadly))
|
|
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6)
|
|
)
|
|
(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! (-> s5-0 max-iteration-count) (the-as uint 1))
|
|
(set! (-> s5-0 event-self) 'touched)
|
|
(set! (-> this root) s5-0)
|
|
)
|
|
(set! (-> this root pat-ignore-mask)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 31 of type metalhead-shot
|
|
;; INFO: Used lq/sq
|
|
(defmethod init-proj-settings! ((this metalhead-shot))
|
|
(vector-copy! (-> this tail-pos) (-> this root trans))
|
|
(set! (-> this attack-mode) 'metalhead-shot)
|
|
(set! (-> this max-speed) 532480.0)
|
|
(set! (-> this move) metalhead-shot-move)
|
|
(set! (-> this timeout) (seconds 0.767))
|
|
(set-gravity-length (-> this root dynam) 573440.0)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function spawn-metalhead-projectile
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-shot).
|
|
(defun spawn-metalhead-projectile ((arg0 metalhead-shot) (arg1 vector) (arg2 vector) (arg3 float))
|
|
(let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
|
(let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1)))
|
|
(set! (-> gp-0 ent) (-> arg0 entity))
|
|
(set! (-> gp-0 charge) 1.0)
|
|
(set! (-> gp-0 options) (projectile-options))
|
|
(logclear! (-> gp-0 options) (projectile-options po14 po15 po16))
|
|
(set! (-> gp-0 notify-handle) (process->handle arg0))
|
|
(set! (-> gp-0 owner-handle) (the-as handle #f))
|
|
(set! (-> gp-0 target-handle) (the-as handle #f))
|
|
(set! (-> gp-0 target-pos quad) (the-as uint128 0))
|
|
(set! (-> gp-0 ignore-handle) (process->handle arg0))
|
|
(let* ((a0-13 *game-info*)
|
|
(a2-12 (+ (-> a0-13 attack-id) 1))
|
|
)
|
|
(set! (-> a0-13 attack-id) a2-12)
|
|
(set! (-> gp-0 attack-id) a2-12)
|
|
)
|
|
(set! (-> gp-0 timeout) (seconds 4))
|
|
(vector-copy! (-> gp-0 pos) arg1)
|
|
(vector-normalize-copy! (-> gp-0 vel) v1-1 arg3)
|
|
)
|
|
(the-as (pointer metalhead-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-metalhead-grenade-shot
|
|
:id 216
|
|
:duration (seconds 0.5)
|
|
:flags (sp0)
|
|
:bounds (static-bspherem 0 0 0 4)
|
|
:parts ((sp-item 879) (sp-item 880) (sp-item 881))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 879
|
|
:init-specs ((:texture (glow level-default-sprite))
|
|
(:num 1.0)
|
|
(:scale-x (meters 3) (meters 1))
|
|
(:rot-x (degrees 2.25))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 255.0)
|
|
(:b 255.0)
|
|
(:a 64.0)
|
|
(:fade-r -5.5)
|
|
(:fade-g -51.0)
|
|
(:fade-b -5.5)
|
|
(:fade-a -8.533334)
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
|
|
(:userdata 409.6)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 880
|
|
:init-specs ((:texture (radial-gradient level-default-sprite))
|
|
(:num 4.0)
|
|
(:scale-x (meters 1) (meters 0.2))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 255.0)
|
|
(:b 255.0)
|
|
(:a 128.0)
|
|
(:scalevel-x (meters -0.01))
|
|
(:rotvel-z (degrees -1.2) (degrees 1.2))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-r -1.375)
|
|
(:fade-g -6.375)
|
|
(:fade-b -1.375)
|
|
(:fade-a -3.2 -3.2)
|
|
(:timer (seconds 0.135))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
|
(:conerot-x (degrees 0) (degrees 360))
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
(:conerot-radius (meters 0) (meters 0.2))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 881
|
|
:init-specs ((:texture (radial-gradient level-default-sprite))
|
|
(:num 2.0 1.0)
|
|
(:scale-x (meters 0.8) (meters 0.4))
|
|
(:scale-y (meters 0.6) (meters 0.2))
|
|
(:r 255.0)
|
|
(:g 255.0)
|
|
(:b 255.0)
|
|
(:a 64.0 32.0)
|
|
(:scalevel-x (meters -0.0026666666) (meters -0.0026666666))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-r -0.73333335)
|
|
(:fade-g -3.4)
|
|
(:fade-b -0.73333335)
|
|
(:accel-y (meters -0.00033333333) (meters -0.001))
|
|
(:timer (seconds 1))
|
|
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
|
|
(:next-time (seconds 0.25))
|
|
(:next-launcher 882)
|
|
(:conerot-x (degrees 0) (degrees 360))
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
(:conerot-radius (meters 0) (meters 0.35))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 882
|
|
:init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48))
|
|
)
|
|
|
|
;; definition of type metalhead-grenade-shot
|
|
(deftype metalhead-grenade-shot (projectile)
|
|
((tumble-quat quaternion :inline)
|
|
(blast-radius float)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type metalhead-grenade-shot
|
|
(defmethod inspect ((this metalhead-grenade-shot))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type projectile inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Ttumble-quat: #<quaternion @ #x~X>~%" (-> this tumble-quat))
|
|
(format #t "~2Tblast-radius: ~f~%" (-> this blast-radius))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type metalhead-grenade-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod projectile-method-26 ((this metalhead-grenade-shot))
|
|
(cond
|
|
((logtest? (-> group-gun-dark-shot-hit flags) (sp-group-flag sp13))
|
|
(vector-copy! (-> *launch-matrix* trans) (-> this root trans))
|
|
(part-tracker-spawn part-tracker-subsampler :to this :group group-gun-dark-shot-hit)
|
|
)
|
|
(else
|
|
(vector-copy! (-> *launch-matrix* trans) (-> this root trans))
|
|
(part-tracker-spawn part-tracker :to this :group group-gun-dark-shot-hit)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 28 of type metalhead-grenade-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod play-impact-sound ((this metalhead-grenade-shot) (arg0 projectile-options))
|
|
(let ((v1-0 arg0))
|
|
(cond
|
|
((zero? v1-0)
|
|
(sound-play "gren-launch")
|
|
)
|
|
((= v1-0 (projectile-options po0))
|
|
(sound-play "gren-shot-hit")
|
|
)
|
|
((= v1-0 (projectile-options po0 po1))
|
|
(sound-play-by-name
|
|
(static-sound-name "gren-missile")
|
|
(-> this sound-id)
|
|
1024
|
|
(the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv))))
|
|
0
|
|
(sound-group)
|
|
(-> this root trans)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate impact (metalhead-grenade-shot)
|
|
:virtual #t
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('touched)
|
|
(let ((v1-1 (the-as process-focusable (as-type proc process-drawable))))
|
|
(when v1-1
|
|
(let ((s4-1 (-> v1-1 root))
|
|
(a1-3 (new 'stack 'collide-query))
|
|
)
|
|
0.0
|
|
(vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere))
|
|
(vector-! (-> a1-3 move-dist) (-> s4-1 root-prim prim-core world-sphere) (-> a1-3 start-pos))
|
|
(let ((v1-6 a1-3))
|
|
(set! (-> v1-6 radius) 40.96)
|
|
(set! (-> v1-6 collide-with) (collide-spec backgnd))
|
|
(set! (-> v1-6 ignore-process0) self)
|
|
(set! (-> v1-6 ignore-process1) (ppointer->process (-> self parent)))
|
|
(set! (-> v1-6 ignore-pat) (-> self root pat-ignore-mask))
|
|
(set! (-> v1-6 action-mask) (collide-action solid))
|
|
)
|
|
(when (< (fill-and-probe-using-line-sphere *collide-cache* a1-3) 0.0)
|
|
(deal-damage! self proc (the-as event-message-block (-> block param 0)))
|
|
(let ((v1-11 (-> self notify-handle)))
|
|
(if (handle->process v1-11)
|
|
(send-event (-> v1-11 process 0) 'notify 'attack proc)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:enter (behavior ()
|
|
(let ((t9-0 (-> (method-of-type projectile impact) enter)))
|
|
(if t9-0
|
|
(t9-0)
|
|
)
|
|
)
|
|
(let ((v1-5 (-> self root root-prim)))
|
|
(set! (-> v1-5 local-sphere w) (-> self blast-radius))
|
|
(set! (-> v1-5 prim-core world-sphere w) (-> self blast-radius))
|
|
(set! (-> v1-5 prim-core collide-with)
|
|
(collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list)
|
|
)
|
|
(set! (-> v1-5 prim-core collide-as) (collide-spec enemy))
|
|
)
|
|
(update-transforms (-> self root))
|
|
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
|
(set! (-> a1-0 options) (overlaps-others-options))
|
|
(set! (-> a1-0 collide-with-filter) (the-as collide-spec -1))
|
|
(set! (-> a1-0 tlist) *touching-list*)
|
|
(find-overlapping-shapes (-> self root) a1-0)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(suspend)
|
|
(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
|
|
(while (-> self child)
|
|
(suspend)
|
|
)
|
|
(deactivate self)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate dissipate (metalhead-grenade-shot)
|
|
:virtual #t
|
|
:enter (behavior ()
|
|
(go-virtual impact)
|
|
)
|
|
)
|
|
|
|
;; definition for method 25 of type metalhead-grenade-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod projectile-method-25 ((this metalhead-grenade-shot))
|
|
(spawn (-> this part) (-> this root trans))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function gren-canister-move
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun gren-canister-move ((arg0 metalhead-grenade-shot))
|
|
(quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> arg0 tumble-quat))
|
|
(projectile-move-fill-all-dirs arg0)
|
|
(let ((s5-0 (new 'stack-no-clear 'water-info)))
|
|
(water-info-init! (-> arg0 root) s5-0 (collide-action solid semi-solid))
|
|
(if (and (logtest? (-> s5-0 flags) (water-flag active)) (< (-> arg0 root trans y) (-> s5-0 trans y)))
|
|
(go (method-of-object arg0 impact))
|
|
)
|
|
)
|
|
(if (logtest? (-> arg0 root status) (collide-status touch-surface))
|
|
(go (method-of-object arg0 impact))
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function gren-cshape-reaction-canister
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun gren-cshape-reaction-canister ((arg0 collide-shape-moving) (arg1 metalhead-grenade-shot))
|
|
(let ((s5-0 0))
|
|
(let ((a1-1 (new 'stack-no-clear 'vector)))
|
|
(vector-float*! a1-1 (the-as vector (&-> arg1 starting-dir y)) (the-as float (-> arg1 connection-list prev0)))
|
|
(move-by-vector! arg0 a1-1)
|
|
)
|
|
(let ((f30-0 (vector-dot (-> arg0 transv) (the-as vector (&-> arg1 prev-state))))
|
|
(s3-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(vector-float*! s3-0 (the-as vector (&-> arg1 prev-state)) (* f30-0 (rand-vu-float-range 1.6 2.2)))
|
|
(vector-! (-> arg0 transv) (-> arg0 transv) s3-0)
|
|
)
|
|
(let ((v0-2 (logior s5-0 7)))
|
|
(logior! (-> arg0 status) v0-2)
|
|
)
|
|
)
|
|
(vector-float*! (-> arg0 transv) (-> arg0 transv) 0.88)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 30 of type metalhead-grenade-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod setup-collision! ((this metalhead-grenade-shot))
|
|
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
|
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
|
(set! (-> s5-0 reaction)
|
|
(the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister)
|
|
)
|
|
(set! (-> s5-0 no-reaction)
|
|
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
|
)
|
|
(set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot))
|
|
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
|
|
(set! (-> v1-7 prim-core collide-with)
|
|
(collide-spec backgnd jak crate obstacle hit-by-others-list player-list pusher)
|
|
)
|
|
(set! (-> v1-7 prim-core action) (collide-action solid))
|
|
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8)
|
|
(set! (-> s5-0 total-prims) (the-as uint 1))
|
|
(set! (-> s5-0 root-prim) v1-7)
|
|
)
|
|
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
|
|
(let ((v1-10 (-> s5-0 root-prim)))
|
|
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
|
|
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
|
|
)
|
|
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
|
|
(set! (-> s5-0 event-self) 'touched)
|
|
(set! (-> this root) s5-0)
|
|
)
|
|
(set! (-> this root pat-ignore-mask)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 31 of type metalhead-grenade-shot
|
|
;; WARN: Return type mismatch sound-id vs none.
|
|
(defmethod init-proj-settings! ((this metalhead-grenade-shot))
|
|
(set! (-> this attack-mode) 'explode)
|
|
(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 group-metalhead-grenade-shot this))
|
|
(set! (-> this sound-id) (new-sound-id))
|
|
(none)
|
|
)
|
|
|
|
;; definition for function spawn-metalhead-grenade
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-grenade-shot).
|
|
(defun spawn-metalhead-grenade ((arg0 metalhead-grenade-shot) (arg1 vector) (arg2 vector) (arg3 float))
|
|
(let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
|
(let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1)))
|
|
(set! (-> gp-0 ent) (-> arg0 entity))
|
|
(set! (-> gp-0 charge) 1.0)
|
|
(set! (-> gp-0 options) (projectile-options))
|
|
(logclear! (-> gp-0 options) (projectile-options po14 po15 po16))
|
|
(set! (-> gp-0 notify-handle) (process->handle arg0))
|
|
(set! (-> gp-0 owner-handle) (the-as handle #f))
|
|
(set! (-> gp-0 target-handle) (the-as handle #f))
|
|
(set! (-> gp-0 target-pos quad) (the-as uint128 0))
|
|
(set! (-> gp-0 ignore-handle) (process->handle arg0))
|
|
(let* ((a0-13 *game-info*)
|
|
(a2-12 (+ (-> a0-13 attack-id) 1))
|
|
)
|
|
(set! (-> a0-13 attack-id) a2-12)
|
|
(set! (-> gp-0 attack-id) a2-12)
|
|
)
|
|
(set! (-> gp-0 timeout) (seconds 4))
|
|
(vector-copy! (-> gp-0 pos) arg1)
|
|
(vector-normalize-copy! (-> gp-0 vel) v1-1 arg3)
|
|
)
|
|
(the-as (pointer metalhead-grenade-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*))
|
|
)
|
|
)
|