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

;; name: credits.gc
;; name in dgo: credits
;; dgos: OUTROCST

;; DECOMP BEGINS

(defun draw-end-credits ((arg0 level) (arg1 float))
  (let ((f30-0 (- 416.0 arg1))
        (s5-0 3839)
        (f28-0 0.0)
        (s3-0 #t)
        (s4-0
          (new 'stack 'font-context *font-default-matrix* 6 0 0.0 (font-color default) (font-flags shadow kerning))
          )
        )
    (set-width! s4-0 500)
    (set-height! s4-0 150)
    (set-scale! s4-0 0.8)
    (set! (-> s4-0 flags) (font-flags shadow kerning middle large))
    (while (or s3-0 (and (< f30-0 (- f28-0)) (< (the-as uint s5-0) (the-as uint 4272))))
      (+! f30-0 f28-0)
      (+! s5-0 1)
      (let ((a0-6 (lookup-text arg0 (the-as text-id s5-0) #t)))
        (while (and a0-6 (zero? (-> a0-6 data 0)) (< (the-as uint s5-0) (the-as uint 4272)))
          (+! s5-0 1)
          (set! a0-6 (lookup-text arg0 (the-as text-id s5-0) #t))
          )
        (set! f28-0 (if a0-6
                        (+ 5.0 (print-game-text a0-6 s4-0 #t 35 (bucket-id progress)))
                        40.0
                        )
              )
        )
      (set! s3-0 #f)
      )
    (cond
      ((and (< (the-as uint 3895) (the-as uint s5-0)) (cpad-pressed? 0 triangle circle x))
       #t
       )
      ((and (= s5-0 4272) (< f30-0 (- f28-0)))
       #t
       )
      (else
        (set! (-> s4-0 origin y) f30-0)
        (while (< (-> s4-0 origin y) 416.0)
          (let ((a0-15 (lookup-text arg0 (the-as text-id s5-0) #t)))
            (while (and a0-15 (zero? (-> a0-15 data 0)) (< (the-as uint s5-0) (the-as uint 4272)))
              (+! s5-0 1)
              (set! a0-15 (lookup-text arg0 (the-as text-id s5-0) #t))
              )
            (let ((f0-10 (if a0-15
                             (+ 5.0 (print-game-text a0-15 s4-0 #f 35 (bucket-id progress)))
                             40.0
                             )
                         )
                  )
              (+! (-> s4-0 origin y) f0-10)
              )
            )
          (+! s5-0 1)
          )
        #f
        )
      )
    )
  )

(defun start-credits ((arg0 process))
  (remove-setting! 'movie)
  (remove-setting! 'music-volume)
  (persist-with-delay *setting-control* 'music-volume (seconds 3) 'music-volume 'abs 0.001 0)
  (process-spawn-function
    process
    (lambda :behavior scene-player
      ()
      (set-setting! 'allow-pause #f 0.0 0)
      (set-setting! 'allow-progress #f 0.0 0)
      (set-setting! 'music 'forest 0.0 0)
      (set-setting! 'sound-mode #f 0.0 1)
      (apply-settings *setting-control*)
      (let ((gp-0 (ppointer->process (-> self parent))))
        (when (type? gp-0 scene-player)
          (if (lookup-gui-connection
                *gui-control*
                (the-as process gp-0)
                (gui-channel art-load)
                (the-as string #f)
                (new 'static 'sound-id)
                )
              (sound-group-pause (sound-group dialog))
              )
          )
        )
      (let ((gp-1 (current-time)))
        (while (let ((a0-9 (level-get *level* 'outrocst)))
                 (and a0-9 (not (draw-end-credits a0-9 (* 0.15 (the float (- (current-time) gp-1))))))
                 )
          (suspend)
          )
        )
      (let ((gp-2 (ppointer->process (-> self parent))))
        (when (type? gp-2 scene-player)
          (if (lookup-gui-connection
                *gui-control*
                (the-as process gp-2)
                (gui-channel art-load)
                (the-as string #f)
                (new 'static 'sound-id)
                )
              (sound-group-continue (sound-group dialog))
              )
          )
        )
      (none)
      )
    :to arg0
    )
  0
  (none)
  )

(defpartgroup group-ctyport-fireworks
  :id 1272
  :duration (seconds 169.6)
  :flags (always-draw)
  :bounds (static-bspherem 0 0 0 2500)
  :parts ((sp-item 5406 :binding 5402)
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5402 :flags (start-dead))
    (sp-item 5407 :binding 5403)
    (sp-item 5403 :flags (start-dead launch-asap) :binding 5404)
    (sp-item 5403 :flags (start-dead launch-asap) :binding 5404)
    (sp-item 5403 :flags (start-dead launch-asap) :binding 5404)
    (sp-item 5403 :flags (start-dead launch-asap) :binding 5404)
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5404 :flags (start-dead))
    (sp-item 5408 :binding 5405)
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    (sp-item 5405 :flags (start-dead))
    )
  )

(defpart 5408
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:num 0.01)
    (:sound (static-sound-spec "whistle-green"))
    (:scale-x (meters 2.5))
    (:scale-y (meters 4.5))
    (:r 128.0 128.0)
    (:g 255.0)
    (:b 128.0)
    (:a 128.0)
    (:omega (degrees 0.1575))
    (:vel-y (meters 0.4) (meters 0.033333335))
    (:rotvel-z (degrees -720) (degrees 1440))
    (:friction 0.96)
    (:timer (seconds 2.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:userdata 4096000.0)
    (:func 'check-pop-level-firework-green-userdata)
    (:next-time (seconds 0.667) (seconds 0.33))
    (:next-launcher 5409)
    (:conerot-x (degrees 20) (degrees 60))
    (:conerot-y (degrees 0) (degrees 3600))
    )
  )

(defpart 5405
  :init-specs ((:texture (firework-dust-grey outrocst-sprite))
    (:num 1.0)
    (:scale-x (meters 2) (meters 1))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 64.0 64.0)
    (:g 128.0)
    (:b 64.0)
    (:a 16.0 48.0)
    (:vel-y (meters -0.04) (meters 0.12))
    (:scalevel-x (meters 0.01) (meters 0.01))
    (:rotvel-z (degrees -0.15) (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667 -0.21333334)
    (:accel-y (meters -0.00016666666) (meters -0.00033333333))
    (:friction 0.9 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc))
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-ctyport-firework-green-pop
  :id 1273
  :duration (seconds 0.835)
  :linger-duration (seconds 1.5)
  :bounds (static-bspherem 0 0 0 120)
  :parts ((sp-item 5412 :flags (launch-asap))
    (sp-item 5413 :flags (launch-asap))
    (sp-item 5414 :binding 5410)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5410 :flags (bit1 start-dead launch-asap) :binding 5411)
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    (sp-item 5411 :flags (start-dead))
    )
  )

(defpart 5412
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:sound (static-sound-spec "explode-green"))
    (:scale-x (meters 48) (meters 0.1))
    (:rot-z (degrees -17) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters -1.6))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -10.2)
    (:fade-g 0.0)
    (:fade-b -10.2)
    (:timer (seconds 1.167))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:next-time (seconds 0.085))
    (:next-launcher 5415)
    )
  )

(defpart 5415
  :init-specs ((:scale-x (meters 8))
    (:scale-y :copy scale-x)
    (:scalevel-x (meters -0.026666667))
    (:scalevel-y :copy scalevel-x)
    )
  )

(defpart 5413
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:scale-x (meters 24) (meters 0.1))
    (:rot-z (degrees -17) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters -0.8))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 1.167))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:next-time (seconds 0.085))
    (:next-launcher 5416)
    )
  )

(defpart 5416
  :init-specs ((:scale-x (meters 4))
    (:scale-y :copy scale-x)
    (:scalevel-x (meters -0.013333334))
    (:scalevel-y :copy scalevel-x)
    )
  )

(defpart 5414
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:num 0.0 1.0)
    (:scale-x (meters 0))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:vel-y (meters 0.2) (meters 0.05))
    (:accel-y (meters -0.0016666667) (meters 0.00083333335))
    (:friction 0.94 0.02)
    (:timer (seconds 0.835))
    (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpart 5410
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:num 1.0)
    (:x (meters 0) (meters 160))
    (:y (meters 0) (meters 160))
    (:z (meters 0.75))
    (:scale-x (meters 3))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:omega (degrees 0) (degrees 3600))
    (:vel-x (meters 0.44444442))
    (:vel-z (meters 0.006666667))
    (:fade-r -2.55 -2.55)
    (:fade-g -1.7)
    (:fade-b -10.2 -10.2)
    (:accel-x (meters -0.0074074077))
    (:timer (seconds 0.335) (seconds 0.665))
    (:flags (sp-cpuinfo-flag-1 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14))
    )
  )

(defpart 5411
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:birth-func 'birth-func-firework-color)
    (:num 3.0)
    (:scale-x (meters 2.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters 0) (meters 0.033333335))
    (:scalevel-x (meters -0.006666667) (meters -0.0033333334))
    (:rotvel-z (degrees -0.15) (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:accel-x (meters -0.00016666666) (meters -0.00008333333))
    (:accel-y (meters -0.00033333333) (meters -0.00016666666))
    (:friction 0.9 0.02)
    (:timer (seconds 0.5) (seconds 1.497))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc))
    (:next-time (seconds 0.5) (seconds 1.997))
    (:next-launcher 5417)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpart 5417
  :init-specs ((:scale-x (meters 1) (meters 1))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters -0.025))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.267))
    )
  )

(defpart 5407
  :init-specs ((:texture (glow-soft effects))
    (:num 0.01)
    (:sound (static-sound-spec "whistle-red"))
    (:scale-x (meters 2.5))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 0.0)
    (:omega (degrees 0.1575))
    (:vel-y (meters 0.33333334) (meters 0.06666667))
    (:accel-y (meters -0.00083333335))
    (:friction 0.98 0.02)
    (:timer (seconds 2.335))
    (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:userdata 4096000.0)
    (:func 'check-pop-level-firework-red-userdata)
    (:next-time (seconds 1.985))
    (:next-launcher 5409)
    (:conerot-x (degrees -10) (degrees 30))
    (:conerot-y (degrees 0) (degrees 3600))
    )
  )

(defpart 5403
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:num 1.0)
    (:x (meters 0))
    (:y (meters 0))
    (:z (meters 0.75))
    (:scale-x (meters 2.5) (meters 0.3))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:omega (degrees 0))
    (:vel-x (meters 0.7407408))
    (:vel-y (meters 0.14814815))
    (:vel-z (meters 0))
    (:accel-x (meters -0.0074074077))
    (:timer (seconds 1.967))
    (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14))
    )
  )

