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

;; name: precurd-scenes.gc
;; name in dgo: precurd-scenes
;; dgos: PRECA, PRECD

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

;; DECOMP BEGINS

(define *beam-appearance-1* (new 'static 'prim-beam-settings
                              :width 16384.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00500
                              :num-tiles 4.0
                              )
        )

(define *beam-appearance-2* (new 'static 'prim-beam-settings
                              :width 16384.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00600
                              :num-tiles 4.0
                              )
        )

(define *beam-appearance-3* (new 'static 'prim-beam-settings
                              :width 32768.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00400
                              :num-tiles 4.0
                              )
        )

(define *beam-appearance-4* (new 'static 'prim-beam-settings
                              :width 32768.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00400
                              :num-tiles 4.0
                              )
        )

(define *beam-appearance-5* (new 'static 'prim-beam-settings
                              :width 4096.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00400
                              :num-tiles 4.0
                              )
        )

(define *beam-appearance-6* (new 'static 'prim-beam-settings
                              :width 81920.0
                              :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
                              :alpha 1.0
                              :tex-id #xd3b00400
                              :num-tiles 4.0
                              )
        )

(deftype precurd-states (structure)
  ((pulse  pulse-state  :inline)
   )
  )


(defun init-mood-precurd ((arg0 mood-context))
  (let ((v1-0 (-> arg0 state)))
    (set! (-> v1-0 1) (the-as uint 1.0))
    (set! (-> v1-0 2) (the-as uint 1.0))
    (let ((f0-2 1.0))
      (set! (-> v1-0 3) (the-as uint f0-2))
      f0-2
      )
    )
  )

(defbehavior update-mood-precurd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
  (update-mood-interior arg0 #f)
  (let ((v1-0 (-> arg0 current-fog)))
    (set! (-> v1-0 fog-color x) 41.0)
    (set! (-> v1-0 fog-color y) 54.7998)
    (set! (-> v1-0 fog-color z) 61.5998)
    (set! (-> v1-0 fog-color w) 128.0)
    )
  (set-vector! (-> arg0 current-fog fog-dists) 131072.0 819200.0 255.0 158.0)
  (cond
    ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
     (palette-select-special arg0)
     )
    (else
      (-> arg0 state)
      (set! (-> arg0 times 0 w) 1.0)
      (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0)
      (set! (-> arg0 times 2 w) 1.0)
      (set! (-> arg0 times 3 w) 1.0)
      (set! (-> arg0 times 4 w) 1.0)
      (set! (-> arg0 times 5 w) 1.0)
      (set! (-> arg0 times 6 w) 1.0)
      (set! (-> arg0 times 7 w) 1.0)
      )
    )
  0
  (none)
  )

(defskelgroup skel-precur-wall-window-big-fma precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja
              ((precur-wall-window-big-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 500)
              :origin-joint-index 4
              )

(defskelgroup skel-precur-planet-fma precur-planet precur-planet-lod0-jg precur-planet-idle-ja
              ((precur-planet-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 5000)
              :origin-joint-index 3
              )

(defskelgroup skel-dm-ship-break-precurd dm-ship-break dm-ship-break-lod0-jg dm-ship-break-idle-ja
              ((dm-ship-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 500)
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-dm-ship-tent-brk-precurd dm-ship-tent-brk dm-ship-tent-brk-lod0-jg dm-ship-tent-brk-idle-ja
              ((dm-ship-tent-brk-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 500)
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-terraformer-head-precurd terraformer-head terraformer-head-lod0-jg terraformer-head-idle-ja
              ((terraformer-head-lod0-mg (meters 20))
               (terraformer-head-lod0-mg (meters 40))
               (terraformer-head-lod0-mg (meters 999999))
               )
              :bounds (static-spherem 0 0 0 150)
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-rail-gun-dark-precurd rail-gun-dark rail-gun-dark-lod0-jg rail-gun-dark-idle-ja
              ((rail-gun-dark-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 70)
              :origin-joint-index 3
              )

(defskelgroup skel-rail-gun-light-precurd rail-gun-light 0 2
              ((1 (meters 999999)))
              :bounds (static-spherem 0 0 0 70)
              :origin-joint-index 3
              )

(defskelgroup skel-terraformer-precurd terraformer terraformer-lod0-jg terraformer-walk-ja
              ((terraformer-lod0-mg (meters 20)) (terraformer-lod0-mg (meters 40)) (terraformer-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 175 75 250)
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-terraformer-precurd-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja
              ((terraformer-leg-a-lod0-mg (meters 20))
               (terraformer-leg-a-lod0-mg (meters 40))
               (terraformer-leg-a-lod0-mg (meters 999999))
               )
              :bounds (static-spherem 0 38 0 50)
              :shadow terraformer-leg-a-shadow-mg
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-terraformer-precurd-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja
              ((terraformer-leg-b-lod0-mg (meters 20))
               (terraformer-leg-b-lod0-mg (meters 40))
               (terraformer-leg-b-lod0-mg (meters 999999))
               )
              :bounds (static-spherem 0 61 0 68)
              :shadow terraformer-leg-b-shadow-mg
              :origin-joint-index 4
              :global-effects 32
              )

(defskelgroup skel-terraformer-precurd-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja
              ((terraformer-leg-c-lod0-mg (meters 20))
               (terraformer-leg-c-lod0-mg (meters 40))
               (terraformer-leg-c-lod0-mg (meters 999999))
               )
              :bounds (static-spherem 0 25 0 75)
              :shadow terraformer-leg-c-shadow-mg
              :origin-joint-index 5
              :global-effects 32
              )

(defskelgroup skel-terraformer-precurd-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja
              ((terraformer-spike-lod0-mg (meters 20))
               (terraformer-spike-lod0-mg (meters 40))
               (terraformer-spike-lod0-mg (meters 999999))
               )
              :bounds (static-spherem 0 40 20 35)
              :origin-joint-index 3
              :global-effects 32
              )

(defskelgroup skel-jakc-wings-precur jakc-wings jakc-wings-lod0-jg jakc-wings-idle-ja
              ((jakc-wings-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 10)
              :origin-joint-index 3
              )

(defbehavior precurd-lightjak-do-effect process-drawable ()
  (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures))
  (let ((gp-0 (new 'stack-no-clear 'vector))
        (f30-0 (fmin 1.0 (-> self clock clock-ratio)))
        )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 623) (sp-field-id spt-a)) initial-valuef) 16.0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 3)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 4)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 5)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 6)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 8)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 13)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 17)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 14)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 18)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 15)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 19)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 25)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 26)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 32)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 27)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 33)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 28)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 34)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 31)) :rate f30-0)
    (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 37)) :rate f30-0)
    )
  (none)
  )

