jak-project/goal_src/jak3/levels/factory/factoryc-mood.gc
Hat Kid e2e5289788
decomp3: font widescreen and shadow hacks, generic renderer, misc files (#3483)
- `pecker-ingame`
- `des-bbush-tasks`
- `des-burning-bush`
- `des-bush-part`
- `des-bush`
- `mh-centipede`
- `mh-centipede-part`
- `mh-wasp`
- `mh-wasp-part`
- `needle-fish`
- `des-bush-time-chase`
- `timer-path`
- `mission-squad-control-h`
- `mh-bat`
- `hover-nav-factoryd`
- `hover-nav-factoryc`
- `conveyor`
- `fac-part`
- `factory-part`
- `factoryc-mood`
- `factoryc-obs`
- `factoryc-obs2`
- `lfaccar-init`
- `factory-boss-part`
- `factory-boss-scenes`
- `factory-boss-setup`
- `factory-boss-states`
- `factory-mood`
- `factoryc-manager`
- `lfacrm1-mood`
- `lfacrm2-mood`
- `missile-bot`
- `sew-laser-turret`
- `ai-task-h`
- `ash-h`
- `ash-shot`
- `ash-states`
- `ash-task`
- `ash`
- `bot-h`
- `bot-states`
- `bot`
- `ash-oasis-course`
- `oasis-defense`
- `comb-field`
- `comb-mood`
- `comb-obs`
- `comb-part`
- `comb-scenes`
- `comb-sentry`
- `comb-travel`
- `comba-init`
- `combx-scenes`
- `h-sled`
- `destroy-dark-eco`
- `fac-gunturret`
- `fac-robotank-turret`
- `fac-robotank`
- `fac-tower`
- `factory-h`
- `factory-hud`
- `factory-manager`
- `factorya-init`
- `ffight-projectile`
- `ftank-projectile`
- `fturret-projectile`
- `h-warf`
- `warf-projectile`
2024-04-28 08:59:46 -04:00

58 lines
1.6 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: factoryc-mood.gc
;; name in dgo: factoryc-mood
;; dgos: FACC
;; DECOMP BEGINS
(deftype factoryc-states (structure)
((electricity electricity-state 2 :inline)
(flame flames-state :inline :offset 32)
)
)
(defbehavior update-mood-factoryc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
(update-mood-interior-ambient arg0 #t 0.0)
(cond
((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode)))
(palette-select-special arg0)
)
(else
(-> arg0 state)
(set! (-> arg0 times 1 w) 1.0)
(let* ((a0-5 (-> *display* part-clock frame-counter))
(v1-7 (mod a0-5 300))
(s5-0 (mod a0-5 900))
)
(set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-7))))))
(set! (-> arg0 times 3 w) (if (< 450 s5-0)
1.0
0.5
)
)
)
(update-mood-electricity arg0 4 0 0.8 1.0)
(update-mood-electricity arg0 6 16 0.8 1.0)
(update-mood-flames arg0 5 1 32 0.85 0.00068359374 2.0)
(set! (-> arg0 times 7 w) 1.0)
)
)
0
(none)
)
;; WARN: Return type mismatch float vs none.
(defun set-factoryc-light! ((arg0 float) (arg1 int))
(let ((v1-1 (level-get *level* 'factoryc)))
(when v1-1
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
(set! (-> (the-as factoryc-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0)
)
)
)
(none)
)