(defpart 5404
  :init-specs ((:texture (firework-mini-glow-orange outrocst-sprite))
    (:num 1.0)
    (:scale-x (meters 3) (meters 1))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:vel-y (meters -0.01) (meters 0.03))
    (:scalevel-x (meters -0.006666667) (meters -0.013333334))
    (:rotvel-z (degrees -0.15) (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.0005) (meters -0.00033333333))
    (:friction 0.9 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc))
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-ctyport-firework-red-pop
  :id 1274
  :duration (seconds 0.75)
  :linger-duration (seconds 1.5)
  :bounds (static-bspherem 0 0 0 120)
  :parts ((sp-item 5419 :flags (launch-asap)) (sp-item 5420 :flags (launch-asap) :binding 5418))
  )

(defpart 5419
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:sound (static-sound-spec "explode-red"))
    (:scale-x (meters 48) (meters 0.1))
    (:rot-z (degrees -17) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters -1.28))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.0)
    (:fade-g -5.12)
    (:fade-b -10.2)
    (:timer (seconds 0.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:next-time (seconds 0.085))
    (:next-launcher 5421)
    )
  )

(defpart 5421
  :init-specs ((:scalevel-x (meters -0.09142857)) (:scalevel-y :copy scalevel-x))
  )

(defpart 5420
  :init-specs ((:texture (firework-mini-glow-orange outrocst-sprite))
    (:num 128.0)
    (:scale-x (meters 0.75) (meters 0.25))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:omega (degrees 0.225) (degrees 0.225))
    (:vel-y (meters 0.26666668) (meters 0.06666667))
    (:fade-r 0.0)
    (:fade-g -0.85 -0.85)
    (:fade-b -1.7 -1.7)
    (:accel-y (meters -0.0016666667) (meters 0.00083333335))
    (:friction 0.94 0.02)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.585) (seconds 0.165))
    (:next-launcher 5422)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpart 5422
  :init-specs ((:scale-x (meters 2.5))
    (:scale-y :copy scale-x)
    (:scalevel-x (meters -0.016666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-g 0.0)
    (:func 'nothing)
    (:next-time (seconds 0.017) (seconds 0.497))
    (:next-launcher 5423)
    )
  )

(defpart 5423
  :init-specs ((:scale-x (meters 3))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:timer (seconds 0.335))
    (:next-time (seconds 0.035))
    (:next-launcher 5424)
    )
  )

(defpart 5424
  :init-specs ((:scale-x (meters 2)) (:scale-y :copy scale-x) (:a 128.0) (:fade-a -0.8 -0.8))
  )

(defun check-pop-level-firework-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (when (< (-> arg1 user-float) (-> arg2 launchrot y))
    (let ((s3-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s3-0 (-> arg2 launchrot x) (-> arg2 launchrot y) (-> arg2 launchrot z) 1.0)
      (part-tracker-spawn :to *entity-pool* :group group-ctyport-firework-pop :mat-joint s3-0)
      )
    )
  (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot))
  (none)
  )

(defun check-pop-level-firework-red-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (when (< (-> arg1 user-float) (-> arg2 launchrot y))
    (let ((s3-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s3-0 (-> arg2 launchrot x) (-> arg2 launchrot y) (-> arg2 launchrot z) 1.0)
      (part-tracker-spawn :to *entity-pool* :group group-ctyport-firework-red-pop :mat-joint s3-0)
      )
    )
  (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot))
  (none)
  )

(defun check-pop-level-firework-green-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (when (< (-> arg1 user-float) (-> arg2 launchrot y))
    (let ((s3-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s3-0 (-> arg2 launchrot x) (-> arg2 launchrot y) (-> arg2 launchrot z) 1.0)
      (part-tracker-spawn :to *entity-pool* :group group-ctyport-firework-green-pop :mat-joint s3-0)
      )
    )
  (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot))
  (none)
  )

