mirror of
https://github.com/open-goal/jak-project
synced 2026-06-15 14:31:58 -04:00
949508d0ed
- `cty-faction-h` - `nav-graph` - `citizen-h` - `citizen` - `civilian` - `traffic-engine` - `traffic-manager` - `cty-attack-controller` - `cty-faction` - `formation-object` - `formations` - `squad-control-city-h` - `squad-control-city` - `traffic-util` - `wlander-female` - `wlander-h` - `wlander-male` - `speech-manager` - `desert-rescue` - `desresc-path` - `neo-satellite` - `rope-prim-system-h` - `rope-prim-system` - `rope-system` - `wland-passenger` - `cty-guard-projectile` - `ctywide-init` - `ff-squad-control` - `guard-grenade` - `guard-rifle` - `guard-states` - `guard-tazer` - `ctywide-speech` - `citizen-chick` - `citizen-fat` - `citizen-norm` - `guard` - `bike` - `car` - `test-bike` - `vehicle-rider` - `desert-rescue-bbush` - `ff-squad-control-h` - `flee-info` - `guard-h` - `mission-squad-control` - `kg-squad-control` - `kg-squad-member-h` - `kg-squad-member` - `mh-squad-control` - `mh-squad-member-h` - `mh-squad-member` - `ctywide-obs-h` - `ctywide-obs` - `ctywide-part` - `ctywide-scenes` - `ctywide-tasks` - `ctywide-texture` - `billiards` - `guide-arrow` - `kg-vehicles` - `flying-turret` - `roboguard-city` - `citizen-enemy` - `metalhead-flitter` - `metalhead-grunt` - `metalhead-predator` - `spydroid` - `kg-squad-control-h` - `mh-squad-control-h` - `krimson-wall` - `ctyport-obs` - `ctyinda-obs` - `ctyinda-part` - `ctyindb-obs` - `ctyindb-part` - `ctyport-attack` - `h-torpedo` - `ctyport-part` - `ctyport-scenes` - `external-player-control` - `desert-chase-path-h` - `desert-chase-path` - `desert-chase` - `desert-jump` - `wcar-catapult` - `bombbot-h` - `bombbot` - `bombbot-path` - `cty-hijack-missile` - `cty-hijack` - `ctyport-attack-bbush` - `ctysluma-part` - `ctyslumb-part` - `ctyslumc-obs` - `ctyslumc-part` - `searchlight` - `cty-destroy-grid` - `ctyfarm-obs` - `ctyfarma-part` - `ctyfarmb-part` - `freehq-part` - `freehq-scenes` - `onintent-scenes` - `onintent-part` - `cty-sniper-battery` - `cty-sniper-turret` - `intro-obs` - `intro-part` - `intro-scenes` - `palcab-part` - `palroof-part`
261 lines
10 KiB
Common Lisp
Vendored
Generated
261 lines
10 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type grid-hash-word
|
|
(deftype grid-hash-word (uint8)
|
|
()
|
|
)
|
|
|
|
;; definition of type grid-hash-box
|
|
(deftype grid-hash-box (structure)
|
|
"Integer coordinate box for the spatial hash grid."
|
|
((min int8 3)
|
|
(max int8 3)
|
|
)
|
|
:pack-me
|
|
)
|
|
|
|
;; definition for method 3 of type grid-hash-box
|
|
(defmethod inspect ((this grid-hash-box))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'grid-hash-box)
|
|
(format #t "~1Tmin[3] @ #x~X~%" (-> this min))
|
|
(format #t "~1Tmax[3] @ #x~X~%" (-> this max))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type grid-hash
|
|
(deftype grid-hash (basic)
|
|
"The grid-hash is the basic 3D grid used in the spatial-hash, which is used for runtime
|
|
actor collision dectection by hashing actor spheres into grid cells, and avoiding the typical
|
|
O(n^2) 'check everybody against everybody' collision loop."
|
|
((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 int) _type_)
|
|
(update-grid-for-objects-in-box (_type_ int vector vector) none)
|
|
(clear-bucket-array (_type_) none)
|
|
(setup-search-box (_type_ int vector vector vector) none)
|
|
(search-for-point (_type_ vector) (pointer uint8))
|
|
(search-for-sphere (_type_ vector float) (pointer uint8))
|
|
(draw (_type_ rgba) none)
|
|
(dump-grid-info (_type_) none)
|
|
(verify-bits-in-bucket (_type_ grid-hash-box grid-hash-box) none)
|
|
(box-of-everything (_type_ object grid-hash-box) none)
|
|
(grid-hash-method-18 (_type_ grid-hash-box int) none)
|
|
(grid-hash-method-19 (_type_ grid-hash-box int) none)
|
|
(do-search! (_type_ grid-hash-box (pointer uint8)) none)
|
|
(set-up-box (_type_ grid-hash-box vector vector) none)
|
|
(sphere-to-grid-box (_type_ grid-hash-box sphere) none)
|
|
(line-sphere-to-grid-box (_type_ grid-hash-box vector vector float) none)
|
|
(update-grid (_type_) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type grid-hash
|
|
(defmethod inspect ((this grid-hash))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Twork: ~A~%" (-> this work))
|
|
(format #t "~1Tsearch-box: #<grid-hash-box @ #x~X>~%" (-> this search-box))
|
|
(format #t "~1Tbucket-size: ~D~%" (-> this bucket-size))
|
|
(format #t "~1Taxis-scale[3] @ #x~X~%" (-> this axis-scale))
|
|
(format #t "~1Tdimension-array[3] @ #x~X~%" (-> this dimension-array))
|
|
(format #t "~1Tvertical-cell-count: ~D~%" (-> this vertical-cell-count))
|
|
(format #t "~1Tbucket-array: #x~X~%" (-> this bucket-array))
|
|
(format #t "~1Tbox-min[3] @ #x~X~%" (-> this box-min))
|
|
(format #t "~1Tbox-max[3] @ #x~X~%" (-> this box-max))
|
|
(format #t "~1Tobject-count: ~D~%" (-> this object-count))
|
|
(format #t "~1Tbucket-count: ~D~%" (-> this bucket-count))
|
|
(format #t "~1Tmin-cell-size: ~f~%" (-> this min-cell-size))
|
|
(format #t "~1Tbucket-memory-size: ~D~%" (-> this bucket-memory-size))
|
|
(format #t "~1Tmem-bucket-array: #x~X~%" (-> this mem-bucket-array))
|
|
(format #t "~1Tspr-bucket-array: #x~X~%" (-> this spr-bucket-array))
|
|
(format #t "~1Tdebug-draw: ~A~%" (-> this debug-draw))
|
|
(format #t "~1Tuse-scratch-ram: ~A~%" (-> this use-scratch-ram))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type find-nav-sphere-ids-params
|
|
(deftype find-nav-sphere-ids-params (structure)
|
|
((bsphere sphere :inline)
|
|
(y-threshold float)
|
|
(len int16)
|
|
(max-len int16)
|
|
(mask uint8)
|
|
(array (pointer uint8))
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type find-nav-sphere-ids-params
|
|
(defmethod inspect ((this find-nav-sphere-ids-params))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'find-nav-sphere-ids-params)
|
|
(format #t "~1Tbsphere: #<sphere @ #x~X>~%" (-> this bsphere))
|
|
(format #t "~1Ty-threshold: ~f~%" (-> this y-threshold))
|
|
(format #t "~1Tlen: ~D~%" (-> this len))
|
|
(format #t "~1Tmax-len: ~D~%" (-> this max-len))
|
|
(format #t "~1Tmask: ~D~%" (-> this mask))
|
|
(format #t "~1Tarray: #x~X~%" (-> this array))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type sphere-hash
|
|
(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 int int) _type_)
|
|
(clear-objects! (_type_) none)
|
|
(add-a-sphere (_type_ vector) int)
|
|
(add-a-sphere-with-flag (_type_ vector int) int)
|
|
(update-from-spheres (_type_) none)
|
|
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none)
|
|
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol)
|
|
(add-sphere-with-mask-and-id (_type_ vector vector float int) symbol)
|
|
(sphere-hash-method-32 (_type_ sphere int) symbol)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type sphere-hash
|
|
(defmethod inspect ((this sphere-hash))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Twork: ~A~%" (-> this work))
|
|
(format #t "~1Tsearch-box: #<grid-hash-box @ #x~X>~%" (-> this search-box))
|
|
(format #t "~1Tbucket-size: ~D~%" (-> this bucket-size))
|
|
(format #t "~1Taxis-scale[3] @ #x~X~%" (-> this axis-scale))
|
|
(format #t "~1Tdimension-array[3] @ #x~X~%" (-> this dimension-array))
|
|
(format #t "~1Tvertical-cell-count: ~D~%" (-> this vertical-cell-count))
|
|
(format #t "~1Tbucket-array: #x~X~%" (-> this bucket-array))
|
|
(format #t "~1Tbox-min[3] @ #x~X~%" (-> this box-min))
|
|
(format #t "~1Tbox-max[3] @ #x~X~%" (-> this box-max))
|
|
(format #t "~1Tobject-count: ~D~%" (-> this object-count))
|
|
(format #t "~1Tbucket-count: ~D~%" (-> this bucket-count))
|
|
(format #t "~1Tmin-cell-size: ~f~%" (-> this min-cell-size))
|
|
(format #t "~1Tbucket-memory-size: ~D~%" (-> this bucket-memory-size))
|
|
(format #t "~1Tmem-bucket-array: #x~X~%" (-> this mem-bucket-array))
|
|
(format #t "~1Tspr-bucket-array: #x~X~%" (-> this spr-bucket-array))
|
|
(format #t "~1Tdebug-draw: ~A~%" (-> this debug-draw))
|
|
(format #t "~1Tuse-scratch-ram: ~A~%" (-> this use-scratch-ram))
|
|
(format #t "~1Tsphere-array: #x~X~%" (-> this sphere-array))
|
|
(format #t "~1Tmax-object-count: ~D~%" (-> this max-object-count))
|
|
(format #t "~1Tpad: ~D~%" (-> this pad))
|
|
(format #t "~1Tmem-sphere-array: #x~X~%" (-> this mem-sphere-array))
|
|
(format #t "~1Tspr-sphere-array: #x~X~%" (-> this spr-sphere-array))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type hash-object-info
|
|
(deftype hash-object-info (structure)
|
|
((object basic)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type hash-object-info
|
|
(defmethod inspect ((this hash-object-info))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'hash-object-info)
|
|
(format #t "~1Tobject: ~A~%" (-> this object))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type spatial-hash
|
|
(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 int int) _type_)
|
|
(spatial-hash-method-33 (_type_ vector hash-object-info) none)
|
|
(add-an-object (_type_ bounding-box (pointer collide-shape) int) int)
|
|
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int)
|
|
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
|
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
|
|
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape)) int)
|
|
(spatial-hash-method-39 (_type_ object hash-object-info) int)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type spatial-hash
|
|
(defmethod inspect ((this spatial-hash))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Twork: ~A~%" (-> this work))
|
|
(format #t "~1Tsearch-box: #<grid-hash-box @ #x~X>~%" (-> this search-box))
|
|
(format #t "~1Tbucket-size: ~D~%" (-> this bucket-size))
|
|
(format #t "~1Taxis-scale[3] @ #x~X~%" (-> this axis-scale))
|
|
(format #t "~1Tdimension-array[3] @ #x~X~%" (-> this dimension-array))
|
|
(format #t "~1Tvertical-cell-count: ~D~%" (-> this vertical-cell-count))
|
|
(format #t "~1Tbucket-array: #x~X~%" (-> this bucket-array))
|
|
(format #t "~1Tbox-min[3] @ #x~X~%" (-> this box-min))
|
|
(format #t "~1Tbox-max[3] @ #x~X~%" (-> this box-max))
|
|
(format #t "~1Tobject-count: ~D~%" (-> this object-count))
|
|
(format #t "~1Tbucket-count: ~D~%" (-> this bucket-count))
|
|
(format #t "~1Tmin-cell-size: ~f~%" (-> this min-cell-size))
|
|
(format #t "~1Tbucket-memory-size: ~D~%" (-> this bucket-memory-size))
|
|
(format #t "~1Tmem-bucket-array: #x~X~%" (-> this mem-bucket-array))
|
|
(format #t "~1Tspr-bucket-array: #x~X~%" (-> this spr-bucket-array))
|
|
(format #t "~1Tdebug-draw: ~A~%" (-> this debug-draw))
|
|
(format #t "~1Tuse-scratch-ram: ~A~%" (-> this use-scratch-ram))
|
|
(format #t "~1Tsphere-array: #x~X~%" (-> this sphere-array))
|
|
(format #t "~1Tmax-object-count: ~D~%" (-> this max-object-count))
|
|
(format #t "~1Tpad: ~D~%" (-> this pad))
|
|
(format #t "~1Tmem-sphere-array: #x~X~%" (-> this mem-sphere-array))
|
|
(format #t "~1Tspr-sphere-array: #x~X~%" (-> this spr-sphere-array))
|
|
(format #t "~1Tobject-array: #x~X~%" (-> this object-array))
|
|
(format #t "~1Tmem-object-array: #x~X~%" (-> this mem-object-array))
|
|
(format #t "~1Tspr-object-array: #x~X~%" (-> this spr-object-array))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|