mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
58a5440c8a
Makes a bunch of missions mostly playable, including: - `arena-training-1` - `arena-fight-1` - `wascity-chase` - `arena-fight-2` - `arena-fight-3` - `volcano-darkeco` - `desert-hover` - `nest-eggs` - `temple-climb` - `temple-oracle` - `temple-tests` - `desert-beast-battle` - `desert-turtle-training` - `desert-course-race` - `desert-artifact-race1` - `wascity-leaper-race` - `wascity-pre-game` - `sewer-met-hum` - `forest-kill-plants` - `forest-ring-chase` - `temple-defend` - `tower-destroy` - `desert-glide` --- Files: - `ripple` - `waswide-mood` - `sig-rider` - `nst-tasks` - `nst-part` - `nst-gas` - `nst-eggs-h` - `nst-obs` - `nst-mood` - `egg-spider` - `wasdoors-init` - `wasall-tasks` - `wvehicle-race` - `wcar-marauder` - `wcar-marauder-b` - `turret-control` - `was-squad-control` - `turtle-training` - `kleever-rider` - `course-race` - `artifact-race` - `desert-hover` - `desbeast-path-h` - `des-beast` - `desertg-obs` - `desertf-obs` - `desertd-obs` - `desert-dust-storm` - `des-cactus` - `race-hud` - `race-info` - `race-manager` - `tizard` - `flyingsaw` - `hover-training` - `temple-mood` - `temple-obs` - `temple-obs2` - `temple-part` - `temple-scenes` - `templex-mood` - `templex-obs` - `templex-part` - `tomb-baby-spider` - `target-turret-shot` - `target-turret` - `beast-battle-path` - `des-beast-2` - `mh-flyer` - `scorpion-gun` - `hover-enemy-h` - `hover-enemy` - `hover-formation-h` - `hover-formation` - `hover-nav-control-h` - `hover-nav-control` - `flamer-hover` - `hover-nav-templea` - `robo-hover` - `hover-nav-sewb` - `hover-nav-sewg` - `hover-nav-sewj` - `hover-nav-sewl` - `hover-nav-sewo` - `hover-nav-towera` - `tower-mood` - `tower-obs` - `tower-scenes` - `tower-part` - `eco-green-collider` - `forest-bridges` - `forest-kill-plants` - `forest-mood` - `forest-ring-chase` - `forest-tasks` - `forest-part` - `foresta-obs` - `hover-nav-foresta` - `mh-plant` - `dp-bipedal-part` - `dp-bipedal-shot` - `dp-bipedal` - `neo-spawner` - `for-turret` - `for-turret-shot` - `neo-wasp` - `neo-wasp-part` - `volcanox-scenes` - `volcanox-mood` - `volcano-scenes` - `volcano-mood` - `volcano-obs` - `volcano-obs2` - `chain-physics` - `rigid-body-plat` - `volcano-part` - `flamer-lava` - `flitter` - `spiky-frog` - `flut-wild` - `target-indax` - `target-indax-hang` - `mantis` - `volcanox-obs` - `spyder` - `wcar-faccar` - `mhcity-obs2` - `mhcity-part` - `mhcity-obs` - `dm-mine-spider` - `rapid-gunner` - `stadium-mood` - `stadium-scenes` - `stadiuma-mood` - `stadiuma-part` - `kanga-lizard` - `marauder` - `arena-scenes` - `wasstada-mood` - `wasstada-obs` - `wasstada-part` - `wasstadb-obs` - `wasstadc-obs` - `dm-flyer` - `maker-part` - `maker-projectile` - `skeet-part` - `wascity-turret` - `wasgun-h` - `wasgun-hud` - `wasgun-manager` - `nav-graph-h` - `traffic-engine-h` - `waswide-init` - `cty-borrow-manager-h` - `cty-borrow-manager` - `desert-part` - `height-map-h` - `height-map` - `traffic-height-map` - `vehicle-control` - `hvehicle-h` - `hvehicle` - `hvehicle-effects` - `hvehicle-physics` - `hvehicle-util` - `glider-h` - `glider-hud` - `glider-manager` - `glider-ring` - `glider-ring-part` - `h-glider` - `hanga-init` - `was-pre-game` - `was-leaper-race` - `flut-racer` - `desert-scenes` - `desert-lizard-h` - `desert-lizard-task` - `desert-lizard` - `throne-scenes` - `waspal-mood` - `waspala-obs` - `waspala-part` - `deswalk-obs` - `deswalk-part` - `terraformer-drone` - `terraformer-head` - `terraformer-part` - `terraformer-setup`
251 lines
8.4 KiB
Common Lisp
251 lines
8.4 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: nst-mood.gc
|
|
;; name in dgo: nst-mood
|
|
;; dgos: NSA
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(defun update-nst-lights ((arg0 mood-context) (arg1 float))
|
|
(let ((v1-0 (-> arg0 light-group)))
|
|
(let ((a0-1 (-> v1-0 0)))
|
|
(set! (-> a0-1 dir0 direction x) 0.0)
|
|
(set! (-> a0-1 dir0 direction y) 1.0)
|
|
(set! (-> a0-1 dir0 direction z) 0.0)
|
|
(set! (-> a0-1 dir0 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-0 0 dir0 color) 0.8 0.45 0.2 1.0)
|
|
(let ((a0-3 (-> v1-0 0 dir1)))
|
|
(set! (-> a0-3 direction x) -0.372)
|
|
(set! (-> a0-3 direction y) 0.853)
|
|
(set! (-> a0-3 direction z) 0.363)
|
|
(set! (-> a0-3 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-0 0 dir1 color) 0.909 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) 1.0)
|
|
(set! (-> v1-0 0 dir1 extra x) 0.5)
|
|
(set! (-> v1-0 0 dir2 extra x) 0.0)
|
|
(set! (-> v1-0 0 ambi extra x) 0.35)
|
|
)
|
|
(let ((s2-0 (new 'stack-no-clear 'vector))
|
|
(a1-17 (camera-pos))
|
|
)
|
|
(new 'stack-no-clear 'vector)
|
|
(new 'stack-no-clear 'vector)
|
|
(let ((s4-0 (new 'stack-no-clear 'vector4))
|
|
(s3-0 (new 'stack-no-clear 'vector4))
|
|
)
|
|
(set-vector! s2-0 4870144.0 -434176.0 2195456.0 1.0)
|
|
(set-vector! s4-0 -327680.0 327680.0 255.0 254.0)
|
|
(set-vector! s3-0 -327680.0 327680.0 255.0 100.0)
|
|
(let ((v1-7 (-> arg0 current-fog)))
|
|
(set! (-> v1-7 fog-color x) 0.0)
|
|
(set! (-> v1-7 fog-color y) 0.0)
|
|
(set! (-> v1-7 fog-color z) 0.0)
|
|
(set! (-> v1-7 fog-color w) 0.0)
|
|
)
|
|
(set-vector! (-> arg0 current-fog fog-dists) 0.0 0.0 0.0 0.0)
|
|
(let* ((f2-0 (vector-vector-distance s2-0 a1-17))
|
|
(f30-0 (* (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.00000025431316 (+ -3072000.0 f2-0))))) arg1))
|
|
(v1-13 (-> arg0 current-fog))
|
|
(a1-18 (-> arg0 current-fog erase-color))
|
|
(gp-1 (-> arg0 current-fog fog-dists))
|
|
)
|
|
(set! (-> v1-13 fog-color x) 0.0)
|
|
(set! (-> v1-13 fog-color y) 128.0)
|
|
(set! (-> v1-13 fog-color z) 48.0)
|
|
(set! (-> v1-13 fog-color w) 128.0)
|
|
(set-vector! a1-18 0.0 64.0 24.0 128.0)
|
|
(vector4-scale! (the-as vector4 a1-18) (the-as vector4 a1-18) f30-0)
|
|
(vector4-scale! (the-as vector4 gp-1) s4-0 (- 1.0 f30-0))
|
|
(vector4-madd! (the-as vector4 gp-1) (the-as vector4 gp-1) s3-0 f30-0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(deftype nsta-states (structure)
|
|
((poison-interp float)
|
|
)
|
|
)
|
|
|
|
|
|
(defbehavior update-mood-nsta time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #t)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((v1-2 (the-as object (-> arg0 state))))
|
|
(update-nst-lights arg0 (-> (the-as nsta-states v1-2) poison-interp))
|
|
)
|
|
(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 nstb-states (structure)
|
|
((poison-interp float)
|
|
(pulse pulse-state 5 :inline :offset 4)
|
|
)
|
|
)
|
|
|
|
|
|
;; WARN: Return type mismatch symbol vs float.
|
|
(defun init-mood-nstb ((arg0 mood-context))
|
|
(let ((v1-0 (-> arg0 light-group 1)))
|
|
(let ((a1-0 (-> v1-0 dir0)))
|
|
(set! (-> a1-0 direction x) -0.5)
|
|
(set! (-> a1-0 direction y) 0.764)
|
|
(set! (-> a1-0 direction z) 0.406)
|
|
(set! (-> a1-0 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-0 dir0 color) 1.0 0.65 0.1 1.0)
|
|
(let ((a1-2 (-> v1-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 dir1 color) 0.909 0.855 0.82 1.0)
|
|
(set-vector! (-> v1-0 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-0 dir0 extra x) 0.5)
|
|
(set! (-> v1-0 dir1 extra x) 0.0)
|
|
(set! (-> v1-0 dir2 extra x) 0.0)
|
|
(set! (-> v1-0 ambi extra x) 0.35)
|
|
)
|
|
(let ((v1-2 (-> arg0 light-group 2)))
|
|
(let ((a1-7 (-> v1-2 dir0)))
|
|
(set! (-> a1-7 direction x) 0.5)
|
|
(set! (-> a1-7 direction y) -0.764)
|
|
(set! (-> a1-7 direction z) -0.406)
|
|
(set! (-> a1-7 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-2 dir0 color) 0.3 0.65 0.3 1.0)
|
|
(let ((a1-9 (-> v1-2 dir1)))
|
|
(set! (-> a1-9 direction x) -0.5)
|
|
(set! (-> a1-9 direction y) 0.764)
|
|
(set! (-> a1-9 direction z) 0.406)
|
|
(set! (-> a1-9 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-2 dir1 color) 1.0 0.65 0.1 1.0)
|
|
(set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-2 dir0 extra x) 0.3)
|
|
(set! (-> v1-2 dir1 extra x) 0.1)
|
|
(set! (-> v1-2 dir2 extra x) 0.0)
|
|
(set! (-> v1-2 ambi extra x) 0.3)
|
|
)
|
|
(let ((v1-4 (-> arg0 light-group 3)))
|
|
(let ((a1-15 (-> v1-4 dir0)))
|
|
(set! (-> a1-15 direction x) 0.0)
|
|
(set! (-> a1-15 direction y) -1.0)
|
|
(set! (-> a1-15 direction z) 0.0)
|
|
(set! (-> a1-15 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-4 dir0 color) 0.3 0.65 0.3 1.0)
|
|
(let ((a1-17 (-> v1-4 dir1)))
|
|
(set! (-> a1-17 direction x) 0.372)
|
|
(set! (-> a1-17 direction y) 0.853)
|
|
(set! (-> a1-17 direction z) -0.363)
|
|
(set! (-> a1-17 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-4 dir1 color) 1.0 0.6 0.1 1.0)
|
|
(set-vector! (-> v1-4 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-4 dir0 extra x) 1.0)
|
|
(set! (-> v1-4 dir1 extra x) 0.5)
|
|
(set! (-> v1-4 dir2 extra x) 0.0)
|
|
(set! (-> v1-4 ambi extra x) 0.35)
|
|
)
|
|
(let ((v1-6 (-> arg0 light-group 4)))
|
|
(let ((a1-23 (-> v1-6 dir0)))
|
|
(set! (-> a1-23 direction x) -0.5)
|
|
(set! (-> a1-23 direction y) 0.764)
|
|
(set! (-> a1-23 direction z) -0.406)
|
|
(set! (-> a1-23 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-6 dir0 color) 0.8 0.6 0.1 1.0)
|
|
(let ((a1-25 (-> v1-6 dir1)))
|
|
(set! (-> a1-25 direction x) -0.372)
|
|
(set! (-> a1-25 direction y) 0.853)
|
|
(set! (-> a1-25 direction z) 0.363)
|
|
(set! (-> a1-25 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-6 dir1 color) 0.909 0.855 0.82 1.0)
|
|
(set-vector! (-> v1-6 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-6 dir0 extra x) 0.4)
|
|
(set! (-> v1-6 dir1 extra x) 0.0)
|
|
(set! (-> v1-6 dir2 extra x) 0.0)
|
|
(set! (-> v1-6 ambi extra x) 0.35)
|
|
)
|
|
(let ((v1-8 (-> arg0 state)))
|
|
(dotimes (a0-1 5)
|
|
(set! (-> (&+ v1-8 (* a0-1 16)) 2) (the-as uint 0.0))
|
|
(set! (-> (&+ v1-8 (* a0-1 16)) 3) (the-as uint 0.0))
|
|
(set! (-> (&+ v1-8 (* a0-1 16)) 4) (the-as uint 2.0))
|
|
)
|
|
)
|
|
(the-as float #f)
|
|
)
|
|
|
|
(defbehavior update-mood-nstb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(update-mood-interior arg0 #t)
|
|
(cond
|
|
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
|
|
(palette-select-special arg0)
|
|
)
|
|
(else
|
|
(let ((v1-2 (the-as object (-> arg0 state))))
|
|
(update-nst-lights arg0 (-> (the-as nstb-states v1-2) poison-interp))
|
|
)
|
|
(set! (-> arg0 times 0 w) 1.0)
|
|
(set! (-> arg0 times 1 w) 1.0)
|
|
(set! (-> arg0 times 2 w) 1.0)
|
|
(let ((f30-0 (* 65536.0 (seconds-per-frame))))
|
|
(update-mood-pulse arg0 3 4 1.125 0.125 f30-0 0.0)
|
|
(update-mood-pulse arg0 4 20 1.125 0.125 f30-0 13107.2)
|
|
(update-mood-pulse arg0 5 36 1.125 0.125 f30-0 26214.4)
|
|
(update-mood-pulse arg0 6 52 1.125 0.125 f30-0 39321.6)
|
|
(update-mood-pulse arg0 7 68 1.125 0.125 f30-0 52428.8)
|
|
)
|
|
(set! (-> arg0 light-group 2 dir0 extra x) (* 0.3 (-> arg0 times 5 w)))
|
|
(when (not (paused?))
|
|
(dotimes (v1-11 5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(define *nstb-light-mode* 0)
|
|
|
|
;; WARN: Return type mismatch float vs none.
|
|
(defun set-nstb-lights! ((arg0 int) (arg1 float) (arg2 float) (arg3 symbol))
|
|
(let ((v1-1 (level-get *level* 'nstb)))
|
|
(when (and v1-1 (= (-> v1-1 status) 'active))
|
|
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
|
(set! (-> (the-as nstb-states v1-2) pulse arg0 target-brightness) arg1)
|
|
(set! (-> (the-as nstb-states v1-2) pulse arg0 speed) arg2)
|
|
(if arg3
|
|
(set! (-> (the-as nstb-states v1-2) pulse arg0 brightness) arg1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|