;; WARN: Return type mismatch draw-control-global-effect vs none.
(defbehavior precurd-lightjak-stop-effect process-drawable ()
  (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures))
  (none)
  )

(load-scene
  (new 'static 'scene
    :name "precursor-destroy-ship-res"
    :extra #f
    :info #f
    :scene-flags (scene-flags scf1 scf2 scf3 scf4)
    :mask-to-clear (process-mask movie projectile)
    :entity "scene-stage-201"
    :art-group "scenecamera"
    :anim "precursor-destroy-ship-res"
    :parts 37
    :command-list '((0
        (kill "wall-window-big-1")
        (send-event *time-of-day* 'change 'ratio (float (new 'static 'bfloat)))
        (send-event *time-of-day* 'change 'hour (int 23) (int 37))
        (send-event
          "precur-planet-fma"
          'trans-hook
          ,(lambda :behavior scene-player
             ()
             (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0)
             (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0)
             (none)
             )
          )
        (apply
          ,(lambda :behavior scene-player
             ()
             (set-railx-light-brightness! 0 1.0 100000.0)
             (set-railx-light-brightness! 1 1.0 100000.0)
             (set-railx-light-brightness! 2 1.0 100000.0)
             (set-railx-light-brightness! 3 0.0 100000.0)
             (none)
             )
          )
        )
      (816
        (part-tracker
          "group-errol-jetpack"
          entity
          "particleman"
          joint
          "particleD"
          track
          #t
          duration
          (frame-range 816 858)
          )
        (part-tracker
          "group-errol-jetpack"
          entity
          "particleman"
          joint
          "particleE"
          track
          #t
          duration
          (frame-range 816 858)
          )
        )
      (891)
      (892
        (part-tracker
          "group-dark-eco-gun-charge"
          entity
          "particleman"
          joint
          "particleZ"
          track
          #t
          duration
          (frame-range 892 1057)
          )
        )
      (895
        (apply
          ,(lambda :behavior scene-player
             ()
             (when (not (-> self aborted?))
               (disable *screen-filter*)
               (setup
                 *screen-filter*
                 (new 'static 'vector)
                 (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0)
                 (* 0.2 (seconds-per-frame))
                 (bucket-id tex-hud-pris2)
                 #x3fffff
                 #x33001
                 #t
                 )
               (set-setting! 'allow-blackout #f 0.0 0)
               )
             (none)
             )
          )
        )
      (921
        (apply
          ,(lambda :behavior scene-player
             ()
             (when (not (-> self aborted?))
               (disable *screen-filter*)
               (setup
                 *screen-filter*
                 (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0)
                 (new 'static 'vector)
                 (* 0.1 (seconds-per-frame))
                 (bucket-id tex-hud-pris2)
                 #x3fffff
                 #x33001
                 #t
                 )
               (set-setting! 'allow-blackout #f 0.0 0)
               )
             (none)
             )
          )
        (want-display 'precurd 'special)
        (want-display 'railx 'display)
        (send-event self 'change-entity "scene-stage-194")
        (kill "rail-gun-dark-2")
        (kill "rail-gun-light-2")
        (kill "rail-warp-gate-2")
        )
      (967
        (part-tracker
          "group-light-eco-gun-charge"
          entity
          "particleman"
          joint
          "particleY"
          track
          #t
          duration
          (frame-range 967 1057)
          )
        )
      (997
        (beam-tracker
          entity1
          "particleman"
          entity2
          "particleman"
          joint1
          "particleF"
          joint2
          "particleG"
          duration
          (frame-range 997 1057)
          beam-type
          '*beam-appearance-3*
          )
        (beam-tracker
          entity1
          "particleman"
          entity2
          "particleman"
          joint1
          "particleF"
          joint2
          "particleY"
          duration
          (frame-range 997 1057)
          beam-type
          '*beam-appearance-2*
          )
        (beam-tracker
          entity1
          "particleman"
          entity2
          "particleman"
          joint1
          "particleF"
          joint2
          "particleZ"
          duration
          (frame-range 997 1057)
          beam-type
          '*beam-appearance-1*
          )
        (part-tracker
          "group-beam-combine-flash"
          entity
          "particleman"
          joint
          "particleF"
          track
          #f
          duration
          (frame-range 997 1057)
          )
        )
      (998 (kill "rail-gun-dark-2") (kill "rail-gun-dark-3"))
      (1058
        (want-display 'railx 'special)
        (setting-reset borrow mode '((railx 0 lcitysml display)))
        (setting-reset borrow mode '((railx 0 lcitysml display)))
        (send-event self 'change-entity "scene-stage-202")
        (apply
          ,(lambda :behavior scene-player
             ()
             (set-setting! 'sky-type #f 0.0 0)
             (apply-settings *setting-control*)
             (none)
             )
          )
        )
      (1084
        (beam-tracker
          entity1
          "particleman"
          entity2
          "particleman"
          joint1
          "particleH"
          joint2
          "particleL"
          duration
          (frame-range 1084 1132)
          beam-type
          '*beam-appearance-4*
          )
        (part-tracker
          "group-final-beam-rise-mist"
          entity
          "particleman"
          joint
          "particleH"
          track
          #f
          duration
          (frame-range 1083 1105)
          )
        )
      (1133
        (want-display 'precurd 'display)
        (setting-reset borrow mode '((railx 0 lcitysml special)))
        (setting-unset sky-type)
        (apply ,(lambda :behavior scene-player
                  ()
                  (set-setting! 'sky-type 'star-field 0.0 0)
                  (apply-settings *setting-control*)
                  (none)
                  )
               )
        )
      (1163 (beam-tracker
              entity1
              "particleman"
              entity2
              "particleman"
              joint1
              "particleB"
              joint2
              "particleC"
              duration
              (frame-range 1163 1200)
              beam-type
              '*beam-appearance-5*
              )
            )
      (1165 (part-tracker
              "group-precursor-ship-beam-hit"
              entity
              "particleman"
              joint
              "particleA"
              track
              #f
              duration
              (frame-range 1165 1185)
              )
            )
      (1201
        (want-display 'precurd 'display)
        (send-event self 'change-entity "scene-stage-201")
        (beam-tracker
          entity1
          "particleman"
          entity2
          "particleman"
          joint1
          "particleI"
          joint2
          "particleM"
          duration
          (frame-range 1201 1261)
          beam-type
          '*beam-appearance-6*
          )
        (part-tracker
          "group-final-beam-cut-sparks"
          entity
          "particleman"
          joint
          "particleI"
          track
          #t
          duration
          (frame-range 1201 1261)
          )
        )
      (1262
        (part-tracker
          "group-airlock-sucking"
          entity
          "particleman"
          joint
          "particleK"
          track
          #f
          duration
          (frame-range 1262 1598)
          )
        (part-tracker
          "group-errol-jetpack"
          entity
          "particleman"
          joint
          "particleD"
          track
          #t
          duration
          (frame-range 1262 1402)
          )
        (part-tracker
          "group-errol-jetpack"
          entity
          "particleman"
          joint
          "particleE"
          track
          #t
          duration
          (frame-range 1262 1402)
          )
        )
      (1361)
      (1501 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect))
      (1502 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect))
      (1577
        (part-tracker
          "group-fma-lightjak-get-off"
          entity
          "jakc-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 1577 1582)
          )
        (send-event "jakc-highres" 'trans-hook precurd-lightjak-stop-effect)
        )
      (10000
        (apply ,(lambda :behavior scene-player
                  ()
                  (when (-> self aborted?)
                    (disable *screen-filter*)
                    (setup
                      *screen-filter*
                      (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0)
                      (new 'static 'vector)
                      (* 0.1 (seconds-per-frame))
                      (bucket-id tex-hud-pris2)
                      #x3fffff
                      #x33001
                      #t
                      )
                    (set-setting! 'allow-blackout #f 0.0 0)
                    )
                  (none)
                  )
               )
        (send-event *time-of-day* 'change 'ratio (float 1))
        (want-display 'precurd 'display)
        (want-display 'railx #f)
        (setting-reset borrow mode '((railx 0 lcitysml #f)))
        (task-close! "precursor-destroy-ship-escape-continue")
        )
      )
    :cut-list '(402 506 687 732 761 782 829 891 967 1058 1133 1201 1262 1361 1501 1562)
    :wait-ground-time (seconds 1)
    :actor (new 'static 'boxed-array :type scene-actor
      (new 'static 'scene-actor
        :name "scenecamera"
        :level #f
        :art-group "skel-scenecamera"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :camera 4
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "particleman"
        :level 'precurd
        :art-group "skel-particleman"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "jakc-highres"
        :level 'precurd
        :art-group "skel-jakc-highres"
        :prefix ""
        :draw-frames '((230 506) (620 829) (1501 1640))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '(512 605 761 777 778 891 (1550 max))
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        :no-draw-seg #x80
        )
      (new 'static 'scene-actor
        :name "sidekick-highres"
        :level 'precurd
        :art-group "skel-sidekick-highres"
        :prefix ""
        :draw-frames '((230 506) (506 687) (732 782) (829 921) (1262 1501) (620 761) (829 921) (1262 1361) (1501 1640))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "errol"
        :level 'precurd
        :art-group "skel-errol"
        :prefix ""
        :draw-frames '((506 687) (732 921) (1262 1501))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "precur-wall-window-big-fma"
        :level 'precurd
        :art-group "skel-precur-wall-window-big-fma"
        :prefix ""
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '((782 max))
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "precur-planet-fma"
        :level 'precurd
        :art-group "skel-precur-planet-fma"
        :prefix ""
        :draw-frames '((1133 1201) (1361 1501))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "jakc-wings-precur"
        :level 'precurd
        :art-group "skel-jakc-wings-precur"
        :prefix ""
        :draw-frames '((min 1577))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd"
        :level 'precurd
        :art-group "skel-terraformer-precurd"
        :prefix ""
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        :no-draw-seg #x2
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "lf-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "lm-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "lr-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "rf-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "rm-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-a"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-a"
        :prefix "rr-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "lf-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "lm-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "lr-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "rf-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "rm-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-b"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-b"
        :prefix "rr-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "lf-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "lm-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "lr-"
        :draw-frames '((1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "rf-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "rm-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-leg-c"
        :level 'precurd
        :art-group "skel-terraformer-precurd-leg-c"
        :prefix "rr-"
        :draw-frames '((0 305) (1201 1262) (1361 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "lf-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "lm-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "lr-"
        :draw-frames '((1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "rf-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "rm-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-precurd-spike"
        :level 'precurd
        :art-group "skel-terraformer-precurd-spike"
        :prefix "rr-"
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "terraformer-head-precurd"
        :level 'precurd
        :art-group "skel-terraformer-head-precurd"
        :prefix ""
        :draw-frames '((0 305) (1201 1501))
        :scissor-frames '()
        :shadow-frames '()
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "dm-ship-break-precurd"
        :level 'precurd
        :art-group "skel-dm-ship-break-precurd"
        :prefix ""
        :draw-frames '((1133 1201))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "dm-ship-tent-brk-precurd"
        :level 'precurd
        :art-group "skel-dm-ship-tent-brk-precurd"
        :prefix ""
        :draw-frames '((1133 1201))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "rail-gun-dark-precurd"
        :level 'railx
        :art-group "skel-rail-gun-dark-precurd"
        :prefix ""
        :draw-frames '((921 1058))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "rail-gun-dark-precurd"
        :level 'railx
        :art-group "skel-rail-gun-dark-precurd"
        :prefix "b-"
        :draw-frames '((921 1058))
        :scissor-frames '()
        :shadow-frames '((min max))
        :cloth-reset-frames '()
        :cloth-commands '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      )
    :load-point "precurd-start"
    :end-point "precurd-escape"
    :borrow '((railx 0 lcitysml special))
    :sfx-volume -1.0
    :ambient-volume 0.5
    :music-delay 1500.0
    :scene-task #x108
    :on-running #f
    :on-complete #f
    )
  )

(load-scene (new 'static 'scene
              :name "desert-final-boss-intro-a"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-221"
              :art-group "scenecamera"
              :anim "desert-final-boss-intro-a"
              :parts 1
              :command-list '((10000 (apply ,(lambda :behavior scene-player
                                 ()
                                 (if (-> self aborted?)
                                     (task-close! "desert-final-boss-introduction")
                                     )
                                 (none)
                                 )
                              )
                       )
                )
              :cut-list '()
              :wait-ground-time (seconds 1)
              :actor (new 'static 'boxed-array :type scene-actor
                (new 'static 'scene-actor
                  :name "scenecamera"
                  :level #f
                  :art-group "skel-scenecamera"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :camera 4
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "jakc-highres"
                  :level 'precurd
                  :art-group "skel-jakc-highres"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  :no-draw-seg #x80
                  )
                (new 'static 'scene-actor
                  :name "sidekick-highres"
                  :level 'precurd
                  :art-group "skel-sidekick-highres"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                )
              :load-point "precurd-escape"
              :end-point "desertb-final-boss-start"
              :borrow '()
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running '(sound-play-loop "storm-amb-mov")
              :on-complete #f
              )
            )

(load-scene (new 'static 'scene
              :name "precursor-destroy-ship-exp-res"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-201"
              :art-group "scenecamera"
              :anim "precursor-destroy-ship-exp-res"
              :parts 1
              :command-list '((0 (want-display 'precurd 'special) (apply ,(lambda :behavior scene-player
                                                              ()
                                                              (set-setting! 'sky-type 'star-field 0.0 0)
                                                              (apply-settings *setting-control*)
                                                              (none)
                                                              )
                                                           )
                   )
                (80)
                (85 (part-tracker
                      "group-precursor-ship-explosion"
                      entity
                      "particleman"
                      joint
                      "particleC"
                      track
                      #f
                      duration
                      (frame-range 85 200)
                      )
                    )
                (99 (part-tracker
                      "group-precursor-ship-explosion"
                      entity
                      "particleman"
                      joint
                      "particleD"
                      track
                      #f
                      duration
                      (frame-range 99 200)
                      )
                    )
                (138 (part-tracker
                       "group-precursor-ship-explosion"
                       entity
                       "particleman"
                       joint
                       "particleE"
                       track
                       #f
                       duration
                       (frame-range 138 200)
                       )
                     )
                (152 (part-tracker
                       "group-precursor-ship-explosion"
                       entity
                       "particleman"
                       joint
                       "particleF"
                       track
                       #f
                       duration
                       (frame-range 152 200)
                       )
                     )
                (155 (apply ,(lambda :behavior scene-player
                               ()
                               (setup
                                 *screen-filter*
                                 (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                                 (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                 (* 1.2 (seconds-per-frame))
                                 (bucket-id tex-hud-pris2)
                                 #x3fffff
                                 #x33001
                                 #t
                                 )
                               (none)
                               )
                            )
                     )
                (10000 (apply ,(lambda :behavior scene-player
                                 ()
                                 (setup
                                   *screen-filter*
                                   (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                                   (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                                   (* 10000.0 (seconds-per-frame))
                                   (bucket-id tex-hud-pris2)
                                   #x3fffff
                                   #x33001
                                   #t
                                   )
                                 (set-setting! 'sky-type #f 0.0 0)
                                 (apply-settings *setting-control*)
                                 (if (-> self aborted?)
                                     (task-close! "desert-final-boss-introduction")
                                     )
                                 (none)
                                 )
                              )
                       )
                )
              :cut-list '()
              :wait-ground-time (seconds 1)
              :actor (new 'static 'boxed-array :type scene-actor
                (new 'static 'scene-actor
                  :name "scenecamera"
                  :level #f
                  :art-group "skel-scenecamera"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :camera 4
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "particleman"
                  :level 'precurd
                  :art-group "skel-particleman"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "dm-ship-break-precurd"
                  :level 'precurd
                  :art-group "skel-dm-ship-break-precurd"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "dm-ship-tent-brk-precurd"
                  :level 'precurd
                  :art-group "skel-dm-ship-tent-brk-precurd"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                )
              :load-point "precurd-escape"
              :end-point "desertb-final-boss-start"
              :borrow '()
              :sfx-volume -1.0
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running #f
              :on-complete #f
              )
            )

(load-scene (new 'static 'scene
              :name "precursor-destroy-ship-lose"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "precura-door-a-1"
              :art-group "scenecamera"
              :anim "precursor-destroy-ship-lose"
              :parts 2
              :command-list '((0
                  (want-display 'precura 'special)
                  (setting-reset borrow mode '((precura 0 lprenme display)))
                  (apply ,(lambda :behavior scene-player
                            ()
                            (set-setting! 'sky-type 'star-field 0.0 0)
                            (apply-settings *setting-control*)
                            (none)
                            )
                         )
                  )
                (85 (part-tracker
                      "group-precursor-ship-explosion"
                      entity
                      "particleman"
                      joint
                      "particleC"
                      track
                      #f
                      duration
                      (frame-range 85 200)
                      )
                    )
                (99 (part-tracker
                      "group-precursor-ship-explosion"
                      entity
                      "particleman"
                      joint
                      "particleD"
                      track
                      #f
                      duration
                      (frame-range 99 200)
                      )
                    )
                (138 (part-tracker
                       "group-precursor-ship-explosion"
                       entity
                       "particleman"
                       joint
                       "particleE"
                       track
                       #f
                       duration
                       (frame-range 138 200)
                       )
                     )
                (152 (part-tracker
                       "group-precursor-ship-explosion"
                       entity
                       "particleman"
                       joint
                       "particleF"
                       track
                       #f
                       duration
                       (frame-range 152 200)
                       )
                     )
                (155 (apply ,(lambda :behavior scene-player
                               ()
                               (setup
                                 *screen-filter*
                                 (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                                 (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0)
                                 (* 1.2 (seconds-per-frame))
                                 (bucket-id tex-hud-pris2)
                                 #x3fffff
                                 #x33001
                                 #t
                                 )
                               (none)
                               )
                            )
                     )
                (10000
                  (apply ,(lambda :behavior scene-player
                            ()
                            (setup
                              *screen-filter*
                              (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                              (new 'static 'vector :x 255.0 :y 255.0 :z 255.0)
                              (* 10000.0 (seconds-per-frame))
                              (bucket-id tex-hud-pris2)
                              #x3fffff
                              #x33001
                              #t
                              )
                            (none)
                            )
                         )
                  (apply ,(lambda :behavior scene-player
                            ()
                            (set-setting! 'sky-type #f 0.0 0)
                            (apply-settings *setting-control*)
                            (none)
                            )
                         )
                  )
                )
              :cut-list '()
              :wait-ground-time (seconds 1)
              :actor (new 'static 'boxed-array :type scene-actor
                (new 'static 'scene-actor
                  :name "scenecamera"
                  :level #f
                  :art-group "skel-scenecamera"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :camera 4
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "particleman"
                  :level 'lprenme
                  :art-group "skel-particleman"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "dm-ship-break-precurd"
                  :level 'lprenme
                  :art-group "skel-dm-ship-break-precurd"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                (new 'static 'scene-actor
                  :name "dm-ship-tent-brk-precurd"
                  :level 'lprenme
                  :art-group "skel-dm-ship-tent-brk-precurd"
                  :prefix ""
                  :draw-frames '((min max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                )
              :load-point "precura-start"
              :end-point #f
              :borrow '()
              :sfx-volume -1.0
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running #f
              :on-complete #f
              )
            )

(defpartgroup group-precursor-ship-explosion
  :id 1299
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 100)
  :parts ((sp-item 4365 :flags (sp3))
    (sp-item 4366 :flags (sp3))
    (sp-item 4367 :flags (sp3))
    (sp-item 4368 :flags (sp3))
    (sp-item 4369 :period (seconds 20) :length (seconds 0.335))
    (sp-item 4370 :period (seconds 20) :length (seconds 0.5))
    (sp-item 4371 :flags (sp3) :binding 4364)
    (sp-item 4371 :flags (sp3) :binding 4364)
    (sp-item 4371 :flags (sp3) :binding 4364)
    (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2))
    (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2))
    (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2))
    )
  )

(defpart 4365
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 100))
    (:rot-x (degrees 225))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 128.0)
    (:b 40.0)
    (:a 64.0)
    (:fade-a -0.10666667)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpart 4366
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 100.0 100.0)
    (:scale-x (meters 0.3) (meters 1))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0 1 128.0)
    (:g :copy r)
    (:b :copy r)
    (:a 255.0)
    (:omega (degrees 0.1125))
    (:vel-y (meters 0.16666667) (meters 0.6666667))
    (:fade-g -0.26666668)
    (:fade-b -1.7)
    (:fade-a -0.56666666 -0.56666666)
    (:friction 0.95)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4367
  :init-specs ((:texture (explosion-nebula level-default-sprite))
    (:num 10.0)
    (:scale-x (meters 10) (meters 5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:vel-y (meters 0) (meters 0.2))
    (:scalevel-x (meters 0.033333335))
    (:rotvel-z (degrees -0.2) 1 (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.85 -0.85)
    (:friction 0.93)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4369
  :init-specs ((:texture (explosion-edge level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 5) (meters 10))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 80.0 20.0)
    (:b 30.0)
    (:a 128.0)
    (:vel-y (meters 1.3333334) (meters 0.33333334))
    (:scalevel-x (meters 0.033333335) (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-g -0.13333334)
    (:fade-b -0.05)
    (:fade-a -0.21333334 -0.21333334)
    (:friction 0.7)
    (:timer (seconds 2))
    (: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 4370
  :init-specs ((:texture (explo-texture level-default-sprite))
    (:birth-func 'birth-func-curve)
    (:num 4.0)
    (:x (meters -10) (meters 20))
    (:y (meters 0) (meters 10))
    (: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.16666667) (meters 0.1))
    (:friction 0.95)
    (: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-precursor-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 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-precursor-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-precursor-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 10.0 :y 20.0 :z 21.0 :w 22.0)
                                            :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0)
                                            )
          )
    )

(if #t
    (set! *range-precursor-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 10.0 :y 20.0 :z 21.0 :w 22.0)
                                            :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0)
                                            )
          )
    )

(if #t
    (set! *curve-precursor-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-precursor-explo-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-precursor-explo-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-precursor-ship-explosion-texture-curve-settings* (new 'static 'particle-curve-settings
                                                                 :lifetime-base (seconds 0.5)
                                                                 :lifetime-offset (seconds 0.6)
                                                                 :flags (particle-curve-flags pcf0)
                                                                 )
        )

(set! (-> *part-id-table* 4370 init-specs 16 initial-valuef)
      (the-as float *part-precursor-ship-explosion-texture-curve-settings*)
      )

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* color-start) *range-precursor-explo-color*)

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* alpha-start) *range-precursor-explo-alpha*)

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-start)
      *range-precursor-explo-scale-x*
      )

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-start)
      *range-precursor-explo-scale-y*
      )

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

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

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

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* a-scalar) *curve-precursor-explo-alpha*)

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-scalar)
      *curve-precursor-explo-scale-x*
      )

