jak-project/goal_src/jak3/engine/gfx/mood/weather-part.gc

921 lines
27 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: weather-part.gc
;; name in dgo: weather-part
;; dgos: GAME
;; DECOMP BEGINS
(defpartgroup group-rain-screend-drop-real
:id 1
:flags (sp2)
:bounds (static-bspherem 0 0 0 16)
:parts ((sp-item 23 :binding 19)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 19 :flags (sp2 sp3) :binding 20)
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 20 :flags (sp2 sp3))
(sp-item 24 :binding 21)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 21 :flags (sp2 sp3) :binding 22)
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
(sp-item 22 :flags (sp2 sp3))
)
)
(define group-rain-screend-drop (-> *part-group-id-table* 1))
(defpart 24
:init-specs ((:texture (starflash level-default-sprite))
(:num 0.1)
(:x (meters -4.5) (meters 9))
(:y (meters -3) (meters 6))
(:scale-x (meters 2.5))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 12.0)
(:scalevel-x (meters 0.16666667))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.8)
(:timer (seconds 0.035))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
)
)
(defpart 21
:init-specs ((:texture (lakedrop level-default-sprite))
(:num 1.0)
(:scale-x (meters 1.5))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 255.0)
(:a 20.0)
(:scalevel-x (meters 0.033333335))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.8)
(:accel-y (meters -0.00066666666))
(:timer (seconds 0.9))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:next-time (seconds 0.05))
(:next-launcher 25)
)
)
(defpart 25
:init-specs ((:scalevel-x (meters 0.004166667)) (:scalevel-y :copy scalevel-x) (:fade-a -0.06666667))
)
(defpart 22
:init-specs ((:num 1.0)
(:rot-x 12)
(:r 4096.0)
(:g 3276.8)
(:b 3276.8)
(:fade-r 6.068148)
(:fade-g 68.26667)
(:fade-b 3.034074)
(:accel-y (meters -0.00066666666))
(:timer (seconds 0.9))
(:flags (distort))
(:next-time (seconds 0.1))
(:next-launcher 26)
)
)
(defpart 26
:init-specs ((:fade-g -5.1200004))
)
(defpart 23
:init-specs ((:texture (starflash level-default-sprite))
(:num 0.1)
(:x (meters -4.5) (meters 9))
(:y (meters -3) (meters 6))
(:scale-x (meters 4))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 12.0)
(:scalevel-x (meters 0.26666668))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.8)
(:timer (seconds 0.035))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
)
)
(defpart 19
:init-specs ((:texture (lakedrop level-default-sprite))
(:num 1.0)
(:scale-x (meters 2.6))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 255.0)
(:a 20.0)
(:scalevel-x (meters 0.06666667))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.8)
(:accel-y (meters -0.00066666666))
(:timer (seconds 0.9))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:next-time (seconds 0.05))
(:next-launcher 27)
)
)
(defpart 27
:init-specs ((:scalevel-x (meters 0.008333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.06666667))
)
(defpart 20
:init-specs ((:num 1.0)
(:rot-x 24)
(:r 12288.0)
(:g 6553.6)
(:b 6553.6)
(:fade-r 12.136296)
(:fade-g 136.53334)
(:fade-b 6.068148)
(:accel-y (meters -0.00066666666))
(:timer (seconds 0.9))
(:flags (distort))
(:next-time (seconds 0.1))
(:next-launcher 28)
)
)
(defpart 28
:init-specs ((:fade-g -10.240001))
)
(defpartgroup group-stars
:id 2
:flags (sp1)
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 29 :flags (sp6)) (sp-item 30 :flags (sp6)) (sp-item 31 :flags (sp6)))
)
(defpart 29
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 30) (meters 20))
(:scale-y :copy scale-x)
(:r 256.0)
(:g 256.0)
(:b 256.0)
(:a 0.0)
(:fade-a 0.42666668)
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:next-time (seconds 0.2) (seconds 0.797))
(:next-launcher 32)
(:conerot-x (degrees -89) (degrees 178))
(:conerot-y (degrees 0) (degrees 1440))
(:rotate-y (degrees 0) (degrees 3600))
(:conerot-radius (meters 5000))
)
)
(defpart 32
:init-specs ((:fade-a 0.0) (:next-time (seconds 99999)) (:next-launcher 33))
)
(defpart 33
:init-specs ((:fade-a -0.42666668))
)
(defpart 30
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 30) (meters 20))
(:scale-y :copy scale-x)
(:r 256.0)
(:g 256.0)
(:b 256.0)
(:a 0.0)
(:fade-a 0.42666668)
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:next-time (seconds 0.2) (seconds 0.797))
(:next-launcher 32)
(:conerot-x (degrees 30) (degrees 59))
(:conerot-y (degrees 0) (degrees 2880))
(:rotate-y (degrees 0) (degrees 3600))
(:conerot-radius (meters 5000))
)
)
(defpart 31
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 30) (meters 20))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 0.0)
(:fade-a 0.42666668)
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:next-time (seconds 0.2) (seconds 0.797))
(:next-launcher 32)
(:conerot-x (degrees 60) (degrees 29))
(:conerot-y (degrees 0) (degrees 5760))
(:rotate-y (degrees 0) (degrees 3600))
(:conerot-radius (meters 5000))
)
)
(defpart 34
:init-specs ((:texture (hotdot level-default-sprite))
(:num 4.0)
(:x (meters 10) (meters 10))
(:y (meters 2) (meters 14))
(:scale-x (meters 0.2) (meters 0.1))
(:rot-x 4)
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 255.0)
(:b 255.0)
(:a 0.0)
(:vel-y (meters -0.01) (meters -0.0033333334))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:fade-a 0.85333335)
(:timer (seconds 5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
(:next-time (seconds 0.25) (seconds 0.247))
(:next-launcher 35)
(:rotate-y (degrees 0) (degrees 180))
)
)
(defpart 36
:init-specs ((:texture (hotdot level-default-sprite))
(:num 0.0)
(:x (meters 0) (meters 20))
(:y (meters 16))
(:scale-x (meters 0.2) (meters 0.1))
(:rot-x 4)
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 255.0)
(:b 255.0)
(:a 0.0)
(:vel-y (meters -0.01) (meters -0.0033333334))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:fade-a 0.85333335)
(:timer (seconds 5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14))
(:next-time (seconds 0.25) (seconds 0.247))
(:next-launcher 35)
(:rotate-y (degrees 0) (degrees 360))
)
)
(defpart 35
:init-specs ((:fade-a 0.0) (:next-time (seconds 4)) (:next-launcher 37))
)
(defpart 37
:init-specs ((:fade-a -0.85333335))
)
(defun update-snow ((arg0 float) (arg1 vector) (arg2 vector))
(let ((f0-0 (lerp-scale 0.0 1.0 (vector-length arg2) 2048.0 40960.0)))
(set! (-> *part-id-table* 36 init-specs 1 initial-valuef) (- 1.0 f0-0))
(set! (-> *part-id-table* 34 init-specs 1 initial-valuef) (* 4.0 f0-0))
)
(set! (-> *part-id-table* 34 init-specs 19 initial-valuef) (+ 32768.0 (vector-y-angle arg2)))
(launch-particles (-> *part-id-table* 36) arg1)
(launch-particles (-> *part-id-table* 34) arg1)
0
(none)
)
(defpart 38
:init-specs ((:texture (lakedrop level-default-sprite))
(:birth-func 'birth-func-rain)
(:num 1.0)
(:x (meters -20) (meters 40))
(:y (meters 30))
(:scale-x (meters 0.03) (meters 0.03))
(:scale-y (meters 0.5) (meters 0.5))
(:r 32.0 32.0)
(:g :copy r)
(:b 64.0 32.0)
(:a 32.0 64.0)
(:vel-y (meters -0.1) (meters -0.2))
(:timer (seconds 3))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:userdata 0.0)
(:func 'check-drop-level-rain)
(:rotate-y (degrees 0) (degrees 3600))
)
)
(defpart 39
:init-specs ((:texture (lakedrop level-default-sprite))
(:birth-func 'birth-func-rain)
(:num 4.0)
(:x (meters -20) (meters 40))
(:y (meters 30))
(:scale-x (meters 0.03) (meters 0.03))
(:scale-y (meters 0.5) (meters 0.5))
(:r 32.0 32.0)
(:g :copy r)
(:b 64.0 32.0)
(:a 32.0 64.0)
(:vel-y (meters -0.06666667) (meters -0.033333335))
(:timer (seconds 3))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:userdata 0.0)
(:func 'check-drop-level-rain2)
(:rotate-y (degrees 0) (degrees 3600))
)
)
(defpart 40
:init-specs ((:texture (lakedrop level-default-sprite))
(:num 1.0 3.0)
(:scale-x (meters 0.08) (meters 0.03))
(:rot-x 4)
(:scale-y :copy scale-x)
(:r 32.0 32.0)
(:g :copy r)
(:b 64.0 32.0)
(:a 64.0 64.0)
(:omega (degrees 0.01575) (degrees 0.009))
(:vel-y (meters 0.033333335) (meters 0.06666667))
(:fade-a -0.21333334 -0.21333334)
(:accel-y (meters -0.005) (meters -0.00066666666))
(:friction 0.98)
(:timer (seconds 1))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z))
(:userdata 0.0)
(:func 'check-drop-level-splash)
(:next-time (seconds 0) (seconds 0.33))
(:next-launcher 41)
(:conerot-x (degrees 0) (degrees 50.000004))
(:conerot-y (degrees 0) (degrees 3600))
(:rotate-x (degrees 0))
(:rotate-y (degrees 0))
)
)
(defpart 42
:init-specs ((:texture (hotdot level-default-sprite))
(:birth-func 'birth-func-omega-normal-orient)
(:num 1.0)
(:y (meters 0.2))
(:scale-x (meters 0.5) (meters 0.25))
(:scale-y :copy scale-x)
(:r 32.0 32.0)
(:g :copy r)
(:b 64.0 32.0)
(:a 64.0 32.0)
(:omega (degrees 0))
(:scalevel-x (meters 0.006666667) (meters 0.006666667))
(:scalevel-y :copy scalevel-x)
(:fade-a -1.2)
(:timer (seconds 1))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
(:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200))
(:func 'sparticle-texture-animate)
)
)
(defpart 43
:init-specs ((:texture (motion-blur-part level-default-sprite))
(:num 2.0 4.0)
(:scale-x (meters 2.5))
(:rot-x 4)
(:scale-y (meters 0.06) (meters 0.03))
(:r 255.0)
(:g 128.0 128.0)
(:b 0.0 128.0)
(:a 128.0)
(:omega (degrees 0.018) (degrees 0.01125))
(:vel-y (meters 0.1) (meters 0.06666667))
(:fade-g -2.55 -2.55)
(:fade-b -8.0)
(:fade-a -0.32 -0.64)
(:friction 0.8 0.02)
(:timer (seconds 0.335) (seconds 0.33))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
(:func 'sparticle-motion-blur)
(:conerot-x (degrees 0) (degrees 80))
(:conerot-y (degrees 0) (degrees 3600))
)
)
(defpart 44
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 0.25))
(:rot-x (degrees 0.225))
(:rot-z (degrees 0) (degrees 3600))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 196.0 128.0)
(:b 128.0 64.0)
(:a 96.0 16.0)
(:omega (degrees 3608.9998))
(:scalevel-x (meters 0.08))
(:scalevel-y :copy scalevel-x)
(:fade-g -6.375)
(:fade-b -13.066667)
(:fade-a -2.8)
(:timer (seconds 0.05) (seconds 0.03))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 2048.0)
)
)
(defun birth-func-omega-normal-orient ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
(arg3 sparticle-launcher)
(arg4 sparticle-launch-state)
)
(local-vars (v1-6 float) (v1-7 float))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((s4-0 (new 'stack-no-clear 'vector))
(gp-0 (new 'stack-no-clear 'quaternion))
)
(set! (-> s4-0 x) (* 0.007874016 (the float (-> arg1 datab 2))))
(set! (-> s4-0 y) 0.0)
(set! (-> s4-0 z) (* -0.007874016 (the float (-> arg1 datab 0))))
(vector-normalize! s4-0 1.0)
(quaternion-vector-angle! gp-0 s4-0 (acos (* 0.007874016 (the float (-> arg1 datab 1)))))
(cond
((< (-> gp-0 w) 0.0)
(.lvf vf1 (&-> arg2 qx-qy-qz-sy quad))
(.lvf vf2 (&-> gp-0 quad))
(.sub.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> arg2 qx-qy-qz-sy quad) vf1)
(.mov v1-6 vf1)
)
(else
(.lvf vf1 (&-> arg2 qx-qy-qz-sy quad))
(.lvf vf2 (&-> gp-0 quad))
(.add.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> arg2 qx-qy-qz-sy quad) vf1)
(.mov v1-7 vf1)
)
)
)
0
(none)
)
)
(defun birth-func-rain ((arg0 sparticle-system)
(arg1 sparticle-cpuinfo)
(arg2 sprite-vec-data-3d)
(arg3 sparticle-launcher)
(arg4 sparticle-launch-state)
)
(let ((s4-0 (new 'stack-no-clear 'collide-query)))
(set! (-> s4-0 start-pos quad) (-> arg2 x-y-z-sx quad))
(set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0)
(let ((v1-2 s4-0))
(set! (-> v1-2 radius) 40.96)
(set! (-> v1-2 collide-with) (collide-spec backgnd))
(set! (-> v1-2 ignore-process0) #f)
(set! (-> v1-2 ignore-process1) #f)
(set! (-> v1-2 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-2 action-mask) (collide-action solid))
)
(fill-using-line-sphere *collide-cache* s4-0)
(cond
((>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
(set! (-> arg1 user-float) (-> s4-0 best-other-tri intersect y))
(let ((f0-8 (+ 65536.0 (-> *math-camera* trans y))))
(if (< (-> arg1 user-float) f0-8)
(set! (-> arg2 x-y-z-sx y) f0-8)
)
)
(set! (-> arg1 datab 0) (the int (* 127.0 (-> s4-0 best-other-tri normal x))))
(set! (-> arg1 datab 1) (the int (* 127.0 (-> s4-0 best-other-tri normal y))))
(set! (-> arg1 datab 2) (the int (* 127.0 (-> s4-0 best-other-tri normal z))))
(set! (-> arg1 datab 3) (the-as int (-> s4-0 best-other-tri pat event)))
)
(else
(set! (-> arg1 omega) 65280.0)
(set! (-> arg1 user-float) (+ -204800.0 (-> arg2 x-y-z-sx y)))
)
)
)
(let ((f0-21 (get-height *ocean* (-> arg2 x-y-z-sx) #f)))
(when (!= f0-21 4095996000.0)
(when (< (-> arg1 user-float) f0-21)
(set! (-> arg1 user-float) f0-21)
(set! (-> arg1 datab 0) 0)
(set! (-> arg1 datab 1) 127)
(set! (-> arg1 datab 2) 0)
(set! (-> arg1 datab 3) 0)
0
)
)
)
0
(none)
)
(defun check-drop-level-rain ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(when (< (-> arg2 y) (-> arg1 user-float))
(let ((s4-0 (new 'stack-no-clear 'vector))
(gp-0 (new 'stack-no-clear 'matrix))
)
(let ((f30-0 (-> arg1 user-float)))
(sp-kill-particle arg0 arg1)
(set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
(-> arg1 omega)
(set-vector!
(-> gp-0 uvec)
(* 0.007874016 (the float (-> arg1 datab 0)))
(* 0.007874016 (the float (-> arg1 datab 1)))
(* 0.007874016 (the float (-> arg1 datab 2)))
0.0
)
(set-vector! (-> gp-0 fvec) 0.0 0.0 1.0 0.0)
(vector-cross! (-> gp-0 rvec) (-> gp-0 uvec) (-> gp-0 fvec))
(set! (-> gp-0 trans quad) (-> s4-0 quad))
(set! (-> *part-id-table* 40 init-specs 23 initial-valuef) (vector-y-angle (-> gp-0 uvec)))
(set! (-> *part-id-table* 40 init-specs 22 initial-valuef) (- 16384.0 (vector-x-angle (-> gp-0 uvec))))
(set! (-> *part-id-table* 40 init-specs 16 initial-valuef) f30-0)
)
(launch-particles (-> *part-id-table* 40) gp-0 :origin-is-matrix #t)
(case (-> arg1 datab 3)
((11 10)
(sound-play "sizzle-drips")
(launch-particles (-> *part-id-table* 44) gp-0 :origin-is-matrix #t)
(launch-particles (-> *part-id-table* 43) gp-0 :origin-is-matrix #t)
)
(else
(sound-play "dry-drips")
(set! (-> *part-id-table* 42 init-specs 10 initial-valuef) (-> arg1 omega))
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 42) gp-0 :origin-is-matrix #t)
)
)
)
)
(none)
)
;; WARN: Return type mismatch symbol vs none.
(defun check-drop-level-rain2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(if (< (-> arg2 y) (-> arg1 user-float))
(sp-kill-particle arg0 arg1)
)
(none)
)
;; WARN: Return type mismatch symbol vs none.
(defun check-drop-level-splash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(sparticle-motion-blur arg0 arg1 arg2)
(if (< (-> arg2 y) (-> arg1 user-float))
(sp-kill-particle arg0 arg1)
)
(none)
)
(defun update-rain ((arg0 float) (arg1 vector) (arg2 vector))
(let ((v1-0 (new 'stack-no-clear 'vector)))
(set! (-> v1-0 x) (-> arg2 x))
(set! (-> v1-0 y) 0.0)
(set! (-> v1-0 z) (-> arg2 z))
(set! (-> v1-0 w) 1.0)
(let ((gp-1 (vector+float*! (new 'stack-no-clear 'vector) arg1 v1-0 0.0)))
(let* ((s4-0 (matrix-local->world #f #f))
(f28-0 (lerp-scale 122.88 245.76 (fabs (-> s4-0 fvec y)) 0.0 0.7))
(f30-0 (lerp-scale 2048.0 245.76 (fabs (-> s4-0 fvec y)) 0.0 0.7))
)
(let ((f26-0 (lerp-scale 0.0 0.1 (-> s4-0 fvec y) 0.3 0.7))
(f0-11 (lerp-scale 1.0 0.1 (-> s4-0 fvec y) 0.3 0.7))
)
(if (< 0.0 f26-0)
(send-event *camera* 'part-water-drip f26-0 f0-11)
)
)
(set! (-> *part-id-table* 38 init-specs 5 initial-valuef) f28-0)
(set! (-> *part-id-table* 38 init-specs 5 random-rangef) f28-0)
(set! (-> *part-id-table* 39 init-specs 5 initial-valuef) f28-0)
(set! (-> *part-id-table* 39 init-specs 5 random-rangef) f28-0)
(set! (-> *part-id-table* 38 init-specs 6 initial-valuef) f30-0)
(set! (-> *part-id-table* 38 init-specs 6 random-rangef) f30-0)
(set! (-> *part-id-table* 39 init-specs 6 initial-valuef) f30-0)
(set! (-> *part-id-table* 39 init-specs 6 random-rangef) f30-0)
)
(set! (-> *part-id-table* 38 init-specs 2 initial-valuef) arg0)
(set! (-> *part-id-table* 39 init-specs 2 initial-valuef) (* 4.0 arg0))
(launch-particles (-> *part-id-table* 38) gp-1)
(launch-particles (-> *part-id-table* 39) gp-1)
)
)
0
(none)
)
(defbehavior cam-master-effect camera-master ()
(when (not (or (movie?) (>= (+ (current-time) (seconds -10)) (-> self water-drip-time))))
(set! (-> *part-id-table* 24 init-specs 1 initial-valuef) (-> self water-drip-mult))
(set! (-> *part-id-table* 23 init-specs 1 initial-valuef) (* 0.9 (-> self water-drip-mult)))
(set! (-> *part-id-table* 21 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
(set! (-> *part-id-table* 22 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
(set! (-> *part-id-table* 19 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
(set! (-> *part-id-table* 20 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
(spawn (-> self water-drip) *zero-vector*)
)
0
(none)
)
(defun sparticle-track-sun ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 matrix))
(-> arg1 key)
(let* ((s2-0 (the int (-> arg1 user-float)))
(s5-0 (math-camera-pos))
(s4-0 (the-as object (+ (the-as uint (-> *sky-work* upload-data)) (* (/ s2-0 4) 64))))
)
(let ((s3-0 *time-of-day*)
(v1-4 (-> *math-camera* inv-camera-rot))
)
(cond
((= s2-0 1)
(set! (-> arg2 uvec z) (+ 8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec)))))
(set! (-> s3-0 0 sun-count) 1)
)
((= s2-0 4)
(set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec)))))
(+! (-> s3-0 0 green-sun-count) 1)
)
((= s2-0 8)
(set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec)))))
(+! (-> s3-0 0 moon-count) 1)
)
((= s2-0 12)
(set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec)))))
(+! (-> s3-0 0 day-star-count) 1)
(let ((f0-15 (* 6144000.0 (fmax 0.3 (fmin 1.0 (* 0.01 (-> *game-info* percent-complete)))))))
(set! (-> arg2 rvec w) f0-15)
(set! (-> arg2 uvec w) f0-15)
)
)
((= s2-0 13)
(set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec)))))
(+! (-> s3-0 0 day-star-count) 1)
(let ((f0-20 (* 12288000.0 (fmax 0.3 (fmin 1.0 (* 0.01 (-> *game-info* percent-complete)))))))
(set! (-> arg2 rvec w) f0-20)
(set! (-> arg2 uvec w) f0-20)
)
)
)
)
(let ((s3-1 (new 'stack-no-clear 'vector)))
(set! (-> s3-1 quad) (-> (the-as vector s4-0) quad))
(if (-> *time-of-day-context* use-camera-other)
(vector-matrix*! s3-1 s3-1 (-> *math-camera* camera-rot-other-sky))
)
(vector+float*! s3-1 s5-0 s3-1 4096.0)
(set! (-> arg2 rvec x) (-> s3-1 x))
(set! (-> arg2 rvec y) (-> s3-1 y))
(set! (-> arg2 rvec z) (-> s3-1 z))
)
)
0
(none)
)
(defpartgroup group-sun
:id 3
:flags (sp1)
:bounds (static-bspherem 0 0 0 70)
:parts ((sp-item 45 :flags (sp3 sp6)) (sp-item 46 :flags (sp3 sp6)))
)
(defpart 45
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 2550))
(:rot-x (degrees 1687.5))
(:rot-z (degrees 30))
(:scale-y (meters 2550))
(:r 64.0)
(:g 64.0)
(:b 16.0)
(:a 70.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 1.0)
(:func 'sparticle-track-sun)
)
)
(defpart 46
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 12000))
(:rot-x (degrees 1687.5))
(:rot-z (degrees 30))
(:scale-y (meters 12000))
(:r 64.0)
(:g 32.0)
(:b 0.0)
(:a 80.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 1.0)
(:func 'sparticle-track-sun)
)
)
(defpartgroup group-green-sun
:id 4
:flags (sp1)
:bounds (static-bspherem 0 0 0 70)
:parts ((sp-item 47 :flags (sp3 sp6)) (sp-item 48 :flags (sp3 sp6)))
)
(defpart 47
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 1500))
(:rot-x (degrees 1125))
(:rot-z (degrees 30))
(:scale-y (meters 1500))
(:r 16.0)
(:g 64.0)
(:b 32.0)
(:a 64.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 4.0)
(:func 'sparticle-track-sun)
)
)
(defpart 48
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 3000))
(:rot-x (degrees 1125))
(:rot-z (degrees 30))
(:scale-y (meters 3000))
(:r 0.0)
(:g 43.0)
(:b 8.0)
(:a 64.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 4.0)
(:func 'sparticle-track-sun)
)
)
(defpartgroup group-moon
:id 5
:flags (sp1)
:bounds (static-bspherem 0 0 0 70)
:parts ((sp-item 49 :flags (sp3 sp6)))
)
(defpart 49
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 6000))
(:rot-x (degrees 2992.5))
(:rot-z (degrees 30))
(:scale-y (meters 6000))
(:r 16.0)
(:g 32.0)
(:b 64.0)
(:a 64.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 8.0)
(:func 'sparticle-track-sun)
)
)
(defpartgroup group-day-star
:id 6
:flags (sp1)
:bounds (static-bspherem 0 0 0 70)
:parts ((sp-item 50 :flags (sp3 sp6)) (sp-item 51 :flags (sp3 sp6)))
)
(defpart 50
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 2000))
(:rot-x (degrees 1125))
(:rot-z (degrees 30))
(:scale-y (meters 2000))
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 64.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 12.0)
(:func 'sparticle-track-sun)
)
)
(defpart 51
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 5000))
(:rot-x (degrees 1125))
(:rot-z (degrees 30))
(:scale-y (meters 5000))
(:r 32.0)
(:g 0.0)
(:b 128.0)
(:a 64.0)
(:omega (degrees 0))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow))
(:userdata 13.0)
(:func 'sparticle-track-sun)
)
)