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

;; name: gungame-scenes.gc
;; name in dgo: gungame-scenes
;; dgos: GGA

;; DECOMP BEGINS

(defskelgroup skel-red-gun-mod-three red-gun-mod-three red-gun-mod-three-lod0-jg red-gun-mod-three-idle-ja
              ((red-gun-mod-three-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 1)
              :origin-joint-index 3
              )

(load-scene (new 'static 'scene
              :name "city-gun-course-intro"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-52"
              :art-group "scenecamera"
              :anim "city-gun-course-intro"
              :parts 12
              :command-list '((0 (fadein (frame-time-30 5)))
                (81 (part-tracker
                      "group-fma-daxter-guncourse-slide-dust"
                      entity
                      "particleman"
                      joint
                      "particleA"
                      track
                      #t
                      duration
                      (frame-range 81 94)
                      )
                    )
                (370 (part-tracker
                       "group-fma-daxter-guncourse-land-dust"
                       entity
                       "particleman"
                       joint
                       "particleA"
                       track
                       #f
                       duration
                       (frame-range 370 371)
                       )
                     )
                (1325 (fadeout (frame-time-30 5)))
                (10000 (task-close! "city-gun-course-1-introduction"))
                )
              :cut-list '(31 58 101 137 358 404 484 521 591 745 855 975 1095 1275)
              :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 'gungame
                  :art-group "skel-jakc-highres"
                  :prefix ""
                  :draw-frames '((min 137) (358 max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  :no-draw-seg #x380
                  )
                (new 'static 'scene-actor
                  :name "sidekick-highres"
                  :level 'gungame
                  :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
                  )
                (new 'static 'scene-actor
                  :name "particleman"
                  :level 'gungame
                  :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 "gun"
                  :level #f
                  :art-group "skel-gun"
                  :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 "tess-highres"
                  :level 'gungame
                  :art-group "skel-tess-highres"
                  :prefix ""
                  :draw-frames '((min 1275))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                )
              :load-point "gungame-start"
              :end-point "gungame-1-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 "city-gun-course-1-res"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-52"
              :art-group "scenecamera"
              :anim "city-gun-course-1-res"
              :parts 4
              :command-list '((0 (fadein (frame-time-30 5)))
                (465 (fadeout (frame-time-30 5)))
                (10000
                  (send-event self 'user-data-set! (task-closed? "city-gun-course-1-resolution"))
                  (task-close! "city-gun-course-1-resolution")
                  )
                )
              :cut-list '(39 91 144 334 365)
              :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 'gungame
                  :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 'gungame
                  :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
                  )
                (new 'static 'scene-actor
                  :name "gun"
                  :level #f
                  :art-group "skel-gun"
                  :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 "tess-highres"
                  :level 'gungame
                  :art-group "skel-tess-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 "gungame-start"
              :end-point "gungame-start"
              :borrow '()
              :sfx-volume -1.0
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running #f
              :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup011"))
              )
            )

(load-scene (new 'static 'scene
              :name "city-gun-course-2-intro"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-52"
              :art-group "scenecamera"
              :anim "city-gun-course-2-intro"
              :parts 11
              :command-list '((0 (fadein (frame-time-30 5)))
                (1325 (fadeout (frame-time-30 5)))
                (10000 (task-close! "city-gun-course-2-introduction"))
                )
              :cut-list '(114 194 384 459 532 769 855 944 1078 1179)
              :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 'gungame
                  :art-group "skel-jakc-highres"
                  :prefix ""
                  :draw-frames '((0 531) (769 854) (944 max))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '((766 775))
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  :no-draw-seg #x80
                  )
                (new 'static 'scene-actor
                  :name "sidekick-highres"
                  :level 'gungame
                  :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
                  )
                (new 'static 'scene-actor
                  :name "red-gun-mod-three"
                  :level 'gungame2
                  :art-group "skel-red-gun-mod-three"
                  :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 "tess-highres"
                  :level 'gungame
                  :art-group "skel-tess-highres"
                  :prefix ""
                  :draw-frames '((min 1275))
                  :scissor-frames '()
                  :shadow-frames '((min max))
                  :cloth-reset-frames '()
                  :cloth-commands '()
                  :flags #x1
                  :shadow-flags -1
                  :shadow-volume-joint #f
                  )
                )
              :load-point "gungame-start"
              :end-point "gungame-2-start"
              :borrow '((gungame 0 gungame2 special))
              :sfx-volume -1.0
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running #f
              :on-complete #f
              )
            )

