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

(import "goal_src/jak1/import/steam-cap-ag.gc")

;; definition of type steam-cap-control-pt
(deftype steam-cap-control-pt (structure)
  ((trans  vector :inline :offset-assert   0)
   (transv vector :inline :offset-assert  16)
   )
  :method-count-assert 9
  :size-assert         #x20
  :flag-assert         #x900000020
  )

;; definition for method 3 of type steam-cap-control-pt
(defmethod inspect steam-cap-control-pt ((obj steam-cap-control-pt))
  (format #t "[~8x] ~A~%" obj 'steam-cap-control-pt)
  (format #t "~Ttrans: #<vector @ #x~X>~%" (-> obj trans))
  (format #t "~Ttransv: #<vector @ #x~X>~%" (-> obj transv))
  obj
  )

;; definition of type steam-cap
(deftype steam-cap (process-drawable)
  ((root-override     collide-shape-moving               :offset        112)
   (do-burst?         symbol                             :offset-assert 176)
   (do-falling-sound? symbol                             :offset-assert 180)
   (do-landing-sound? symbol                             :offset-assert 184)
   (begin-travel-up   float                              :offset-assert 188)
   (begin-travel-down float                              :offset-assert 192)
   (sync              sync-info                :inline   :offset-assert 196)
   (part2             sparticle-launch-control           :offset-assert 204)
   (part3             sparticle-launch-control           :offset-assert 208)
   (down              vector                   :inline   :offset-assert 224)
   (up                vector                   :inline   :offset-assert 240)
   (control-pt        steam-cap-control-pt     3 :inline :offset-assert 256)
   )
  :heap-base #xf0
  :method-count-assert 22
  :size-assert         #x160
  :flag-assert         #x1600f00160
  (:methods
    (dummy-20 (_type_) none 20)
    (dummy-21 (_type_) quaternion 21)
    )
  (:states
    steam-cap-idle
    )
  )

;; definition for method 3 of type steam-cap
(defmethod inspect steam-cap ((obj steam-cap))
  (let ((t9-0 (method-of-type process-drawable inspect)))
    (t9-0 obj)
    )
  (format #t "~T~Tdo-burst?: ~A~%" (-> obj do-burst?))
  (format #t "~T~Tdo-falling-sound?: ~A~%" (-> obj do-falling-sound?))
  (format #t "~T~Tdo-landing-sound?: ~A~%" (-> obj do-landing-sound?))
  (format #t "~T~Tbegin-travel-up: ~f~%" (-> obj begin-travel-up))
  (format #t "~T~Tbegin-travel-down: ~f~%" (-> obj begin-travel-down))
  (format #t "~T~Tsync: #<sync-info @ #x~X>~%" (-> obj sync))
  (format #t "~T~Tpart2: ~A~%" (-> obj part2))
  (format #t "~T~Tpart3: ~A~%" (-> obj part3))
  (format #t "~T~Tdown: #<vector @ #x~X>~%" (-> obj down))
  (format #t "~T~Tup: #<vector @ #x~X>~%" (-> obj up))
  (format #t "~T~Tcontrol-pt[3] @ #x~X~%" (-> obj control-pt))
  obj
  )

;; failed to figure out what this is:
(defpartgroup group-steam-cap-sides
  :id 441
  :bounds (static-bspherem 0 0 0 10)
  :parts ((sp-item 1718 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75)
    (sp-item 1719 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75 :offset 60)
    (sp-item 1720 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75 :offset 120)
    (sp-item 1721 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75)
    (sp-item 1722 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75 :offset 60)
    (sp-item 1723 :fade-after (meters 100) :falloff-to (meters 160) :period 180 :length 75 :offset 120)
    (sp-item 1724 :fade-after (meters 60) :falloff-to (meters 60) :period 180 :length 75 :offset 120)
    )
  )

;; failed to figure out what this is:
(defpart 1724
  :init-specs ((sp-flt spt-num 1.0)
    (sp-int spt-rot-x 5)
    (sp-flt spt-r 4096.0)
    (sp-flt spt-g 2867.2)
    (sp-flt spt-b 3276.8)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags aux-list)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1725)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1725
  :init-specs ((sp-flt spt-fade-b -2.7306666))
  )

;; failed to figure out what this is:
(defpart 1718
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2 bit3)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1721
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1719
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2 bit3)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 120.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1722
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 120.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1720
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2 bit3)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 240.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1723
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.0 2.0 1.0)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 0.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-scalevel-x (meters 0.01))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a 0.10666667)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1726)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 240.0) (degrees 120.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1726
  :init-specs ((sp-flt spt-fade-a -0.21333334))
  )

;; failed to figure out what this is:
(defpartgroup group-steam-cap-plume
  :id 442
  :bounds (static-bspherem 0 0 0 32)
  :parts ((sp-item 1727 :fade-after (meters 120) :falloff-to (meters 160))
    (sp-item 1728 :fade-after (meters 120) :falloff-to (meters 160))
    (sp-item 1729 :fade-after (meters 60) :falloff-to (meters 60))
    (sp-item 1730 :fade-after (meters 60) :falloff-to (meters 60) :flags (start-dead))
    )
  )

;; failed to figure out what this is:
(defpartgroup group-steam-cap-plume-spread
  :id 443
  :bounds (static-bspherem 0 0 0 32)
  :parts ((sp-item 1731 :fade-after (meters 120) :falloff-to (meters 160))
    (sp-item 1732 :fade-after (meters 120) :falloff-to (meters 160))
    )
  )

;; failed to figure out what this is:
(defpart 1730
  :init-specs ((sp-flt spt-num 0.4)
    (sp-int spt-rot-x 5)
    (sp-flt spt-r 6144.0)
    (sp-flt spt-g 2867.2)
    (sp-flt spt-b 3276.8)
    (sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.033333335) 1.0)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.94 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags aux-list)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1725)
    (sp-flt spt-conerot-x (degrees 90.0))
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2.5))
    )
  )

;; failed to figure out what this is:
(defpart 1732
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 0.5)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 16.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.026666667) 1.0)
    (sp-flt spt-scalevel-x (meters 0.013333334))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2 bit3)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1735)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 15.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 0.5))
    )
  )

