mirror of
https://github.com/open-goal/jak-project
synced 2026-06-08 12:27:57 -04:00
06ae38d464
* clean up * fix test
73 lines
2.2 KiB
Common Lisp
73 lines
2.2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type align-control
|
|
(deftype align-control (basic)
|
|
((flags uint32 :offset-assert 4)
|
|
(process process :offset-assert 8)
|
|
(frame-group basic :offset-assert 12)
|
|
(frame-num float :offset-assert 16)
|
|
(matrix matrix 2 :inline :offset-assert 32)
|
|
(transform transform 2 :inline :offset-assert 160)
|
|
(delta transformq :inline :offset-assert 256)
|
|
(last-speed float :offset-assert 304)
|
|
(align transformq :inline :offset 160)
|
|
)
|
|
:method-count-assert 14
|
|
:size-assert #x134
|
|
:flag-assert #xe00000134
|
|
(:methods
|
|
(new (symbol type process) _type_ 0)
|
|
(dummy-9 () none 9)
|
|
(dummy-10 () none 10)
|
|
(dummy-11 () none 11)
|
|
(dummy-12 () none 12)
|
|
(dummy-13 () none 13)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type align-control
|
|
(defmethod inspect align-control ((obj align-control))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tflags: #x~X~%" (-> obj flags))
|
|
(format #t "~Tprocess: ~A~%" (-> obj process))
|
|
(format #t "~Tframe-group: ~A~%" (-> obj frame-group))
|
|
(format #t "~Tframe-num: ~f~%" (-> obj frame-num))
|
|
(format #t "~Tmatrix[2] @ #x~X~%" (-> obj matrix))
|
|
(format #t "~Ttransform[2] @ #x~X~%" (-> obj transform))
|
|
(format #t "~Tdelta: #<transformq @ #x~X>~%" (-> obj delta))
|
|
(format #t "~Tlast-speed: (meters ~m)~%" (-> obj last-speed))
|
|
(format #t "~Talign: #<transformq @ #x~X>~%" (-> obj transform))
|
|
obj
|
|
)
|
|
|
|
;; definition for method 0 of type align-control
|
|
;; INFO: Return type mismatch object vs align-control.
|
|
(defmethod
|
|
new
|
|
align-control
|
|
((allocation symbol) (type-to-make type) (arg0 process))
|
|
(with-pp
|
|
(let
|
|
((obj
|
|
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
|
)
|
|
)
|
|
(if (zero? obj)
|
|
(return (begin
|
|
(let ((t9-1 (the-as (function object object) enter-state))
|
|
(a0-1 "memory")
|
|
)
|
|
(set! (-> pp next-state) process-drawable-art-error)
|
|
(t9-1 a0-1)
|
|
)
|
|
(the-as align-control 0)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> obj process) arg0)
|
|
obj
|
|
)
|
|
)
|
|
)
|