(load-scene (new 'static 'scene
              :name "city-gun-course-2-res"
              :extra #f
              :info #f
              :scene-flags (scene-flags scf1 scf2 scf3 scf4)
              :mask-to-clear (process-mask movie projectile)
              :entity "scene-stage-52"
              :art-group "scenecamera"
              :anim "city-gun-course-2-res"
              :parts 4
              :command-list '((360 (fadeout (frame-time-30 10)))
                (10000
                  (send-event self 'user-data-set! (task-closed? "city-gun-course-2-resolution"))
                  (task-close! "city-gun-course-2-resolution")
                  )
                )
              :cut-list '(80 180 267)
              :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 'gungame
                  :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 'gungame
                  :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
                  )
                (new 'static 'scene-actor
                  :name "tess-highres"
                  :level 'gungame
                  :art-group "skel-tess-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
                  )
                (new 'static 'scene-actor
                  :name "red-gun-mod-three"
                  :level 'gungame2
                  :art-group "skel-red-gun-mod-three"
                  :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 "gungame-movie"
              :end-point "gungame-start"
              :borrow '((gungame 0 gungame2 special))
              :sfx-volume -1.0
              :ambient-volume -1.0
              :music-delay 1500.0
              :on-running #f
              :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup012"))
              )
            )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-part-fma-daxter-guncourse-slide-dust ((arg0 sparticle-system)
                                                              (arg1 sparticle-cpuinfo)
                                                              (arg2 sprite-vec-data-3d)
                                                              (arg3 sparticle-launcher)
                                                              (arg4 sparticle-launch-state)
                                                              )
  (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20))
        (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 40))
        )
    (set! (-> arg2 r-g-b-a x) (the float (- s5-0 s3-0)))
    (set! (-> arg2 r-g-b-a y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 r-g-b-a z) (the float (- s5-0 v1-3)))
    )
  (none)
  )

(defpartgroup group-fma-daxter-guncourse-slide-dust
  :id 1430
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 12)
  :parts ((sp-item 4694))
  )

(defpart 4694
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:birth-func 'spt-birth-func-brightness-part-fma-daxter-guncourse-slide-dust)
    (:num 0.5)
    (:scale-x (meters 1) (meters 1))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0)
    (:b 0.0)
    (:a 32.0 32.0)
    (:vel-z (meters 0) (meters -0.01))
    (:scalevel-x (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667 -0.10666667)
    (:accel-y (meters 0) (meters 0.000033333334))
    (:friction 0.95)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
    (:conerot-y (degrees -20) (degrees 20))
    (:rotate-y (degrees 0))
    )
  )

;; WARN: Return type mismatch float vs none.
(defun spt-birth-func-brightness-part-fma-daxter-guncourse-land-dust ((arg0 sparticle-system)
                                                             (arg1 sparticle-cpuinfo)
                                                             (arg2 sprite-vec-data-3d)
                                                             (arg3 sparticle-launcher)
                                                             (arg4 sparticle-launch-state)
                                                             )
  (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140))
        (s3-0 (logand 0 (rand-uint31-gen *random-generator*)))
        (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20))
        (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 40))
        )
    (set! (-> arg2 r-g-b-a x) (the float (- s5-0 s3-0)))
    (set! (-> arg2 r-g-b-a y) (the float (- s5-0 s4-0)))
    (set! (-> arg2 r-g-b-a z) (the float (- s5-0 v1-3)))
    )
  (none)
  )

(defpartgroup group-fma-daxter-guncourse-land-dust
  :id 1431
  :flags (sp0)
  :bounds (static-bspherem 0 0 0 12)
  :parts ((sp-item 4695))
  )

(defpart 4695
  :init-specs ((:texture (dirtpuff01 level-default-sprite))
    (:birth-func 'spt-birth-func-brightness-part-fma-daxter-guncourse-land-dust)
    (:num 10.0)
    (:scale-x (meters 0.5))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0)
    (:b 0.0)
    (:a 32.0 32.0)
    (:vel-y (meters 0) (meters 0.016666668))
    (:scalevel-x (meters 0.0016666667) (meters 0.0016666667))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.10666667 -0.10666667)
    (:accel-y (meters 0) (meters 0.000033333334))
    (:friction 0.95)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13))
    (:conerot-x (degrees 80) (degrees 20))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )
