Files
jak-project/goal_src/engine/draw/draw-node-h.gc
T

52 lines
1.6 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: draw-node-h.gc
;; name in dgo: draw-node-h
;; dgos: GAME, ENGINE
;; A "draw-node" is a way to group together a bunch of drawables (possibly other draw-nodes)
;; they do not support calling draw, but do support collision.
;; The typical use is to put a bunch of these in an inline array, then call collide on the first,
;; and pass in the length of the inline array. This will collide with all nodes in the list.
;; They are also used as groups for the culling system.
(deftype draw-node (drawable)
((child-count uint8 :offset 6) ;; if our child requires a count
(flags uint8 :offset 7)
(child drawable :offset 8) ;; can be draw-node or any other drawable
(distance float :offset 12)
)
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
;; field distance is a float printed as hex?
)
;; It's annoying to work with draw-node's directly, so drawable-inline-array-node is a nice wrapper
;; that knows the array's length.
(deftype drawable-inline-array-node (drawable-inline-array)
((data draw-node 1 :inline)
(pad uint32)
)
:method-count-assert 18
:size-assert #x44
:flag-assert #x1200000044
;; too many basic blocks
(:methods
)
)
;; the types of these fields are a guess for now.
(deftype draw-node-dma (structure)
((banka draw-node 32 :inline :offset-assert 0)
(bankb draw-node 32 :inline :offset-assert 1024)
)
:method-count-assert 9
:size-assert #x800
:flag-assert #x900000800
)