mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -04:00
deftype and defmethod syntax major changes (#3094)
Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
This commit is contained in:
+101
-126
@@ -6,36 +6,33 @@
|
||||
|
||||
;; definition of type list-control
|
||||
(deftype list-control (structure)
|
||||
((listfunc (function int list-control symbol) :offset-assert 0)
|
||||
(list-owner uint32 :offset-assert 4)
|
||||
(top int32 :offset-assert 8)
|
||||
(left int32 :offset-assert 12)
|
||||
(list glst-list :offset-assert 16)
|
||||
(the-node glst-node :offset-assert 20)
|
||||
(top-index int32 :offset-assert 24)
|
||||
(the-index int32 :offset-assert 28)
|
||||
(the-disp-line int32 :offset-assert 32)
|
||||
(highlight-index int32 :offset-assert 36)
|
||||
(current-index int32 :offset-assert 40)
|
||||
(numlines int32 :offset-assert 44)
|
||||
(lines-to-disp int32 :offset-assert 48)
|
||||
(charswide int32 :offset-assert 52)
|
||||
(highlight-disp-line int32 :offset-assert 56)
|
||||
(field-id int32 :offset-assert 60)
|
||||
(xpos int32 :offset-assert 64)
|
||||
(ypos int32 :offset-assert 68)
|
||||
(user-info int32 :offset-assert 72)
|
||||
(user-info-u uint32 :offset 72)
|
||||
(return-int int32 :offset-assert 76)
|
||||
((listfunc (function int list-control symbol))
|
||||
(list-owner uint32)
|
||||
(top int32)
|
||||
(left int32)
|
||||
(list glst-list)
|
||||
(the-node glst-node)
|
||||
(top-index int32)
|
||||
(the-index int32)
|
||||
(the-disp-line int32)
|
||||
(highlight-index int32)
|
||||
(current-index int32)
|
||||
(numlines int32)
|
||||
(lines-to-disp int32)
|
||||
(charswide int32)
|
||||
(highlight-disp-line int32)
|
||||
(field-id int32)
|
||||
(xpos int32)
|
||||
(ypos int32)
|
||||
(user-info int32)
|
||||
(user-info-u uint32 :overlay-at user-info)
|
||||
(return-int int32)
|
||||
)
|
||||
:allow-misaligned
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
;; definition for method 3 of type list-control
|
||||
(defmethod inspect list-control ((this list-control))
|
||||
(defmethod inspect ((this list-control))
|
||||
(format #t "[~8x] ~A~%" this 'list-control)
|
||||
(format #t "~Tlistfunc: ~A~%" (-> this listfunc))
|
||||
(format #t "~Tlist-owner: #x~X~%" (-> this list-owner))
|
||||
@@ -62,16 +59,13 @@
|
||||
|
||||
;; definition of type list-field
|
||||
(deftype list-field (structure)
|
||||
((left int32 :offset-assert 0)
|
||||
(width int32 :offset-assert 4)
|
||||
((left int32)
|
||||
(width int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type list-field
|
||||
(defmethod inspect list-field ((this list-field))
|
||||
(defmethod inspect ((this list-field))
|
||||
(format #t "[~8x] ~A~%" this 'list-field)
|
||||
(format #t "~Tleft: ~D~%" (-> this left))
|
||||
(format #t "~Twidth: ~D~%" (-> this width))
|
||||
@@ -80,25 +74,22 @@
|
||||
|
||||
;; definition of type DISP_LIST-bank
|
||||
(deftype DISP_LIST-bank (basic)
|
||||
((TV_SPACING int32 :offset-assert 4)
|
||||
(BORDER_WIDTH int32 :offset-assert 8)
|
||||
(BORDER_HEIGHT int32 :offset-assert 12)
|
||||
(MAX_LINES int32 :offset-assert 16)
|
||||
(CHAR_WIDTH int32 :offset-assert 20)
|
||||
(INC_DELAY int32 :offset-assert 24)
|
||||
(BORDER_LINES int32 :offset-assert 28)
|
||||
(CXOFF int32 :offset-assert 32)
|
||||
(CYOFF int32 :offset-assert 36)
|
||||
(BXOFF int32 :offset-assert 40)
|
||||
(BYOFF int32 :offset-assert 44)
|
||||
((TV_SPACING int32)
|
||||
(BORDER_WIDTH int32)
|
||||
(BORDER_HEIGHT int32)
|
||||
(MAX_LINES int32)
|
||||
(CHAR_WIDTH int32)
|
||||
(INC_DELAY int32)
|
||||
(BORDER_LINES int32)
|
||||
(CXOFF int32)
|
||||
(CYOFF int32)
|
||||
(BXOFF int32)
|
||||
(BYOFF int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type DISP_LIST-bank
|
||||
(defmethod inspect DISP_LIST-bank ((this DISP_LIST-bank))
|
||||
(defmethod inspect ((this DISP_LIST-bank))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~TV_SPACING: ~D~%" (-> this TV_SPACING))
|
||||
(format #t "~TBORDER_WIDTH: ~D~%" (-> this BORDER_WIDTH))
|
||||
@@ -384,30 +375,27 @@
|
||||
|
||||
;; definition of type anim-tester-bank
|
||||
(deftype anim-tester-bank (basic)
|
||||
((ANIM_SPEED float :offset-assert 4)
|
||||
(BLEND float :offset-assert 8)
|
||||
(OBJECT_LIST_X int32 :offset-assert 12)
|
||||
(OBJECT_LIST_Y int32 :offset-assert 16)
|
||||
(OBJECT_LIST_MIN_WIDTH int32 :offset-assert 20)
|
||||
(ANIM_LIST_X int32 :offset-assert 24)
|
||||
(ANIM_LIST_Y int32 :offset-assert 28)
|
||||
(ANIM_LIST_MIN_WIDTH int32 :offset-assert 32)
|
||||
(PICK_LIST_X int32 :offset-assert 36)
|
||||
(PICK_LIST_Y int32 :offset-assert 40)
|
||||
(PICK_LIST_MIN_WIDTH int32 :offset-assert 44)
|
||||
(EDIT_LIST_X int32 :offset-assert 48)
|
||||
(EDIT_LIST_Y int32 :offset-assert 52)
|
||||
(EDIT_STATS_X int32 :offset-assert 56)
|
||||
(EDIT_LIST_MIN_WIDTH int32 :offset-assert 60)
|
||||
(EDIT_PICK_X int32 :offset-assert 64)
|
||||
((ANIM_SPEED float)
|
||||
(BLEND float)
|
||||
(OBJECT_LIST_X int32)
|
||||
(OBJECT_LIST_Y int32)
|
||||
(OBJECT_LIST_MIN_WIDTH int32)
|
||||
(ANIM_LIST_X int32)
|
||||
(ANIM_LIST_Y int32)
|
||||
(ANIM_LIST_MIN_WIDTH int32)
|
||||
(PICK_LIST_X int32)
|
||||
(PICK_LIST_Y int32)
|
||||
(PICK_LIST_MIN_WIDTH int32)
|
||||
(EDIT_LIST_X int32)
|
||||
(EDIT_LIST_Y int32)
|
||||
(EDIT_STATS_X int32)
|
||||
(EDIT_LIST_MIN_WIDTH int32)
|
||||
(EDIT_PICK_X int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x44
|
||||
:flag-assert #x900000044
|
||||
)
|
||||
|
||||
;; definition for method 3 of type anim-tester-bank
|
||||
(defmethod inspect anim-tester-bank ((this anim-tester-bank))
|
||||
(defmethod inspect ((this anim-tester-bank))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~TANIM_SPEED: ~f~%" (-> this ANIM_SPEED))
|
||||
(format #t "~TBLEND: ~f~%" (-> this BLEND))
|
||||
@@ -451,26 +439,22 @@
|
||||
|
||||
;; definition of type anim-tester
|
||||
(deftype anim-tester (process-drawable)
|
||||
((flags anim-tester-flags :offset-assert 176)
|
||||
(obj-list glst-list :inline :offset-assert 180)
|
||||
(current-obj string :offset-assert 196)
|
||||
(speed int32 :offset-assert 200)
|
||||
(list-con list-control :inline :offset-assert 204)
|
||||
(pick-con list-control :inline :offset-assert 284)
|
||||
(item-field int64 :offset-assert 368)
|
||||
(inc-delay int32 :offset-assert 376)
|
||||
(inc-timer int32 :offset-assert 380)
|
||||
(edit-mode int32 :offset-assert 384)
|
||||
(old-mode int32 :offset-assert 388)
|
||||
(anim-speed float :offset-assert 392)
|
||||
(anim-gspeed float :offset-assert 396)
|
||||
(anim-first float :offset-assert 400)
|
||||
(anim-last float :offset-assert 404)
|
||||
((flags anim-tester-flags)
|
||||
(obj-list glst-list :inline)
|
||||
(current-obj string)
|
||||
(speed int32)
|
||||
(list-con list-control :inline)
|
||||
(pick-con list-control :inline)
|
||||
(item-field int64)
|
||||
(inc-delay int32)
|
||||
(inc-timer int32)
|
||||
(edit-mode int32)
|
||||
(old-mode int32)
|
||||
(anim-speed float)
|
||||
(anim-gspeed float)
|
||||
(anim-first float)
|
||||
(anim-last float)
|
||||
)
|
||||
:heap-base #x130
|
||||
:method-count-assert 20
|
||||
:size-assert #x198
|
||||
:flag-assert #x1401300198
|
||||
(:states
|
||||
anim-tester-process
|
||||
)
|
||||
@@ -478,7 +462,7 @@
|
||||
|
||||
;; definition for method 3 of type anim-tester
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect anim-tester ((this anim-tester))
|
||||
(defmethod inspect ((this anim-tester))
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
@@ -522,28 +506,25 @@
|
||||
|
||||
;; definition of type anim-test-obj
|
||||
(deftype anim-test-obj (glst-named-node)
|
||||
((obj-art-group art-group :offset-assert 12)
|
||||
(seq-list glst-list :inline :offset-assert 16)
|
||||
(flags int32 :offset-assert 32)
|
||||
(mesh-geo merc-ctrl :offset-assert 36)
|
||||
(joint-geo art-joint-geo :offset-assert 40)
|
||||
(list-con list-control :inline :offset-assert 44)
|
||||
(parent uint32 :offset-assert 124)
|
||||
(anim-index int32 :offset-assert 128)
|
||||
(anim-hindex int32 :offset-assert 132)
|
||||
(seq-index int32 :offset-assert 136)
|
||||
(seq-hindex int32 :offset-assert 140)
|
||||
((obj-art-group art-group)
|
||||
(seq-list glst-list :inline)
|
||||
(flags int32)
|
||||
(mesh-geo merc-ctrl)
|
||||
(joint-geo art-joint-geo)
|
||||
(list-con list-control :inline)
|
||||
(parent uint32)
|
||||
(anim-index int32)
|
||||
(anim-hindex int32)
|
||||
(seq-index int32)
|
||||
(seq-hindex int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x90
|
||||
:flag-assert #x900000090
|
||||
(:methods
|
||||
(new (symbol type int string basic) _type_ 0)
|
||||
(new (symbol type int string basic) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type anim-test-obj
|
||||
(defmethod inspect anim-test-obj ((this anim-test-obj))
|
||||
(defmethod inspect ((this anim-test-obj))
|
||||
(format #t "[~8x] ~A~%" this 'anim-test-obj)
|
||||
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> this next))
|
||||
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> this prev))
|
||||
@@ -599,22 +580,19 @@
|
||||
|
||||
;; definition of type anim-test-sequence
|
||||
(deftype anim-test-sequence (glst-named-node)
|
||||
((item-list glst-list :inline :offset-assert 12)
|
||||
(playing-item int32 :offset-assert 28)
|
||||
(flags int32 :offset-assert 32)
|
||||
(list-con list-control :inline :offset-assert 36)
|
||||
(parent anim-test-obj :offset-assert 116)
|
||||
((item-list glst-list :inline)
|
||||
(playing-item int32)
|
||||
(flags int32)
|
||||
(list-con list-control :inline)
|
||||
(parent anim-test-obj)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x78
|
||||
:flag-assert #x900000078
|
||||
(:methods
|
||||
(new (symbol type int string) _type_ 0)
|
||||
(new (symbol type int string) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type anim-test-sequence
|
||||
(defmethod inspect anim-test-sequence ((this anim-test-sequence))
|
||||
(defmethod inspect ((this anim-test-sequence))
|
||||
(format #t "[~8x] ~A~%" this 'anim-test-sequence)
|
||||
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> this next))
|
||||
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> this prev))
|
||||
@@ -655,25 +633,22 @@
|
||||
|
||||
;; definition of type anim-test-seq-item
|
||||
(deftype anim-test-seq-item (glst-named-node)
|
||||
((speed int32 :offset-assert 12)
|
||||
(blend int32 :offset-assert 16)
|
||||
(first-frame float :offset-assert 20)
|
||||
(last-frame float :offset-assert 24)
|
||||
(num-frames float :offset-assert 28)
|
||||
(artist-base float :offset-assert 32)
|
||||
(flags int32 :offset-assert 36)
|
||||
(parent anim-test-sequence :offset-assert 40)
|
||||
((speed int32)
|
||||
(blend int32)
|
||||
(first-frame float)
|
||||
(last-frame float)
|
||||
(num-frames float)
|
||||
(artist-base float)
|
||||
(flags int32)
|
||||
(parent anim-test-sequence)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x2c
|
||||
:flag-assert #x90000002c
|
||||
(:methods
|
||||
(new (symbol type int string) _type_ 0)
|
||||
(new (symbol type int string) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type anim-test-seq-item
|
||||
(defmethod inspect anim-test-seq-item ((this anim-test-seq-item))
|
||||
(defmethod inspect ((this anim-test-seq-item))
|
||||
(format #t "[~8x] ~A~%" this 'anim-test-seq-item)
|
||||
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> this next))
|
||||
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> this prev))
|
||||
@@ -728,7 +703,7 @@
|
||||
;; definition for method 3 of type anim-tester
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
;; INFO: Return type mismatch object vs anim-tester.
|
||||
(defmethod inspect anim-tester ((this anim-tester))
|
||||
(defmethod inspect ((this anim-tester))
|
||||
(format #t "--anim-tester--~%")
|
||||
(let ((v1-0 (-> this obj-list)))
|
||||
"return the start of the list"
|
||||
|
||||
+8
-11
@@ -3,21 +3,18 @@
|
||||
|
||||
;; definition of type __assert-info-private-struct
|
||||
(deftype __assert-info-private-struct (structure)
|
||||
((filename string :offset-assert 0)
|
||||
(line-num uint16 :offset-assert 4)
|
||||
(column-num uint16 :offset-assert 6)
|
||||
((filename string)
|
||||
(line-num uint16)
|
||||
(column-num uint16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x8
|
||||
:flag-assert #xb00000008
|
||||
(:methods
|
||||
(set-pos (_type_ string uint uint) int 9)
|
||||
(print-pos (_type_) int 10)
|
||||
(set-pos (_type_ string uint uint) int)
|
||||
(print-pos (_type_) int)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type __assert-info-private-struct
|
||||
(defmethod inspect __assert-info-private-struct ((this __assert-info-private-struct))
|
||||
(defmethod inspect ((this __assert-info-private-struct))
|
||||
(format #t "[~8x] ~A~%" this '__assert-info-private-struct)
|
||||
(format #t "~Tfilename: ~A~%" (-> this filename))
|
||||
(format #t "~Tline-num: ~D~%" (-> this line-num))
|
||||
@@ -26,7 +23,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type __assert-info-private-struct
|
||||
(defmethod set-pos __assert-info-private-struct ((this __assert-info-private-struct) (filename string) (line-num uint) (column-num uint))
|
||||
(defmethod set-pos ((this __assert-info-private-struct) (filename string) (line-num uint) (column-num uint))
|
||||
(set! (-> this filename) filename)
|
||||
(set! (-> this line-num) line-num)
|
||||
(set! (-> this column-num) column-num)
|
||||
@@ -34,7 +31,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 10 of type __assert-info-private-struct
|
||||
(defmethod print-pos __assert-info-private-struct ((this __assert-info-private-struct))
|
||||
(defmethod print-pos ((this __assert-info-private-struct))
|
||||
(format #t "file ~S.gc, line ~D, col ~D.~%" (-> this filename) (-> this line-num) (-> this column-num))
|
||||
0
|
||||
)
|
||||
|
||||
+15
-23
@@ -3,18 +3,15 @@
|
||||
|
||||
;; definition of type pos-history
|
||||
(deftype pos-history (structure)
|
||||
((points (inline-array vector) :offset-assert 0)
|
||||
(num-points int32 :offset-assert 4)
|
||||
(h-first int32 :offset-assert 8)
|
||||
(h-last int32 :offset-assert 12)
|
||||
((points (inline-array vector))
|
||||
(num-points int32)
|
||||
(h-first int32)
|
||||
(h-last int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type pos-history
|
||||
(defmethod inspect pos-history ((this pos-history))
|
||||
(defmethod inspect ((this pos-history))
|
||||
(format #t "[~8x] ~A~%" this 'pos-history)
|
||||
(format #t "~Tpoints: #x~X~%" (-> this points))
|
||||
(format #t "~Tnum-points: ~D~%" (-> this num-points))
|
||||
@@ -25,18 +22,15 @@
|
||||
|
||||
;; 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)
|
||||
((trans vector4w :inline)
|
||||
(normal vector3h :inline)
|
||||
(st vector2h :inline)
|
||||
(color uint32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex
|
||||
(defmethod inspect debug-vertex ((this debug-vertex))
|
||||
(defmethod inspect ((this debug-vertex))
|
||||
(format #t "[~8x] ~A~%" this 'debug-vertex)
|
||||
(format #t "~Ttrans: ~`vector4w`P~%" (-> this trans))
|
||||
(format #t "~Tnormal: ~`vector3h`P~%" (-> this normal))
|
||||
@@ -47,17 +41,15 @@
|
||||
|
||||
;; 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)
|
||||
((length int32)
|
||||
(pos-count int32)
|
||||
(vertex debug-vertex 600 :inline)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4b10
|
||||
:flag-assert #x900004b10
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex-stats
|
||||
(defmethod inspect debug-vertex-stats ((this debug-vertex-stats))
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this debug-vertex-stats))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
(format #t "~Tpos-count: ~D~%" (-> this pos-count))
|
||||
|
||||
+2
-5
@@ -3,15 +3,12 @@
|
||||
|
||||
;; definition of type debug-sphere-table
|
||||
(deftype debug-sphere-table (basic)
|
||||
((point vector 300 :inline :offset-assert 16)
|
||||
((point vector 300 :inline)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x12d0
|
||||
:flag-assert #x9000012d0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-sphere-table
|
||||
(defmethod inspect debug-sphere-table ((this debug-sphere-table))
|
||||
(defmethod inspect ((this debug-sphere-table))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tpoint[300] @ #x~X~%" (-> this point))
|
||||
this
|
||||
|
||||
+20
-28
@@ -483,21 +483,18 @@
|
||||
(when *debug-segment*
|
||||
;; definition of type debug-line
|
||||
(deftype debug-line (structure)
|
||||
((flags int32 :offset-assert 0)
|
||||
(bucket bucket-id :offset-assert 4)
|
||||
(v1 vector :inline :offset-assert 16)
|
||||
(v2 vector :inline :offset-assert 32)
|
||||
(color rgba :offset-assert 48)
|
||||
(mode symbol :offset-assert 52)
|
||||
(color2 rgba :offset-assert 56)
|
||||
((flags int32)
|
||||
(bucket bucket-id)
|
||||
(v1 vector :inline)
|
||||
(v2 vector :inline)
|
||||
(color rgba)
|
||||
(mode symbol)
|
||||
(color2 rgba)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x3c
|
||||
:flag-assert #x90000003c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-line
|
||||
(defmethod inspect debug-line ((this debug-line))
|
||||
(defmethod inspect ((this debug-line))
|
||||
(format #t "[~8x] ~A~%" this 'debug-line)
|
||||
(format #t "~Tflags: ~D~%" (-> this flags))
|
||||
(format #t "~Tbucket: ~D~%" (-> this bucket))
|
||||
@@ -511,20 +508,17 @@
|
||||
|
||||
;; definition of type debug-text-3d
|
||||
(deftype debug-text-3d (structure)
|
||||
((flags int32 :offset-assert 0)
|
||||
(bucket bucket-id :offset-assert 4)
|
||||
(pos vector :inline :offset-assert 16)
|
||||
(color font-color :offset-assert 32)
|
||||
(offset vector2h :inline :offset-assert 40)
|
||||
(str string :offset-assert 44)
|
||||
((flags int32)
|
||||
(bucket bucket-id)
|
||||
(pos vector :inline)
|
||||
(color font-color)
|
||||
(offset vector2h :inline)
|
||||
(str string)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-text-3d
|
||||
(defmethod inspect debug-text-3d ((this debug-text-3d))
|
||||
(defmethod inspect ((this debug-text-3d))
|
||||
(format #t "[~8x] ~A~%" this 'debug-text-3d)
|
||||
(format #t "~Tflags: ~D~%" (-> this flags))
|
||||
(format #t "~Tbucket: ~D~%" (-> this bucket))
|
||||
@@ -537,16 +531,13 @@
|
||||
|
||||
;; definition of type debug-tracking-thang
|
||||
(deftype debug-tracking-thang (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
((length int32)
|
||||
(allocated-length int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-tracking-thang
|
||||
(defmethod inspect debug-tracking-thang ((this debug-tracking-thang))
|
||||
(defmethod inspect ((this debug-tracking-thang))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> this allocated-length))
|
||||
@@ -1345,7 +1336,8 @@
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex-stats
|
||||
(defmethod inspect debug-vertex-stats ((this debug-vertex-stats))
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this debug-vertex-stats))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
(format #t "~Tpos-count: ~D~%" (-> this pos-count))
|
||||
|
||||
+13
-18
@@ -6,18 +6,15 @@
|
||||
|
||||
;; definition of type memory-usage-info
|
||||
(deftype memory-usage-info (structure)
|
||||
((name string :offset-assert 0)
|
||||
(count int32 :offset-assert 4)
|
||||
(used int32 :offset-assert 8)
|
||||
(total int32 :offset-assert 12)
|
||||
((name string)
|
||||
(count int32)
|
||||
(used int32)
|
||||
(total int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type memory-usage-info
|
||||
(defmethod inspect memory-usage-info ((this memory-usage-info))
|
||||
(defmethod inspect ((this memory-usage-info))
|
||||
(format #t "[~8x] ~A~%" this 'memory-usage-info)
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tcount: ~D~%" (-> this count))
|
||||
@@ -28,22 +25,20 @@
|
||||
|
||||
;; definition of type memory-usage-block
|
||||
(deftype memory-usage-block (basic)
|
||||
((work-bsp basic :offset-assert 4)
|
||||
(length int32 :offset-assert 8)
|
||||
(data memory-usage-info 109 :inline :offset-assert 16)
|
||||
((work-bsp basic)
|
||||
(length int32)
|
||||
(data memory-usage-info 109 :inline)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x6e0
|
||||
:flag-assert #xc000006e0
|
||||
(:methods
|
||||
(reset! (_type_) _type_ 9)
|
||||
(calculate-total (_type_) int 10)
|
||||
(print-mem-usage (_type_ level object) none 11)
|
||||
(reset! (_type_) _type_)
|
||||
(calculate-total (_type_) int)
|
||||
(print-mem-usage (_type_ level object) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type memory-usage-block
|
||||
(defmethod inspect memory-usage-block ((this memory-usage-block))
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this memory-usage-block))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Twork-bsp: ~A~%" (-> this work-bsp))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
|
||||
+8
-7
@@ -5,7 +5,8 @@
|
||||
(declare-file (debug))
|
||||
|
||||
;; definition for method 3 of type memory-usage-block
|
||||
(defmethod inspect memory-usage-block ((this memory-usage-block))
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this memory-usage-block))
|
||||
(format #t "-------------------------------------------------------------~%")
|
||||
(format #t " # name count bytes used aligned bytes~%")
|
||||
(format #t "-------------------------------------------------------------~%")
|
||||
@@ -34,7 +35,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 8 of type object
|
||||
(defmethod mem-usage object ((this object) (arg0 memory-usage-block) (arg1 int))
|
||||
(defmethod mem-usage ((this object) (arg0 memory-usage-block) (arg1 int))
|
||||
(if this
|
||||
(format #t "WARNING: mem-usage called on object, probably not what was wanted for ~A~%" this)
|
||||
)
|
||||
@@ -42,7 +43,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 10 of type memory-usage-block
|
||||
(defmethod calculate-total memory-usage-block ((this memory-usage-block))
|
||||
(defmethod calculate-total ((this memory-usage-block))
|
||||
(let ((v0-0 0))
|
||||
(dotimes (v1-0 (-> this length))
|
||||
(+! v0-0 (-> this data v1-0 total))
|
||||
@@ -52,7 +53,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type memory-usage-block
|
||||
(defmethod reset! memory-usage-block ((this memory-usage-block))
|
||||
(defmethod reset! ((this memory-usage-block))
|
||||
(set! (-> this length) 0)
|
||||
(dotimes (v1-0 109)
|
||||
(set! (-> this data v1-0 used) 0)
|
||||
@@ -74,7 +75,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 14 of type level
|
||||
(defmethod compute-memory-usage level ((this level) (arg0 object))
|
||||
(defmethod compute-memory-usage ((this level) (arg0 object))
|
||||
(if (zero? (-> this mem-usage-block))
|
||||
(set! (-> this mem-usage-block) (new 'debug 'memory-usage-block))
|
||||
)
|
||||
@@ -87,7 +88,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 8 of type process-tree
|
||||
(defmethod mem-usage process-tree ((this process-tree) (arg0 memory-usage-block) (arg1 int))
|
||||
(defmethod mem-usage ((this process-tree) (arg0 memory-usage-block) (arg1 int))
|
||||
(let ((v1-0 87))
|
||||
(let* ((a0-1 *dead-pool-list*)
|
||||
(a3-0 (car a0-1))
|
||||
@@ -304,7 +305,7 @@
|
||||
;; definition for method 11 of type memory-usage-block
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch memory-usage-block vs none.
|
||||
(defmethod print-mem-usage memory-usage-block ((this memory-usage-block) (arg0 level) (arg1 object))
|
||||
(defmethod print-mem-usage ((this memory-usage-block) (arg0 level) (arg1 object))
|
||||
(local-vars (sv-16 object) (sv-32 string) (sv-48 symbol) (sv-64 int) (sv-80 int))
|
||||
(let ((s3-0 (&- (-> arg0 heap current) (the-as uint (-> arg0 heap base)))))
|
||||
(let ((v1-2 (+ (-> this data 59 total) (-> this data 60 total))))
|
||||
|
||||
+89
-113
@@ -6,25 +6,22 @@
|
||||
|
||||
;; definition of type debug-menu-context
|
||||
(deftype debug-menu-context (basic)
|
||||
((is-active symbol :offset-assert 4)
|
||||
(sel-length int32 :offset-assert 8)
|
||||
(sel-menu debug-menu 8 :offset-assert 12)
|
||||
(root-menu debug-menu :offset-assert 44)
|
||||
(joypad-func (function basic none) :offset-assert 48)
|
||||
(joypad-item basic :offset-assert 52)
|
||||
(font font-context :offset-assert 56)
|
||||
(is-hidden symbol :offset-assert 60)
|
||||
((is-active symbol)
|
||||
(sel-length int32)
|
||||
(sel-menu debug-menu 8)
|
||||
(root-menu debug-menu)
|
||||
(joypad-func (function basic none))
|
||||
(joypad-item basic)
|
||||
(font font-context)
|
||||
(is-hidden symbol)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
:flag-assert #x900000040
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
(new (symbol type) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-context
|
||||
(defmethod inspect debug-menu-context ((this debug-menu-context))
|
||||
(defmethod inspect ((this debug-menu-context))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tis-active: ~A~%" (-> this is-active))
|
||||
(format #t "~Tsel-length: ~D~%" (-> this sel-length))
|
||||
@@ -55,18 +52,15 @@
|
||||
|
||||
;; definition of type debug-menu-node
|
||||
(deftype debug-menu-node (basic)
|
||||
((name string :offset-assert 4)
|
||||
(parent debug-menu :offset-assert 8)
|
||||
(refresh-delay int32 :offset-assert 12)
|
||||
(refresh-ctr int32 :offset-assert 16)
|
||||
((name string)
|
||||
(parent debug-menu)
|
||||
(refresh-delay int32)
|
||||
(refresh-ctr int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x14
|
||||
:flag-assert #x900000014
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-node
|
||||
(defmethod inspect debug-menu-node ((this debug-menu-node))
|
||||
(defmethod inspect ((this debug-menu-node))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -76,29 +70,26 @@
|
||||
)
|
||||
|
||||
;; definition for method 2 of type debug-menu-node
|
||||
(defmethod print debug-menu-node ((this debug-menu-node))
|
||||
(defmethod print ((this debug-menu-node))
|
||||
(format #t "#<~A ~A @ #x~X>" (-> this type) (-> this name) this)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type debug-menu
|
||||
(deftype debug-menu (debug-menu-node)
|
||||
((context debug-menu-context :offset-assert 20)
|
||||
(selected-item debug-menu-item :offset-assert 24)
|
||||
(pix-width int32 :offset-assert 28)
|
||||
(pix-height int32 :offset-assert 32)
|
||||
(items pair :offset-assert 36)
|
||||
((context debug-menu-context)
|
||||
(selected-item debug-menu-item)
|
||||
(pix-width int32)
|
||||
(pix-height int32)
|
||||
(items pair)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
(:methods
|
||||
(new (symbol type debug-menu-context string) _type_ 0)
|
||||
(new (symbol type debug-menu-context string) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu
|
||||
(defmethod inspect debug-menu ((this debug-menu))
|
||||
(defmethod inspect ((this debug-menu))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -126,15 +117,12 @@
|
||||
|
||||
;; definition of type debug-menu-item
|
||||
(deftype debug-menu-item (debug-menu-node)
|
||||
((id int32 :offset-assert 20)
|
||||
((id int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x18
|
||||
:flag-assert #x900000018
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-item
|
||||
(defmethod inspect debug-menu-item ((this debug-menu-item))
|
||||
(defmethod inspect ((this debug-menu-item))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -146,18 +134,15 @@
|
||||
|
||||
;; definition of type debug-menu-item-submenu
|
||||
(deftype debug-menu-item-submenu (debug-menu-item)
|
||||
((submenu debug-menu :offset-assert 24)
|
||||
((submenu debug-menu)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c
|
||||
:flag-assert #x90000001c
|
||||
(:methods
|
||||
(new (symbol type string debug-menu) _type_ 0)
|
||||
(new (symbol type string debug-menu) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-item-submenu
|
||||
(defmethod inspect debug-menu-item-submenu ((this debug-menu-item-submenu))
|
||||
(defmethod inspect ((this debug-menu-item-submenu))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -183,19 +168,16 @@
|
||||
|
||||
;; definition of type debug-menu-item-function
|
||||
(deftype debug-menu-item-function (debug-menu-item)
|
||||
((activate-func (function object object) :offset-assert 24)
|
||||
(hilite-timer int8 :offset-assert 28)
|
||||
((activate-func (function object object))
|
||||
(hilite-timer int8)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1d
|
||||
:flag-assert #x90000001d
|
||||
(:methods
|
||||
(new (symbol type string object (function object object)) _type_ 0)
|
||||
(new (symbol type string object (function object object)) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-item-function
|
||||
(defmethod inspect debug-menu-item-function ((this debug-menu-item-function))
|
||||
(defmethod inspect ((this debug-menu-item-function))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -223,19 +205,16 @@
|
||||
|
||||
;; definition of type debug-menu-item-flag
|
||||
(deftype debug-menu-item-flag (debug-menu-item)
|
||||
((activate-func (function object debug-menu-msg object) :offset-assert 24)
|
||||
(is-on object :offset-assert 28)
|
||||
((activate-func (function object debug-menu-msg object))
|
||||
(is-on object)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
(:methods
|
||||
(new (symbol type string object (function object debug-menu-msg object)) _type_ 0)
|
||||
(new (symbol type string object (function object debug-menu-msg object)) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-item-flag
|
||||
(defmethod inspect debug-menu-item-flag ((this debug-menu-item-flag))
|
||||
(defmethod inspect ((this debug-menu-item-flag))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -268,43 +247,40 @@
|
||||
|
||||
;; definition of type debug-menu-item-var
|
||||
(deftype debug-menu-item-var (debug-menu-item)
|
||||
((display-str string :offset-assert 24)
|
||||
(grabbed-joypad-p symbol :offset-assert 28)
|
||||
(float-p symbol :offset-assert 32)
|
||||
(range-p symbol :offset-assert 36)
|
||||
(show-len int32 :offset-assert 40)
|
||||
(inc-delay int32 :offset-assert 44)
|
||||
(inc-delay-ctr int32 :offset-assert 48)
|
||||
(step-delay-ctr int32 :offset-assert 52)
|
||||
(inc-dir int32 :offset-assert 56)
|
||||
(fval float :offset-assert 60)
|
||||
(fundo-val float :offset-assert 64)
|
||||
(frange-min float :offset-assert 68)
|
||||
(frange-max float :offset-assert 72)
|
||||
(fstart-inc float :offset-assert 76)
|
||||
(fstep float :offset-assert 80)
|
||||
(fprecision int32 :offset-assert 84)
|
||||
(factivate-func (function int debug-menu-msg float float float) :offset-assert 88)
|
||||
(ival int32 :offset 60)
|
||||
(iundo-val int32 :offset 64)
|
||||
(irange-min int32 :offset 68)
|
||||
(irange-max int32 :offset 72)
|
||||
(istart-inc int32 :offset 76)
|
||||
(istep int32 :offset 80)
|
||||
(ihex-p symbol :offset-assert 92)
|
||||
(iactivate-func (function int debug-menu-msg int int int) :offset 88)
|
||||
(ifloat-p symbol :offset-assert 96)
|
||||
((display-str string)
|
||||
(grabbed-joypad-p symbol)
|
||||
(float-p symbol)
|
||||
(range-p symbol)
|
||||
(show-len int32)
|
||||
(inc-delay int32)
|
||||
(inc-delay-ctr int32)
|
||||
(step-delay-ctr int32)
|
||||
(inc-dir int32)
|
||||
(fval float)
|
||||
(fundo-val float)
|
||||
(frange-min float)
|
||||
(frange-max float)
|
||||
(fstart-inc float)
|
||||
(fstep float)
|
||||
(fprecision int32)
|
||||
(factivate-func (function int debug-menu-msg float float float))
|
||||
(ival int32 :overlay-at fval)
|
||||
(iundo-val int32 :overlay-at fundo-val)
|
||||
(irange-min int32 :overlay-at frange-min)
|
||||
(irange-max int32 :overlay-at frange-max)
|
||||
(istart-inc int32 :overlay-at fstart-inc)
|
||||
(istep int32 :overlay-at fstep)
|
||||
(ihex-p symbol)
|
||||
(iactivate-func (function int debug-menu-msg int int int) :overlay-at factivate-func)
|
||||
(ifloat-p symbol)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x64
|
||||
:flag-assert #x900000064
|
||||
(:methods
|
||||
(new (symbol type string int int) _type_ 0)
|
||||
(new (symbol type string int int) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-menu-item-var
|
||||
(defmethod inspect debug-menu-item-var ((this debug-menu-item-var))
|
||||
(defmethod inspect ((this debug-menu-item-var))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tname: ~A~%" (-> this name))
|
||||
(format #t "~Tparent: ~A~%" (-> this parent))
|
||||
@@ -477,14 +453,14 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-context-grab-joypad
|
||||
(defun debug-menu-context-grab-joypad ((menu debug-menu-context) (callback-arg basic) (callback-func (function basic none)))
|
||||
(defun debug-menu-context-grab-joypad ((ctxt debug-menu-context) (callback-arg basic) (callback-func (function basic none)))
|
||||
(cond
|
||||
((-> menu joypad-func)
|
||||
((-> ctxt joypad-func)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> menu joypad-func) callback-func)
|
||||
(set! (-> menu joypad-item) callback-arg)
|
||||
(set! (-> ctxt joypad-func) callback-func)
|
||||
(set! (-> ctxt joypad-item) callback-arg)
|
||||
#t
|
||||
)
|
||||
)
|
||||
@@ -1058,32 +1034,32 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-item-render
|
||||
(defun debug-menu-item-render ((arg0 debug-menu-item) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol))
|
||||
(when (> (-> arg0 refresh-delay) 0)
|
||||
(+! (-> arg0 refresh-ctr) -1)
|
||||
(when (<= (-> arg0 refresh-ctr) 0)
|
||||
(set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay))
|
||||
(debug-menu-item-send-msg arg0 (debug-menu-msg update))
|
||||
(defun debug-menu-item-render ((item debug-menu-item) (x int) (y int) (submenus int) (selected symbol))
|
||||
(when (> (-> item refresh-delay) 0)
|
||||
(+! (-> item refresh-ctr) -1)
|
||||
(when (<= (-> item refresh-ctr) 0)
|
||||
(set! (-> item refresh-ctr) (-> item refresh-delay))
|
||||
(debug-menu-item-send-msg item (debug-menu-msg update))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> arg0 type) debug-menu-item-submenu)
|
||||
(debug-menu-item-submenu-render (the-as debug-menu-item-submenu arg0) arg1 arg2 arg3 arg4)
|
||||
((= (-> item type) debug-menu-item-submenu)
|
||||
(debug-menu-item-submenu-render (the-as debug-menu-item-submenu item) x y submenus selected)
|
||||
)
|
||||
((= (-> arg0 type) debug-menu-item-function)
|
||||
(debug-menu-item-function-render (the-as debug-menu-item-function arg0) arg1 arg2 arg3 arg4)
|
||||
((= (-> item type) debug-menu-item-function)
|
||||
(debug-menu-item-function-render (the-as debug-menu-item-function item) x y submenus selected)
|
||||
)
|
||||
((= (-> arg0 type) debug-menu-item-flag)
|
||||
(debug-menu-item-flag-render (the-as debug-menu-item-flag arg0) arg1 arg2 arg3 arg4)
|
||||
((= (-> item type) debug-menu-item-flag)
|
||||
(debug-menu-item-flag-render (the-as debug-menu-item-flag item) x y submenus selected)
|
||||
)
|
||||
((= (-> arg0 type) debug-menu-item-var)
|
||||
(debug-menu-item-var-render (the-as debug-menu-item-var arg0) arg1 arg2 arg3 arg4)
|
||||
((= (-> item type) debug-menu-item-var)
|
||||
(debug-menu-item-var-render (the-as debug-menu-item-var item) x y submenus selected)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR: Found unknown item type!~%")
|
||||
)
|
||||
)
|
||||
arg0
|
||||
item
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-render
|
||||
@@ -1175,13 +1151,13 @@
|
||||
|
||||
;; definition for function debug-menu-context-render
|
||||
(defun debug-menu-context-render ((arg0 debug-menu-context))
|
||||
(let ((s4-0 6))
|
||||
(dotimes (s5-0 (-> arg0 sel-length))
|
||||
(let ((s3-0 (-> arg0 sel-menu s5-0)))
|
||||
(let ((a3-0 (-> s3-0 selected-item)))
|
||||
(debug-menu-render s3-0 s4-0 28 a3-0 (+ (- -1 s5-0) (-> arg0 sel-length)))
|
||||
(let ((x-pos 6))
|
||||
(dotimes (stack-idx (-> arg0 sel-length))
|
||||
(let ((menu (-> arg0 sel-menu stack-idx)))
|
||||
(let ((selection (-> menu selected-item)))
|
||||
(debug-menu-render menu x-pos 28 selection (+ (- -1 stack-idx) (-> arg0 sel-length)))
|
||||
)
|
||||
(set! s4-0 (+ s4-0 3 (-> s3-0 pix-width)))
|
||||
(set! x-pos (+ x-pos 3 (-> menu pix-width)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+5
-8
@@ -9,18 +9,15 @@
|
||||
|
||||
;; definition of type part-tester
|
||||
(deftype part-tester (process)
|
||||
((root trsqv :offset-assert 112)
|
||||
(part sparticle-launch-control :offset-assert 116)
|
||||
(old-group sparticle-launch-group :offset-assert 120)
|
||||
((root trsqv)
|
||||
(part sparticle-launch-control)
|
||||
(old-group sparticle-launch-group)
|
||||
)
|
||||
:heap-base #x100
|
||||
:method-count-assert 14
|
||||
:size-assert #x7c
|
||||
:flag-assert #xe0100007c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type part-tester
|
||||
(defmethod inspect part-tester ((this part-tester))
|
||||
(defmethod inspect ((this part-tester))
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
@@ -34,7 +31,7 @@
|
||||
(define *part-tester-name* (the-as string #f))
|
||||
|
||||
;; definition for method 10 of type part-tester
|
||||
(defmethod deactivate part-tester ((this part-tester))
|
||||
(defmethod deactivate ((this part-tester))
|
||||
(if (nonzero? (-> this part))
|
||||
(kill-and-free-particles (-> this part))
|
||||
)
|
||||
|
||||
+34
-46
@@ -3,20 +3,17 @@
|
||||
|
||||
;; definition of type tr-stat
|
||||
(deftype tr-stat (structure)
|
||||
((groups uint16 :offset-assert 0)
|
||||
(fragments uint16 :offset-assert 2)
|
||||
(tris uint32 :offset-assert 4)
|
||||
(dverts uint32 :offset-assert 8)
|
||||
(instances uint16 :offset-assert 12)
|
||||
(pad uint16 :offset-assert 14)
|
||||
((groups uint16)
|
||||
(fragments uint16)
|
||||
(tris uint32)
|
||||
(dverts uint32)
|
||||
(instances uint16)
|
||||
(pad uint16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type tr-stat
|
||||
(defmethod inspect tr-stat ((this tr-stat))
|
||||
(defmethod inspect ((this tr-stat))
|
||||
(format #t "[~8x] ~A~%" this 'tr-stat)
|
||||
(format #t "~Tgroups: ~D~%" (-> this groups))
|
||||
(format #t "~Tfragments: ~D~%" (-> this fragments))
|
||||
@@ -29,16 +26,13 @@
|
||||
|
||||
;; definition of type merc-global-stats
|
||||
(deftype merc-global-stats (structure)
|
||||
((merc tr-stat :inline :offset-assert 0)
|
||||
(mercneric tr-stat :inline :offset-assert 16)
|
||||
((merc tr-stat :inline)
|
||||
(mercneric tr-stat :inline)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type merc-global-stats
|
||||
(defmethod inspect merc-global-stats ((this merc-global-stats))
|
||||
(defmethod inspect ((this merc-global-stats))
|
||||
(format #t "[~8x] ~A~%" this 'merc-global-stats)
|
||||
(format #t "~Tmerc: #<tr-stat @ #x~X>~%" (-> this merc))
|
||||
(format #t "~Tmercneric: #<tr-stat @ #x~X>~%" (-> this mercneric))
|
||||
@@ -47,35 +41,32 @@
|
||||
|
||||
;; definition of type perf-stat
|
||||
(deftype perf-stat (structure)
|
||||
((frame-number uint32 :offset-assert 0)
|
||||
(count uint32 :offset-assert 4)
|
||||
(cycles uint32 :offset-assert 8)
|
||||
(instructions uint32 :offset-assert 12)
|
||||
(icache uint32 :offset-assert 16)
|
||||
(dcache uint32 :offset-assert 20)
|
||||
(select uint32 :offset-assert 24)
|
||||
(ctrl uint32 :offset-assert 28)
|
||||
(accum0 uint32 :offset-assert 32)
|
||||
(accum1 uint32 :offset-assert 36)
|
||||
(to-vu0-waits uint32 :offset-assert 40)
|
||||
(to-spr-waits uint32 :offset-assert 44)
|
||||
(from-spr-waits uint32 :offset-assert 48)
|
||||
((frame-number uint32)
|
||||
(count uint32)
|
||||
(cycles uint32)
|
||||
(instructions uint32)
|
||||
(icache uint32)
|
||||
(dcache uint32)
|
||||
(select uint32)
|
||||
(ctrl uint32)
|
||||
(accum0 uint32)
|
||||
(accum1 uint32)
|
||||
(to-vu0-waits uint32)
|
||||
(to-spr-waits uint32)
|
||||
(from-spr-waits uint32)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 14
|
||||
:size-assert #x34
|
||||
:flag-assert #xe00000034
|
||||
(:methods
|
||||
(perf-stat-method-9 (_type_) none 9)
|
||||
(print-to-stream (_type_ string basic) none 10)
|
||||
(reset! (_type_) none 11)
|
||||
(read! (_type_) none 12)
|
||||
(update-wait-stats (_type_ uint uint uint) none 13)
|
||||
(perf-stat-method-9 (_type_) none)
|
||||
(print-to-stream (_type_ string basic) none)
|
||||
(reset! (_type_) none)
|
||||
(read! (_type_) none)
|
||||
(update-wait-stats (_type_ uint uint uint) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type perf-stat
|
||||
(defmethod inspect perf-stat ((this perf-stat))
|
||||
(defmethod inspect ((this perf-stat))
|
||||
(format #t "[~8x] ~A~%" this 'perf-stat)
|
||||
(format #t "~Tframe-number: ~D~%" (-> this frame-number))
|
||||
(format #t "~Tcount: ~D~%" (-> this count))
|
||||
@@ -95,15 +86,12 @@
|
||||
|
||||
;; definition of type perf-stat-array
|
||||
(deftype perf-stat-array (inline-array-class)
|
||||
((data perf-stat :inline :dynamic :offset-assert 16)
|
||||
((data perf-stat :inline :dynamic)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type perf-stat-array
|
||||
(defmethod inspect perf-stat-array ((this perf-stat-array))
|
||||
(defmethod inspect ((this perf-stat-array))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> this allocated-length))
|
||||
@@ -116,7 +104,7 @@
|
||||
|
||||
;; definition for method 11 of type perf-stat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod reset! perf-stat ((this perf-stat))
|
||||
(defmethod reset! ((this perf-stat))
|
||||
(let ((v1-0 (-> this ctrl)))
|
||||
(+! (-> this count) 1)
|
||||
(b! (zero? v1-0) cfg-2 :delay (nop!))
|
||||
@@ -138,7 +126,7 @@
|
||||
|
||||
;; definition for method 12 of type perf-stat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod read! perf-stat ((this perf-stat))
|
||||
(defmethod read! ((this perf-stat))
|
||||
(local-vars (v1-1 int) (v1-3 int))
|
||||
(b! (zero? (-> this ctrl)) cfg-2 :delay (nop!))
|
||||
(.mtc0 Perf 0)
|
||||
@@ -155,7 +143,7 @@
|
||||
|
||||
;; definition for method 13 of type perf-stat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod update-wait-stats perf-stat ((this perf-stat) (arg0 uint) (arg1 uint) (arg2 uint))
|
||||
(defmethod update-wait-stats ((this perf-stat) (arg0 uint) (arg1 uint) (arg2 uint))
|
||||
(when (nonzero? (-> this ctrl))
|
||||
(+! (-> this to-vu0-waits) arg0)
|
||||
(+! (-> this to-spr-waits) arg1)
|
||||
|
||||
+3
-7
@@ -10,19 +10,15 @@
|
||||
|
||||
;; definition of type viewer
|
||||
(deftype viewer (process-drawable)
|
||||
((janim art-joint-anim :offset-assert 176)
|
||||
((janim art-joint-anim)
|
||||
)
|
||||
:heap-base #x50
|
||||
:method-count-assert 20
|
||||
:size-assert #xb4
|
||||
:flag-assert #x14005000b4
|
||||
(:states
|
||||
viewer-process
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type viewer
|
||||
(defmethod inspect viewer ((this viewer))
|
||||
(defmethod inspect ((this viewer))
|
||||
(let ((t9-0 (method-of-type process-drawable inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
@@ -184,7 +180,7 @@
|
||||
|
||||
;; definition for method 11 of type viewer
|
||||
;; INFO: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! viewer ((this viewer) (arg0 entity-actor))
|
||||
(defmethod init-from-entity! ((this viewer) (arg0 entity-actor))
|
||||
(set! *viewer* this)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
Reference in New Issue
Block a user