mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
36f1592b90
Also adds: - BLERC - Minimap (with missing texture for the map, sprites work) - Eco Mine files - Precursor robot boss files - Sewer files - Vehicle files
375 lines
10 KiB
Common Lisp
375 lines
10 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: sewer-mood.gc
|
|
;; name in dgo: sewer-mood
|
|
;; dgos: SEA
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype sewa-states (structure)
|
|
()
|
|
)
|
|
|
|
|
|
;; WARN: Return type mismatch vector vs none.
|
|
(defun update-sewer-lights ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 light-group)))
|
|
(let ((a1-0 (-> v1-0 0)))
|
|
(set! (-> a1-0 dir0 direction x) -0.372)
|
|
(set! (-> a1-0 dir0 direction y) 0.853)
|
|
(set! (-> a1-0 dir0 direction z) 0.363)
|
|
(set! (-> a1-0 dir0 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-0 0 dir0 color) 0.65 0.855 0.82 1.0)
|
|
(let ((a1-2 (-> v1-0 0 dir1)))
|
|
(set! (-> a1-2 direction x) 0.372)
|
|
(set! (-> a1-2 direction y) 0.853)
|
|
(set! (-> a1-2 direction z) -0.363)
|
|
(set! (-> a1-2 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-0 0 dir1 color) 0.65 0.855 0.82 1.0)
|
|
(set-vector! (-> v1-0 0 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-0 0 dir0 extra x) 0.85)
|
|
(set! (-> v1-0 0 dir1 extra x) 0.3)
|
|
(set! (-> v1-0 0 dir2 extra x) 0.0)
|
|
(set! (-> v1-0 0 ambi extra x) 0.3)
|
|
)
|
|
(let ((v1-2 (-> arg0 current-fog)))
|
|
(set! (-> v1-2 fog-color x) 150.0)
|
|
(set! (-> v1-2 fog-color y) 165.0)
|
|
(set! (-> v1-2 fog-color z) 220.0)
|
|
(set! (-> v1-2 fog-color w) 128.0)
|
|
)
|
|
(set-vector! (-> arg0 current-fog fog-dists) 2048000.0 12288000.0 255.0 150.0)
|
|
(none)
|
|
)
|
|
|
|
(defbehavior update-mood-sewa time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(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)
|
|
(set! (-> arg0 times 1 w) 1.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)
|
|
)
|
|
|
|
(deftype sewb-states (structure)
|
|
((pulse pulse-state :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-sewb ((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-sewb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(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)
|
|
(set! (-> arg0 times 1 w) 1.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)
|
|
(update-mood-pulse arg0 7 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype sewc-states (structure)
|
|
((pulse pulse-state :inline)
|
|
(electricity electricity-state :inline)
|
|
(rot float)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-sewc ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 state)))
|
|
(set! (-> v1-0 5) (the-as uint 1.0))
|
|
(set! (-> v1-0 1) (the-as uint 1.0))
|
|
(set! (-> v1-0 2) (the-as uint 1.0))
|
|
(let ((f0-3 1.0))
|
|
(set! (-> v1-0 3) (the-as uint f0-3))
|
|
f0-3
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior update-mood-sewc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((gp-0 (the-as sewc-states (-> arg0 state))))
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(update-mood-electricity arg0 2 16 0.8 1.0)
|
|
(update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0)
|
|
(set! (-> arg0 times 4 w) 1.0)
|
|
(update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4)
|
|
(update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4)
|
|
(update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4)
|
|
(if (not (paused?))
|
|
(+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype sewd-states (structure)
|
|
((pulse pulse-state :inline)
|
|
(electricity electricity-state :inline)
|
|
(rot float)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-sewd ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 state)))
|
|
(set! (-> v1-0 5) (the-as uint 0.0))
|
|
(set! (-> v1-0 1) (the-as uint 1.0))
|
|
(set! (-> v1-0 2) (the-as uint 1.0))
|
|
(let ((f0-3 1.0))
|
|
(set! (-> v1-0 3) (the-as uint f0-3))
|
|
f0-3
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior update-mood-sewd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((gp-0 (the-as sewd-states (-> arg0 state))))
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(update-mood-electricity arg0 2 16 0.8 1.0)
|
|
(update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0)
|
|
(set! (-> arg0 times 4 w) 1.0)
|
|
(update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4)
|
|
(update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4)
|
|
(update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4)
|
|
(if (not (paused?))
|
|
(+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch float vs none.
|
|
(defun set-sewd-light! ((arg0 float))
|
|
(let ((v1-1 (level-get *level* 'sewd)))
|
|
(when (and v1-1 (= (-> v1-1 status) 'active))
|
|
(let ((v1-2 (-> v1-1 mood-context state)))
|
|
(set! (-> v1-2 5) (the-as uint arg0))
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(deftype sewg-states (structure)
|
|
((electricity electricity-state 2 :inline)
|
|
(rot float :offset 32)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-sewg ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 state)))
|
|
(set! (-> v1-0 1) (the-as uint 1.0))
|
|
(let ((f0-1 1.0))
|
|
(set! (-> v1-0 5) (the-as uint f0-1))
|
|
f0-1
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior update-mood-sewg time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((gp-0 (the-as sewg-states (-> arg0 state))))
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(set! (-> arg0 times 4 w) 1.0)
|
|
(update-mood-electricity arg0 2 0 1.2 1.7)
|
|
(update-mood-electricity arg0 3 16 1.2 1.7)
|
|
(update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4)
|
|
(update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4)
|
|
(update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4)
|
|
(if (not (paused?))
|
|
(+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defun set-sewg-electricity-scale! ((arg0 float) (arg1 int))
|
|
(let ((v1-1 (level-get *level* 'sewg)))
|
|
(when v1-1
|
|
(let ((v1-2 (the-as sewg-states (-> v1-1 mood-context state))))
|
|
(set! (-> (the-as sewg-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype sewh-states (structure)
|
|
((electricity electricity-state 5 :inline)
|
|
(turret-value float :offset 80)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-sewh ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 state)))
|
|
(set! (-> v1-0 1) (the-as uint 1.0))
|
|
(set! (-> v1-0 5) (the-as uint 1.0))
|
|
(set! (-> v1-0 9) (the-as uint 1.0))
|
|
(set! (-> v1-0 13) (the-as uint 1.0))
|
|
(let ((f0-4 1.0))
|
|
(set! (-> v1-0 17) (the-as uint f0-4))
|
|
f0-4
|
|
)
|
|
)
|
|
)
|
|
|
|
(defbehavior update-mood-sewh time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((gp-0 (the-as sewh-states (-> arg0 state))))
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(update-mood-electricity arg0 2 0 1.2 1.7)
|
|
(update-mood-electricity arg0 3 16 1.2 1.7)
|
|
(update-mood-electricity arg0 5 48 1.2 1.7)
|
|
(update-mood-electricity arg0 6 64 1.2 1.7)
|
|
(set! (-> arg0 times 7 w) (-> gp-0 turret-value))
|
|
(if (not (paused?))
|
|
(set! (-> gp-0 turret-value) (fmax 0.0 (+ -0.1 (-> gp-0 turret-value))))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defun set-sewh-electricity-scale! ((arg0 float) (arg1 int))
|
|
(let ((v1-1 (level-get *level* 'sewh)))
|
|
(when v1-1
|
|
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
|
(set! (-> (the-as sewh-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch float vs none.
|
|
(defun set-sewh-turret-flash! ()
|
|
(let ((v1-1 (level-get *level* 'sewh)))
|
|
(when v1-1
|
|
(let ((v1-2 (-> v1-1 mood-context state)))
|
|
(set! (-> v1-2 20) (the-as uint 1.2))
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(deftype sewj-states (structure)
|
|
((rot float)
|
|
)
|
|
)
|
|
|
|
|
|
(defbehavior update-mood-sewj time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #f)
|
|
(update-sewer-lights arg0)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((gp-0 (the-as sewj-states (-> arg0 state))))
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(set! (-> arg0 times 2 w) 1.0)
|
|
(set! (-> arg0 times 3 w) 1.0)
|
|
(set! (-> arg0 times 4 w) 1.0)
|
|
(update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4)
|
|
(update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4)
|
|
(update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4)
|
|
(if (not (paused?))
|
|
(+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|