mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-21 07:37:45 -04:00
7fac11ddf5
* wip 128 bit support * add a few more files to offline test
63 lines
1.7 KiB
Common Lisp
63 lines
1.7 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type curve
|
|
(deftype curve (structure)
|
|
((cverts uint32 :offset-assert 0)
|
|
(num-cverts int32 :offset-assert 4)
|
|
(knots uint32 :offset-assert 8)
|
|
(num-knots int32 :offset-assert 12)
|
|
(length float :offset-assert 16)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x14
|
|
:flag-assert #x900000014
|
|
)
|
|
|
|
;; definition for method 3 of type curve
|
|
(defmethod inspect curve ((obj curve))
|
|
(format #t "[~8x] ~A~%" obj 'curve)
|
|
(format #t "~Tcverts: #x~X~%" (-> obj cverts))
|
|
(format #t "~Tnum-cverts: ~D~%" (-> obj num-cverts))
|
|
(format #t "~Tknots: #x~X~%" (-> obj knots))
|
|
(format #t "~Tnum-knots: ~D~%" (-> obj num-knots))
|
|
(format #t "~Tlength: ~f~%" (-> obj length))
|
|
obj
|
|
)
|
|
|
|
;; definition of type border-plane
|
|
(deftype border-plane (basic)
|
|
((name basic :offset-assert 4)
|
|
(action basic :offset-assert 8)
|
|
(slot int8 :offset-assert 12)
|
|
(trans vector :inline :offset-assert 16)
|
|
(normal vector :inline :offset-assert 32)
|
|
)
|
|
:method-count-assert 11
|
|
:size-assert #x30
|
|
:flag-assert #xb00000030
|
|
(:methods
|
|
(dummy-9 () none 9)
|
|
(dummy-10 () none 10)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type border-plane
|
|
(defmethod inspect border-plane ((obj border-plane))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tname: ~A~%" (-> obj name))
|
|
(format #t "~Taction: ~A~%" (-> obj action))
|
|
(format #t "~Tslot: ~D~%" (-> obj slot))
|
|
(format #t "~Ttrans: ~`vector`P~%" (-> obj trans))
|
|
(format #t "~Tnormal: ~`vector`P~%" (-> obj normal))
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(let ((v0-2 0))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(none)
|
|
|