jak-project/goal_src/jak3/engine/process-drawable/simple-focus.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.3 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: simple-focus.gc
;; name in dgo: simple-focus
;; dgos: DESOASIS
;; DECOMP BEGINS
(deftype simple-focus (process-focusable)
((first-time? symbol)
)
(:state-methods
idle
)
)
(defmethod get-trans ((this simple-focus) (arg0 int))
"Get the `trans` for this process."
(-> this root trans)
)
(defmethod run-logic? ((this simple-focus))
"Should this process be run? Checked by execute-process-tree."
(when (-> this first-time?)
(set! (-> this first-time?) #f)
#t
)
)
(defstate idle (simple-focus)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('move-trans)
(let ((v0-0 (-> self root trans)))
(set! (-> v0-0 quad) (-> (the-as vector (-> block param 0)) quad))
v0-0
)
)
)
)
:code sleep-code
)
(defbehavior simple-focus-init-by-other simple-focus ()
(let ((gp-0 (new 'process 'trsqv)))
(set! (-> self root) (the-as collide-shape gp-0))
(vector-identity! (-> gp-0 scale))
(quaternion-identity! (-> gp-0 quat))
)
(logclear! (-> self mask) (process-mask enemy))
(set! (-> self first-time?) #t)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(go-virtual idle)
)