mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 18:23:13 -04:00
7348e6a4ff
Update the decompiler to use the new vf macros. Also, fix a bunch of silly casting issues where accessing inline fields with an offset of 0 would be better than a cast:  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
505 lines
14 KiB
Common Lisp
Vendored
Generated
505 lines
14 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type sewer-part
|
|
(deftype sewer-part (part-spawner)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type sewer-part
|
|
(defmethod inspect ((this sewer-part))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type part-spawner inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sewer-light
|
|
:id 340
|
|
:bounds (static-bspherem 0 0 0 6)
|
|
:parts ((sp-item 1437 :fade-after (meters 120) :flags (bit6)) (sp-item 1438 :fade-after (meters 120) :flags (bit6)))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1437
|
|
:init-specs ((:texture (glow effects))
|
|
(:num 1.0)
|
|
(:scale-x (meters 4) (meters 0.5))
|
|
(:rot-x (degrees 3.3750002))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 192.0 64.0)
|
|
(:b 128.0)
|
|
(:a 12.0)
|
|
(:omega (degrees 2718))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 4096.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1438
|
|
:init-specs ((:texture (glow-soft effects))
|
|
(:num 1.0)
|
|
(:scale-x (meters 16) (meters 2))
|
|
(:rot-x (degrees 6.7500005))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 192.0 64.0)
|
|
(:b 128.0)
|
|
(:a 12.0)
|
|
(:omega (degrees 2720.25))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 4096.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sewer-light-switched
|
|
:id 341
|
|
:bounds (static-bspherem 0 0 0 6)
|
|
:parts ((sp-item 39 :fade-after (meters 120) :flags (bit6)) (sp-item 40 :fade-after (meters 120) :flags (bit6)))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 39
|
|
:init-specs ((:texture (glow effects))
|
|
(:num 1.0)
|
|
(:scale-x (meters 4) (meters 0.5))
|
|
(:rot-x (degrees 3.3750002))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 192.0 64.0)
|
|
(:b 128.0)
|
|
(:a 12.0)
|
|
(:omega (degrees 2718))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 4096.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 40
|
|
:init-specs ((:texture (glow-soft effects))
|
|
(:num 1.0)
|
|
(:scale-x (meters 16) (meters 2))
|
|
(:rot-x (degrees 6.7500005))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 192.0 64.0)
|
|
(:b 128.0)
|
|
(:a 12.0)
|
|
(:omega (degrees 2720.25))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 4096.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sewer-steamvent
|
|
:id 342
|
|
:flags (unk-4)
|
|
:bounds (static-bspherem 0 0 0 6)
|
|
:parts ((sp-item 1439 :fade-after (meters 60) :falloff-to (meters 60) :flags (bit7))
|
|
(sp-item 1440 :fade-after (meters 100) :falloff-to (meters 140) :flags (bit7))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1439
|
|
:init-specs ((:texture (motion-blur-part effects))
|
|
(:num 5.0)
|
|
(:scale-x (meters 0.1))
|
|
(:rot-x 4)
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0)
|
|
(:g :copy r)
|
|
(:b :copy g)
|
|
(:a 64.0 32.0)
|
|
(:omega (degrees 0.0225))
|
|
(:vel-z (meters 0.083333336) (meters 0.033333335))
|
|
(:fade-a -0.64 -0.64)
|
|
(:friction 0.93 0.025)
|
|
(:timer (seconds 0.5))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
|
|
(:func 'sparticle-motion-blur)
|
|
(:launchrot-x (degrees -7.5) (degrees 15))
|
|
(:launchrot-y (degrees -7.5) (degrees 15))
|
|
(:rotate-y (degrees 0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1440
|
|
:init-specs ((:texture (bigpuff effects))
|
|
(:num 1.0 6.0)
|
|
(:scale-x (meters 0.5) (meters 0.25))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 64.0 128.0)
|
|
(:g :copy r)
|
|
(:b :copy g)
|
|
(:a 0.0)
|
|
(:vel-z (meters 0.083333336) (meters 0.033333335))
|
|
(:scalevel-x (meters 0.01) (meters 0.016666668))
|
|
(:rotvel-z (degrees -1.2) (degrees 2.4))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-a 0.96)
|
|
(:friction 0.93 0.025)
|
|
(:timer (seconds 0.5))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
|
|
(:next-time (seconds 0.085) (seconds 0.08))
|
|
(:next-launcher 1441)
|
|
(:launchrot-x (degrees -5) (degrees 10))
|
|
(:launchrot-y (degrees -5) (degrees 10))
|
|
(:rotate-y (degrees 0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1441
|
|
:init-specs ((:fade-a -0.48 -0.48))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1442
|
|
:init-specs ((:texture (glow-soft effects))
|
|
(:num 1.0)
|
|
(:scale-x (meters 3))
|
|
(:rot-x (degrees 6.7500005))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 128.0)
|
|
(:b 0.0 32.0)
|
|
(:a 32.0)
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 2048.0)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sewer-drops
|
|
:id 343
|
|
:bounds (static-bspherem 0 4 0 8)
|
|
:parts ((sp-item 1443 :fade-after (meters 100) :falloff-to (meters 100)))
|
|
)
|
|
|
|
;; definition for function sewer-drop-birth-func
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun sewer-drop-birth-func ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
|
|
"Resets the timer to birth a new water drop"
|
|
(when (>= (get-height *ocean* (-> arg2 launchrot) #t) (-> arg2 launchrot y))
|
|
(set! (-> arg1 timer) 0)
|
|
0
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function check-drop-level-sewer-drop
|
|
;; INFO: Used lq/sq
|
|
(defun check-drop-level-sewer-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
|
"Prevent the water drop from going below the ocean, display the splash on the surface or ground, play associated sounds"
|
|
(let ((f30-0 (-> arg1 key origin trans y))
|
|
(f28-0 (-> arg2 vector 0 y))
|
|
(s5-0 #f)
|
|
)
|
|
(cond
|
|
((< f28-0 f30-0)
|
|
(set! s5-0 #t)
|
|
)
|
|
((begin (set! f30-0 (get-height *ocean* (-> arg2 vector 0) #t)) (< f28-0 f30-0))
|
|
(set! s5-0 'water)
|
|
)
|
|
)
|
|
(when s5-0
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(sp-kill-particle arg0 arg1)
|
|
(set-vector! gp-0 (-> arg2 vector 0 x) f30-0 (-> arg2 vector 0 z) 1.0)
|
|
(when (< (vector-vector-distance (camera-pos) gp-0) 204800.0)
|
|
(cond
|
|
((= s5-0 'water)
|
|
(sound-play "wet-drips" :position gp-0)
|
|
)
|
|
((= s5-0 #t)
|
|
(sound-play "dry-drips" :position gp-0)
|
|
)
|
|
)
|
|
)
|
|
(launch-particles (-> *part-id-table* 1444) gp-0)
|
|
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 1445) gp-0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1443
|
|
:init-specs ((:texture (lakedrop effects))
|
|
(:birth-func 'sewer-drop-birth-func)
|
|
(:num 0.1)
|
|
(:y (meters 12.5))
|
|
(:scale-x (meters 0.15) (meters 0.1))
|
|
(:scale-y :copy scale-x)
|
|
(:r 96.0 32.0)
|
|
(:g 64.0 32.0)
|
|
(:b 32.0 32.0)
|
|
(:a 0.0)
|
|
(:scalevel-x (meters -0.00013333333))
|
|
(:scalevel-y (meters 0.0013333333))
|
|
(:timer (seconds 0) (seconds 0.997))
|
|
(:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
|
|
(:func 'check-drop-level-sewer-drop)
|
|
(:next-time (seconds 0) (seconds 0.997))
|
|
(:next-launcher 1446)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1446
|
|
:init-specs ((:a 32.0 64.0)
|
|
(:accel-y (meters -0.00066666666))
|
|
(:timer (seconds 8))
|
|
(:next-time (seconds 0) (seconds 0.497))
|
|
(:next-launcher 1447)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1447
|
|
:init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1448))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1448
|
|
:init-specs ((:r 96.0 32.0) (:g 64.0 32.0) (:b 32.0 32.0) (:next-time (seconds 0) (seconds 0.497)) (:next-launcher 1447))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1444
|
|
:init-specs ((:texture (lakedrop effects))
|
|
(:num 1.0 2.0)
|
|
(:scale-x (meters 0.15) (meters 0.05))
|
|
(:rot-x 4)
|
|
(:scale-y :copy scale-x)
|
|
(:r 96.0 32.0)
|
|
(:g 64.0 32.0)
|
|
(:b 32.0 32.0)
|
|
(:a 32.0 64.0)
|
|
(:omega (degrees 0.05625))
|
|
(:vel-y (meters 0.02) (meters 0.026666667))
|
|
(:accel-y (meters -0.001) (meters -0.00016666666))
|
|
(:friction 0.97)
|
|
(:timer (seconds 0.5))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
|
|
(:func 'sparticle-motion-blur)
|
|
(:next-time (seconds 0) (seconds 0.497))
|
|
(:next-launcher 1447)
|
|
(:conerot-x (degrees 0) (degrees 60))
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1445
|
|
:init-specs ((:texture (water-ring effects))
|
|
(:num 1.0)
|
|
(:y (meters 0.02))
|
|
(:scale-x (meters 1))
|
|
(:scale-y :copy scale-x)
|
|
(:r 96.0 32.0)
|
|
(:g 64.0 32.0)
|
|
(:b 32.0 32.0)
|
|
(:a 63.0 32.0)
|
|
(:scalevel-x (meters 0.02) (meters 0.01))
|
|
(:scalevel-y (meters 0.02) (meters 0.01))
|
|
(:fade-a -0.64)
|
|
(:timer (seconds 0.335))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
|
|
(:rotate-y (degrees 0) (degrees 360))
|
|
)
|
|
)
|
|
|
|
;; definition for function sewer-drop2-birth-func
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun sewer-drop2-birth-func ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
|
|
"Resets the timer to birth a new water drop"
|
|
(when (>= (get-height *ocean* (-> arg2 launchrot) #t) (-> arg2 launchrot y))
|
|
(set! (-> arg1 timer) 0)
|
|
0
|
|
)
|
|
(let ((cquery (new 'stack-no-clear 'collide-query)))
|
|
(set! (-> cquery start-pos quad) (-> arg2 launchrot quad))
|
|
(set-vector! (-> cquery move-dist) 0.0 -204800.0 0.0 1.0)
|
|
(let ((_cquery cquery))
|
|
(set! (-> _cquery radius) 40.96)
|
|
(set! (-> _cquery collide-with) (collide-spec backgnd))
|
|
(set! (-> _cquery ignore-process0) #f)
|
|
(set! (-> _cquery ignore-process1) #f)
|
|
(set! (-> _cquery ignore-pat)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1)
|
|
)
|
|
(set! (-> _cquery action-mask) (collide-action solid))
|
|
)
|
|
(if (>= (fill-and-probe-using-line-sphere *collide-cache* cquery) 0.0)
|
|
(set! (-> arg1 user-float) (-> cquery best-other-tri intersect y))
|
|
(set! (-> arg1 user-float) (+ -204800.0 (-> arg2 launchrot y)))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function check-drop2-level-sewer-drop
|
|
;; INFO: Used lq/sq
|
|
(defun check-drop2-level-sewer-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
|
"Prevent the water drop from going below the ocean, display the splash on the surface or ground, play associated sounds"
|
|
(-> arg1 key)
|
|
(let ((f30-0 (-> arg1 user-float))
|
|
(f28-0 (-> arg2 vector 0 y))
|
|
(s5-0 #f)
|
|
)
|
|
(cond
|
|
((< f28-0 f30-0)
|
|
(set! s5-0 #t)
|
|
)
|
|
((begin (set! f30-0 (get-height *ocean* (-> arg2 vector 0) #t)) (< f28-0 f30-0))
|
|
(set! s5-0 'water)
|
|
)
|
|
)
|
|
(when s5-0
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(sp-kill-particle arg0 arg1)
|
|
(set-vector! gp-0 (-> arg2 vector 0 x) f30-0 (-> arg2 vector 0 z) 1.0)
|
|
(when (< (vector-vector-distance (camera-pos) gp-0) 204800.0)
|
|
(cond
|
|
((= s5-0 'water)
|
|
(sound-play "wet-drips" :position gp-0)
|
|
)
|
|
((= s5-0 #t)
|
|
(sound-play "dry-drips" :position gp-0)
|
|
)
|
|
)
|
|
)
|
|
(launch-particles (-> *part-id-table* 1444) gp-0)
|
|
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 1445) gp-0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sewer-checkground-drops
|
|
:id 344
|
|
:bounds (static-bspherem 0 -16 0 32)
|
|
:parts ((sp-item 1449 :fade-after (meters 100) :falloff-to (meters 100)))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1449
|
|
:init-specs ((:texture (lakedrop effects))
|
|
(:birth-func 'sewer-drop2-birth-func)
|
|
(:num 0.1)
|
|
(:y (meters 0))
|
|
(:scale-x (meters 0.2) (meters 0.1))
|
|
(:scale-y :copy scale-x)
|
|
(:r 96.0 32.0)
|
|
(:g 64.0 32.0)
|
|
(:b 32.0 32.0)
|
|
(:a 0.0)
|
|
(:scalevel-x (meters -0.000033333334))
|
|
(:scalevel-y (meters 0.0013333333))
|
|
(:accel-y (meters -0.00066666666))
|
|
(:timer (seconds 0.5) (seconds 0.497))
|
|
(:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
|
|
(:func 'check-drop2-level-sewer-drop)
|
|
(:next-time (seconds 0) (seconds 0.997))
|
|
(:next-launcher 1450)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1450
|
|
:init-specs ((:a 32.0 64.0)
|
|
(:accel-y (meters -0.00066666666))
|
|
(:timer (seconds 8))
|
|
(:next-time (seconds 0) (seconds 0.997))
|
|
(:next-launcher 1451)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1451
|
|
:init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1452))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1452
|
|
:init-specs ((:r 96.0 32.0) (:g 64.0 32.0) (:b 32.0 32.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 1447))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-sew-mine-light
|
|
:id 345
|
|
:duration (seconds 0.017)
|
|
:flags (use-local-clock)
|
|
:bounds (static-bspherem 0 0 0 5)
|
|
:parts ((sp-item 1453 :fade-after (meters 120) :period (seconds 0.335) :length (seconds 0.167))
|
|
(sp-item 1454 :fade-after (meters 120) :period (seconds 0.335) :length (seconds 0.167))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1453
|
|
:init-specs ((:texture (glow effects))
|
|
(:num 1.0)
|
|
(:y (meters 1.4))
|
|
(:scale-x (meters 1.5) (meters 0.2))
|
|
(:rot-x (degrees 1.125))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 0.0 64.0)
|
|
(:b 0.0)
|
|
(:a 32.0 4.0)
|
|
(:omega (degrees 2715.75))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 1024.0)
|
|
(:rotate-y (degrees 0))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 1454
|
|
:init-specs ((:texture (glow effects))
|
|
(:num 1.0)
|
|
(:y (meters 1.4))
|
|
(:scale-x (meters 0.5) (meters 0.1))
|
|
(:rot-x (degrees 1.125))
|
|
(:scale-y :copy scale-x)
|
|
(:r 255.0)
|
|
(:g 255.0)
|
|
(:b 128.0)
|
|
(:a 48.0 4.0)
|
|
(:omega (degrees 2715.75))
|
|
(:timer (seconds 0.017))
|
|
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
|
|
(:userdata 1024.0)
|
|
(:rotate-y (degrees 0))
|
|
)
|
|
)
|