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

;; name: volcanox-mood.gc
;; name in dgo: volcanox-mood
;; dgos: VOCX

;; DECOMP BEGINS

(define *volcanox-mood-color-table*
  (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 1.1978 :y 1.0519 :z 0.389)
                                           :amb-color (new 'static 'vector :x 0.2722 :y 0.3004 :z 0.4219 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974)
                                           :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 1.841 :y 1.6849 :z 1.3595)
                                           :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974)
                                           :amb-color (new 'static 'vector :x 0.4976 :y 0.5195 :z 0.4419 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 1.5685 :y 1.1821 :z 0.3112)
                                           :amb-color (new 'static 'vector :x 0.3439 :y 0.401 :z 0.5508 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 0.5774 :y 0.4298 :z 0.4757)
                                           :amb-color (new 'static 'vector :x 0.3432 :y 0.3971 :z 0.4284 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 0.5192 :y 0.7075 :z 0.8291)
                                           :amb-color (new 'static 'vector :x 0.4013 :y 0.3901 :z 0.519 :w 1.0)
                                           )
                                         (new 'static 'mood-color
                                           :lgt-color (new 'static 'vector :x 0.3333 :y 0.5748 :z 0.4777)
                                           :amb-color (new 'static 'vector :x 0.3498 :y 0.3648 :z 0.3454 :w 1.0)
                                           )
                                         )
                                 )
  )

(define *volcanox-mood-fog-table*
  (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 181.0 :y 140.0 :z 140.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 205.0 :y 169.0 :z 136.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 198.0 :y 160.0 :z 83.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 170.0 :y 145.0 :z 130.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 262144.0 :y 1843200.0 :z 255.0 :w 128.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 170.0 :y 140.0 :z 150.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 61.0 :y 58.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1146880.0 :z 255.0 :w 178.5)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 50.0 :y 44.0 :z 24.0 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 942080.0 :z 255.0 :w 138.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       (new 'static 'mood-fog
                                         :fog-color (new 'static 'vector :x 50.0 :y 34.7999 :z 17.5998 :w 128.0)
                                         :fog-dists (new 'static 'vector :x 131072.0 :y 1392640.0 :z 255.0 :w 133.0)
                                         :erase-color (new 'static 'vector :w 128.0)
                                         )
                                       )
                               )
  )

(deftype volcanox-states (structure)
  ()
  )


(defbehavior update-mood-volcanox time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
  (copy-mood-exterior arg0)
  (when (not (-> *time-of-day-context* overide-enable))
    (overide-mood-color arg0 arg1 (the-as int *volcanox-mood-color-table*) 0.0)
    (overide-mood-fog arg0 arg1 (the-as int *volcanox-mood-fog-table*) 0.0)
    )
  (when (and (= (-> *level* level arg2 status) 'active)
             (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
             )
    (-> arg0 state)
    (set! (-> arg0 times 5 w) 1.0)
    (if (task-node-closed? (game-task-node volcano-darkeco-resolution))
        (set! (-> arg0 times 6 w) 1.0)
        )
    )
  0
  (none)
  )
