mirror of
https://github.com/open-goal/jak-project
synced 2026-08-27 08:28:03 -04:00
4ee402984f
No more ghost town! Manual patches: - `hal3-course`: In `(anon-function 17 hal3-course)`, the decompiler is doing something strange with `s3-0` that fails to compile, so I just removed the `set!` and inlined the condition in the `when`. - `guard`: Rewrote `(.mula.s)` stuff
1130 lines
40 KiB
Common Lisp
Vendored
Generated
1130 lines
40 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 605
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9b :page #xb))
|
|
(sp-rnd-flt spt-num 10.0 1.0 1.0)
|
|
(sp-flt spt-x (meters 0))
|
|
(sp-flt spt-y (meters 0))
|
|
(sp-flt spt-z (meters 0))
|
|
(sp-flt spt-scale-x (meters 1))
|
|
(sp-flt spt-rot-x 16384.0)
|
|
(sp-flt spt-rot-y (degrees 0.0))
|
|
(sp-flt spt-rot-z (degrees 0.0))
|
|
(sp-flt spt-scale-y (meters 0.1))
|
|
(sp-flt spt-r 255.0)
|
|
(sp-flt spt-g 255.0)
|
|
(sp-flt spt-b 255.0)
|
|
(sp-rnd-flt spt-a 64.0 32.0 1.0)
|
|
(sp-rnd-flt spt-accel-y -1.3653333 -4.096 1.0)
|
|
(sp-int spt-timer 5)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 606
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x45 :page #xc))
|
|
(sp-func spt-birth-func 'birth-func-set-quat)
|
|
(sp-flt spt-num 1.0)
|
|
(sp-flt spt-scale-x (meters 0.25))
|
|
(sp-flt spt-scale-y (meters 9))
|
|
(sp-flt spt-r 128.0)
|
|
(sp-rnd-flt spt-g 0.0 64.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 128.0)
|
|
(sp-flt spt-scalevel-x (meters 0.0016666667))
|
|
(sp-flt spt-fade-a -2.1333334)
|
|
(sp-int spt-timer 40)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 607
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xca :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-flt spt-scale-x (meters 1))
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 128.0)
|
|
(sp-rnd-flt spt-g 0.0 32.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 64.0)
|
|
(sp-flt spt-scalevel-x (meters -0.016666668))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-a -1.6)
|
|
(sp-int spt-timer 25)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 608
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x47 :page #xc))
|
|
(sp-flt spt-num 0.0)
|
|
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.3) 1.0)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 128.0)
|
|
(sp-flt spt-g 128.0)
|
|
(sp-flt spt-b 128.0)
|
|
(sp-rnd-flt spt-a 64.0 32.0 1.0)
|
|
(sp-int spt-timer 5)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 609
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x14 :page #xc))
|
|
(sp-rnd-flt spt-num 8.0 8.0 1.0)
|
|
(sp-rnd-flt spt-z (meters 0) (meters -3) 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 0.4) (meters 0.4) 1.0)
|
|
(sp-rnd-flt spt-scale-y (meters 0.4) (meters 0.4) 1.0)
|
|
(sp-flt spt-r 192.0)
|
|
(sp-rnd-flt spt-g 64.0 128.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 64.0)
|
|
(sp-flt spt-scalevel-x (meters -0.00234375))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-rnd-flt spt-fade-g -1.2 -2.4 1.0)
|
|
(sp-rnd-flt spt-fade-a -0.53333336 -2.1333334 1.0)
|
|
(sp-rnd-flt spt-accel-y -0.68266666 -0.68266666 1.0)
|
|
(sp-int spt-timer 240)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
|
(sp-flt spt-rotate-y (degrees 0.0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 610
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x81 :page #xc))
|
|
(sp-func spt-birth-func 'birth-func-set-quat)
|
|
(sp-flt spt-num 1.0)
|
|
(sp-flt spt-scale-x (meters 2))
|
|
(sp-flt spt-scale-y (meters 4.5))
|
|
(sp-flt spt-r 128.0)
|
|
(sp-rnd-flt spt-g 0.0 128.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 128.0)
|
|
(sp-flt spt-fade-a -3.6571429)
|
|
(sp-int spt-timer 35)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 611
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
|
(sp-flt spt-rot-x 819.2)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 128.0)
|
|
(sp-flt spt-g 128.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 255.0)
|
|
(sp-flt spt-omega 822067.2)
|
|
(sp-flt spt-scalevel-x (meters 0.053333335))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-g -3.6571429)
|
|
(sp-flt spt-fade-a -7.285714)
|
|
(sp-int spt-timer 35)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
|
(sp-flt spt-userdata 1024.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-guard-shot-hit-object
|
|
:id 136
|
|
:duration (seconds 1)
|
|
:flags (use-local-clock)
|
|
:bounds (static-bspherem 0 0 0 8)
|
|
:parts ((sp-item 612 :flags (bit6) :period 600 :length 5)
|
|
(sp-item 613 :flags (bit6) :period 600 :length 5)
|
|
(sp-item 614 :flags (bit6) :period 600 :length 5)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-guard-shot-hit
|
|
:id 137
|
|
:duration (seconds 1)
|
|
:flags (use-local-clock)
|
|
:bounds (static-bspherem 0 0 0 8)
|
|
:parts ((sp-item 612 :flags (bit6) :period 600 :length 5)
|
|
(sp-item 613 :flags (bit6) :period 600 :length 5)
|
|
(sp-item 614 :flags (bit6) :period 600 :length 5)
|
|
(sp-item 615 :period 600 :length 5)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 614
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-flt spt-scale-x (meters 2))
|
|
(sp-flt spt-rot-x 204.8)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 255.0)
|
|
(sp-rnd-flt spt-g 0.0 128.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-flt spt-a 64.0)
|
|
(sp-flt spt-scalevel-x (meters 0.075))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-a -1.8285714)
|
|
(sp-int spt-timer 40)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
|
(sp-flt spt-userdata 8192.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 615
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
|
(sp-rnd-flt spt-num 8.0 8.0 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 0.75) (meters 0.5) 1.0)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 255.0)
|
|
(sp-rnd-flt spt-g 0.0 128.0 1.0)
|
|
(sp-flt spt-b 0.0)
|
|
(sp-rnd-flt spt-a 16.0 48.0 1.0)
|
|
(sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.026666667) 1.0)
|
|
(sp-rnd-flt spt-scalevel-x (meters 0.0016666667) (meters 0.006666667) 1.0)
|
|
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-r -0.30476192)
|
|
(sp-flt spt-fade-g 0.15238096)
|
|
(sp-flt spt-fade-b 0.30476192)
|
|
(sp-flt spt-fade-a -0.15238096)
|
|
(sp-rnd-flt spt-accel-y -0.68266666 -0.68266666 1.0)
|
|
(sp-flt spt-friction 0.9)
|
|
(sp-int spt-timer 420)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
|
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 613
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
|
(sp-flt spt-num 2.0)
|
|
(sp-flt spt-scale-x (meters 2))
|
|
(sp-flt spt-rot-x 819.2)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 255.0)
|
|
(sp-rnd-flt spt-g 128.0 64.0 1.0)
|
|
(sp-rnd-flt spt-b 0.0 32.0 1.0)
|
|
(sp-flt spt-a 48.0)
|
|
(sp-flt spt-scalevel-x (meters 0.125))
|
|
(sp-rnd-flt spt-rotvel-z (degrees -0.3) (degrees 0.6) 1.0)
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-g -2.1333334)
|
|
(sp-flt spt-fade-b -2.1333334)
|
|
(sp-int spt-timer 80)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)
|
|
(sp-flt spt-userdata 0.0)
|
|
(sp-int spt-next-time 20)
|
|
(sp-launcher-by-id spt-next-launcher 616)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 616
|
|
:init-specs ((sp-flt spt-scale-x (meters 4.5))
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-scalevel-x (meters -0.05))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-g -0.53333336)
|
|
(sp-flt spt-fade-a -0.8)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 612
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-flt spt-scale-x (meters 1))
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-r 255.0)
|
|
(sp-flt spt-g 255.0)
|
|
(sp-flt spt-b 255.0)
|
|
(sp-flt spt-a 96.0)
|
|
(sp-flt spt-scalevel-x (meters 0.1))
|
|
(sp-flt spt-rotvel-z (degrees 0.3))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-int spt-timer 55)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
|
(sp-int spt-next-time 15)
|
|
(sp-launcher-by-id spt-next-launcher 617)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 617
|
|
:init-specs ((sp-flt spt-scale-x (meters 3.5))
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-flt spt-scalevel-x (meters -0.0625))
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-flt spt-fade-b -6.4)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-guard-grenade
|
|
:id 138
|
|
:duration (seconds 0.5)
|
|
:flags (use-local-clock)
|
|
:bounds (static-bspherem 0 0 0 2)
|
|
:parts ((sp-item 618 :fade-after (meters 200) :falloff-to (meters 200)))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 618
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
|
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-rnd-flt spt-r 64.0 128.0 1.0)
|
|
(sp-copy-from-other spt-g -1)
|
|
(sp-copy-from-other spt-b -1)
|
|
(sp-rnd-flt spt-a 16.0 32.0 1.0)
|
|
(sp-rnd-flt spt-vel-y (meters 0) (meters 0.016666668) 1.0)
|
|
(sp-rnd-flt spt-scalevel-x (meters 0.006666667) (meters 0.013333334) 1.0)
|
|
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
|
|
(sp-copy-from-other spt-scalevel-y -4)
|
|
(sp-rnd-flt spt-fade-a -0.16 -0.16 1.0)
|
|
(sp-flt spt-friction 0.96)
|
|
(sp-int spt-timer 300)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
|
|
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
|
|
(sp-flt spt-conerot-radius (meters 0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-guard-shot-die
|
|
:id 139
|
|
:duration (seconds 0.017)
|
|
:flags (use-local-clock)
|
|
:bounds (static-bspherem 0 0 0 8)
|
|
:parts ((sp-item 209))
|
|
)
|
|
|
|
;; definition of type guard-shot
|
|
(deftype guard-shot (projectile)
|
|
((hit-actor? symbol :offset-assert 472)
|
|
(tail-pos vector :inline :offset-assert 480)
|
|
)
|
|
:heap-base #x170
|
|
:method-count-assert 40
|
|
:size-assert #x1f0
|
|
:flag-assert #x28017001f0
|
|
)
|
|
|
|
;; definition for method 3 of type guard-shot
|
|
(defmethod inspect guard-shot ((obj guard-shot))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type projectile inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~2Thit-actor?: ~A~%" (-> obj hit-actor?))
|
|
(format #t "~2Ttail-pos: #<vector @ #x~X>~%" (-> obj tail-pos))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition for method 37 of type guard-shot
|
|
(defmethod deal-damage! guard-shot ((obj guard-shot) (arg0 process) (arg1 event-message-block))
|
|
"Constructs an [[attack-info]] according to the projectile's `options`"
|
|
(let ((t9-0 (method-of-type projectile deal-damage!)))
|
|
(when (t9-0 obj arg0 arg1)
|
|
(set! (-> obj hit-actor?) #t)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 24 of type guard-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod draw-laser-sight guard-shot ((obj guard-shot))
|
|
"TODO - confirm If applicable, draw the laser sight particles"
|
|
(draw-beam (-> *part-id-table* 610) (-> obj tail-pos) (-> obj starting-dir) #f #t)
|
|
(let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> obj starting-dir) 2048.0))
|
|
(v1-2 (vector+! (new 'stack-no-clear 'vector) (-> obj tail-pos) a0-3))
|
|
(t9-2 sp-launch-particles-var)
|
|
(a0-4 *sp-particle-system-2d*)
|
|
(a1-4 (-> *part-id-table* 611))
|
|
(a2-2 *launch-matrix*)
|
|
)
|
|
(set! (-> a2-2 trans quad) (-> v1-2 quad))
|
|
(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 guard-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod spawn-impact-particles guard-shot ((obj guard-shot))
|
|
"Spawns associated particles with the projectile if applicable"
|
|
(rlet ((acc :class vf)
|
|
(vf0 :class vf)
|
|
(vf4 :class vf)
|
|
(vf5 :class vf)
|
|
(vf6 :class vf)
|
|
(vf7 :class vf)
|
|
)
|
|
(init-vf0-vector)
|
|
(let* ((gp-0 (-> obj root-override trans))
|
|
(a1-0 (-> obj tail-pos))
|
|
(s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0))
|
|
(f30-0 (vector-length s5-1))
|
|
)
|
|
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-4 a1-0))
|
|
(let ((a0-2 s5-1))
|
|
(let ((a2-1 0.8))
|
|
(.mov vf7 a2-1)
|
|
)
|
|
(.lvf vf5 (&-> a0-2 quad))
|
|
)
|
|
(.lvf vf4 (&-> v1-4 quad))
|
|
)
|
|
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
|
|
(.mul.x.vf acc vf5 vf7 :mask #b111)
|
|
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
|
|
(.svf (&-> s4-0 quad) vf6)
|
|
(let ((f28-0 (-> *part-id-table* 606 init-specs 4 initial-valuef)))
|
|
(set! (-> *part-id-table* 606 init-specs 4 initial-valuef) (vector-length s5-1))
|
|
(draw-beam (-> *part-id-table* 606) a1-0 s5-1 #f #t)
|
|
(set! (-> *part-id-table* 606 init-specs 4 initial-valuef) f28-0)
|
|
)
|
|
(vector-normalize! s5-1 1.0)
|
|
(let ((t9-2 sp-launch-particles-var)
|
|
(a0-5 *sp-particle-system-2d*)
|
|
(a1-2 (-> *part-id-table* 607))
|
|
(a2-3 *launch-matrix*)
|
|
)
|
|
(set! (-> a2-3 trans quad) (-> s4-0 quad))
|
|
(t9-2 a0-5 a1-2 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
|
)
|
|
(let ((t9-3 sp-launch-particles-var)
|
|
(a0-6 *sp-particle-system-2d*)
|
|
(a1-3 (-> *part-id-table* 608))
|
|
(a2-4 *launch-matrix*)
|
|
)
|
|
(set! (-> a2-4 trans quad) (-> s4-0 quad))
|
|
(t9-3 a0-6 a1-3 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
|
)
|
|
)
|
|
(let ((s4-1 (new 'stack-no-clear 'matrix))
|
|
(f26-0 (* 0.000027126736 f30-0))
|
|
(f30-1 (-> *part-id-table* 609 init-specs 3 initial-valuef))
|
|
(f28-1 (-> *part-id-table* 609 init-specs 4 initial-valuef))
|
|
)
|
|
(forward-up->inv-matrix s4-1 s5-1 *up-vector*)
|
|
(set! (-> s4-1 trans quad) (-> gp-0 quad))
|
|
(set! (-> *part-id-table* 609 init-specs 3 initial-valuef) (* f26-0 f30-1))
|
|
(set! (-> *part-id-table* 609 init-specs 4 initial-valuef) (* f26-0 f28-1))
|
|
(sp-launch-particles-var
|
|
*sp-particle-system-2d*
|
|
(-> *part-id-table* 609)
|
|
s4-1
|
|
(the-as sparticle-launch-state #f)
|
|
(the-as sparticle-launch-control #f)
|
|
1.0
|
|
)
|
|
(set! (-> *part-id-table* 609 init-specs 3 initial-valuef) f30-1)
|
|
(set! (-> *part-id-table* 609 init-specs 4 initial-valuef) f28-1)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 26 of type guard-shot
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod spawn-shell-particles guard-shot ((obj guard-shot))
|
|
"TODO - confirm"
|
|
(let* ((s4-0 (-> obj root-override))
|
|
(v1-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> obj tail-pos) (-> s4-0 trans)) 2048.0))
|
|
(gp-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(set! (-> gp-0 quad) (-> s4-0 trans quad))
|
|
(vector+! gp-0 gp-0 v1-1)
|
|
(cond
|
|
((-> obj hit-actor?)
|
|
(let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000)))
|
|
(when s5-1
|
|
(let ((t9-2 (method-of-type part-tracker activate)))
|
|
(t9-2
|
|
(the-as part-tracker s5-1)
|
|
*entity-pool*
|
|
(symbol->string (-> part-tracker symbol))
|
|
(the-as pointer #x70004000)
|
|
)
|
|
)
|
|
(let ((t9-3 run-function-in-process)
|
|
(a0-8 s5-1)
|
|
(a1-6 part-tracker-init)
|
|
(a2-4 (-> *part-group-id-table* 136))
|
|
(a3-1 0)
|
|
(t0-0 #f)
|
|
(t1-0 #f)
|
|
(t2-0 #f)
|
|
(t3-0 *launch-matrix*)
|
|
)
|
|
(set! (-> t3-0 trans quad) (-> gp-0 quad))
|
|
((the-as (function object object object object object object object object none) t9-3)
|
|
a0-8
|
|
a1-6
|
|
a2-4
|
|
a3-1
|
|
t0-0
|
|
t1-0
|
|
t2-0
|
|
t3-0
|
|
)
|
|
)
|
|
(-> s5-1 ppointer)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000)))
|
|
(when s5-2
|
|
(let ((t9-5 (method-of-type part-tracker activate)))
|
|
(t9-5
|
|
(the-as part-tracker s5-2)
|
|
*entity-pool*
|
|
(symbol->string (-> part-tracker symbol))
|
|
(the-as pointer #x70004000)
|
|
)
|
|
)
|
|
(let ((t9-6 run-function-in-process)
|
|
(a0-11 s5-2)
|
|
(a1-9 part-tracker-init)
|
|
(a2-9 (-> *part-group-id-table* 137))
|
|
(a3-3 0)
|
|
(t0-1 #f)
|
|
(t1-1 #f)
|
|
(t2-1 #f)
|
|
(t3-1 *launch-matrix*)
|
|
)
|
|
(set! (-> t3-1 trans quad) (-> gp-0 quad))
|
|
((the-as (function object object object object object object object object none) t9-6)
|
|
a0-11
|
|
a1-9
|
|
a2-9
|
|
a3-3
|
|
t0-1
|
|
t1-1
|
|
t2-1
|
|
t3-1
|
|
)
|
|
)
|
|
(-> s5-2 ppointer)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 28 of type guard-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod play-impact-sound guard-shot ((obj guard-shot) (arg0 projectile-options))
|
|
(let ((v1-0 arg0))
|
|
(cond
|
|
((zero? v1-0)
|
|
(sound-play "guard-shot-fire")
|
|
)
|
|
((= v1-0 (projectile-options lose-altitude))
|
|
(sound-play "guard-shot-hit")
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate impact (guard-shot)
|
|
:virtual #t
|
|
:enter (behavior ()
|
|
(let ((t9-0 (-> (method-of-type projectile impact) enter)))
|
|
(if t9-0
|
|
(t9-0)
|
|
)
|
|
)
|
|
(when *traffic-manager*
|
|
(let ((v1-5 (new 'stack-no-clear 'traffic-danger-info)))
|
|
(set! (-> v1-5 sphere quad) (-> self root-override trans quad))
|
|
(set! (-> v1-5 sphere r) 40960.0)
|
|
(set! (-> v1-5 velocity quad) (-> self root-override transv quad))
|
|
(set! (-> v1-5 notify-radius) 122880.0)
|
|
(set! (-> v1-5 danger-level) 1.0)
|
|
(set! (-> v1-5 decay-rate) 0.0)
|
|
(set! (-> v1-5 flags) (traffic-danger-flags tdf0))
|
|
(set! (-> v1-5 danger-type) (traffic-danger-type tdt0))
|
|
(set! (-> v1-5 handle) (the-as handle #f))
|
|
(send-event *traffic-manager* 'add-danger-sphere v1-5)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for function guard-shot-move
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun guard-shot-move ((arg0 guard-shot))
|
|
(projectile-move-fill-line-sphere arg0)
|
|
(let ((s5-0 (-> arg0 root-override)))
|
|
(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 (< 36864.0 f0-0)
|
|
(vector-normalize! s4-0 36864.0)
|
|
(vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0)
|
|
)
|
|
)
|
|
)
|
|
(when (logtest? (-> s5-0 status) (collide-status touch-surface))
|
|
(if (logtest? (-> arg0 root-override status) (collide-status touch-actor))
|
|
(set! (-> arg0 hit-actor?) #t)
|
|
)
|
|
(go (method-of-object arg0 impact))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 38 of type guard-shot
|
|
(defmethod made-impact? guard-shot ((obj guard-shot))
|
|
"TODO - queries the collision cache, return true/false"
|
|
(let ((v1-0 (-> obj root-override))
|
|
(t1-0 (new 'stack-no-clear 'collide-query))
|
|
)
|
|
(let ((a0-1 t1-0))
|
|
(set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w))
|
|
(set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with))
|
|
(set! (-> a0-1 ignore-process0) obj)
|
|
(set! (-> a0-1 ignore-process1) (ppointer->process (-> obj parent)))
|
|
(set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask))
|
|
(set! (-> a0-1 action-mask) (collide-action solid))
|
|
)
|
|
(when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0)
|
|
(if (logtest? (-> obj root-override status) (collide-status touch-actor))
|
|
(set! (-> obj hit-actor?) #t)
|
|
)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 30 of type guard-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-proj-collision! guard-shot ((obj guard-shot))
|
|
"Init the [[projectile]]'s [[collide-shape]]"
|
|
(let ((s5-0 (new 'process 'collide-shape-moving obj (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 2457.6)
|
|
(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! (-> obj root-override) s5-0)
|
|
)
|
|
(set! (-> obj root-override pat-ignore-mask)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 31 of type guard-shot
|
|
;; INFO: Used lq/sq
|
|
(defmethod init-proj-settings! guard-shot ((obj guard-shot))
|
|
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
|
|
(set! (-> obj hit-actor?) #f)
|
|
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
|
|
(set! (-> obj attack-mode) 'guard-shot)
|
|
(set! (-> obj max-speed) 819200.0)
|
|
(set! (-> obj move) guard-shot-move)
|
|
(set! (-> obj update-velocity) projectile-update-velocity-space-wars)
|
|
(set! (-> obj timeout) (seconds 0.5))
|
|
(logior! (-> obj options) (projectile-options account-for-target-velocity))
|
|
(set-gravity-length (-> obj root-override dynam) 573440.0)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type vehicle-grenade
|
|
(deftype vehicle-grenade (projectile-bounce)
|
|
((blast-radius float :offset-assert 496)
|
|
)
|
|
:heap-base #x180
|
|
:method-count-assert 42
|
|
:size-assert #x1f4
|
|
:flag-assert #x2a018001f4
|
|
)
|
|
|
|
;; definition for method 3 of type vehicle-grenade
|
|
(defmethod inspect vehicle-grenade ((obj vehicle-grenade))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type projectile-bounce inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~2Tblast-radius: ~f~%" (-> obj blast-radius))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defskelgroup skel-vehicle-grenade eco-canister eco-canister-dark-lod0-jg eco-canister-dark-idle-ja
|
|
((eco-canister-dark-lod0-mg (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 0.3)
|
|
:texture-level 6
|
|
)
|
|
|
|
;; definition for method 28 of type vehicle-grenade
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod play-impact-sound vehicle-grenade ((obj vehicle-grenade) (arg0 projectile-options))
|
|
(let ((v1-0 arg0))
|
|
(cond
|
|
((zero? v1-0)
|
|
(sound-play "grenade-fire")
|
|
)
|
|
((= v1-0 (projectile-options lose-altitude))
|
|
(sound-play "grenade-explode")
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 30 of type vehicle-grenade
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-proj-collision! vehicle-grenade ((obj vehicle-grenade))
|
|
"Init the [[projectile]]'s [[collide-shape]]"
|
|
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
|
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
|
(set! (-> s5-0 reaction) projectile-bounce-reaction)
|
|
(set! (-> s5-0 no-reaction)
|
|
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
|
|
)
|
|
(set! (-> s5-0 penetrate-using) (penetrate explode))
|
|
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-7 prim-core action) (collide-action solid))
|
|
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2)
|
|
(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! (-> obj root-override) s5-0)
|
|
)
|
|
(set-collide-with!
|
|
(-> obj root-override)
|
|
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
|
)
|
|
(set-collide-as! (-> obj root-override) (collide-spec enemy))
|
|
(set! (-> obj root-override pat-ignore-mask)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 31 of type vehicle-grenade
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-proj-settings! vehicle-grenade ((obj vehicle-grenade))
|
|
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
|
|
(set! (-> obj attack-mode) 'eco-dark)
|
|
(initialize-skeleton
|
|
obj
|
|
(the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer uint32) #f)))
|
|
(the-as pair 0)
|
|
)
|
|
(let ((t9-2 (method-of-type projectile-bounce init-proj-settings!)))
|
|
(t9-2 obj)
|
|
)
|
|
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 138) obj))
|
|
(set! (-> obj blast-radius) 16384.0)
|
|
(set! (-> obj max-speed) 90112.0)
|
|
(set! (-> obj timeout) (seconds 4))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 25 of type vehicle-grenade
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod spawn-impact-particles vehicle-grenade ((obj vehicle-grenade))
|
|
"Spawns associated particles with the projectile if applicable"
|
|
(spawn (-> obj part) (-> obj root-override trans))
|
|
(ja-post)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 41 of type vehicle-grenade
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod noop vehicle-grenade ((obj vehicle-grenade))
|
|
"Does nothing"
|
|
(spawn (-> obj part) (-> obj root-override trans))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 39 of type vehicle-grenade
|
|
(defmethod play-impact-sound! vehicle-grenade ((obj vehicle-grenade))
|
|
"Plays impact sound"
|
|
(let* ((a2-0 (-> obj root-override))
|
|
(v1-0 (-> a2-0 status))
|
|
)
|
|
(if (logtest? v1-0 (collide-status touch-surface))
|
|
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.2)
|
|
)
|
|
(when (and (logtest? v1-0 (collide-status impact-surface))
|
|
(>= (- (-> self clock frame-counter) (-> obj played-bounce-time)) (seconds 0.3))
|
|
)
|
|
(set! (-> obj played-bounce-time) (-> self clock frame-counter))
|
|
(sound-play "grenade-bounce")
|
|
)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate impact (vehicle-grenade)
|
|
:virtual #t
|
|
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
|
(the-as object (case event-type
|
|
(('touched)
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) (process->ppointer self))
|
|
(set! (-> a1-2 num-params) 2)
|
|
(set! (-> a1-2 message) 'attack)
|
|
(set! (-> a1-2 param 0) (-> event param 0))
|
|
(let ((v1-5 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
|
(set! (-> v1-5 id) (-> self attack-id))
|
|
(set! (-> v1-5 mode) 'explode)
|
|
(set! (-> a1-2 param 1) (the-as uint v1-5))
|
|
)
|
|
(if (send-event-function proc a1-2)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(let ((gp-0 (new 'stack-no-clear 'explosion-init-params)))
|
|
(set! (-> gp-0 spawn-point quad) (-> self root-override trans quad))
|
|
(quaternion-copy! (-> gp-0 spawn-quat) (-> self root-override quat))
|
|
(set! (-> gp-0 radius) (-> self blast-radius))
|
|
(set! (-> gp-0 group) (-> *part-group-id-table* 76))
|
|
(set! (-> gp-0 collide-with)
|
|
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
|
)
|
|
(set! (-> gp-0 penetrate-using) (penetrate explode))
|
|
(explosion-spawn self explosion gp-0)
|
|
)
|
|
(logior! (-> self draw status) (draw-control-status no-draw))
|
|
(let ((v1-11 (-> self root-override root-prim)))
|
|
(set! (-> v1-11 prim-core collide-as) (collide-spec))
|
|
(set! (-> v1-11 prim-core collide-with) (collide-spec))
|
|
)
|
|
0
|
|
(while (-> self child)
|
|
(suspend)
|
|
)
|
|
(deactivate self)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(set! (-> *lightning-spec-id-table* 13) (new 'static 'lightning-spec
|
|
:name "lightning-trail-crimson-guard"
|
|
:flags (lightning-spec-flags lsf1)
|
|
:rand-func #x2
|
|
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
|
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
|
:fade-start-factor 0.2
|
|
:fade-time 120.0
|
|
:texture (new 'static 'texture-id :index #x83 :page #xc)
|
|
:reduction 0.6
|
|
:num-points 16
|
|
:box-size 2048.0
|
|
:merge-factor 0.5
|
|
:merge-count 2
|
|
:radius 1638.4
|
|
:duration -1.0
|
|
:sound #f
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(set! (-> *lightning-spec-id-table* 14) (new 'static 'lightning-spec
|
|
:name "lightning-fractal-crimson-guard"
|
|
:flags (lightning-spec-flags lsf1)
|
|
:start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)
|
|
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
|
|
:fade-start-factor 0.2
|
|
:fade-time 120.0
|
|
:texture (new 'static 'texture-id :index #x83 :page #xc)
|
|
:reduction 0.6
|
|
:num-points 16
|
|
:box-size 2048.0
|
|
:merge-factor 0.5
|
|
:merge-count 2
|
|
:radius 1638.4
|
|
:duration -1.0
|
|
:sound #f
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 619
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 0.8) (meters 0.2) 1.0)
|
|
(sp-flt spt-rot-x 409.6)
|
|
(sp-rnd-flt spt-rot-z (degrees -17.0) (degrees 360.0) 1.0)
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-rnd-flt spt-r 32.0 96.0 1.0)
|
|
(sp-copy-from-other spt-g -1)
|
|
(sp-flt spt-b 255.0)
|
|
(sp-rnd-flt spt-a 32.0 16.0 1.0)
|
|
(sp-flt spt-omega 412467.2)
|
|
(sp-int spt-timer 5)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
|
(sp-flt spt-userdata 819.2)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 620
|
|
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
|
(sp-flt spt-num 1.0)
|
|
(sp-rnd-flt spt-scale-x (meters 2.5) (meters 1) 1.0)
|
|
(sp-flt spt-rot-x 409.6)
|
|
(sp-flt spt-rot-z (degrees -17.0))
|
|
(sp-copy-from-other spt-scale-y -4)
|
|
(sp-rnd-flt spt-r 0.0 64.0 1.0)
|
|
(sp-copy-from-other spt-g -1)
|
|
(sp-flt spt-b 255.0)
|
|
(sp-rnd-flt spt-a 16.0 16.0 1.0)
|
|
(sp-flt spt-omega 412467.2)
|
|
(sp-int spt-timer 5)
|
|
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
|
(sp-flt spt-userdata 819.2)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup part-crimson-lightning-glow
|
|
:id 140
|
|
:duration (seconds 0.017)
|
|
:linger-duration (seconds 0.035)
|
|
:bounds (static-bspherem 0 0 0 4)
|
|
:parts ((sp-item 620 :fade-after (meters 100) :flags (bit6)) (sp-item 619 :fade-after (meters 100) :flags (bit6)))
|
|
)
|
|
|
|
;; definition of type guard-lazer-shot
|
|
(deftype guard-lazer-shot (projectile)
|
|
()
|
|
:heap-base #x160
|
|
:method-count-assert 40
|
|
:size-assert #x1d8
|
|
:flag-assert #x28016001d8
|
|
)
|
|
|
|
;; definition for method 3 of type guard-lazer-shot
|
|
(defmethod inspect guard-lazer-shot ((obj guard-lazer-shot))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type projectile inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate dissipate (guard-lazer-shot)
|
|
:virtual #t
|
|
:enter (behavior ()
|
|
(go-virtual impact)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 38 of type guard-lazer-shot
|
|
(defmethod made-impact? guard-lazer-shot ((obj guard-lazer-shot))
|
|
"TODO - queries the collision cache, return true/false"
|
|
(let ((gp-0 (-> obj root-override))
|
|
(s5-0 (new 'stack-no-clear 'collide-query))
|
|
)
|
|
(let ((v1-0 s5-0))
|
|
(set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w))
|
|
(set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
|
|
(set! (-> v1-0 ignore-process0) obj)
|
|
(set! (-> v1-0 ignore-process1) (ppointer->process (-> obj parent)))
|
|
(set! (-> v1-0 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
|
(set! (-> v1-0 action-mask) (collide-action solid))
|
|
)
|
|
(let ((a0-2 (handle->process (-> obj notify-handle))))
|
|
(when a0-2
|
|
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3)))
|
|
(f0-2 (- (vector-length s4-1)))
|
|
)
|
|
(fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function guard-lazer-shot-move
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun guard-lazer-shot-move ((arg0 guard-lazer-shot))
|
|
(projectile-move-fill-line-sphere arg0)
|
|
(if (logtest? (-> arg0 root-override status) (collide-status touch-surface))
|
|
(go (method-of-object arg0 impact))
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 30 of type guard-lazer-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-proj-collision! guard-lazer-shot ((obj guard-lazer-shot))
|
|
"Init the [[projectile]]'s [[collide-shape]]"
|
|
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum 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 penetrate-using) (penetrate enemy-yellow-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
|
|
bot
|
|
crate
|
|
civilian
|
|
enemy
|
|
obstacle
|
|
vehicle-sphere
|
|
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 1))
|
|
(set! (-> s5-0 event-self) 'touched)
|
|
(set! (-> obj root-override) s5-0)
|
|
)
|
|
(set! (-> obj root-override pat-ignore-mask)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 31 of type guard-lazer-shot
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-proj-settings! guard-lazer-shot ((obj guard-lazer-shot))
|
|
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
|
|
(set! (-> obj attack-mode) 'shock)
|
|
(set! (-> obj max-speed) 131072.0)
|
|
(set! (-> obj timeout) (seconds 0.125))
|
|
(set! (-> obj move) guard-lazer-shot-move)
|
|
(set! (-> obj root-override dynam gravity y) 0.0)
|
|
(set! (-> obj root-override dynam gravity-length) 0.0)
|
|
(set! (-> obj root-override dynam gravity-max) 0.0)
|
|
0
|
|
(none)
|
|
)
|