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

;; name: errol-chal-part.gc
;; name in dgo: errol-chal-part
;; dgos: LERLCHAL, LPRTRACE

;; DECOMP BEGINS

(defpartgroup group-turbo-ring
  :id 1058
  :duration (seconds 218.45)
  :linger-duration (seconds 0)
  :bounds (static-bspherem 0 0 0 8)
  :parts ((sp-item 4603 :flags (is-3d bit6 bit7))
    (sp-item 4604 :fade-after (meters 100) :flags (is-3d bit6 bit7))
    (sp-item 4605 :fade-after (meters 150) :falloff-to (meters 150) :flags (is-3d bit7))
    )
  )

(defpart 4603
  :init-specs ((:texture (errol-ring-01 lerlchal-sprite))
    (:num 1.0)
    (:scale-x (meters 12))
    (:rot-x (degrees 0))
    (:rot-z (degrees 90))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 64.0 64.0)
    (:b 255.0)
    (:a 128.0)
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4604
  :init-specs ((:texture (water-ring effects))
    (:num 1.0)
    (:scale-x (meters 12))
    (:rot-x (degrees 0))
    (:rot-z (degrees 90))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0 64.0)
    (:b 255.0)
    (:a 128.0)
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4605
  :init-specs ((:texture (errol-ring-02 lerlchal-sprite))
    (:num 0.0 1.0)
    (:scale-x (meters 13) (meters 1))
    (:rot-x (degrees 0))
    (:rot-z (degrees 90))
    (:scale-y :copy scale-x)
    (:r 0.0)
    (:g 0.0 128.0)
    (:b 255.0)
    (:a 127.0)
    (:scalevel-x (meters -0.175))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.8 -0.8)
    (:timer (seconds 0.267))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-turbo-ring-explode
  :id 1059
  :duration (seconds 0.067)
  :linger-duration (seconds 0.5)
  :bounds (static-bspherem 0 0 0 8)
  :parts ((sp-item 4606 :flags (is-3d bit6 bit7)) (sp-item 4607 :flags (bit6 bit7)))
  )

(defpart 4606
  :init-specs ((:texture (harddot effects))
    (:num 1.0)
    (:scale-x (meters 12))
    (:rot-x (degrees 0))
    (:rot-z (degrees 90))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 128.0)
    (:fade-r -8.5)
    (:fade-g -4.25)
    (:fade-b 0.0)
    (:fade-a -2.1333334)
    (:timer (seconds 0.2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4607
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:scale-x (meters 36))
    (:rot-x (degrees 6.7500005))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 32.0)
    (:fade-r -17.0)
    (:fade-g -8.5)
    (:fade-b 0.0)
    (:fade-a -1.0666667)
    (:timer (seconds 0.1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 0.0)
    (:rotate-y (degrees 0))
    )
  )

(defun city-race-borrow-level-activate ()
  "Sets up the `errol-ring-01` and `errol-ring-02` particles"
  (setup-user-array (-> *part-id-table* 4603) "errol-ring-01")
  (setup-user-array (-> *part-id-table* 4605) "errol-ring-02")
  (none)
  )