;; failed to figure out what this is:
(defpart 1731
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 0.5)
    (sp-flt spt-y (meters -0.5))
    (sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 16.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.026666667) 1.0)
    (sp-flt spt-scalevel-x (meters 0.013333334))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-accel-y 0.13653333)
    (sp-rnd-flt spt-friction 0.92 0.02 1.0)
    (sp-int spt-timer 300)
    (sp-cpuinfo-flags bit2)
    (sp-int spt-next-time 150)
    (sp-launcher-by-id spt-next-launcher 1735)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 15.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 0.5))
    )
  )

;; failed to figure out what this is:
(defpart 1735
  :init-specs ((sp-flt spt-fade-a -0.32))
  )

;; failed to figure out what this is:
(defpart 1727
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.5 0.5 1.0)
    (sp-rnd-flt spt-x (meters 0) (meters 1) 1.0)
    (sp-flt spt-y (meters -1))
    (sp-rnd-flt spt-scale-x (meters 2) (meters 2) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 16.0 16.0 1.0)
    (sp-flt spt-vel-y (meters 0.053333335))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-flt spt-accel-y 2.7306666)
    (sp-int spt-timer 153)
    (sp-cpuinfo-flags bit2)
    (sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 15.0) 1.0)
    (sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1728
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 0.5 0.5 1.0)
    (sp-rnd-flt spt-x (meters 0) (meters 0.5) 1.0)
    (sp-flt spt-y (meters -1))
    (sp-rnd-flt spt-scale-x (meters 2) (meters 2) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 128.0)
    (sp-flt spt-b 128.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-flt spt-vel-y (meters 0.053333335))
    (sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
    (sp-flt spt-accel-y 2.7306666)
    (sp-int spt-timer 153)
    (sp-cpuinfo-flags bit2 bit3)
    (sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1729
  :init-specs ((sp-flt spt-num 0.5)
    (sp-rnd-flt spt-x (meters 0.5) (meters 0.5) 1.0)
    (sp-int spt-rot-x 5)
    (sp-flt spt-r 6144.0)
    (sp-flt spt-g 2457.6)
    (sp-flt spt-b 3276.8)
    (sp-flt spt-vel-y (meters 0.053333335))
    (sp-int spt-timer 153)
    (sp-cpuinfo-flags aux-list)
    (sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
    )
  )

;; failed to figure out what this is:
(defskelgroup *steam-cap-sg* steam-cap steam-cap-lod0-jg steam-cap-idle-ja
              ((steam-cap-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 3)
              )

;; definition for method 20 of type steam-cap
;; INFO: Return type mismatch object vs none.
(defmethod dummy-20 steam-cap ((obj steam-cap))
  (when *target*
    (let* ((a1-0 (target-pos 0))
           (f0-0 (-> a1-0 y))
           )
      (when (and (>= f0-0 (+ -8192.0 (-> obj down y)))
                 (and (>= (+ -4096.0 (-> obj root-override trans y)) f0-0) (zero? (-> obj root-override riders num-riders)))
                 )
        (let ((f0-1 (vector-vector-xz-distance-squared (-> obj down) a1-0)))
          (when (>= 104857600.0 f0-1)
            (let ((s5-0 (>= 37748736.0 f0-1)))
              (when (not s5-0)
                (when (>= (- (-> obj root-override trans y) (-> obj down y)) 3072.0)
                  (let ((a1-1 (new 'stack-no-clear 'vector)))
                    (set! (-> a1-1 x) (the-as float 1))
                    (set! (-> a1-1 y) (the-as float #f))
                    (if (find-overlapping-shapes (-> obj root-override) (the-as overlaps-others-params a1-1))
                        (set! s5-0 #t)
                        )
                    )
                  )
                )
              (if s5-0
                  (send-event *target* 'shove #f (static-attack-info ((shove-up (meters 0.5)) (shove-back (meters 1.5)))))
                  )
              )
            )
          )
        )
      )
    )
  (none)
  )

;; definition for method 21 of type steam-cap
;; INFO: Used lq/sq
(defmethod dummy-21 steam-cap ((obj steam-cap))
  (local-vars (at-0 int) (at-1 int) (s5-0 symbol))
  (rlet ((vf0 :class vf)
         (vf1 :class vf)
         (vf2 :class vf)
         )
    (init-vf0-vector)
    (let ((f0-0 (get-current-phase (-> obj sync))))
      #t
      (cond
        ((< f0-0 (-> obj begin-travel-up))
         (let ((f30-0 (/ f0-0 (-> obj begin-travel-up))))
           (set! s5-0 #t)
           (dotimes (s4-0 3)
             (let ((s3-0 (-> obj control-pt s4-0)))
               (when (= (-> s3-0 trans y) (-> obj down y))
                 (set! (-> obj do-burst?) #t)
                 (let ((a0-2 (+ (the int (* 60.0 (- 1.0 f30-0))) 3)))
                   (if (zero? (rand-vu-int-count a0-2))
                       (+! (-> s3-0 transv y) (* (rand-vu-float-range 40960.0 57344.0) f30-0))
                       )
                   )
                 )
               )
             )
           (let ((a0-4 (+ (the int (* 60.0 (- 1.0 f30-0))) 1)))
             (if (zero? (rand-vu-int-count a0-4))
                 (spawn (-> obj part) (-> obj down))
                 )
             )
           )
         )
        ((< f0-0 (-> obj begin-travel-down))
         (let ((f30-1 (/ (- f0-0 (-> obj begin-travel-up)) (- (-> obj begin-travel-down) (-> obj begin-travel-up)))))
           (set! s5-0 #f)
           (set! (-> obj do-falling-sound?) #t)
           (when (-> obj do-burst?)
             (sound-play "sunk-top-rises")
             (set! (-> obj do-burst?) #f)
             (spawn (-> obj part) (-> obj down))
             (spawn (-> obj part) (-> obj down))
             (spawn (-> obj part) (-> obj down))
             (spawn (-> obj part) (-> obj down))
             )
           (when (< f30-1 0.94)
             (spawn (-> obj part2) (-> obj down))
             (let ((a1-8 (new 'stack-no-clear 'vector)))
               (set! (-> a1-8 quad) (-> obj root-override trans quad))
               (set! (-> a1-8 y) (+ -3072.0 (-> a1-8 y)))
               (spawn (-> obj part3) a1-8)
               )
             )
           )
         )
        (else
          (set! s5-0 #t)
          (when (-> obj do-falling-sound?)
            (set! (-> obj do-falling-sound?) #f)
            (sound-play "sunk-top-falls")
            )
          )
        )
      )
    (dotimes (s4-3 3)
      (let ((s2-0 (-> obj control-pt s4-3))
            (s3-3 (new 'stack-no-clear 'vector))
            )
        (set! (-> s3-3 quad) (-> s2-0 trans quad))
        (cond
          (s5-0
            (+! (-> s2-0 transv y) (* -819200.0 (-> *display* seconds-per-frame)))
            (let ((a1-10 s3-3)
                  (v1-42 s3-3)
                  (a0-21 (new 'stack-no-clear 'vector))
                  )
              (.lvf vf1 (&-> (-> s2-0 transv) quad))
              (let ((f0-17 (-> *display* seconds-per-frame)))
                (.mov at-0 f0-17)
                )
              (.mov vf2 at-0)
              (.mov.vf vf1 vf0 :mask #b1000)
              (.mul.x.vf vf1 vf1 vf2 :mask #b111)
              (.svf (&-> a0-21 quad) vf1)
              (vector+! a1-10 v1-42 a0-21)
              )
            (when (< (-> s3-3 y) (-> obj down y))
              (when (-> obj do-landing-sound?)
                (set! (-> obj do-landing-sound?) #f)
                (sound-play "sunk-top-lands")
                )
              (set! (-> s3-3 y) (-> obj down y))
              (let ((f0-20 (-> s2-0 transv y)))
                (when (< f0-20 0.0)
                  (let ((f0-22 (* 0.3 (- f0-20))))
                    (set! (-> s2-0 transv y) f0-22)
                    (if (< 7782.4 f0-22)
                        (sound-play "sunk-top-lands" :vol 60)
                        )
                    )
                  )
                )
              )
            )
          (else
            (set! (-> obj do-landing-sound?) #t)
            (let ((f0-24 (* 0.000048828126 (- (-> obj up y) (-> s2-0 trans y)))))
              (cond
                ((< 1.0 f0-24)
                 (set! f0-24 1.0)
                 )
                ((< f0-24 -1.0)
                 (set! f0-24 -1.0)
                 )
                )
              (+! (-> s2-0 transv y) (* 819200.0 (-> *display* seconds-per-frame) f0-24))
              (let ((f1-24 (-> s2-0 transv y)))
                (when (< 122880.0 (fabs f1-24))
                  (if (>= f1-24 0.0)
                      (set! (-> s2-0 transv y) 122880.0)
                      (set! (-> s2-0 transv y) -122880.0)
                      )
                  )
                )
              (let ((a1-14 s3-3)
                    (v1-61 s3-3)
                    (a0-26 (new 'stack-no-clear 'vector))
                    )
                (.lvf vf1 (&-> (-> s2-0 transv) quad))
                (let ((f1-27 (-> *display* seconds-per-frame)))
                  (.mov at-1 f1-27)
                  )
                (.mov vf2 at-1)
                (.mov.vf vf1 vf0 :mask #b1000)
                (.mul.x.vf vf1 vf1 vf2 :mask #b111)
                (.svf (&-> a0-26 quad) vf1)
                (vector+! a1-14 v1-61 a0-26)
                )
              (let ((f1-29 (- (-> obj up y) (-> s3-3 y)))
                    (v1-62 (>= f0-24 0.0))
                    )
                (when (!= v1-62 (>= f1-29 0.0))
                  (let ((f0-26 (-> s2-0 transv y)))
                    (when (< 40960.0 (fabs f0-26))
                      (if (>= f0-26 0.0)
                          (set! (-> s2-0 transv y) 40960.0)
                          (set! (-> s2-0 transv y) -40960.0)
                          )
                      )
                    )
                  (set! (-> s2-0 transv y) (* 0.8 (-> s2-0 transv y)))
                  )
                )
              )
            )
          )
        (set! (-> s2-0 trans quad) (-> s3-3 quad))
        )
      )
    (let ((f0-31 0.0))
      (dotimes (v1-71 3)
        (+! f0-31 (-> obj control-pt v1-71 trans y))
        )
      (let ((f0-32 (* 0.33333334 f0-31))
            (a1-16 (new 'stack-no-clear 'vector))
            )
        (set! (-> a1-16 quad) (-> obj root-override trans quad))
        (set! (-> a1-16 y) f0-32)
        (move-to-point! (-> obj root-override) a1-16)
        )
      )
    (let ((v1-77 (new 'stack-no-clear 'vector))
          (a0-35 (new 'stack-no-clear 'vector))
          (s5-1 (new 'stack-no-clear 'vector))
          )
      (vector-! v1-77 (the-as vector (&-> obj stack 176)) (the-as vector (-> obj control-pt)))
      (vector-! a0-35 (the-as vector (&-> obj stack 208)) (the-as vector (-> obj control-pt)))
      (vector-cross! s5-1 v1-77 a0-35)
      (vector-normalize! s5-1 1.0)
      (forward-up-nopitch->quaternion
        (-> obj root-override quat)
        (vector-z-quaternion! (new-stack-vector0) (-> obj root-override quat))
        s5-1
        )
      )
    )
  )

;; failed to figure out what this is:
(defstate steam-cap-idle (steam-cap)
  :trans (the-as (function none :behavior steam-cap) rider-trans)
  :code (behavior ()
    (loop
      (dummy-20 self)
      (dummy-21 self)
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior steam-cap) rider-post)
  )

;; definition for method 7 of type steam-cap
;; INFO: Return type mismatch process-drawable vs steam-cap.
(defmethod relocate steam-cap ((obj steam-cap) (arg0 int))
  (if (nonzero? (-> obj part2))
      (&+! (-> obj part2) arg0)
      )
  (if (nonzero? (-> obj part3))
      (&+! (-> obj part3) arg0)
      )
  (the-as
    steam-cap
    ((the-as (function process-drawable int process-drawable) (find-parent-method steam-cap 7)) obj arg0)
    )
  )

;; definition for method 10 of type steam-cap
(defmethod deactivate steam-cap ((obj steam-cap))
  (if (nonzero? (-> obj part2))
      (kill-and-free-particles (-> obj part2))
      )
  (if (nonzero? (-> obj part3))
      (kill-and-free-particles (-> obj part3))
      )
  ((method-of-type process-drawable deactivate) obj)
  (none)
  )

;; definition for method 11 of type steam-cap
;; INFO: Used lq/sq
;; INFO: Return type mismatch object vs none.
(defmethod init-from-entity! steam-cap ((obj steam-cap) (arg0 entity-actor))
  (local-vars (sv-16 res-tag))
  (set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
  (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
    (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s4-0 reaction) default-collision-reaction)
    (set! (-> s4-0 no-reaction)
          (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
          )
    (alloc-riders s4-0 1)
    (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
      (set! (-> s3-0 collide-with) (collide-kind target))
      (set! (-> s3-0 prim-core action) (collide-action solid ca-1))
      (set! (-> s3-0 prim-core offense) (collide-offense indestructible))
      (set! (-> s3-0 transform-index) 4)
      (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.0)
      (set-root-prim! s4-0 s3-0)
      )
    (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
    (backup-collide-with-as s4-0)
    (set! (-> obj root-override) s4-0)
    )
  (set! (-> obj do-burst?) #f)
  (set! (-> obj do-falling-sound?) #f)
  (set! (-> obj do-landing-sound?) #f)
  (process-drawable-from-entity! obj arg0)
  (initialize-skeleton obj *steam-cap-sg* '())
  (logior! (-> obj skel status) (janim-status inited))
  (ja-channel-set! 1)
  (let ((s4-1 (-> obj skel root-channel 0)))
    (joint-control-channel-group-eval!
      s4-1
      (the-as art-joint-anim (-> obj draw art-group data 2))
      num-func-identity
      )
    (set! (-> s4-1 frame-num) 0.0)
    )
  (update-transforms! (-> obj root-override))
  (load-params! (-> obj sync) obj (the-as uint 1800) 0.0 0.15 0.15)
  (let ((f30-0 0.4)
        (f28-0 0.9)
        )
    (set! sv-16 (new 'static 'res-tag))
    (let ((v1-36 (res-lump-data arg0 'percent (pointer float) :tag-ptr (& sv-16))))
      (when v1-36
        (set! f30-0 (-> v1-36 0))
        (set! f28-0 (-> v1-36 1))
        (if (>= 0.01 f30-0)
            (set! f30-0 0.01)
            )
        (if (>= 0.01 f28-0)
            (set! f28-0 0.01)
            )
        (if (>= f30-0 f28-0)
            (set! f28-0 (+ 0.01 f30-0))
            )
        (when (>= f30-0 1.0)
          (set! f28-0 (* 0.9 (/ f28-0 f30-0)))
          (set! f30-0 0.9)
          )
        )
      )
    (set! (-> obj begin-travel-up) f30-0)
    (set! (-> obj begin-travel-down) f28-0)
    )
  (set! (-> obj down quad) (-> obj root-override trans quad))
  (set! (-> obj up quad) (-> obj root-override trans quad))
  (set! (-> obj up y) (+ 40960.0 (-> obj up y)))
  (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 441) obj))
  (set! (-> obj part2) (create-launch-control (-> *part-group-id-table* 442) obj))
  (set! (-> obj part3) (create-launch-control (-> *part-group-id-table* 443) obj))
  (vector-reset! (-> obj root-override transv))
  (let ((s5-1 (new 'stack-no-clear 'vector))
        (f30-1 0.0)
        )
    (dotimes (s4-2 3)
      (let ((s3-1 (-> obj control-pt s4-2)))
        (set-vector! s5-1 0.0 0.0 10240.0 1.0)
        (vector-rotate-around-y! s5-1 s5-1 f30-1)
        (set! f30-1 (+ 21845.334 f30-1))
        (vector+! (-> s3-1 trans) s5-1 (-> obj root-override trans))
        (vector-reset! (-> s3-1 transv))
        )
      )
    )
  (go steam-cap-idle)
  (none)
  )
