;;-*-Lisp-*-
(in-package goal)

;; name: forest-part.gc
;; name in dgo: forest-part
;; dgos: FRSTA

(define-extern *range-ffexplo-dust-color* curve-color-fast)
(define-extern *range-ffexplo-dust-alpha* curve2d-fast)
(define-extern *range-ffexplo-dust-scale-x* curve2d-fast)
(define-extern *range-ffexplo-dust-scale-y* curve2d-fast)
(define-extern *curve-ffexplo-dust-alpha* curve2d-fast)
(define-extern *curve-ffexplo-dust-scale-x* curve2d-fast)
(define-extern *curve-ffexplo-dust-scale-y* curve2d-fast)
(define-extern *range-ffexplo-color* curve-color-fast)
(define-extern *range-ffexplo-alpha* curve2d-fast)
(define-extern *range-ffexplo-scale-x* curve2d-fast)
(define-extern *range-ffexplo-scale-y* curve2d-fast)
(define-extern *curve-ffexplo-alpha* curve2d-fast)
(define-extern *curve-ffexplo-scale-x* curve2d-fast)
(define-extern *curve-ffexplo-scale-y* curve2d-fast)
(define-extern *range-sat-explo-color* curve-color-fast)
(define-extern *range-sat-explo-alpha* curve2d-fast)
(define-extern *range-sat-explo-scale-x* curve2d-fast)
(define-extern *range-sat-explo-scale-y* curve2d-fast)
(define-extern *curve-sat-explo-alpha* curve2d-fast)
(define-extern *curve-sat-explo-scale-x* curve2d-fast)
(define-extern *curve-sat-explo-scale-y* curve2d-fast)

;; DECOMP BEGINS

(defpartgroup group-plant-seed-explode
  :id 561
  :duration (seconds 0.25)
  :linger-duration (seconds 2)
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 2)
  :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167)))
  )

(defpartgroup group-plant-spore-explode
  :id 562
  :duration (seconds 0.25)
  :linger-duration (seconds 2)
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 2)
  :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167)))
  )

(defpartgroup group-plant-seed-tunnel
  :id 563
  :duration (seconds 0.25)
  :linger-duration (seconds 2)
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 2)
  :parts ((sp-item 115))
  )

(defpartgroup group-neo-egg-explode
  :id 564
  :duration (seconds 4)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 2218 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.035))
    (sp-item 2219 :flags (sp7) :period (seconds 20) :length (seconds 0.035))
    )
  )

(defpart 2218
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 3) (meters 2))
    (:rot-x (degrees 22.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 255.0)
    (:scalevel-x (meters -0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    )
  )

(defpart 2219
  :init-specs ((:texture (water-drops level-default-sprite))
    (:num 5.0)
    (:z (meters 0) (meters 1))
    (:scale-x (meters 1) (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0 64.0)
    (:g 30.0)
    (:b 255.0)
    (:a 64.0 64.0)
    (:scalevel-x (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.42666668 -0.42666668)
    (:accel-y (meters -0.001))
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z))
    (:next-time (seconds 0.5))
    (:next-launcher 2220)
    (:rotate-x (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2220
  :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x))
  )

(defpartgroup group-neo-spawner-explode
  :id 565
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 2221 :period (seconds 20) :length (seconds 1))
    (sp-item 2222 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017))
    (sp-item 2223 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017))
    (sp-item 2224 :period (seconds 20) :length (seconds 1))
    )
  )

(defpart 2222
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 20) (meters 2))
    (:rot-x (degrees 225))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 255.0)
    (:scalevel-x (meters -0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpart 2223
  :init-specs ((:texture (shockwave level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 5))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 64.0)
    (:scalevel-x (meters 0.26666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    )
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-part-neo-spawner-explode-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 141) 40))
        (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 20))
        (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 180))
        (v1-6 (mod (the-as int (rand-uint31-gen *random-generator*)) 21))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0)))
    (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0))))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

(defpart 2224
  :init-specs ((:texture (water-drops level-default-sprite))
    (:birth-func 'spt-birth-func-brightness-part-neo-spawner-explode-juice)
    (:num 4.0)
    (:x (meters -1) (meters 2))
    (:y (meters -1) (meters 2))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 64.0 64.0)
    (:vel-y (meters 0.0033333334) (meters 0.06666667))
    (:scalevel-x (meters 0.01) (meters 0.01))
    (:rotvel-z (degrees -0.1) (degrees 0.2))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 launch-along-z))
    (:conerot-x (degrees 0) (degrees 60))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2221
  :init-specs ((:texture (middot level-default-sprite))
    (:num 5.0 5.0)
    (:x (meters -1) (meters 2))
    (:y (meters -1) (meters 2))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 0.2) (meters 0.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.2) (meters 0.5))
    (:r 255.0)
    (:g 200.0)
    (:b 255.0)
    (:a 0.0)
    (:vel-y (meters 0.0033333334) (meters 0.06666667))
    (:rotvel-z (degrees -0.1) (degrees 0.2))
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 2))
    (:flags (launch-along-z))
    (:next-time (seconds 0.017))
    (:next-launcher 2225)
    (:conerot-x (degrees 0) (degrees 60))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2225
  :init-specs ((:a 0.0) (:next-time (seconds 0.017) (seconds 0.997)) (:next-launcher 2226))
  )

(defpart 2226
  :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.047)) (:next-launcher 2225))
  )

(defpartgroup group-neo-spawner-spit
  :id 566
  :duration (seconds 0.25)
  :linger-duration (seconds 2)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 10)
  :parts ((sp-item 2227 :flags (sp7) :period (seconds 20) :length (seconds 0.25))
    (sp-item 2228 :flags (sp7) :period (seconds 20) :length (seconds 0.25))
    )
  )

(defpart 2227
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 0.5) (meters 0.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 120.0 60.0)
    (:g 20.0)
    (:b 255.0)
    (:a 64.0)
    (:vel-z (meters 0.033333335) (meters 0.033333335))
    (:scalevel-x (meters 0.02) (meters 0.02))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334)
    (:accel-x (meters 0.001))
    (:accel-y (meters 0.001))
    (:friction 0.97)
    (:timer (seconds 1.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
    (:next-time (seconds 0.5))
    (:next-launcher 2229)
    (:conerot-x (degrees 0) (degrees 10))
    (:rotate-y (degrees 0))
    (:rotate-z (degrees 0) (degrees 360))
    )
  )

(defpart 2229
  :init-specs ((:scalevel-x (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.18285714)
    (:fade-b -0.18285714)
    (:fade-a -0.09142857)
    )
  )

(defpart 2228
  :init-specs ((:texture (specs level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 0.5) (meters 0.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-z (meters 0.033333335) (meters 0.033333335))
    (:scalevel-x (meters 0.01) (meters 0.01))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334)
    (:accel-y (meters -0.000033333334))
    (:friction 0.97)
    (:timer (seconds 1.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z))
    (:conerot-x (degrees 0) (degrees 20))
    (:rotate-y (degrees 0))
    (:rotate-z (degrees 0) (degrees 360))
    )
  )

(defpartgroup group-neo-spawner-dead
  :id 567
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 40)
  :parts ((sp-item 2231 :flags (sp7) :binding 2230)
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    (sp-item 2230 :flags (sp2 sp3))
    )
  )

(defpart 2231
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 0.39)
    (:x (meters -0.5))
    (:y (meters 1))
    (:z (meters 0))
    (:scale-x (meters 2) (meters 0.1))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 64.0)
    (:b 64.0)
    (:a 0.0)
    (:vel-y (meters 0.013333334) (meters 0.00033333333))
    (:timer (seconds 2.5))
    (:flags ())
    )
  )

(defpart 2230
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:num 1.0)
    (:z (meters 0.5) (meters 0.1))
    (:scale-x (meters 0.5) (meters 0.8))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0 64.0)
    (:g 50.0 20.0)
    (:b 64.0 64.0)
    (:a 32.0 32.0)
    (:omega (degrees 0))
    (:vel-x (meters 0.04444444))
    (:scalevel-x (meters 0.0026666666) (meters 0.006666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.08533333)
    (:timer (seconds 5))
    (:flags (sp-cpuinfo-flag-2 ready-to-launch sp-cpuinfo-flag-13))
    )
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 100))
        (s3-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 71) 20))
        (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0)))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7)))
    )
  (none)
  )

(defpartgroup group-forest-leaf-fall
  :id 568
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2232 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017))
    )
  )

(defpart 2232
  :init-specs ((:texture (forest-leaf foresta-sprite))
    (:birth-func 'spt-birth-func-part-forest-leaf-fall)
    (:num 1.0)
    (:x (meters 0) (meters 6))
    (:y (meters 40))
    (:scale-x (meters 0.5) (meters 1))
    (:rot-x 4)
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:rotvel-x (degrees -0.2) (degrees 0.4))
    (:rotvel-y (degrees -0.2) 1 (degrees 0.4))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:accel-y (meters -0.00006666667) (meters -0.00006666667))
    (:friction 0.99)
    (:timer (seconds 20))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900))
    (:func 'spt-forest-check-ground-lie-flat)
    (:next-time (seconds 1))
    (:next-launcher 2233)
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2233
  :init-specs ((:rotvel-x (degrees -0.6666667) (degrees 1.3333334))
    (:rotvel-y (degrees -0.2) 1 (degrees 0.4))
    (:rotvel-z (degrees -0.6666667) (degrees 1.3333334))
    (:accel-x (meters -0.00016666666) (meters 0.00033333333))
    (:accel-y (meters 0.000033333334) (meters -0.00066666666))
    (:accel-z (meters -0.00016666666) (meters 0.00033333333))
    (:next-time (seconds 0.5) (seconds 0.497))
    (:next-launcher 2233)
    )
  )

(defpart 2234
  :init-specs ((:fade-a -0.08533333) (:flags (sp-cpuinfo-flag-2 left-multiply-quat)))
  )

(defun spt-birth-func-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2)
  (none)
  )

;; WARN: Return type mismatch quaternion vs none.
(defun spt-forest-check-ground-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (local-vars (v1-11 float) (v1-12 float) (v1-17 float) (v1-18 float) (s5-1 quaternion))
  (rlet ((vf0 :class vf)
         (vf1 :class vf)
         (vf2 :class vf)
         )
    (init-vf0-vector)
    (let* ((v1-0 (-> arg1 key))
           (f0-1 (+ 819.2 (-> v1-0 origin trans y)))
           (f30-0 (+ 8192.0 f0-1))
           )
      (when (< (-> arg2 launchrot y) f0-1)
        (let ((s4-0 (new 'stack-no-clear 'quaternion)))
          (let ((s3-0 (new 'stack-no-clear 'matrix)))
            (set! (-> arg1 next-launcher) (-> *part-id-table* 2234))
            (set! (-> arg1 next-time) (the-as uint 5))
            (set! (-> arg1 acc quad) (the-as uint128 0))
            (set! (-> arg1 vel-sxvel quad) (the-as uint128 0))
            (set! (-> arg1 rot-syvel quad) (the-as uint128 0))
            (quaternion-identity! (-> arg1 rotvel3d))
            (let* ((v1-9 s4-0)
                   (a0-3 arg2)
                   (f0-2 (-> a0-3 conerot x))
                   (f1-3 (-> a0-3 conerot y))
                   (f2-0 (-> a0-3 conerot z))
                   )
              (set! (-> v1-9 x) f0-2)
              (set! (-> v1-9 y) f1-3)
              (set! (-> v1-9 z) f2-0)
              (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2))))
              )
            (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0))
            (matrix->quaternion s4-0 s3-0)
            )
          (let ((v1-10 arg2))
            (cond
              ((< (-> s4-0 w) 0.0)
               (.lvf vf1 (&-> v1-10 conerot quad))
               (.lvf vf2 (&-> s4-0 quad))
               (.sub.vf.xyz vf1 vf0 vf2)
               (.svf (&-> v1-10 conerot quad) vf1)
               (.mov v1-11 vf1)
               )
              (else
                (.lvf vf1 (&-> v1-10 conerot quad))
                (.lvf vf2 (&-> s4-0 quad))
                (.add.vf.xyz vf1 vf0 vf2)
                (.svf (&-> v1-10 conerot quad) vf1)
                (.mov v1-12 vf1)
                )
              )
            )
          )
        (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0))
        0
        )
      (set! s5-1
            (when (< (-> arg2 launchrot y) f30-0)
              (set! s5-1 (new 'stack-no-clear 'quaternion))
              (let ((s4-1 (new 'stack-no-clear 'quaternion)))
                (let ((s3-1 (new 'stack-no-clear 'matrix)))
                  (let* ((v1-14 s5-1)
                         (a0-9 arg2)
                         (f0-8 (-> a0-9 conerot x))
                         (f1-7 (-> a0-9 conerot y))
                         (f2-3 (-> a0-9 conerot z))
                         )
                    (set! (-> v1-14 x) f0-8)
                    (set! (-> v1-14 y) f1-7)
                    (set! (-> v1-14 z) f2-3)
                    (set! (-> v1-14 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-8 f0-8))))
                    )
                  (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1))
                  (matrix->quaternion s4-1 s3-1)
                  )
                (quaternion-pseudo-seek s5-1 s5-1 s4-1 (* 3.034074 (seconds-per-frame)))
                )
              (cond
                ((< (-> s5-1 w) 0.0)
                 (.lvf vf1 (&-> arg2 conerot quad))
                 (.lvf vf2 (&-> s5-1 quad))
                 (.sub.vf.xyz vf1 vf0 vf2)
                 (.svf (&-> arg2 conerot quad) vf1)
                 (.mov v1-17 vf1)
                 )
                (else
                  (.lvf vf1 (&-> arg2 conerot quad))
                  (.lvf vf2 (&-> s5-1 quad))
                  (.add.vf.xyz vf1 vf0 vf2)
                  (.svf (&-> arg2 conerot quad) vf1)
                  (.mov v1-18 vf1)
                  )
                )
              s5-1
              )
            )
      )
    (none)
    )
  )

(defpartgroup group-forest-leaf-fall-water
  :id 569
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2235 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017))
    )
  )

(defpart 2235
  :init-specs ((:texture (forest-leaf foresta-sprite))
    (:birth-func 'spt-birth-func-part-forest-leaf-fall-water)
    (:num 1.0)
    (:x (meters 0) (meters 6))
    (:y (meters 40))
    (:scale-x (meters 0.5) (meters 1))
    (:rot-x 4)
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:rotvel-x (degrees -0.2) (degrees 0.4))
    (:rotvel-y (degrees -0.2) 1 (degrees 0.4))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:accel-y (meters -0.00006666667) (meters -0.00006666667))
    (:friction 0.99)
    (:timer (seconds 20))
    (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z left-multiply-quat))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900))
    (:func 'spt-check-water-lie-flat)
    (:next-time (seconds 1))
    (:next-launcher 2233)
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-forest-leaf-fall-water ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2)
  (none)
  )

(defpart 2236
  :init-specs ((:vel-x (meters -0.0000033333336) (meters 0.002))
    (:rotvel-y (degrees -0.13333334) (degrees 0.26666668))
    (:fade-a -0.08533333)
    (:flags (sp-cpuinfo-flag-2 left-multiply-quat))
    )
  )

(defpartgroup group-forest-leaf-water-hit
  :id 570
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 10)
  :parts ((sp-item 2237 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.017)))
  )

(defpart 2237
  :init-specs ((:texture (ripples level-default-sprite))
    (:num 2.0 3.0)
    (:y (meters -0.01))
    (:scale-x (meters 0.3))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 80.0)
    (:g 130.0)
    (:b 130.0)
    (:a 64.0)
    (:scalevel-x (meters 0.0033333334) (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.07111111)
    (:timer (seconds 3))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
    )
  )

;; WARN: Return type mismatch quaternion vs none.
(defun spt-check-water-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (local-vars (v1-11 float) (v1-12 float) (v1-49 float) (v1-50 float) (s5-1 quaternion))
  (rlet ((vf0 :class vf)
         (vf1 :class vf)
         (vf2 :class vf)
         )
    (init-vf0-vector)
    (let* ((v1-0 (-> arg1 key))
           (f0-1 (+ 819.2 (-> v1-0 origin trans y)))
           (f30-0 (+ 8192.0 f0-1))
           )
      (when (< (-> arg2 launchrot y) f0-1)
        (let ((s4-0 (new 'stack-no-clear 'quaternion)))
          (let ((s3-0 (new 'stack-no-clear 'matrix)))
            (set! (-> arg1 next-launcher) (-> *part-id-table* 2236))
            (set! (-> arg1 next-time) (the-as uint 5))
            (set! (-> arg1 acc quad) (the-as uint128 0))
            (set! (-> arg1 vel-sxvel quad) (the-as uint128 0))
            (set! (-> arg1 rot-syvel quad) (the-as uint128 0))
            (quaternion-identity! (-> arg1 rotvel3d))
            (let* ((v1-9 s4-0)
                   (a0-3 arg2)
                   (f0-2 (-> a0-3 conerot x))
                   (f1-3 (-> a0-3 conerot y))
                   (f2-0 (-> a0-3 conerot z))
                   )
              (set! (-> v1-9 x) f0-2)
              (set! (-> v1-9 y) f1-3)
              (set! (-> v1-9 z) f2-0)
              (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2))))
              )
            (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0))
            (matrix->quaternion s4-0 s3-0)
            )
          (let ((v1-10 arg2))
            (cond
              ((< (-> s4-0 w) 0.0)
               (.lvf vf1 (&-> v1-10 conerot quad))
               (.lvf vf2 (&-> s4-0 quad))
               (.sub.vf.xyz vf1 vf0 vf2)
               (.svf (&-> v1-10 conerot quad) vf1)
               (.mov v1-11 vf1)
               )
              (else
                (.lvf vf1 (&-> v1-10 conerot quad))
                (.lvf vf2 (&-> s4-0 quad))
                (.add.vf.xyz vf1 vf0 vf2)
                (.svf (&-> v1-10 conerot quad) vf1)
                (.mov v1-12 vf1)
                )
              )
            )
          )
        (cond
          ((logtest? (-> group-forest-leaf-water-hit flags) (sp-group-flag sp13))
           (let ((v1-18 (-> *launch-matrix* trans))
                 (a0-9 (new 'stack-no-clear 'vector))
                 )
             (set! (-> a0-9 x) (-> arg2 launchrot x))
             (set! (-> a0-9 y) (-> arg2 launchrot y))
             (set! (-> a0-9 z) (-> arg2 launchrot z))
             (set! (-> a0-9 w) 1.0)
             (vector-copy! v1-18 a0-9)
             )
           (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group group-forest-leaf-water-hit)
           )
          (else
            (let ((v1-33 (-> *launch-matrix* trans))
                  (a0-14 (new 'stack-no-clear 'vector))
                  )
              (set! (-> a0-14 x) (-> arg2 launchrot x))
              (set! (-> a0-14 y) (-> arg2 launchrot y))
              (set! (-> a0-14 z) (-> arg2 launchrot z))
              (set! (-> a0-14 w) 1.0)
              (vector-copy! v1-33 a0-14)
              )
            (part-tracker-spawn part-tracker :to *entity-pool* :group group-forest-leaf-water-hit)
            )
          )
        (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0))
        0
        )
      (set! s5-1
            (when (< (-> arg2 launchrot y) f30-0)
              (set! s5-1 (new 'stack-no-clear 'quaternion))
              (let ((s4-3 (new 'stack-no-clear 'quaternion)))
                (let ((s3-1 (new 'stack-no-clear 'matrix)))
                  (let* ((v1-46 s5-1)
                         (a0-19 arg2)
                         (f0-17 (-> a0-19 conerot x))
                         (f1-7 (-> a0-19 conerot y))
                         (f2-3 (-> a0-19 conerot z))
                         )
                    (set! (-> v1-46 x) f0-17)
                    (set! (-> v1-46 y) f1-7)
                    (set! (-> v1-46 z) f2-3)
                    (set! (-> v1-46 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-17 f0-17))))
                    )
                  (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1))
                  (matrix->quaternion s4-3 s3-1)
                  )
                (quaternion-pseudo-seek s5-1 s5-1 s4-3 (* 3.034074 (seconds-per-frame)))
                )
              (cond
                ((< (-> s5-1 w) 0.0)
                 (.lvf vf1 (&-> arg2 conerot quad))
                 (.lvf vf2 (&-> s5-1 quad))
                 (.sub.vf.xyz vf1 vf0 vf2)
                 (.svf (&-> arg2 conerot quad) vf1)
                 (.mov v1-49 vf1)
                 )
                (else
                  (.lvf vf1 (&-> arg2 conerot quad))
                  (.lvf vf2 (&-> s5-1 quad))
                  (.add.vf.xyz vf1 vf0 vf2)
                  (.svf (&-> arg2 conerot quad) vf1)
                  (.mov v1-50 vf1)
                  )
                )
              s5-1
              )
            )
      )
    (none)
    )
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-mh-plant-rebirth-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

(defpartgroup group-mh-plant-rebirth
  :id 571
  :duration (seconds 4)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2238 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.167))
    (sp-item 2239 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067))
    (sp-item 2240 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067))
    )
  )

(defpart 2241
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 3))
    (:rot-x (degrees 4.5))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 0.0)
    (:b 128.0)
    (:a 64.0)
    (:omega (degrees 2261.25))
    (:fade-a -0.10666667)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 glow))
    (:userdata 4096.0)
    )
  )

(defpart 2238
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:birth-func 'spt-birth-func-brightness-mh-plant-rebirth-dust)
    (:num 1.0)
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 32.0 64.0)
    (:vel-y (meters 0.0033333334) (meters 0.02))
    (:scalevel-x (meters 0.0033333334) (meters 0.006666667))
    (:rotvel-z (degrees -0.1) (degrees 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.064 -0.064)
    (:accel-y (meters 0) (meters 0.00033333333))
    (:friction 0.97)
    (:timer (seconds 10))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z))
    (:conerot-x (degrees 80) (degrees 10))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2239
  :init-specs ((:texture (water-drops level-default-sprite))
    (:birth-func 'spt-birth-func-part-mh-plant-rebirth-dirt)
    (:num 4.0)
    (:x (meters 0) (meters 0.5))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.016666668) (meters 0.033333335))
    (:scalevel-x (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0033333334))
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-13 launch-along-z))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00))
    (:conerot-x (degrees 20))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-mh-plant-rebirth-dirt arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defpart 2240
  :init-specs ((:texture (rockbit01 level-default-sprite))
    (:birth-func 'spt-birth-func-part-mh-plant-rebirth-rocks)
    (:num 4.0)
    (:x (meters 0) (meters 1))
    (:scale-x (meters 0.1) (meters 0.2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.1) (meters 0.2))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.026666667) (meters 0.06666667))
    (:rotvel-z (degrees -1) (degrees 2))
    (:accel-y (meters -0.0033333334))
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13))
    (:userdata :data (new 'static 'boxed-array :type int32
                       10
                       1
                       0
                       #x408b00
                       #x408c00
                       #x40a100
                       #x40a200
                       #x40a300
                       #x40a400
                       #x40a500
                       #x40a600
                       #x40a700
                       #x40a800
                       #x40a900
                       #x40aa00
                       #x40ab00
                       #x40ac00
                       #x40ad00
                       #x40ae00
                       )
               )
    (:func 'spt-func-part-mh-plant-rebirth-rocks)
    (:conerot-x (degrees 20))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-mh-plant-rebirth-rocks arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defun spt-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot))
  (none)
  )

(defpartgroup group-mh-plant-embers
  :id 572
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 100)
  :parts ((sp-item 2243 :fade-after (meters 2000) :period (seconds 1) :length (seconds 0.017) :binding 2242)
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    (sp-item 2242 :fade-after (meters 2000) :flags (sp2))
    )
  )

(defpart 2243
  :init-specs ((:texture (radial-gradient level-default-sprite))
    (:num 0.5)
    (:x (meters 0) (meters 1))
    (:scale-x (meters 2))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a -1000.0 11 100.0)
    (:vel-y (meters 0.033333335) (meters 0.016666668))
    (:friction 0.995)
    (:timer (seconds 5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'spt-func-birth-on-stop)
    )
  )

(defpart 2242
  :init-specs ((:texture (middot level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 0.8) (meters 0.2))
    (:scale-y :copy scale-x)
    (:r 64.0)
    (:g 0.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.00033333333) (meters 0.0033333334))
    (:scalevel-x (meters -0.0013333333) (meters -0.0013333333))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.10666667)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    )
  )

;; WARN: Return type mismatch (pointer process) vs none.
(defun spt-func-birth-on-stop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (when (zero? (-> arg1 timer))
    (cond
      ((logtest? (-> group-mh-plant-flare-pop flags) (sp-group-flag sp13))
       (let ((v1-6 (-> *launch-matrix* trans))
             (a0-1 (new 'stack-no-clear 'vector))
             )
         (set! (-> a0-1 x) (-> arg2 launchrot x))
         (set! (-> a0-1 y) (-> arg2 launchrot y))
         (set! (-> a0-1 z) (-> arg2 launchrot z))
         (set! (-> a0-1 w) 1.0)
         (vector-copy! v1-6 a0-1)
         )
       (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group group-mh-plant-flare-pop)
       )
      (else
        (let ((v1-19 (-> *launch-matrix* trans))
              (a0-6 (new 'stack-no-clear 'vector))
              )
          (set! (-> a0-6 x) (-> arg2 launchrot x))
          (set! (-> a0-6 y) (-> arg2 launchrot y))
          (set! (-> a0-6 z) (-> arg2 launchrot z))
          (set! (-> a0-6 w) 1.0)
          (vector-copy! v1-19 a0-6)
          )
        (part-tracker-spawn part-tracker :to *entity-pool* :group group-mh-plant-flare-pop)
        )
      )
    )
  (none)
  )

(defpartgroup group-mh-plant-flare-pop
  :id 573
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 100)
  :parts ((sp-item 2244 :fade-after (meters 2000) :flags (sp3)))
  )

(defpart 2244
  :init-specs ((:texture (big-cloud level-default-sprite))
    (:num 10.0 10.0)
    (:scale-x (meters 5) (meters 10))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0)
    (:g 0.0)
    (:b 128.0)
    (:a 32.0)
    (:vel-y (meters 0.16666667))
    (:fade-r -0.10666667)
    (:fade-a -0.053333335 -0.053333335)
    (:accel-y (meters -0.00033333333) (meters -0.0033333334))
    (:friction 0.8 0.05)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-mh-plant-die
  :id 574
  :duration (seconds 2)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2245 :flags (sp7) :period (seconds 20) :length (seconds 0.335))
    (sp-item 2246 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.335) :offset 25)
    )
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-mh-plant-die-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100))
        (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 40))
        (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 130))
        (v1-5 (logand 0 (rand-uint31-gen *random-generator*)))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0)))
    (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0))))
    (set! (-> arg2 rotate-z) (the float (- s5-0 (the-as int v1-5))))
    )
  (none)
  )

(defpart 2245
  :init-specs ((:texture (water-splat lforplnt-sprite))
    (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice)
    (:num 1.0)
    (:scale-x (meters 1) (meters 1))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.016666668) (meters 0.03))
    (:scalevel-x (meters 0.0033333334) (meters 0.01))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334)
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2))
    (:func 'check-drop-group-center)
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2246
  :init-specs ((:texture (water-splat lforplnt-sprite))
    (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice)
    (:num 0.3 0.2)
    (:y (meters 0.3))
    (:scale-x (meters 0.5))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters -0.0004))
    (:scalevel-x (meters 0.006666667) (meters 0.016666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-mh-plant-warning
  :id 575
  :duration (seconds 12)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2247 :flags (sp3 sp7)) (sp-item 2248 :flags (sp3 sp7)))
  )

