Files
jak-project/goal_src/engine/game/game-h.gc
T
ManDude 4d634cf50d [decomp] add a bunch of flag enums (#1350)
* update refs

* first pass

* update refs 2

* update

* update

* update

* stuff and things

* accidentally wiped this

* fancy decomp for static sound specs

* clang

* 5 more refs
2022-05-02 18:35:17 -04:00

227 lines
6.0 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: game-h.gc
;; name in dgo: game-h
;; dgos: GAME, ENGINE
(declare-type target process-drawable)
(declare-type voicebox process-drawable)
(defun-extern voicebox-spawn process vector (pointer process))
(declare-type nav-control basic)
(declare-type path-control basic)
(declare-type vol-control basic)
(declare-type actor-link-info basic)
(declare-type sparticle-launch-control basic)
(declare-type water-control basic)
(declare-type collide-shape basic)
(defenum state-flags
:bitfield #t
:type uint32
(sf00)
(sf01)
(sf02)
(sf03)
(sf04)
(sf05)
(sf06)
(sf07)
(sf08)
(sf09)
(sf10)
(sf11)
(sf12)
(sf13)
(sf14)
(sf15)
(sf16)
(sf17)
(sf18)
(sf19)
(sf20)
(sf21)
(sf22)
(sf23)
(sf24)
(sf25)
(sf26)
(sf27)
(sf28)
(sf29)
(sf30)
(sf31)
)
;; DECOMP BEGINS
;; Process drawable is the parent type of most game objects.
(deftype process-drawable (process)
;; The "root" is the location of the process-drawable.
;; It may be a more specific type, and often contains the collision geometry.
((root trsqv :offset-assert 112)
;; The node-list is a list of all the joints and bones, and how
;; joints update bones.
(node-list cspace-array :offset-assert 116)
;; the draw-control contains references to all data required for drawing
(draw draw-control :offset-assert 120)
;; The skel is a joint-control which combines animations to control joints
(skel joint-control :offset-assert 124)
;; The nav-control allows enemies to navigate on a nav mesh.
(nav nav-control :offset-assert 128)
;; alignment of animation to our position
(align align-control :offset-assert 132)
;; our path (like if we are a platform or enemy that moves along a fixed path)
(path path-control :offset-assert 136)
;; associated volumes (for water)
(vol vol-control :offset-assert 140)
;; our settings
(fact fact-info :offset-assert 144)
;; reference to our entity
(link actor-link-info :offset-assert 148)
;; our particles
(part sparticle-launch-control :offset-assert 152)
;; state related to entering and being in water
(water water-control :offset-assert 156)
;; any sound that we're playing
(sound ambient-sound :offset-assert 160)
;; seems to only be used in target?
(state-flags state-flags :offset-assert 164)
;; the time when we last did something. Used for different things in different objects
(state-time time-frame :offset-assert 168)
)
:heap-base #x40
:method-count-assert 20
:size-assert #xb0
:flag-assert #x14004000b0
(:methods
(initialize-skeleton (_type_ skeleton-group pair) none 14)
(initialize-skeleton-by-name (_type_ string object) _type_ 15)
(apply-alignment (_type_ int transformq vector) collide-shape 16)
(do-joint-math! (_type_) none 17)
(cleanup-for-death (_type_) none 18)
(evaluate-joint-control (_type_) none 19)
)
(:states
(process-drawable-art-error string)
process-drawable-idle
)
)
;; This is unused. Maybe it was useful in development, where it might be slow to add
;; methods to a type?
(deftype process-drawable-reserved (process-drawable)
()
:heap-base #x40
:method-count-assert 63
:size-assert #xb0
:flag-assert #x3f004000b0
(:methods
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
(dummy-29 () none 29)
(dummy-30 () none 30)
(dummy-31 () none 31)
(dummy-32 () none 32)
(dummy-33 () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
(dummy-38 () none 38)
(dummy-39 () none 39)
(dummy-40 () none 40)
(dummy-41 () none 41)
(dummy-42 () none 42)
(dummy-43 () none 43)
(dummy-44 () none 44)
(dummy-45 () none 45)
(dummy-46 () none 46)
(dummy-47 () none 47)
(dummy-48 () none 48)
(dummy-49 () none 49)
(dummy-50 () none 50)
(dummy-51 () none 51)
(dummy-52 () none 52)
(dummy-53 () none 53)
(dummy-54 () none 54)
(dummy-55 () none 55)
(dummy-56 () none 56)
(dummy-57 () none 57)
(dummy-58 () none 58)
(dummy-59 () none 59)
(dummy-60 () none 60)
(dummy-61 () none 61)
(dummy-62 () none 62)
)
)
;; The attack-info is generated by attackers and sent to target.
(deftype attack-info (structure)
((trans vector :inline :offset-assert 0)
(vector vector :inline :offset-assert 16)
(intersection vector :inline :offset-assert 32)
(attacker handle :offset-assert 48)
(invinc-time time-frame :offset-assert 56)
(mask uint32 :offset-assert 64) ;; todo enum here.
(mode symbol :offset-assert 68)
(shove-back meters :offset-assert 72)
(shove-up meters :offset-assert 76)
(speed meters :offset-assert 80)
(dist meters :offset-assert 84)
(control float :offset-assert 88)
(angle symbol :offset-assert 92)
(rotate-to degrees :offset-assert 96)
(prev-state state :offset-assert 100)
)
:method-count-assert 10
:size-assert #x68
:flag-assert #xa00000068
(:methods
(combine! (_type_ attack-info) none 9)
)
)
(define *global-attack-id* 0)
(deftype ground-tween-info (structure)
((chan uint8 3 :offset-assert 0)
(blend float 3 :offset-assert 4)
(group uint32 5 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x24
:flag-assert #x900000024
)
0