mirror of
https://github.com/open-goal/jak-project
synced 2026-06-21 16:46:55 -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...
234 lines
9.8 KiB
Common Lisp
Vendored
Generated
234 lines
9.8 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type load-dir
|
|
(deftype load-dir (basic)
|
|
((lev level :offset-assert 4)
|
|
(string-array (array string) :offset-assert 8)
|
|
(data-array (array basic) :offset-assert 12)
|
|
)
|
|
:method-count-assert 11
|
|
:size-assert #x10
|
|
:flag-assert #xb00000010
|
|
(:methods
|
|
(new (symbol type int level) _type_ 0)
|
|
(load-to-heap-by-name (_type_ string symbol kheap int) art-group 9)
|
|
(set-loaded-art (_type_ art-group) art-group 10)
|
|
)
|
|
)
|
|
|
|
;; definition of type load-dir-art-group
|
|
(deftype load-dir-art-group (load-dir)
|
|
((art-group-array (array art-group) :offset 12)
|
|
)
|
|
:method-count-assert 11
|
|
:size-assert #x10
|
|
:flag-assert #xb00000010
|
|
(:methods
|
|
(new (symbol type int level) _type_ 0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 0 of type load-dir
|
|
(defmethod new load-dir ((allocation symbol) (type-to-make type) (length int) (unk level))
|
|
(let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
|
(set! (-> this lev) unk)
|
|
(set! (-> this string-array)
|
|
(the-as (array string) ((method-of-type array new) allocation array string length))
|
|
)
|
|
(set! (-> this string-array length) 0)
|
|
(set! (-> this data-array) (the-as (array basic) ((method-of-type array new) allocation array basic length)))
|
|
(set! (-> this data-array length) 0)
|
|
this
|
|
)
|
|
)
|
|
|
|
;; definition for method 0 of type load-dir-art-group
|
|
;; INFO: Return type mismatch load-dir vs load-dir-art-group.
|
|
(defmethod new load-dir-art-group ((allocation symbol) (type-to-make type) (length int) (unk level))
|
|
(let ((this ((method-of-type load-dir new) allocation type-to-make length unk)))
|
|
(set! (-> this data-array content-type) art-group)
|
|
(the-as load-dir-art-group this)
|
|
)
|
|
)
|
|
|
|
;; definition of type external-art-buffer
|
|
(deftype external-art-buffer (basic)
|
|
((index int32 :offset-assert 4)
|
|
(other external-art-buffer :offset-assert 8)
|
|
(status symbol :offset-assert 12)
|
|
(locked? symbol :offset-assert 16)
|
|
(frame-lock symbol :offset-assert 20)
|
|
(heap kheap :inline :offset-assert 32)
|
|
(pending-load-file string :offset-assert 48)
|
|
(pending-load-file-part int32 :offset-assert 52)
|
|
(pending-load-file-owner handle :offset-assert 56)
|
|
(pending-load-file-priority float :offset-assert 64)
|
|
(load-file string :offset-assert 68)
|
|
(load-file-part int32 :offset-assert 72)
|
|
(load-file-owner handle :offset-assert 80)
|
|
(load-file-priority float :offset-assert 88)
|
|
(buf pointer :offset-assert 92)
|
|
(len int32 :offset-assert 96)
|
|
(art-group art-group :offset-assert 100)
|
|
)
|
|
:method-count-assert 16
|
|
:size-assert #x68
|
|
:flag-assert #x1000000068
|
|
(:methods
|
|
(new (symbol type int) _type_ 0)
|
|
(set-pending-file (_type_ string int handle float) int 9)
|
|
(update (_type_) int 10)
|
|
(inactive? (_type_) symbol 11)
|
|
(file-status (_type_ string int) symbol 12)
|
|
(link-file (_type_ art-group) art-group 13)
|
|
(unlink-file (_type_ art-group) int 14)
|
|
(unlock! (_type_) symbol 15)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type external-art-buffer
|
|
(defmethod inspect external-art-buffer ((this external-art-buffer))
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~Tindex: ~D~%" (-> this index))
|
|
(format #t "~Tother: ~A~%" (-> this other))
|
|
(format #t "~Tstatus: ~A~%" (-> this status))
|
|
(format #t "~Tlocked?: ~A~%" (-> this locked?))
|
|
(format #t "~Tframe-lock: ~A~%" (-> this frame-lock))
|
|
(format #t "~Theap: #<kheap @ #x~X>~%" (-> this heap))
|
|
(format #t "~Tpending-load-file: ~A~%" (-> this pending-load-file))
|
|
(format #t "~Tpending-load-file-part: ~D~%" (-> this pending-load-file-part))
|
|
(format #t "~Tpending-load-file-owner: ~D~%" (-> this pending-load-file-owner))
|
|
(format #t "~Tpending-load-file-priority: ~f~%" (-> this pending-load-file-priority))
|
|
(format #t "~Tload-file: ~A~%" (-> this load-file))
|
|
(format #t "~Tload-file-part: ~D~%" (-> this load-file-part))
|
|
(format #t "~Tload-file-owner: ~D~%" (-> this load-file-owner))
|
|
(format #t "~Tload-file-priority: ~f~%" (-> this load-file-priority))
|
|
(format #t "~Tbuf: #x~X~%" (-> this buf))
|
|
(format #t "~Tlen: ~D~%" (-> this len))
|
|
(format #t "~Tart-group: ~A~%" (-> this art-group))
|
|
this
|
|
)
|
|
|
|
;; definition for method 0 of type external-art-buffer
|
|
(defmethod new external-art-buffer ((allocation symbol) (type-to-make type) (idx int))
|
|
(let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
|
(set! (-> this index) idx)
|
|
(set! (-> this load-file) #f)
|
|
(set! (-> this load-file-part) -1)
|
|
(set! (-> this load-file-owner) (the-as handle #f))
|
|
(set! (-> this load-file-priority) 100000000.0)
|
|
(set! (-> this pending-load-file) #f)
|
|
(set! (-> this pending-load-file-part) -1)
|
|
(set! (-> this pending-load-file-owner) (the-as handle #f))
|
|
(set! (-> this pending-load-file-priority) 100000000.0)
|
|
(set! (-> this art-group) #f)
|
|
(set! (-> this status) 'initialize)
|
|
(set! (-> this locked?) #f)
|
|
(set! (-> this other) #f)
|
|
this
|
|
)
|
|
)
|
|
|
|
;; definition of type spool-anim
|
|
(deftype spool-anim (basic)
|
|
((name string :offset 16)
|
|
(buf1 external-art-buffer :offset 16)
|
|
(index int32 :offset 20)
|
|
(buf2 external-art-buffer :offset 20)
|
|
(parts int32 :offset-assert 24)
|
|
(priority float :offset-assert 28)
|
|
(owner handle :offset-assert 32)
|
|
(command-list pair :offset-assert 40)
|
|
)
|
|
:pack-me
|
|
:method-count-assert 9
|
|
:size-assert #x2c
|
|
:flag-assert #x90000002c
|
|
)
|
|
|
|
;; definition for method 3 of type spool-anim
|
|
(defmethod inspect spool-anim ((this spool-anim))
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~Tname: ~A~%" (-> this name))
|
|
(format #t "~Tindex: ~D~%" (-> this index))
|
|
(format #t "~Tparts: ~D~%" (-> this parts))
|
|
(format #t "~Tpriority: ~f~%" (-> this priority))
|
|
(format #t "~Towner: ~D~%" (-> this owner))
|
|
(format #t "~Tcommand-list: ~A~%" (-> this command-list))
|
|
this
|
|
)
|
|
|
|
;; definition of type external-art-control
|
|
(deftype external-art-control (basic)
|
|
((buffer external-art-buffer 2 :offset-assert 4)
|
|
(rec spool-anim 3 :inline :offset-assert 16)
|
|
(spool-lock handle :offset-assert 160)
|
|
(reserve-buffer external-art-buffer :offset-assert 168)
|
|
(reserve-buffer-count int32 :offset-assert 172)
|
|
(active-stream string :offset-assert 176)
|
|
(preload-stream spool-anim :inline :offset-assert 184)
|
|
(last-preload-stream spool-anim :inline :offset-assert 232)
|
|
(end-pad uint32 :offset-assert 276)
|
|
)
|
|
:method-count-assert 17
|
|
:size-assert #x118
|
|
:flag-assert #x1100000118
|
|
(:methods
|
|
(new (symbol type) _type_ 0)
|
|
(update (_type_ symbol) int 9)
|
|
(clear-rec (_type_) int 10)
|
|
(spool-push (_type_ string int process float) int 11)
|
|
(file-status (_type_ string int) symbol 12)
|
|
(reserve-alloc (_type_) kheap 13)
|
|
(reserve-free (_type_ kheap) int 14)
|
|
(none-reserved? (_type_) symbol 15)
|
|
(try-preload-stream (_type_ string int process float) int 16)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type external-art-control
|
|
(defmethod inspect external-art-control ((this external-art-control))
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~Tbuffer[2] @ #x~X~%" (-> this buffer))
|
|
(format #t "~Trec[3] @ #x~X~%" (-> this rec))
|
|
(format #t "~Tspool-lock: ~D~%" (-> this spool-lock))
|
|
(format #t "~Treserve-buffer: ~A~%" (-> this reserve-buffer))
|
|
(format #t "~Treserve-buffer-count: ~D~%" (-> this reserve-buffer-count))
|
|
(format #t "~Tactive-stream: ~A~%" (-> this active-stream))
|
|
(format #t "~Tpreload-stream: #<spool-anim @ #x~X>~%" (-> this preload-stream))
|
|
(format #t "~Tlast-preload-stream: #<spool-anim @ #x~X>~%" (-> this last-preload-stream))
|
|
this
|
|
)
|
|
|
|
;; definition for method 0 of type external-art-control
|
|
(defmethod new external-art-control ((allocation symbol) (type-to-make type))
|
|
(let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
|
(dotimes (buff-idx 2)
|
|
(set! (-> this buffer buff-idx)
|
|
((method-of-type external-art-buffer new) allocation external-art-buffer buff-idx)
|
|
)
|
|
)
|
|
(set! (-> this buffer 0 other) (-> this buffer 1))
|
|
(set! (-> this buffer 1 other) (-> this buffer 0))
|
|
(dotimes (rec-idx 3)
|
|
(set! (-> this rec rec-idx name) #f)
|
|
(set! (-> this rec rec-idx priority) 100000000.0)
|
|
(set! (-> this rec rec-idx owner) (the-as handle #f))
|
|
)
|
|
(set! (-> this spool-lock) (the-as handle #f))
|
|
(set! (-> this reserve-buffer) #f)
|
|
(set! (-> this active-stream) #f)
|
|
(set! (-> this preload-stream name) #f)
|
|
(set! (-> this preload-stream priority) 100000000.0)
|
|
(set! (-> this preload-stream owner) (the-as handle #f))
|
|
(set! (-> this last-preload-stream name) #f)
|
|
(set! (-> this last-preload-stream priority) 100000000.0)
|
|
(set! (-> this last-preload-stream owner) (the-as handle #f))
|
|
this
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|