(defpart 2247
  :init-specs ((:texture (bigpuff level-default-sprite))
    (:num 1.0)
    (:y (meters 0.3))
    (:scale-x (meters 0.5))
    (:rot-x (degrees 4.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0)
    (:g 0.0)
    (:b 128.0)
    (:a 0.0)
    (:omega (degrees 2261.25))
    (:scalevel-x (meters 0.0013333333))
    (:rotvel-z (degrees 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.012307692)
    (:timer (seconds 12))
    (:flags (glow))
    (:userdata 4096.0)
    (:next-time (seconds 10.835))
    (:next-launcher 2249)
    )
  )

(defpart 2248
  :init-specs ((:texture (bigpuff level-default-sprite))
    (:num 1.0)
    (:y (meters 0.3))
    (:scale-x (meters 0.5))
    (:rot-x (degrees 4.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0)
    (:g 0.0)
    (:b 128.0)
    (:a 0.0)
    (:omega (degrees 2261.25))
    (:scalevel-x (meters 0.0013333333))
    (:rotvel-z (degrees -0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.012307692)
    (:timer (seconds 12))
    (:flags (glow))
    (:userdata 4096.0)
    (:next-time (seconds 10.835))
    (:next-launcher 2249)
    )
  )

(defpart 2249
  :init-specs ((:fade-a -0.114285715))
  )

(defpartgroup group-mh-plant-pop
  :id 576
  :duration (seconds 2)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2250 :flags (sp7)))
  )

(defpart 2250
  :init-specs ((:texture (big-cloud level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 2) (meters 2))
    (:scale-y :copy scale-x)
    (:r 40.0 40.0)
    (:g 0.0)
    (:b 128.0)
    (:a 32.0 32.0)
    (:omega (degrees 0.45))
    (:vel-y (meters 0.05) (meters 0.016666668))
    (:scalevel-x (meters 0.0033333334) (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.53333336)
    (:fade-b -0.85333335)
    (:fade-a -0.10666667)
    (:friction 0.97 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2))
    (:func 'sparticle-motion-blur)
    (:conerot-x (degrees 80) (degrees 10))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-for-bridge-dust
  :id 577
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2251 :flags (sp7)) (sp-item 2252 :flags (sp7)))
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

(defpart 2251
  :init-specs ((:texture (rockbit01 level-default-sprite))
    (:birth-func 'spt-birth-func-part-for-bridge-bits)
    (:num 1.0)
    (:scale-x (meters 0.1) (meters 0.1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.1) (meters 0.1))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-x (meters -0.1) (meters 0.2))
    (:vel-y (meters 0.016666668) (meters 0.016666668))
    (:rotvel-z (degrees -3.0000002) (degrees 6.0000005))
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat))
    (:userdata :data (new 'static 'boxed-array :type int32
                       10
                       1
                       0
                       #x408b00
                       #x408c00
                       #x40a100
                       #x40a200
                       #x40a300
                       #x40a400
                       #x40a500
                       #x40a600
                       #x40a700
                       #x40a800
                       #x40a900
                       #x40aa00
                       #x40ab00
                       #x40ac00
                       #x40ad00
                       #x40ae00
                       )
               )
    (:func 'sparticle-texture-animate)
    (:conerot-x (degrees 0) (degrees 90))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-for-bridge-bits arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defpart 2252
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 3) (meters 3))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 190.0)
    (:g 150.0)
    (:b 90.0)
    (:a 64.0)
    (:vel-x (meters -0.1) (meters 0.2))
    (:vel-z (meters 0.016666668) (meters 0.016666668))
    (:scalevel-x (meters 0.01) (meters 0.01))
    (:rotvel-z (degrees -0.3) (degrees 0.6))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667)
    (:accel-y (meters 0) (meters 0.00066666666))
    (:friction 0.95)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-for-ring-finder
  :id 578
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 2253 :flags (sp7)))
  )

(defpart 2254
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 1))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0)
    (:b 128.0)
    (:a 50.0)
    (:fade-r 0.027777778)
    (:fade-b -0.027777778)
    (:fade-a -0.055555556)
    (:timer (seconds 6))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    )
  )

(defpart 2253
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 2.0)
    (:x (meters -2) (meters 4))
    (:y (meters -1) (meters 2))
    (:scale-x (meters 0.1) (meters 0.2))
    (:scale-y :copy scale-x)
    (:r 50.0)
    (:g 50.0)
    (:b 120.0)
    (:a 64.0)
    (:vel-y (meters 0.006666667) (meters 0.0016666667))
    (:scalevel-x (meters 0.00033333333))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.0)
    (:accel-y (meters -0.00033333333) (meters -0.00016666666))
    (:timer (seconds 1.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    )
  )

(defpartgroup group-for-ring-finder-explosion
  :id 579
  :duration (seconds 4)
  :flags (sp0 sp5)
  :bounds (static-bspherem 0 0 0 15)
  :parts ((sp-item 2255 :flags (sp6) :period (seconds 30) :length (seconds 0.017)))
  )

(defpart 2255
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 40.0)
    (:x (meters -2) (meters 4))
    (:y (meters -2) (meters 4))
    (:z (meters -2) (meters 4))
    (:scale-x (meters 2.5))
    (:scale-y :copy scale-x)
    (:r 100.0)
    (:g 0.0 100.0)
    (:b 255.0)
    (:a 60.0)
    (:vel-x (meters -0.023333333) (meters 0.046666667))
    (:vel-y (meters 0.013333334) (meters 0.033333335))
    (:vel-z (meters -0.023333333) (meters 0.046666667))
    (:scalevel-x (meters 0.0016666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.33333334)
    (:fade-g -0.33333334)
    (:fade-a -0.2)
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    )
  )

(defpart 2256
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 20))
    (:rot-x (degrees 225))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 255.0)
    (:a 64.0)
    (:fade-a -0.21333334)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpart 2257
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 10.0 10.0)
    (:scale-x (meters 0.8) (meters 1.2))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.16666667) (meters 0.33333334))
    (:scalevel-x (meters -0.0016666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-g -0.17777778)
    (:fade-b -0.06666667)
    (:fade-a -0.28444445 -0.28444445)
    (:friction 0.9)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2258
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 30.0)
    (:scale-x (meters 3) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0) (meters 0.06666667))
    (:scalevel-x (meters 0.016666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-g -0.22857143)
    (:fade-b -0.08571429)
    (:fade-a -0.36571428 -0.36571428)
    (:friction 0.93)
    (:timer (seconds 1.167))
    (:flags (sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2259
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 3) (meters 2))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 8.0 8.0)
    (:g :copy r)
    (:b :copy r)
    (:a 64.0)
    (:vel-y (meters 0.33333334) (meters 0.13333334))
    (:scalevel-x (meters 0.06666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667 -0.10666667)
    (:friction 0.7)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
    (:func 'sparticle-2d-spline-align-instant)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2260
  :init-specs ((:texture (hotdot level-default-sprite))
    (:birth-func 'birth-func-curve)
    (:num 30.0)
    (:scale-x (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 1.0)
    (:g 1.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.05))
    (:friction 0.97)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-13))
    (:userdata 0.0)
    (:func 'live-func-curve)
    (:conerot-x (degrees 0) (degrees 360))
    (:conerot-z (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(if #t
    (set! *range-ffexplo-dust-color* (new 'static 'curve-color-fast
                                       :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                       :ys (new 'static 'inline-array vector 4
                                         (new 'static 'vector :x 70.0 :y 70.0 :z 70.0 :w 128.0)
                                         (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0)
                                         (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0)
                                         (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0)
                                         )
                                       :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
                                       )
          )
    )

(if #t
    (set! *range-ffexplo-dust-alpha* (new 'static 'curve2d-fast
                                       :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                       :ys (new 'static 'vector :x 64.0 :y 32.0 :z 33.0 :w 34.0)
                                       :one-over-x-deltas (new 'static 'vector :x -32.0 :y 1.0 :z 1.0 :w 1.0)
                                       )
          )
    )

(if #t
    (set! *range-ffexplo-dust-scale-x* (new 'static 'curve2d-fast
                                         :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                         :ys (new 'static 'vector :x 8.0 :y 20.0 :z 21.0 :w 22.0)
                                         :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0)
                                         )
          )
    )

(if #t
    (set! *range-ffexplo-dust-scale-y* (new 'static 'curve2d-fast
                                         :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                         :ys (new 'static 'vector :x 8.0 :y 20.0 :z 21.0 :w 22.0)
                                         :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0)
                                         )
          )
    )

(if #t
    (set! *curve-ffexplo-dust-alpha* (new 'static 'curve2d-fast
                                       :xs (new 'static 'vector :y -0.7 :z -1.0 :w -2.0)
                                       :ys (new 'static 'vector :y 1.0 :w 1.0)
                                       :one-over-x-deltas (new 'static 'vector :x 1.4285715 :y -3.3333333 :z 1.0 :w 1.0)
                                       )
          )
    )

(if #t
    (set! *curve-ffexplo-dust-scale-x* (new 'static 'curve2d-fast
                                         :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0)
                                         :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2)
                                         :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0)
                                         )
          )
    )

(if #t
    (set! *curve-ffexplo-dust-scale-y* (new 'static 'curve2d-fast
                                         :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0)
                                         :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2)
                                         :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0)
                                         )
          )
    )