(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-scalar)
      *curve-precursor-explo-scale-y*
      )

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

(defpart 4371
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 10) (meters 10))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 200.0)
    (:a 128.0)
    (:vel-y (meters 0.16666667) (meters 0.16666667))
    (:scalevel-x (meters -0.033333335) (meters -0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:friction 0.98)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4364
  :init-specs ((:texture (edge-cloud level-default-sprite))
    (:birth-func 'birth-func-inherit-size)
    (:num 0.5)
    (:scale-x (meters 0.00012207031) (meters 0.00012207031))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 100.0)
    (:g 50.0 30.0)
    (:b 0.0)
    (:a 128.0)
    (:fade-a -0.21333334 -0.21333334)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-3))
    )
  )

(defpartgroup group-beam-combine-flash
  :id 1300
  :duration (seconds 0)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 4372 :flags (sp7)) (sp-item 4373))
  )

(defpart 4372
  :init-specs ((:texture (laser-hit2 level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 10))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:scalevel-x (meters 0.26666668) (meters 0.26666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -1.28)
    (:timer (seconds 0.335))
    (:flags (sp-cpuinfo-flag-3 left-multiply-quat))
    )
  )

(defpart 4373
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 0.5)
    (:scale-x (meters 10))
    (:rot-x (degrees 22.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 20.0 40.0)
    (:timer (seconds 0.167))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpartgroup group-final-beam-rise-mist
  :id 1301
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 600)
  :parts ((sp-item 4374 :period (seconds 10) :length (seconds 0.167)))
  )

