Files
jak-project/goal_src/jak3/engine/entity/entity-h.gc
T
Hat Kid 58a5440c8a decomp3: more misc files (#3466)
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`
2024-04-22 18:43:51 +02:00

211 lines
5.3 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: entity-h.gc
;; name in dgo: entity-h
;; dgos: GAME
;; +++entity-perm-status
(defenum entity-perm-status
:bitfield #t
:type uint16
(bit-0 0) ;; blocks birth
(error 1)
(dead 2)
(no-kill 3)
(bit-4 4)
(bit-5 5)
(subtask-complete 6)
(bit-7 7)
(complete 8)
(bit-9 9)
(bit-10 10)
(save 11)
(bit-12 12)
(bit-13 13)
(bit-14 14)
(bit-15 15)
)
;; ---entity-perm-status
(declare-type race-mesh basic)
(declare-type nav-poly structure)
(define-extern process-by-ename (function string process))
(define-extern entity-by-name (function string entity))
(define-extern entity-by-aid (function uint entity))
(define-extern reset-actors (function symbol none))
(define-extern process-entity-status! (function process entity-perm-status symbol entity-perm-status))
(define-extern process-drawable-from-entity! (function process-drawable entity-actor none))
(define-extern init-entity (function process entity-actor type none))
(define-extern entity-by-type (function type entity-actor))
(define-extern entity-actor-from-level-name (function symbol entity-actor))
(define-extern birth-viewer (function process entity-actor object))
(define-extern *spawn-actors* symbol)
;; DECOMP BEGINS
(define *generate-actor-vis* #f)
(define *generate-actor-vis-start* #f)
(define *generate-actor-vis-output* #f)
(deftype entity-perm (structure)
"Entity information that gets persisted in the save file."
((user-object object 2)
(user-uint64 uint64 :overlay-at (-> user-object 0))
(user-float float 2 :overlay-at (-> user-object 0))
(user-int32 int32 2 :overlay-at (-> user-object 0))
(user-uint32 uint32 2 :overlay-at (-> user-object 0))
(user-int16 int16 4 :overlay-at (-> user-object 0))
(user-uint16 uint16 4 :overlay-at (-> user-object 0))
(user-int8 int8 8 :overlay-at (-> user-object 0))
(user-uint8 uint8 8 :overlay-at (-> user-object 0))
(status entity-perm-status)
(dummy uint8 1)
(task game-task)
(aid actor-id)
(quad uint128 :overlay-at (-> user-object 0))
)
(:methods
(update (_type_ symbol entity-perm-status) _type_)
)
)
(deftype entity-links (structure)
"A linked list of entities with some extra data about their current status."
((prev-link entity-links)
(next-link entity-links)
(entity entity)
(process process)
(level level)
(vis-id int32)
(kill-mask task-mask)
(vis-dist meters)
(trans vector :inline)
(perm entity-perm :inline)
(status entity-perm-status :overlay-at (-> perm status))
(aid uint32 :overlay-at (-> perm aid))
(task game-task :overlay-at (-> perm task))
)
(:methods
(birth? (_type_ vector) symbol)
)
)
(deftype entity-perm-array (inline-array-class)
((data entity-perm :inline :dynamic)
)
)
(set! (-> entity-perm-array heap-base) (the-as uint 16))
(deftype entity-links-array (inline-array-class)
"An array of [[entity-links]].
Levels store a reference to this which holds all the entities in the level."
((data entity-links :inline :dynamic)
)
)
(set! (-> entity-links-array heap-base) (the-as uint 64))
(deftype entity (res-lump)
"Entities are mainly used to place objects in a level.
As a child of [[res-lump]], they store various types of metadata
in [[res-tag]]s (such as name, curve data, volume data, etc.)
that gets accessed by the accompanying process."
((trans vector :inline)
(aid uint32)
)
(:methods
(birth! (_type_) _type_)
(kill! (_type_) _type_)
(add-to-level! (_type_ level-group level actor-id) none)
(remove-from-level! (_type_ level-group) _type_)
(get-level (_type_) level)
)
)
(deftype entity-camera (entity)
((connect connectable :inline)
)
)
(deftype entity-nav-mesh (entity)
((nav-mesh nav-mesh)
)
(:methods
(initialize-nav-mesh! (_type_) none)
(debug-draw (_type_) none)
)
)
(deftype entity-race-mesh (entity)
((race-mesh race-mesh)
)
(:methods
(entity-race-mesh-method-27 () none)
(entity-race-mesh-method-28 () none)
)
)
(deftype entity-actor (entity)
"Child class of [[entity]] used to spawn [[process-drawable]] actors."
((etype type :offset 56)
(task game-task)
(kill-mask task-mask :offset 52)
(vis-id int16)
(quat quaternion :inline)
)
(:methods
(next-actor (_type_) entity-actor)
(prev-actor (_type_) entity-actor)
(debug-print (_type_ symbol type) none)
(toggle-status (_type_ entity-perm-status symbol) none)
(get-simple-travel-vector (_type_ vector vector vector object float) nav-mesh)
(project-point-to-nav-mesh (_type_ vector vector nav-poly float) nav-poly)
)
)
(deftype actor-reference (structure)
((actor entity-actor)
(id uint32)
)
:pack-me
)
(deftype actor-group (inline-array-class)
((data actor-reference :inline :dynamic)
)
)
(set! (-> actor-group heap-base) (the-as uint 8))
(deftype entity-info (basic)
((ptype type)
(pool symbol)
(heap-size int32)
)
)
(deftype actor-bank (basic)
((pause-dist float)
(birth-dist float)
(birth-max int32)
)
)
(define *ACTOR-bank* (new 'static 'actor-bank :pause-dist 204800.0 :birth-dist 901120.0 :birth-max 10))