(define *part-for-ring-finder-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings
                                                                  :lifetime-base (seconds 0.5)
                                                                  :lifetime-offset (seconds 1)
                                                                  :flags (particle-curve-flags pcf0)
                                                                  )
        )

(set! (-> *part-id-table* 2260 init-specs 14 initial-valuef)
      (the-as float *part-for-ring-finder-explosion-dust-in-curve-settings*)
      )

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* r-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* g-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* b-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*)

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-scalar)
      *curve-ffexplo-dust-scale-x*
      )

(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-scalar)
      *curve-ffexplo-dust-scale-y*
      )

(defpart 2261
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 3) (meters 2))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 255.0)
    (:a 128.0)
    (:vel-y (meters 0.33333334) (meters 0.13333334))
    (:scalevel-x (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-g -0.17777778)
    (:fade-b -0.06666667)
    (:fade-a -0.28444445 -0.28444445)
    (:friction 0.7)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:func 'sparticle-2d-spline-align-instant)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2262
  :init-specs ((:texture (hotdot level-default-sprite))
    (:birth-func 'birth-func-curve)
    (:num 8.0)
    (:x (meters -1) (meters 2))
    (:y (meters 0) (meters 2))
    (:scale-x (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 255.0)
    (:a 15.0)
    (:vel-y (meters 0.06666667) (meters 0.21333334))
    (:friction 0.9)
    (:timer (seconds 1))
    (:flags ())
    (:userdata 0.0)
    (:func 'live-func-curve)
    (:conerot-x (degrees 20) (degrees 90))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(if #t
    (set! *range-ffexplo-color* (new 'static 'curve-color-fast
                                  :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                  :ys (new 'static 'inline-array vector 4
                                    (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                    (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                    (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                    (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                    )
                                  :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
                                  )
          )
    )

(if #t
    (set! *range-ffexplo-alpha* (new 'static 'curve2d-fast
                                  :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                  :ys (new 'static 'vector :x 64.0 :y 64.0 :z 65.0 :w 66.0)
                                  :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0)
                                  )
          )
    )

(if #t
    (set! *range-ffexplo-scale-x* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                    :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0)
                                    :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *range-ffexplo-scale-y* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                    :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0)
                                    :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *curve-ffexplo-alpha* (new 'static 'curve2d-fast
                                  :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0)
                                  :ys (new 'static 'vector :y 1.0 :z 0.8)
                                  :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0)
                                  )
          )
    )

(if #t
    (set! *curve-ffexplo-scale-x* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0)
                                    :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5)
                                    :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *curve-ffexplo-scale-y* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0)
                                    :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5)
                                    :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0)
                                    )
          )
    )

(define *part-for-ring-finder-explosion-texture-curve-settings* (new 'static 'particle-curve-settings
                                                                  :lifetime-base (seconds 0.1)
                                                                  :lifetime-offset (seconds 0.6)
                                                                  :flags (particle-curve-flags pcf0)
                                                                  )
        )

(set! (-> *part-id-table* 2262 init-specs 16 initial-valuef)
      (the-as float *part-for-ring-finder-explosion-texture-curve-settings*)
      )

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* color-start) *range-ffexplo-color*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* alpha-start) *range-ffexplo-alpha*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-start) *range-ffexplo-scale-x*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-start) *range-ffexplo-scale-y*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* r-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* g-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* b-scalar) #f)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* a-scalar) *curve-ffexplo-alpha*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-scalar) *curve-ffexplo-scale-x*)

(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-scalar) *curve-ffexplo-scale-y*)

(defpart 2263
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 20))
    (:rot-x (degrees 2.25))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 128.0)
    (:a 128.0)
    (:omega (degrees 6767.9995))
    (:scalevel-x (meters -0.33333334))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.135))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 2264
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 4) (meters 4))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 255.0)
    (:a 128.0)
    (:vel-y (meters 0.06666667) (meters 0.06666667))
    (:scalevel-x (meters -0.033333335) (meters -0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.00066666666) (meters -0.00066666666))
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 170))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2265
  :init-specs ((:texture (hotdot level-default-sprite))
    (:birth-func 'birth-func-inherit-size)
    (:num 1.0)
    (:scale-x (meters 0.00024414062) (meters 0.00012207031))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 10.0)
    (:g 0.0 64.0)
    (:b 128.0)
    (:a 128.0)
    (:fade-a -0.36571428 -0.36571428)
    (:accel-y (meters 0) (meters -0.00033333333))
    (:timer (seconds 1.167))
    (:flags (sp-cpuinfo-flag-3))
    )
  )

(defpartgroup group-forest-waterfall-base
  :id 580
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 1)
  :parts ((sp-item 2266 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7))
    (sp-item 2267 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7))
    )
  )

(defpart 2266
  :init-specs ((:texture (water-drops level-default-sprite))
    (:num 4.0)
    (:x (meters 0) (meters 0.4))
    (:scale-x (meters 0.1) (meters 0.2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 120.0 30.0)
    (:g :copy r)
    (:b :copy r)
    (:a 128.0)
    (:vel-y (meters 0.0033333334))
    (:scalevel-x (meters 0.002) (meters 0.002))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.00066666666))
    (:timer (seconds 0.267))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 left-multiply-quat))
    (:next-time (seconds 0.135))
    (:next-launcher 2268)
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2268
  :init-specs ((:fade-a -3.2))
  )

(defpart 2267
  :init-specs ((:texture (laser-hit2 level-default-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 0.2)
    (:scale-x (meters 0.5) (meters 0.5))
    (:scale-y :copy scale-x)
    (:r 120.0 30.0)
    (:g :copy r)
    (:b :copy r)
    (:a 32.0 120.0)
    (:scalevel-x (meters 0.006666667) (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.25833333)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200))
    (:rotate-y (degrees 0) (degrees 360))
    )
  )

(defpartgroup group-forest-waterfall-splash
  :id 581
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 10)
  :parts ((sp-item 2269 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)))
  )

(defpart 2269
  :init-specs ((:texture (water-drops level-default-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 1.0)
    (:y (meters 0))
    (:scale-x (meters 1) (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 100.0 20.0)
    (:g :copy r)
    (:b :copy r)
    (:a 64.0)
    (:vel-y (meters 0.033333335) (meters 0.01))
    (:scalevel-x (meters 0.026666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.053333335 -0.10666667)
    (:accel-y (meters -0.0016666667))
    (:friction 0.98 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00))
    (:conerot-x (degrees 90) (degrees 30))
    (:conerot-y (degrees -60) (degrees 120))
    (:rotate-y (degrees 0))
    )
  )

;; WARN: Return type mismatch float vs none.
(defun birth-func-for-ground-dirt-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (set! (-> arg1 omega) (+ -1024.0 (-> arg2 launchrot y)))
  (none)
  )

(defun spt-func-for-ground-dirt-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0))
    (let ((s4-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0)
      (launch-particles (-> *part-id-table* 2270) s4-0)
      )
    )
  (none)
  )

(defun spt-func-for-ground-dirt-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0))
    (let ((s4-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0)
      (launch-particles (-> *part-id-table* 2271) s4-0)
      )
    )
  (none)
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-for-statue-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-for-statue-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25))
        (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60))
        )
    (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0))))
    (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6)))
    )
  (none)
  )

(defpartgroup group-for-statue-rise
  :id 582
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 12)
  :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200))
    (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200))
    (sp-item 2274 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 3))
    )
  )

(defpartgroup group-for-statue-rise-no-rocks
  :id 583
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 12)
  :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200))
    (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200))
    )
  )