(defpart 4374
  :init-specs ((:texture (big-cloud level-default-sprite))
    (:num 3.0)
    (:x (meters 0) (meters 50))
    (:y (meters 80))
    (:scale-x (meters 50))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 150.0)
    (:g 100.0)
    (:b 255.0)
    (:a 32.0)
    (:vel-y (meters 2.6666667))
    (:scalevel-x (meters 0.33333334) (meters 0.6666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667 -0.10666667)
    (:friction 0.7 0.25)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-3))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-final-beam-cut-sparks
  :id 1302
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 600)
  :parts ((sp-item 4375))
  )

(defpart 4375
  :init-specs ((:texture (glow-hotdot level-default-sprite))
    (:num 3.0)
    (:scale-x (meters 10) (meters 10))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 150.0 50.0)
    (:b 100.0)
    (:a 255.0)
    (:vel-y (meters 1.6666666) (meters 1.6666666))
    (:scalevel-x (meters -0.033333335) (meters -0.06666667))
    (:scalevel-y :copy scalevel-x)
    (:friction 0.94)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:conerot-x (degrees -20) (degrees 40))
    (:conerot-z (degrees -20) (degrees 40))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-precursor-ship-beam-hit
  :id 1303
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 100)
  :parts ((sp-item 4376 :flags (sp3))
    (sp-item 4377 :flags (sp3))
    (sp-item 4378 :flags (sp3))
    (sp-item 4379 :flags (sp3))
    (sp-item 4380 :period (seconds 20) :length (seconds 0.335))
    )
  )

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