(defpartgroup group-ctyport-firework-pop
  :id 1275
  :duration (seconds 0.75)
  :linger-duration (seconds 1.5)
  :bounds (static-bspherem 0 0 0 120)
  :parts ((sp-item 5425 :flags (launch-asap))
    (sp-item 5426 :flags (launch-asap) :binding 5418)
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    (sp-item 5418 :flags (start-dead))
    )
  )

(defun birth-func-firework-color ((arg0 sparticle-system)
                         (arg1 sparticle-cpuinfo)
                         (arg2 sprite-vec-data-3d)
                         (arg3 sparticle-launcher)
                         (arg4 sparticle-launch-state)
                         )
  (let ((v1-0 (-> arg4 sprite)))
    (set! (-> arg2 r-g-b-a x) (-> v1-0 sprite r-g-b-a x))
    (set! (-> arg2 r-g-b-a y) (-> v1-0 sprite r-g-b-a y))
    (set! (-> arg2 r-g-b-a z) (-> v1-0 sprite r-g-b-a z))
    )
  0
  (none)
  )

(defpart 5418
  :init-specs ((:texture (firework-dust-grey outrocst-sprite))
    (:birth-func 'birth-func-firework-color)
    (:num 0.25 0.5)
    (:scale-x (meters 1.5) (meters 0.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters -0.01) (meters 0.03))
    (:scalevel-x (meters 0.0033333334) (meters 0.006666667))
    (:rotvel-z (degrees -0.15) (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334 -0.21333334)
    (:accel-x (meters -0.00016666666) (meters -0.00008333333))
    (:accel-y (meters -0.00033333333) (meters -0.00016666666))
    (:friction 0.9 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc))
    (:next-time (seconds 0.167))
    (:next-launcher 5427)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    )
  )

(defpart 5427
  :init-specs ((:scalevel-x (meters 0.0016666667) (meters 0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:next-time (seconds 0.167))
    (:next-launcher 5428)
    )
  )

(defpart 5428
  :init-specs ((:scalevel-x (meters -0.00083333335) (meters -0.0016666667))
    (:scalevel-y :copy scalevel-x)
    (:next-time (seconds 0.5) (seconds 1.997))
    (:next-launcher 5429)
    )
  )

(defpart 5429
  :init-specs ((:scale-x (meters 1))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0 128.0)
    (:next-time (seconds 0.035))
    (:next-launcher 5430)
    )
  )

(defpart 5430
  :init-specs ((:r 128.0) (:g 128.0) (:b 128.0) (:a 64.0) (:fade-a -0.8))
  )

(defpart 5425
  :init-specs ((:texture (glow effects))
    (:num 1.0)
    (:sound (static-sound-spec "explode-blue"))
    (:scale-x (meters 48) (meters 0.1))
    (:rot-z (degrees -17) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters -1.28))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.0)
    (:fade-g -5.12)
    (:fade-b -10.2)
    (:timer (seconds 0.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:next-time (seconds 0.085))
    (:next-launcher 5431)
    )
  )

(defpart 5431
  :init-specs ((:r 0.0)
    (:scalevel-x (meters -0.09142857))
    (:scalevel-y :copy scalevel-x)
    (:fade-r 0.0)
    (:fade-g -1.6)
    (:fade-b 0.0)
    )
  )

(defpart 5426
  :init-specs ((:texture (firework-mini-glow-grey outrocst-sprite))
    (:num 24.0 12.0)
    (:scale-x (meters 2) (meters 0.3))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:omega (degrees 0.225))
    (:vel-y (meters 0.26666668) (meters 0.06666667))
    (:fade-r -3.4)
    (:fade-g -1.7)
    (:fade-b -0.85)
    (:accel-y (meters -0.0016666667) (meters 0.00083333335))
    (:friction 0.94 0.02)
    (:timer (seconds 1) (seconds 0.247))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.585) (seconds 0.08))
    (:next-launcher 5432)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )

(defpart 5432
  :init-specs ((:fade-g 0.0) (:fade-a -0.85333335 -0.85333335))
  )

(defpart 5406
  :init-specs ((:texture (firework-mini-glow outrocst-sprite))
    (:num 0.01)
    (:sound (static-sound-spec "whistle--blue"))
    (:scale-x (meters 4.5) (meters 0.3))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:omega (degrees 0.1575))
    (:vel-y (meters 0.4) (meters 0.06666667))
    (:accel-y (meters -0.0016666667))
    (:friction 0.98 0.02)
    (:timer (seconds 2.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:userdata 4096000.0)
    (:func 'check-pop-level-firework-userdata)
    (:next-time (seconds 1) (seconds 0.997))
    (:next-launcher 5409)
    (:conerot-x (degrees -20) (degrees 60))
    (:conerot-y (degrees 0) (degrees 3600))
    )
  )

(defpart 5409
  :init-specs ((:userdata -4096000.0))
  )

(defpart 5402
  :init-specs ((:texture (firework-mini-glow outrocst-sprite))
    (:num 1.0)
    (:scale-x (meters 2) (meters 1))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:vel-y (meters -0.01) (meters 0.03))
    (:scalevel-x (meters 0.01) (meters 0.01))
    (:rotvel-z (degrees -0.15) (degrees 0.3))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.21333334 -0.42666668)
    (:accel-y (meters -0.00016666666) (meters -0.00033333333))
    (:friction 0.9 0.02)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc))
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-z (degrees 0) (degrees 3600))
    )
  )