(defpart 2272
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:birth-func 'spt-birth-func-brightness-for-statue-dust)
    (:num 0.5)
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 140.0 10.0)
    (:g 120.0)
    (:b 80.0)
    (:a 32.0 64.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0.006666667) (meters 0.016666668))
    (:rotvel-z (degrees -0.1) (degrees 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.064 -0.064)
    (:accel-y (meters 0) (meters 0.000033333334))
    (:friction 0.94)
    (:timer (seconds 10))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z))
    (:conerot-x (degrees 80) (degrees 10))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2273
  :init-specs ((:texture (water-drops level-default-sprite))
    (:birth-func 'spt-birth-func-part-for-statue-rise-dirt)
    (:num 5.0)
    (:x (meters 3) (meters 2))
    (:y (meters -1))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.026666667) (meters 0.013333334))
    (:scalevel-x (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-13))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00))
    (:conerot-x (degrees 0) (degrees 30))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-for-statue-rise-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-for-statue-dirt arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defpart 2274
  :init-specs ((:texture (rockbit01 level-default-sprite))
    (:birth-func 'spt-birth-func-part-for-statue-rise-rocks)
    (:num 2.0)
    (:x (meters 3) (meters 3))
    (:y (meters 0.5))
    (:scale-x (meters 0.2) (meters 0.6))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.2) (meters 0.6))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.013333334) (meters 0.06666667))
    (:rotvel-z (degrees -1) (degrees 2))
    (:accel-y (meters -0.0033333334))
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13))
    (:userdata :data (new 'static 'boxed-array :type int32
                       10
                       1
                       0
                       #x408b00
                       #x408c00
                       #x40a100
                       #x40a200
                       #x40a300
                       #x40a400
                       #x40a500
                       #x40a600
                       #x40a700
                       #x40a800
                       #x40a900
                       #x40aa00
                       #x40ab00
                       #x40ac00
                       #x40ad00
                       #x40ae00
                       )
               )
    (:func 'spt-func-part-for-statue-rise-rocks)
    (:conerot-x (degrees 20))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4)
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defun spt-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot))
  (spt-func-for-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4))
  (none)
  )

(defpart 2270
  :init-specs ((:texture (rockbit01 level-default-sprite))
    (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce1)
    (:num 1.0)
    (:scale-x (meters 0.5) (meters 0.4) :store)
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.5) (meters 0.4))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.016666668) (meters 0.033333335))
    (:rotvel-z (degrees -1) (degrees 2))
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13))
    (:userdata :data (new 'static 'boxed-array :type int32
                       10
                       1
                       0
                       #x40ae00
                       #x40ad00
                       #x40ac00
                       #x40ab00
                       #x40aa00
                       #x40a900
                       #x40a800
                       #x40a700
                       #x40a600
                       #x40a500
                       #x40a400
                       #x40a300
                       #x40a200
                       #x40a100
                       #x408c00
                       #x408b00
                       )
               )
    (:func 'spt-func-part-for-statue-rise-rocks-bounce1)
    (:conerot-x (degrees 5) (degrees 30))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4)
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defun spt-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot))
  (spt-func-for-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4))
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defun spt-func-for-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (cond
    ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y)))
     (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot))
     )
    (else
      (set! (-> arg1 acc x) 0.0)
      (set! (-> arg1 acc y) 0.0)
      (set! (-> arg1 acc z) 0.0)
      (set! (-> arg1 vel-sxvel x) (* 0.7 (-> arg1 vel-sxvel x)))
      (set! (-> arg1 vel-sxvel z) (* 0.7 (-> arg1 vel-sxvel z)))
      (set! (-> arg2 launchrot y) (-> arg1 omega))
      )
    )
  (none)
  )

(defpart 2271
  :init-specs ((:texture (rockbit01 level-default-sprite))
    (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce2)
    (:num 1.0)
    (:scale-x '*sp-temp*)
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 0.5) (meters 0.4))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.0033333334) (meters 0.016666668))
    (:scalevel-x (meters -0.00083333335))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0016666667))
    (:timer (seconds 10))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13))
    (:userdata :data (new 'static 'boxed-array :type int32
                       10
                       1
                       0
                       #x408b00
                       #x408c00
                       #x40a100
                       #x40a200
                       #x40a300
                       #x40a400
                       #x40a500
                       #x40a600
                       #x40a700
                       #x40a800
                       #x40a900
                       #x40aa00
                       #x40ab00
                       #x40ac00
                       #x40ad00
                       #x40ae00
                       )
               )
    (:func 'spt-func-for-ground-dirt-bounce3)
    (:conerot-x (degrees 5) (degrees 30))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defun spt-birth-func-part-for-statue-rise-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object))
  (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4)
  (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4)
  (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4)
  (none)
  )

(defpartgroup group-for-statue-buildup
  :id 584
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2275 :flags (is-3d sp7) :period (seconds 10) :length (seconds 1))
    (sp-item 2276 :flags (sp7) :period (seconds 10) :length (seconds 0.035))
    )
  )

(defpart 2275
  :init-specs ((:texture (light-burst level-default-sprite))
    (:num 0.2 0.2)
    (:scale-x (meters 40) (meters 40))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0))
    (:r 128.0)
    (:g 64.0)
    (:b 255.0)
    (:a 255.0)
    (:scalevel-y (meters 0.033333335))
    (:timer (seconds 1.167))
    (:flags (sp-cpuinfo-flag-3 left-multiply-quat))
    (:func 'sparticle-track-root)
    (:next-time (seconds 0.167))
    (:next-launcher 2277)
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2277
  :init-specs ((:scalevel-y (meters 0)) (:next-time (seconds 0.835)) (:next-launcher 2278))
  )

(defpart 2278
  :init-specs ((:fade-a -5.1))
  )

(defpart 2276
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:y (meters 2))
    (:scale-x (meters 0))
    (:rot-x (degrees 225))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 32.0)
    (:b 255.0)
    (:a 0.0)
    (:scalevel-x (meters 0.13333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.21333334)
    (:timer (seconds 1.017))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpartgroup group-for-statue-explode
  :id 585
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 20)
  :parts ((sp-item 2279 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
    (sp-item 2280 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
    (sp-item 2281 :flags (sp3) :period (seconds 30) :length (seconds 0.017))
    (sp-item 2282 :period (seconds 30) :length (seconds 0.167))
    (sp-item 2283 :period (seconds 30) :length (seconds 0.335))
    (sp-item 2284 :period (seconds 30) :length (seconds 0.667) :offset 300)
    (sp-item 2285 :period (seconds 30) :length (seconds 0.117))
    )
  )

(defpart 2285
  :init-specs ((:texture (motion-blur-part level-default-sprite))
    (:num 10.0)
    (:y (meters -3.5) (meters 2))
    (:scale-x (meters 5))
    (:rot-x 4)
    (:scale-y (meters 0.2) (meters 0.4))
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:omega (degrees 0.0675))
    (:vel-y (meters 0.26666668) (meters 0.33333334))
    (:fade-a -0.51 -0.51)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.9 0.08)
    (:timer (seconds 1.5) (seconds 0.997))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:conerot-x (degrees 0) (degrees 140))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2284
  :init-specs ((:texture (motion-blur-part level-default-sprite))
    (:num 10.0)
    (:x (meters -5) (meters 10))
    (:y (meters -5) (meters 10))
    (:z (meters -5) (meters 10))
    (:scale-x (meters 0.05) (meters 0.2))
    (:scale-y :copy scale-x)
    (:r 64.0 128.0)
    (:g 0.0 32.0)
    (:b 255.0)
    (:a 120.0 120.0)
    (:omega (degrees 0.045))
    (:vel-y (meters 0) (meters 0.01))
    (:fade-a -0.17 -0.1275)
    (:timer (seconds 10))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.017))
    (:next-launcher 2286)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2286
  :init-specs ((:accel-x (meters -0.0033333334) 1 (meters 0.006666667))
    (:accel-y (meters -0.0033333334) 1 (meters 0.006666667))
    (:accel-z (meters -0.0033333334) 1 (meters 0.006666667))
    (:next-time (seconds 0.067) (seconds 0.03))
    (:next-launcher 2286)
    )
  )

