Files
jak-project/goal_src/engine/collide/collide-frag-h.gc
T
2022-01-08 20:57:57 -05:00

66 lines
1.8 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: collide-frag-h.gc
;; name in dgo: collide-frag-h
;; dgos: GAME, ENGINE
;;;;;;;;;;;;;;;;;
;; Collide Frag
;;;;;;;;;;;;;;;;;
;; A collide fragment stores background collide data.
;; It's a drawable-tree, and it uses the familiar sphere BVH.
;; The actual "fragments" are in a weird packed format.
;; This doesn't participate in the foreground collide shape system directly.
; TODO - defined in drawable, but needed in collide-frag
(define-extern sphere-cull (function vector symbol))
(deftype collide-frag-vertex (vector)
()
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(deftype collide-frag-mesh (basic)
((packed-data uint32 :offset-assert 4)
(pat-array uint32 :offset-assert 8)
(strip-data-len uint16 :offset-assert 12)
(poly-count uint16 :offset-assert 14)
(base-trans vector :inline :offset-assert 16)
(vertex-count uint8 :offset 28)
(vertex-data-qwc uint8 :offset 29)
(total-qwc uint8 :offset 30)
(unused uint8 :offset 31)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
(deftype collide-fragment (drawable)
((mesh collide-frag-mesh :offset 8)
)
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
)
(deftype drawable-inline-array-collide-fragment (drawable-inline-array)
((data collide-fragment 1 :inline :offset-assert 32)
(pad uint32 :offset-assert 64)
)
:method-count-assert 18
:size-assert #x44
:flag-assert #x1200000044
)
(deftype drawable-tree-collide-fragment (drawable-tree)
((data-override drawable-inline-array :offset 32))
:method-count-assert #x12
:size-assert #x24
:flag-assert #x1200000024
)