(defpart 4377
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 100.0)
    (:scale-x (meters 0.1) (meters 0.5))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0 1 128.0)
    (:g :copy r)
    (:b :copy r)
    (:a 255.0)
    (:omega (degrees 0.0675))
    (:vel-y (meters 0.16666667) (meters 0.33333334))
    (:fade-g -0.26666668)
    (:fade-b -1.7)
    (:fade-a -0.56666666 -0.56666666)
    (:friction 0.95)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4378
  :init-specs ((:texture (explosion-nebula level-default-sprite))
    (:num 5.0)
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 255.0)
    (:vel-y (meters 0) (meters 0.06666667))
    (:scalevel-x (meters 0.016666668))
    (:rotvel-z (degrees -0.2) 1 (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.85 -0.85)
    (:friction 0.93)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-3))
    (:conerot-x (degrees 0) (degrees 360))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4380
  :init-specs ((:texture (explosion-edge level-default-sprite))
    (:num 2.0)
    (:scale-x (meters 2) (meters 5))
    (:rot-y (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 80.0 20.0)
    (:b 30.0)
    (:a 128.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0.016666668) (meters 0.016666668))
    (:scalevel-y :copy scalevel-x)
    (:fade-g -0.13333334)
    (:fade-b -0.05)
    (:fade-a -0.21333334 -0.21333334)
    (:friction 0.9)
    (:timer (seconds 2))
    (: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 4379
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 100))
    (:rot-x (degrees 2.25))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 80.0)
    (:b 40.0)
    (:a 128.0)
    (:omega (degrees 6767.9995))
    (:scalevel-x (meters -1.6666666))
    (:scalevel-y :copy scalevel-x)
    (:timer (seconds 0.135))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpartgroup group-light-eco-gun-charge
  :id 1304
  :duration (seconds 0)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 4381 :flags (sp7))
    (sp-item 4382 :flags (sp7))
    (sp-item 4383 :flags (sp6))
    (sp-item 4384 :flags (sp6))
    )
  )

(defpart 4381
  :init-specs ((:texture (bigpuff level-default-sprite))
    (:num 0.5 0.5)
    (:x (meters 10))
    (:scale-x (meters 25))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 60.0)
    (:b 255.0)
    (:a 0.0)
    (:scalevel-x (meters -0.06666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-g 0.4)
    (:fade-a 0.07111111)
    (:accel-x (meters -0.0013333333))
    (:friction 0.98 0.01)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-3 left-multiply-quat))
    (:rotate-x (degrees 0) (degrees 36000))
    (:rotate-y (degrees 0) (degrees 36000))
    (:rotate-z (degrees 0) (degrees 36000))
    )
  )

(defpart 4382
  :init-specs ((:texture (specs level-default-sprite))
    (:num 0.1)
    (:scale-x (meters 25) (meters 10))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 64.0)
    (:g 80.0 80.0)
    (:b 255.0)
    (:a 0.0)
    (:scalevel-x (meters -0.06666667) (meters -0.05))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.64)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:next-time (seconds 0.335))
    (:next-launcher 4385)
    )
  )

(defpart 4385
  :init-specs ((:fade-a 0.0))
  )

(defpart 4383
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 0.5)
    (:scale-x (meters 10))
    (:rot-x (degrees 22.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 20.0 40.0)
    (:timer (seconds 0.167))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 4384
  :init-specs ((:texture (ring level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 30))
    (:rot-x (degrees 225))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 80.0)
    (:b 255.0)
    (:a 5.0 5.0)
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 40960.0)
    )
  )