(defpart 2279
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:y (meters 2))
    (:scale-x (meters 40))
    (:rot-x (degrees 225))
    (:scale-y :copy scale-x)
    (:r 160.0)
    (:g 0.0)
    (:b 255.0)
    (:a 64.0)
    (:fade-a -0.21333334)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpart 2280
  :init-specs ((:texture (bigpuff level-default-sprite))
    (:num 30.0)
    (:scale-x (meters 6) (meters 4))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 160.0)
    (:g 30.0)
    (:b 255.0)
    (:a 128.0)
    (:vel-y (meters 0) (meters 0.13333334))
    (:scalevel-x (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.06666667)
    (:fade-g -0.025)
    (:fade-a -0.10666667 -0.10666667)
    (:friction 0.99)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2282
  :init-specs ((:texture (explosion-edge level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 6) (meters 4))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 80.0 20.0)
    (:g 30.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.6666667) (meters 0.26666668))
    (:scalevel-x (meters 0.06666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.13333334)
    (:fade-g -0.05)
    (:fade-a -0.21333334 -0.21333334)
    (:friction 0.8)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:func 'sparticle-2d-spline-align-instant)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2283
  :init-specs ((:texture (explosion-nebula level-default-sprite))
    (:birth-func 'birth-func-curve)
    (:num 1.0)
    (:x (meters -4) (meters 8))
    (:y (meters -4) (meters 8))
    (:scale-x (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0.13333334) (meters 0.06666667))
    (:friction 0.9)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-14))
    (:userdata 0.0)
    (:func 'live-func-curve)
    (:conerot-x (degrees 20) (degrees 90))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(if #t
    (set! *range-sat-explo-color* (new 'static 'curve-color-fast
                                    :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                    :ys (new 'static 'inline-array vector 4
                                      (new 'static 'vector :x 32.0 :z 128.0 :w 128.0)
                                      (new 'static 'vector :x 64.0 :z 128.0 :w 128.0)
                                      (new 'static 'vector :x 64.0 :z 128.0 :w 128.0)
                                      (new 'static 'vector :x 64.0 :z 128.0 :w 128.0)
                                      )
                                    :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *range-sat-explo-alpha* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                    :ys (new 'static 'vector :x 128.0 :y 128.0 :z 129.0 :w 130.0)
                                    :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *range-sat-explo-scale-x* (new 'static 'curve2d-fast
                                      :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                      :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0)
                                      :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0)
                                      )
          )
    )

(if #t
    (set! *range-sat-explo-scale-y* (new 'static 'curve2d-fast
                                      :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
                                      :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0)
                                      :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0)
                                      )
          )
    )

(if #t
    (set! *curve-sat-explo-alpha* (new 'static 'curve2d-fast
                                    :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0)
                                    :ys (new 'static 'vector :y 1.0 :z 0.8)
                                    :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0)
                                    )
          )
    )

(if #t
    (set! *curve-sat-explo-scale-x* (new 'static 'curve2d-fast
                                      :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0)
                                      :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5)
                                      :one-over-x-deltas (new 'static 'vector :x 5.0 :y 0.625 :z 1.0 :w 1.0)
                                      )
          )
    )

(if #t
    (set! *curve-sat-explo-scale-y* (new 'static 'curve2d-fast
                                      :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0)
                                      :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5)
                                      :one-over-x-deltas (new 'static 'vector :x 5.0 :y 0.625 :z 1.0 :w 1.0)
                                      )
          )
    )

(define *part-for-statue-explosion-texture-curve-settings* (new 'static 'particle-curve-settings
                                                             :lifetime-base (seconds 0.7)
                                                             :lifetime-offset (seconds 0.6)
                                                             :flags (particle-curve-flags pcf0)
                                                             )
        )

(set! (-> *part-id-table* 2283 init-specs 16 initial-valuef)
      (the-as float *part-for-statue-explosion-texture-curve-settings*)
      )

(set! (-> *part-for-statue-explosion-texture-curve-settings* color-start) *range-sat-explo-color*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* alpha-start) *range-sat-explo-alpha*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-start) *range-sat-explo-scale-x*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-start) *range-sat-explo-scale-y*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* r-scalar) #f)

(set! (-> *part-for-statue-explosion-texture-curve-settings* g-scalar) #f)

(set! (-> *part-for-statue-explosion-texture-curve-settings* b-scalar) #f)

(set! (-> *part-for-statue-explosion-texture-curve-settings* a-scalar) *curve-sat-explo-alpha*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-scalar) *curve-sat-explo-scale-x*)

(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-scalar) *curve-sat-explo-scale-y*)

(defpart 2281
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 30))
    (:rot-x (degrees 2.25))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 80.0)
    (:g 40.0)
    (:b 128.0)
    (:a 128.0)
    (:omega (degrees 6767.9995))
    (:scalevel-x (meters -0.33333334))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.135))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpartgroup group-for-pillar-splash
  :id 586
  :duration (seconds 5)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 -12 0 14)
  :parts ((sp-item 2287 :flags (sp7)) (sp-item 2288 :flags (is-3d)))
  )

(defpart 2287
  :init-specs ((:texture (water-drops level-default-sprite))
    (:num 5.0)
    (:x (meters 4))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 120.0 100.0)
    (:g :copy r)
    (:b :copy r)
    (:a 64.0 64.0)
    (:vel-y (meters 0.033333335) (meters 0.016666668))
    (:scalevel-x (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0016666667))
    (:friction 0.99)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z))
    (:func 'check-drop-group-center)
    (:conerot-x (degrees -5) (degrees 10))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 2288
  :init-specs ((:texture (splash-foam level-default-sprite))
    (:num 0.1)
    (:scale-x (meters 10) (meters 0.5))
    (:rot-y (degrees 0) (degrees 3600))
    (:scale-y (meters 10) (meters 0.5))
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters 0.01) (meters 0.0033333334))
    (:scalevel-y (meters 0.01) (meters 0.0033333334))
    (:fade-a -0.21333334)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat))
    )
  )

(defpartgroup group-for-tower-splash
  :id 587
  :duration (seconds 5)
  :flags (sp0)
  :bounds (static-bspherem 0 -12 0 14)
  :parts ((sp-item 2289 :flags (is-3d)))
  )

(defpart 2289
  :init-specs ((:texture (splash-foam level-default-sprite))
    (:num 0.1)
    (:scale-x (meters 20) (meters 1.5))
    (:rot-y (degrees 0) (degrees 3600))
    (:scale-y (meters 20) (meters 1.5))
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters 0.01) (meters 0.0033333334))
    (:scalevel-y (meters 0.01) (meters 0.0033333334))
    (:fade-a -0.21333334)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat))
    )
  )

(defpartgroup group-for-statue-eyes
  :id 588
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 14)
  :parts ((sp-item 2290 :flags (sp6)))
  )

(defpart 2290
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 6))
    (:rot-x (degrees 225))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 100.0 30.0)
    (:b 155.0)
    (:a 64.0)
    (:omega (degrees 4511.25))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )
