mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 02:06:59 -04:00
124 lines
3.2 KiB
Common Lisp
124 lines
3.2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: spatial-hash-h.gc
|
|
;; name in dgo: spatial-hash-h
|
|
;; dgos: ENGINE, GAME
|
|
|
|
(declare-type grid-hash-work structure)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype grid-hash-word (uint8)
|
|
()
|
|
)
|
|
|
|
(deftype grid-hash-box (structure)
|
|
"Integer coordinate box for the spatial hash grid."
|
|
((min int8 3)
|
|
(max int8 3)
|
|
)
|
|
:pack-me
|
|
)
|
|
|
|
|
|
(deftype grid-hash (basic)
|
|
((work grid-hash-work)
|
|
(search-box grid-hash-box :inline)
|
|
(bucket-size int16)
|
|
(axis-scale float 3)
|
|
(dimension-array int8 3)
|
|
(vertical-cell-count int8)
|
|
(bucket-array (pointer grid-hash-word))
|
|
(box-min float 3)
|
|
(box-max float 3)
|
|
(object-count int16)
|
|
(bucket-count int16)
|
|
(min-cell-size float)
|
|
(bucket-memory-size int32)
|
|
(mem-bucket-array (pointer grid-hash-word))
|
|
(spr-bucket-array (pointer grid-hash-word))
|
|
(debug-draw symbol)
|
|
(use-scratch-ram symbol)
|
|
)
|
|
(:methods
|
|
(new (symbol type) _type_)
|
|
(grid-hash-method-9 () none)
|
|
(grid-hash-method-10 () none)
|
|
(grid-hash-method-11 () none)
|
|
(grid-hash-method-12 () none)
|
|
(grid-hash-method-13 () none)
|
|
(grid-hash-method-14 () none)
|
|
(grid-hash-method-15 () none)
|
|
(grid-hash-method-16 () none)
|
|
(grid-hash-method-17 () none)
|
|
(grid-hash-method-18 () none)
|
|
(grid-hash-method-19 () none)
|
|
(grid-hash-method-20 () none)
|
|
(grid-hash-method-21 () none)
|
|
(grid-hash-method-22 () none)
|
|
(grid-hash-method-23 () none)
|
|
(grid-hash-method-24 () none)
|
|
(grid-hash-method-25 () none)
|
|
(grid-hash-method-26 () none)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype find-nav-sphere-ids-params (structure)
|
|
((bsphere sphere :inline)
|
|
(y-threshold float)
|
|
(len int16)
|
|
(max-len int16)
|
|
(mask uint8)
|
|
(array (pointer uint8))
|
|
)
|
|
)
|
|
|
|
|
|
(deftype sphere-hash (grid-hash)
|
|
"An extension of grid hash that holds spheres inside of the grid."
|
|
((sphere-array (inline-array sphere))
|
|
(max-object-count int16)
|
|
(pad int16)
|
|
(mem-sphere-array uint32)
|
|
(spr-sphere-array uint32)
|
|
)
|
|
(:methods
|
|
(new (symbol type) _type_)
|
|
(sphere-hash-method-27 () none)
|
|
(sphere-hash-method-28 () none)
|
|
(sphere-hash-method-29 () none)
|
|
(sphere-hash-method-30 () none)
|
|
(sphere-hash-method-31 () none)
|
|
(sphere-hash-method-32 () none)
|
|
(sphere-hash-method-33 () none)
|
|
(sphere-hash-method-34 () none)
|
|
(sphere-hash-method-35 () none)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype hash-object-info (structure)
|
|
((object basic)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype spatial-hash (sphere-hash)
|
|
"An extension of sphere-hash that associates an object with each sphere."
|
|
((object-array (inline-array hash-object-info))
|
|
(mem-object-array (inline-array hash-object-info))
|
|
(spr-object-array (inline-array hash-object-info))
|
|
)
|
|
(:methods
|
|
(new (symbol type) _type_)
|
|
(spatial-hash-method-36 () none)
|
|
(spatial-hash-method-37 () none)
|
|
(spatial-hash-method-38 () none)
|
|
(spatial-hash-method-39 () none)
|
|
(spatial-hash-method-40 () none)
|
|
(spatial-hash-method-41 () none)
|
|
)
|
|
)
|