mirror of
https://github.com/open-goal/jak-project
synced 2026-08-03 17:02:47 -04:00
fc43870d85
This renames the method object in `defmethod`s to `this` and adds detection for the `set-time!` and `time-elapsed?` macros. Definitely my biggest PR yet...
258 lines
12 KiB
Common Lisp
Vendored
Generated
258 lines
12 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type bsp-node
|
|
(deftype bsp-node (structure)
|
|
((front int16 :offset-assert 0)
|
|
(back int16 :offset-assert 2)
|
|
(front-box-min vector4b :inline :offset-assert 4)
|
|
(front-box-max vector4b :inline :offset-assert 8)
|
|
(back-box-min vector4b :inline :offset-assert 12)
|
|
(back-box-max vector4b :inline :offset-assert 16)
|
|
)
|
|
:pack-me
|
|
:method-count-assert 9
|
|
:size-assert #x14
|
|
:flag-assert #x900000014
|
|
)
|
|
|
|
;; definition for method 3 of type bsp-node
|
|
(defmethod inspect bsp-node ((this bsp-node))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'bsp-node)
|
|
(format #t "~1Tfront: ~D~%" (-> this front))
|
|
(format #t "~1Tback: ~D~%" (-> this back))
|
|
(format #t "~1Tfront-box-min: #<vector4b @ #x~X>~%" (-> this front-box-min))
|
|
(format #t "~1Tfront-box-max: #<vector4b @ #x~X>~%" (-> this front-box-max))
|
|
(format #t "~1Tback-box-min: #<vector4b @ #x~X>~%" (-> this back-box-min))
|
|
(format #t "~1Tback-box-max: #<vector4b @ #x~X>~%" (-> this back-box-max))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type bsp-header
|
|
(deftype bsp-header (drawable)
|
|
((info file-info :offset 4)
|
|
(all-visible-list (pointer uint16) :offset-assert 32)
|
|
(visible-list-length int16 :offset-assert 36)
|
|
(extra-vis-list-length int16 :offset-assert 38)
|
|
(drawable-trees drawable-tree-array :offset-assert 40)
|
|
(pat pointer :offset-assert 44)
|
|
(pat-length int32 :offset-assert 48)
|
|
(texture-remap-table (pointer uint64) :offset-assert 52)
|
|
(texture-remap-table-len int32 :offset-assert 56)
|
|
(texture-ids (pointer texture-id) :offset-assert 60)
|
|
(texture-page-count int32 :offset-assert 64)
|
|
(unknown-basic basic :offset-assert 68)
|
|
(name symbol :offset-assert 72)
|
|
(nickname symbol :offset-assert 76)
|
|
(vis-info level-vis-info 8 :offset-assert 80)
|
|
(actors drawable-inline-array-actor :offset-assert 112)
|
|
(cameras (array entity-camera) :offset-assert 116)
|
|
(nodes (inline-array bsp-node) :offset-assert 120)
|
|
(level level :offset-assert 124)
|
|
(current-leaf-idx uint16 :offset-assert 128)
|
|
(texture-flags texture-page-flag 10 :offset-assert 130)
|
|
(cam-outside-bsp uint8 :offset 152)
|
|
(cam-using-back uint8 :offset-assert 153)
|
|
(cam-box-idx uint16 :offset-assert 154)
|
|
(ambients symbol :offset-assert 156)
|
|
(subdivide-close float :offset-assert 160)
|
|
(subdivide-far float :offset-assert 164)
|
|
(race-meshes (array entity-race-mesh) :offset-assert 168)
|
|
(actor-birth-order (pointer uint32) :offset-assert 172)
|
|
(light-hash light-hash :offset-assert 176)
|
|
(nav-meshes (array entity-nav-mesh) :offset-assert 180)
|
|
(actor-groups (array actor-group) :offset-assert 184)
|
|
(region-trees (array drawable-tree-region-prim) :offset-assert 188)
|
|
(region-array region-array :offset-assert 192)
|
|
(collide-hash collide-hash :offset-assert 196)
|
|
(wind-array uint32 :offset 200)
|
|
(wind-array-length int32 :offset 204)
|
|
(city-level-info city-level-info :offset 208)
|
|
(vis-spheres vector-array :offset 216)
|
|
(vis-spheres-length uint32 :offset 248)
|
|
(region-tree drawable-tree-region-prim :offset 252)
|
|
(tfrag-masks texture-masks-array :offset-assert 256)
|
|
(tfrag-closest (pointer float) :offset-assert 260)
|
|
(tfrag-mask-count uint32 :offset 260)
|
|
(shrub-masks texture-masks-array :offset-assert 264)
|
|
(shrub-closest (pointer float) :offset-assert 268)
|
|
(shrub-mask-count uint32 :offset 268)
|
|
(alpha-masks texture-masks-array :offset-assert 272)
|
|
(alpha-closest (pointer float) :offset-assert 276)
|
|
(alpha-mask-count uint32 :offset 276)
|
|
(water-masks texture-masks-array :offset-assert 280)
|
|
(water-closest (pointer float) :offset-assert 284)
|
|
(water-mask-count uint32 :offset 284)
|
|
(bsp-scale vector :inline :offset-assert 288)
|
|
(bsp-offset vector :inline :offset-assert 304)
|
|
(end uint8 :offset 399)
|
|
)
|
|
:method-count-assert 19
|
|
:size-assert #x190
|
|
:flag-assert #x1300000190
|
|
(:methods
|
|
(birth (_type_) none 17)
|
|
(deactivate-entities (_type_) none 18)
|
|
)
|
|
)
|
|
|
|
;; definition of type game-level
|
|
(deftype game-level (basic)
|
|
((master-bsp basic :offset-assert 4)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x8
|
|
:flag-assert #x900000008
|
|
)
|
|
|
|
;; definition for method 3 of type game-level
|
|
(defmethod inspect game-level ((this game-level))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Tmaster-bsp: ~A~%" (-> this master-bsp))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type view-frustum
|
|
(deftype view-frustum (structure)
|
|
((hither-top-left vector :inline :offset-assert 0)
|
|
(hither-top-right vector :inline :offset-assert 16)
|
|
(hither-bottom-left vector :inline :offset-assert 32)
|
|
(hither-bottom-right vector :inline :offset-assert 48)
|
|
(yon-top-left vector :inline :offset-assert 64)
|
|
(yon-top-right vector :inline :offset-assert 80)
|
|
(yon-bottom-left vector :inline :offset-assert 96)
|
|
(yon-bottom-right vector :inline :offset-assert 112)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x80
|
|
:flag-assert #x900000080
|
|
)
|
|
|
|
;; definition for method 3 of type view-frustum
|
|
(defmethod inspect view-frustum ((this view-frustum))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'view-frustum)
|
|
(format #t "~1Thither-top-left: #<vector @ #x~X>~%" (-> this hither-top-left))
|
|
(format #t "~1Thither-top-right: #<vector @ #x~X>~%" (-> this hither-top-right))
|
|
(format #t "~1Thither-bottom-left: #<vector @ #x~X>~%" (-> this hither-bottom-left))
|
|
(format #t "~1Thither-bottom-right: #<vector @ #x~X>~%" (-> this hither-bottom-right))
|
|
(format #t "~1Tyon-top-left: #<vector @ #x~X>~%" (-> this yon-top-left))
|
|
(format #t "~1Tyon-top-right: #<vector @ #x~X>~%" (-> this yon-top-right))
|
|
(format #t "~1Tyon-bottom-left: #<vector @ #x~X>~%" (-> this yon-bottom-left))
|
|
(format #t "~1Tyon-bottom-right: #<vector @ #x~X>~%" (-> this yon-bottom-right))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 3 of type bsp-header
|
|
(defmethod inspect bsp-header ((this bsp-header))
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~Tall-visible-list: #x~X~%" (-> this all-visible-list))
|
|
(format #t "~Tvisible-list-length: ~D~%" (-> this visible-list-length))
|
|
(format #t "~Tdrawable-trees: ~A~%" (-> this drawable-trees))
|
|
(format #t "~Tpat: #x~X~%" (-> this pat))
|
|
(format #t "~Tpat-length: ~D~%" (-> this pat-length))
|
|
(inspect-bsp-tree this (-> this nodes 0))
|
|
this
|
|
)
|
|
|
|
;; definition (debug) for function inspect-bsp-tree
|
|
;; WARN: Return type mismatch bsp-header vs none.
|
|
(defun-debug inspect-bsp-tree ((arg0 bsp-header) (arg1 bsp-node))
|
|
(cond
|
|
((zero? arg1)
|
|
)
|
|
(else
|
|
(format #t "_#x~X________________~%" arg1)
|
|
(inspect arg1)
|
|
(let ((s4-0 *print-column*))
|
|
(set! *print-column* (+ *print-column* 64))
|
|
(if (> (-> arg1 front) 0)
|
|
(inspect-bsp-tree arg0 (the-as bsp-node (-> arg1 front)))
|
|
(format #t "_#x~X________________~%" arg1)
|
|
)
|
|
(if (> (-> arg1 back) 0)
|
|
(inspect-bsp-tree arg0 (the-as bsp-node (-> arg1 back)))
|
|
(format #t "_#x~X________________~%" arg1)
|
|
)
|
|
(set! *print-column* s4-0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function map-bsp-tree
|
|
;; WARN: Return type mismatch bsp-header vs none.
|
|
(defun map-bsp-tree ((arg0 (function bsp-node none)) (arg1 bsp-header) (arg2 bsp-node))
|
|
(cond
|
|
((zero? arg2)
|
|
)
|
|
(else
|
|
(if (> (-> arg2 front) 0)
|
|
(map-bsp-tree arg0 arg1 (the-as bsp-node (-> arg2 front)))
|
|
(arg0 arg2)
|
|
)
|
|
(if (> (-> arg2 back) 0)
|
|
(map-bsp-tree arg0 arg1 (the-as bsp-node (-> arg2 back)))
|
|
(arg0 arg2)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type collide-stats
|
|
(deftype collide-stats (structure)
|
|
((calls uint32 :offset-assert 0)
|
|
(spheres uint32 :offset-assert 4)
|
|
(nodes uint32 :offset-assert 8)
|
|
(frags uint32 :offset-assert 12)
|
|
(tris uint32 :offset-assert 16)
|
|
(output uint32 :offset-assert 20)
|
|
(pad0 uint32 2 :offset-assert 24)
|
|
(total-target uint32 8 :offset-assert 32)
|
|
(target-cache-fill uint32 8 :offset-assert 64)
|
|
(target-ray-poly uint32 6 :offset-assert 96)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x78
|
|
:flag-assert #x900000078
|
|
)
|
|
|
|
;; definition for method 3 of type collide-stats
|
|
(defmethod inspect collide-stats ((this collide-stats))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'collide-stats)
|
|
(format #t "~1Tcalls: ~D~%" (-> this calls))
|
|
(format #t "~1Tspheres: ~D~%" (-> this spheres))
|
|
(format #t "~1Tnodes: ~D~%" (-> this nodes))
|
|
(format #t "~1Tfrags: ~D~%" (-> this frags))
|
|
(format #t "~1Ttris: ~D~%" (-> this tris))
|
|
(format #t "~1Toutput: ~D~%" (-> this output))
|
|
(format #t "~1Ttotal-target: #<stopwatch @ #x~X>~%" (&-> this pad0 1))
|
|
(format #t "~1Ttarget-cache-fill: #<stopwatch @ #x~X>~%" (&-> this total-target 7))
|
|
(format #t "~1Ttarget-ray-poly: #<stopwatch @ #x~X>~%" (&-> this target-cache-fill 7))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|