mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -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`
126 lines
3.7 KiB
Common Lisp
126 lines
3.7 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: desert-mood.gc
|
|
;; name in dgo: desert-mood
|
|
;; dgos: HGA, WIN, DST
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype desert-states (structure)
|
|
((light light-state :inline)
|
|
(flame flames-state :inline)
|
|
(bsphere0 vector :inline)
|
|
(bsphere1 vector :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(defbehavior update-mood-desert time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(copy-mood-exterior arg0)
|
|
(when (and (= (-> *level* level arg2 status) 'active)
|
|
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
|
)
|
|
(-> arg0 state)
|
|
(set! (-> arg0 times 7 w) 1.0)
|
|
(update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype desertg-states (structure)
|
|
((light light-state :inline)
|
|
(flame flames-state :inline)
|
|
(bsphere vector :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(defun init-mood-desertg ((arg0 mood-context))
|
|
(let ((v1-1 (&-> (-> arg0 state) 4)))
|
|
(set! (-> v1-1 0) (the-as uint 8192000.0))
|
|
(set! (-> v1-1 1) (the-as uint 221184.0))
|
|
(set! (-> v1-1 2) (the-as uint 8601600.0))
|
|
(set! (-> v1-1 3) (the-as uint 1.0))
|
|
)
|
|
(let ((v1-2 (-> arg0 light-group 2)))
|
|
(let ((a0-1 (-> v1-2 dir0)))
|
|
(set! (-> a0-1 direction x) 0.0)
|
|
(set! (-> a0-1 direction y) 1.0)
|
|
(set! (-> a0-1 direction z) 0.0)
|
|
(set! (-> a0-1 direction w) 0.0)
|
|
)
|
|
(set-vector! (-> v1-2 dir0 color) 0.8 0.45 0.2 1.0)
|
|
(let ((a0-3 (-> v1-2 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-2 dir1 color) 0.909 0.855 0.82 1.0)
|
|
(set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0)
|
|
(set! (-> v1-2 dir0 extra x) 1.0)
|
|
(set! (-> v1-2 dir1 extra x) 0.5)
|
|
(set! (-> v1-2 dir2 extra x) 0.0)
|
|
(set! (-> v1-2 ambi extra x) 0.35)
|
|
)
|
|
)
|
|
|
|
(defbehavior update-mood-desertg time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(copy-mood-exterior arg0)
|
|
(when (and (= (-> *level* level arg2 status) 'active)
|
|
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
|
)
|
|
(let ((v1-8 (&-> (-> arg0 state) 4)))
|
|
(set! (-> v1-8 0) (the-as uint 8192000.0))
|
|
(set! (-> v1-8 1) (the-as uint 221184.0))
|
|
(set! (-> v1-8 2) (the-as uint 8601600.0))
|
|
(set! (-> v1-8 3) (the-as uint 1.0))
|
|
)
|
|
(let* ((s5-1 (the-as object (-> arg0 state)))
|
|
(f2-0 (vector-vector-distance (target-pos 0) (-> (the-as desert-states s5-1) bsphere0)))
|
|
(f0-5 (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.0000030517579 (+ -737280.0 f2-0))))))
|
|
)
|
|
(set! (-> arg0 times 7 w) 1.0)
|
|
(light-group-lerp!
|
|
(the-as light-group (-> arg0 light-group))
|
|
(the-as (pointer light-group) (-> arg0 light-group))
|
|
(-> arg0 light-group 2)
|
|
f0-5
|
|
)
|
|
)
|
|
(update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype deswalk-states (structure)
|
|
((light light-state :inline)
|
|
(flame flames-state :inline)
|
|
(bsphere0 vector :inline)
|
|
(bsphere1 vector :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(defbehavior update-mood-deswalk time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
|
(copy-mood-exterior arg0)
|
|
(when (and (= (-> *level* level arg2 status) 'active)
|
|
(< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9))
|
|
)
|
|
(-> arg0 state)
|
|
(let* ((a0-6 (-> *display* part-clock frame-counter))
|
|
(v1-11 (mod a0-6 300))
|
|
)
|
|
(mod a0-6 900)
|
|
(set! (-> arg0 times 5 w) 1.0)
|
|
(set! (-> arg0 times 7 w) 1.0)
|
|
(set! (-> arg0 times 6 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-11))))))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|