mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 10:34:30 -04:00
add types (#559)
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type pos-history
|
||||
(deftype pos-history (structure)
|
||||
((points uint32 :offset-assert 0)
|
||||
(num-points int32 :offset-assert 4)
|
||||
(h-first int32 :offset-assert 8)
|
||||
(h-last int32 :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type pos-history
|
||||
(defmethod inspect pos-history ((obj pos-history))
|
||||
(format #t "[~8x] ~A~%" obj 'pos-history)
|
||||
(format #t "~Tpoints: #x~X~%" (-> obj points))
|
||||
(format #t "~Tnum-points: ~D~%" (-> obj num-points))
|
||||
(format #t "~Th-first: ~D~%" (-> obj h-first))
|
||||
(format #t "~Th-last: ~D~%" (-> obj h-last))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type debug-vertex
|
||||
(deftype debug-vertex (structure)
|
||||
((trans vector4w :inline :offset-assert 0)
|
||||
(normal vector3h :inline :offset-assert 16)
|
||||
(st vector2h :inline :offset-assert 22)
|
||||
(color uint32 :offset-assert 28)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex
|
||||
(defmethod inspect debug-vertex ((obj debug-vertex))
|
||||
(format #t "[~8x] ~A~%" obj 'debug-vertex)
|
||||
(format #t "~Ttrans: ~`vector4w`P~%" (-> obj trans))
|
||||
(format #t "~Tnormal: ~`vector3h`P~%" (-> obj normal))
|
||||
(format #t "~Tst: ~`vector2h`P~%" (-> obj st))
|
||||
(format #t "~Tcolor: #x~X~%" (-> obj color))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type debug-vertex-stats
|
||||
(deftype debug-vertex-stats (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(pos-count int32 :offset-assert 8)
|
||||
(vertex debug-vertex 600 :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4b10
|
||||
:flag-assert #x900004b10
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex-stats
|
||||
(defmethod inspect debug-vertex-stats ((obj debug-vertex-stats))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tpos-count: ~D~%" (-> obj pos-count))
|
||||
(format #t "~Tvertex[600] @ #x~X~%" (-> obj vertex))
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-3 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (&-> obj data 4))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> obj _data))
|
||||
obj
|
||||
)
|
||||
|
||||
@@ -140,7 +140,3 @@
|
||||
(set! (-> perf-stat method-table 12) nothing)
|
||||
(set! (-> perf-stat method-table 13) nothing)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user