(defpartgroup group-dark-eco-gun-charge
  :id 1305
  :duration (seconds 1)
  :linger-duration (seconds 1)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 100)
  :parts ((sp-item 4386 :flags (sp6)) (sp-item 4387 :flags (sp6)) (sp-item 4388) (sp-item 4389))
  )

(defpart 4386
  :init-specs ((:texture (starflash level-default-sprite))
    (:num 0.5)
    (:scale-x (meters 5))
    (:rot-x (degrees 22.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 20.0 40.0)
    (:timer (seconds 0.167))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 4387
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 40) (meters 1))
    (:rot-x (degrees 6.7500005))
    (:rot-z (degrees 0) (degrees 3599))
    (:scale-y :copy scale-x)
    (:r 64.0 20.0)
    (:g 64.0)
    (:b 255.0)
    (:a 60.0 10.0)
    (:omega (degrees 13511.25))
    (:timer (seconds 0.005))
    (:flags (sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 4388
  :init-specs ((:texture (lightning-anim-01 level-default-sprite))
    (:num 1.0 20.0)
    (:scale-x (meters 1) (meters 3))
    (:rot-x 4)
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y (meters 5) (meters 2.5))
    (:r 50.0 100.0)
    (:g 60.0)
    (:b 255.0)
    (:a 128.0)
    (:fade-a -1.6)
    (:timer (seconds 0.3) (seconds 0.197))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:next-time (seconds 0.035))
    (:next-launcher 4390)
    )
  )

(defpart 4389
  :init-specs ((:texture (lightning-anim-01 level-default-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 1.0 5.0)
    (:scale-x (meters 5) (meters 5))
    (:rot-x 4)
    (:rot-z (degrees 0) (degrees 3598.0002))
    (:scale-y (meters 5) (meters 2.5))
    (:r 50.0 100.0)
    (:g 60.0)
    (:b 255.0)
    (:a 128.0)
    (:fade-a -1.6)
    (:timer (seconds 0.3) (seconds 0.197))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900))
    (:next-time (seconds 0.035))
    (:next-launcher 4390)
    )
  )

(defpart 4390
  :init-specs ((:r 64.0) (:g 64.0) (:fade-r -2.0) (:fade-g -0.8) (:fade-a -4.0))
  )

(defpartgroup group-fma-lightjak-get-off
  :id 1306
  :duration (seconds 0.5)
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 4391 :period (seconds 5) :length (seconds 0.017))
    (sp-item 4392 :period (seconds 5) :length (seconds 0.017))
    (sp-item 4393 :period (seconds 5) :length (seconds 0.085))
    )
  )

(defpart 4391
  :init-specs ((:texture (colorflash level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 20))
    (:rot-x (degrees 22.5))
    (:scale-y (meters 12))
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:omega (degrees 6767.9995))
    (:scalevel-x (meters -0.13333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -1.6)
    (:fade-g -1.6)
    (:fade-b -1.6)
    (:timer (seconds 0.267))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 4392
  :init-specs ((:texture (rainbow-halo level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 10))
    (:rot-x (degrees 22.5))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 128.0)
    (:b 128.0)
    (:a 128.0)
    (:omega (degrees 6767.9995))
    (:scalevel-x (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.85333335)
    (:fade-g -0.85333335)
    (:fade-b -0.85333335)
    (:timer (seconds 0.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 4096.0)
    )
  )

(defpart 4393
  :init-specs ((:texture (middot level-default-sprite))
    (:num 60.0)
    (:y (meters -1.5) (meters 3))
    (:scale-x (meters 0.05) (meters 0.05))
    (:scale-y :copy scale-x)
    (:r 32.0 64.0)
    (:g :copy r)
    (:b 128.0)
    (:a 128.0 128.0)
    (:omega (degrees 0.045))
    (:vel-y (meters 0.016666668) (meters 0.033333335))
    (:accel-y (meters 0.00016666666) (meters 0.00066666666))
    (:friction 0.95 0.05)
    (:timer (seconds 3))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.5))
    (:next-launcher 4394)
    (:conerot-x (degrees 90) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4394
  :init-specs ((:scalevel-x (meters -0.00016666666) (meters -0.00016666666))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.425 -0.425)
    (:friction 0.99)
    (:next-time (seconds 0.017))
    (:next-launcher 4395)
    )
  )

(defpart 4395
  :init-specs ((:accel-x (meters -0.0013333333) (meters 0.0026666666))
    (:accel-z (meters -0.0013333333) (meters 0.0026666666))
    (:next-time (seconds 0.085) (seconds 0.08))
    (:next-launcher 4395)
    )
  )

(defpartgroup group-errol-jetpack
  :id 1307
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 640)
  :parts ((sp-item 4396 :flags (is-3d sp7)) (sp-item 4397 :flags (sp6 sp7)))
  )

(defpart 4396
  :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite))
    (:num 10.0)
    (:y (meters 0.3))
    (:z (meters 0.3))
    (:scale-x (meters 0.4) (meters 0.2))
    (:rot-x (degrees 40))
    (:rot-y (degrees 0))
    (:rot-z (degrees 0) 1 (degrees 90))
    (:scale-y (meters 1) (meters 0.5))
    (:r 128.0 128.0)
    (:g 64.0 64.0)
    (:b :copy g)
    (:a 16.0 16.0)
    (:fade-a -0.6)
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:conerot-z (degrees 0))
    (:rotate-x (degrees 0))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4397
  :init-specs ((:texture (glow-soft level-default-sprite))
    (:num 1.0)
    (:y (meters 0.5))
    (:z (meters 0.2))
    (:scale-x (meters 2) (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 100.0)
    (:b 0.0)
    (:a 20.0 2.0)
    (:fade-a -0.12)
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:conerot-z (degrees 0))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-airlock-sucking
  :id 1308
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 200)
  :parts ((sp-item 4398 :flags (sp7)))
  )

(defpart 4398
  :init-specs ((:texture (big-cloud level-default-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 10.0)
    (:x (meters 130) (meters 10))
    (:scale-x (meters 5) (meters 15))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 0.0)
    (:omega (degrees 0.225) (degrees 0.225))
    (:vel-x (meters -0.033333335))
    (:scalevel-x (meters -0.0033333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.16 0.16)
    (:friction 1.34)
    (:timer (seconds 2) (seconds 0.665))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2))
    (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.167))
    (:next-launcher 4399)
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4399
  :init-specs ((:fade-a -0.013333334 -0.013333334)
    (:accel-y (meters -0.006666667))
    (:friction 0.98)
    (:next-time (seconds 0.5))
    (:next-launcher 4400)
    )
  )

(defpart 4400
  :init-specs ((:fade-a -0.026666667 -0.026666667) (:friction 0.99))
  )
