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:
ManDude
2023-10-30 03:20:02 +00:00
committed by GitHub
parent 09536c68ac
commit cd68cb671e
2079 changed files with 94384 additions and 117066 deletions
+11 -20
View File
@@ -58,37 +58,28 @@
;; DECOMP BEGINS
(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
)
(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
)
(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
)
+15 -24
View File
@@ -477,39 +477,30 @@ Most functions take a boolean as their first argument. If the boolean is set to
(when *debug-segment*
(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
)
(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 36)
(str string :offset-assert 40)
((flags int32)
(bucket bucket-id)
(pos vector :inline)
(color font-color)
(offset vector2h :inline)
(str string)
)
:method-count-assert 9
:size-assert #x2c
:flag-assert #x90000002c
)
(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
)
+112 -145
View File
@@ -365,102 +365,93 @@
)
(deftype editable-region (basic)
((changed symbol :offset-assert 4)
(locked symbol :offset-assert 8)
(id uint64 :offset-assert 16)
(filter editable-filter :offset-assert 24)
(tree symbol :offset-assert 28)
(level string :offset-assert 32)
(on-enter string :offset-assert 36)
(on-inside string :offset-assert 40)
(on-exit string :offset-assert 44)
((changed symbol)
(locked symbol)
(id uint64)
(filter editable-filter)
(tree symbol)
(level string)
(on-enter string)
(on-inside string)
(on-exit string)
)
:method-count-assert 13
:size-assert #x30
:flag-assert #xd00000030
(:methods
(new (symbol type) _type_ 0)
(editable-region-method-9 (_type_ editable-array int int) symbol 9)
(editable-region-method-10 (_type_ int) symbol 10)
(editable-region-method-11 (_type_ vector int) none 11)
(editable-region-method-12 (_type_) editable-filter 12)
(new (symbol type) _type_)
(editable-region-method-9 (_type_ editable-array int int) symbol)
(editable-region-method-10 (_type_ int) symbol)
(editable-region-method-11 (_type_ vector int) none)
(editable-region-method-12 (_type_) editable-filter)
)
)
(deftype editable (basic)
((flags editable-flag :offset-assert 4)
(name string :offset-assert 8)
(id uint32 :offset-assert 12)
(region editable-region :offset-assert 16)
(owner pair :offset-assert 20)
((flags editable-flag)
(name string)
(id uint32)
(region editable-region)
(owner pair)
)
:method-count-assert 30
:size-assert #x18
:flag-assert #x1e00000018
(:methods
(get-color (_type_ int) rgba 9)
(editable-method-10 (_type_) none 10)
(editable-method-11 (_type_ vector) symbol 11)
(select-editable! (_type_ symbol) none 12)
(edit-get-distance (_type_ vector) float 13)
(edit-get-trans (_type_) vector 14)
(editable-method-15 (_type_ vector int) none 15)
(edit-coord! (_type_ vector editable-flag) none 16)
(editable-method-17 (_type_ vector) none 17)
(editable-method-18 (_type_ vector matrix) none 18)
(editable-method-19 (_type_ vector) none 19)
(editable-method-20 (_type_ vector vector vector vector) none 20)
(editable-method-21 (_type_ editable-region) none 21)
(editable-method-22 (_type_ editable-array int int) symbol 22)
(editable-method-23 (_type_) symbol 23)
(editable-method-24 (_type_) none 24)
(editable-method-25 (_type_ editable-array) none 25)
(editable-method-26 (_type_ editable editable-array) none 26)
(editable-method-27 (_type_ editable-array) editable 27)
(editable-method-28 (_type_ editable-filter) none 28)
(editable-method-29 (_type_ editable-filter) symbol 29)
(get-color (_type_ int) rgba)
(editable-method-10 (_type_) none)
(editable-method-11 (_type_ vector) symbol)
(select-editable! (_type_ symbol) none)
(edit-get-distance (_type_ vector) float)
(edit-get-trans (_type_) vector)
(editable-method-15 (_type_ vector int) none)
(edit-coord! (_type_ vector editable-flag) none)
(editable-method-17 (_type_ vector) none)
(editable-method-18 (_type_ vector matrix) none)
(editable-method-19 (_type_ vector) none)
(editable-method-20 (_type_ vector vector vector vector) none)
(editable-method-21 (_type_ editable-region) none)
(editable-method-22 (_type_ editable-array int int) symbol)
(editable-method-23 (_type_) symbol)
(editable-method-24 (_type_) none)
(editable-method-25 (_type_ editable-array) none)
(editable-method-26 (_type_ editable editable-array) none)
(editable-method-27 (_type_ editable-array) editable)
(editable-method-28 (_type_ editable-filter) none)
(editable-method-29 (_type_ editable-filter) symbol)
)
)
(deftype editable-array (basic)
((allocated-length int32 :offset-assert 4)
(length int32 :offset-assert 8)
(region editable-region :offset-assert 12)
(backup-region editable-region :offset-assert 16)
(region-lock? symbol :offset-assert 20)
(move-lock? symbol :offset-assert 24)
(move-speed float :offset-assert 28)
(selection (array editable) :offset-assert 32)
(filter editable-filter 2 :offset-assert 36)
(target editable :offset-assert 44)
(target-mode editable-command :offset-assert 48)
(target-command editable-command :offset-assert 52)
(target-message string :offset-assert 56)
(edit-plane editable-plane :offset-assert 60)
(edit-plane-center vector :inline :offset-assert 64)
(edit-plane-normal vector :inline :offset-assert 80)
(level-offset vector :inline :offset-assert 96)
(level-info-id uint32 :offset-assert 112)
(level uint32 :offset-assert 116)
(edit-param0 float :offset-assert 120)
(data editable :dynamic :offset-assert 124)
((allocated-length int32)
(length int32)
(region editable-region)
(backup-region editable-region)
(region-lock? symbol)
(move-lock? symbol)
(move-speed float)
(selection (array editable))
(filter editable-filter 2)
(target editable)
(target-mode editable-command)
(target-command editable-command)
(target-message string)
(edit-plane editable-plane)
(edit-plane-center vector :inline)
(edit-plane-normal vector :inline)
(level-offset vector :inline)
(level-info-id uint32)
(level uint32)
(edit-param0 float)
(data editable :dynamic)
)
:method-count-assert 18
:size-assert #x7c
:flag-assert #x120000007c
(:methods
(new (symbol type int) _type_ 0)
(editable-array-method-9 (_type_ editable-command mouse-info) symbol :behavior editable-player 9)
(editable-array-method-10 (_type_ vector int) editable 10)
(editable-array-method-11 (_type_) int 11)
(editable-array-method-12 (_type_ editable-array) none 12)
(editable-array-method-13 (_type_ editable-command editable-command string) none 13)
(editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable) 14)
(editable-array-method-15 (_type_ editable) none 15)
(editable-array-method-16 (_type_) none 16)
(editable-array-method-17 (_type_ vector vector) vector 17)
(new (symbol type int) _type_)
(editable-array-method-9 (_type_ editable-command mouse-info) symbol :behavior editable-player)
(editable-array-method-10 (_type_ vector int) editable)
(editable-array-method-11 (_type_) int)
(editable-array-method-12 (_type_ editable-array) none)
(editable-array-method-13 (_type_ editable-command editable-command string) none)
(editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable))
(editable-array-method-15 (_type_ editable) none)
(editable-array-method-16 (_type_) none)
(editable-array-method-17 (_type_ vector vector) vector)
)
)
@@ -505,14 +496,11 @@
)
(deftype editable-point (editable)
((radius float :offset-assert 24)
(trans vector :inline :offset-assert 32)
((radius float)
(trans vector :inline)
)
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
(:methods
(new (symbol type vector editable-region) _type_ 0)
(new (symbol type vector editable-region) _type_)
)
)
@@ -540,11 +528,8 @@
(deftype editable-sphere (editable-point)
()
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
(:methods
(new (symbol type vector float editable-region) _type_ 0)
(new (symbol type vector float editable-region) _type_)
)
)
@@ -572,24 +557,18 @@
(deftype editable-sample (editable-point)
()
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
)
(deftype editable-light (editable-sphere)
((direction vector :inline :offset-assert 48)
(color vector :inline :offset-assert 64)
(decay-start float :offset-assert 80)
(ambient-point-ratio float :offset-assert 84)
(brightness float :offset-assert 88)
((direction vector :inline)
(color vector :inline)
(decay-start float)
(ambient-point-ratio float)
(brightness float)
)
:method-count-assert 30
:size-assert #x5c
:flag-assert #x1e0000005c
(:methods
(new (symbol type vector float editable-region) _type_ 0)
(new (symbol type vector float editable-region) _type_)
)
)
@@ -626,25 +605,19 @@
(deftype editable-entity (editable-point)
()
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
)
(deftype editable-face (editable)
((length int32 :offset-assert 24)
(normal vector :inline :offset-assert 32)
(center vector :inline :offset-assert 48)
(vertex editable-point 6 :offset-assert 64) ;; can hold up to 6 (kinda a weird number...) but still does just define 1 face!
((length int32)
(normal vector :inline)
(center vector :inline)
(vertex editable-point 6) ;; can hold up to 6 (kinda a weird number...) but still does just define 1 face!
)
:method-count-assert 32
:size-assert #x58
:flag-assert #x2000000058
(:methods
(new (symbol type editable-region) _type_ 0)
(editable-face-method-30 (_type_ (inline-array vector)) int 30)
(editable-face-method-31 (_type_ vector) vector 31)
(new (symbol type editable-region) _type_)
(editable-face-method-30 (_type_ (inline-array vector)) int)
(editable-face-method-31 (_type_ vector) vector)
)
)
@@ -670,16 +643,15 @@
(deftype editable-plane (editable)
"Modified from the original, in the original editor code a plane is defined by a normal vector (2 points) and a radius (equal side lengths)"
((length int32)
((length int32)
(normal vector :inline)
(position vector :inline)
(vertex editable-point 4)
(vertex editable-point 4) ;; was 2
)
:method-count-assert 32
(:methods
(new (symbol type editable-region) _type_ 0)
(editable-plane-method-30 (_type_ (inline-array vector)) int 30)
(editable-plane-method-31 (_type_ vector) vector 31)
(new (symbol type editable-region) _type_)
(editable-plane-method-30 (_type_ (inline-array vector)) int)
(editable-plane-method-31 (_type_ vector) vector)
)
)
@@ -704,38 +676,33 @@
)
(deftype editable-player (process-drawable)
((current editable-array :offset-assert 200)
(select-command function :offset-assert 204)
(move-command function :offset-assert 208)
(extra-command function :offset-assert 212)
(left-handed basic :offset-assert 216)
(light-names basic :offset-assert 220)
(external-cam-mode symbol :offset-assert 224)
(command editable-command 6 :offset-assert 228)
(close-menu-time time-frame :offset-assert 256)
((current editable-array)
(select-command function)
(move-command function)
(extra-command function)
(left-handed basic)
(light-names basic)
(external-cam-mode symbol)
(command editable-command 6)
(close-menu-time time-frame)
)
:heap-base #x90
:method-count-assert 22
:size-assert #x108
:flag-assert #x1600900108
(:state-methods
idle
)
(:methods
(idle () _type_ :state 20)
(editable-player-method-21 (_type_) none 21)
(editable-player-method-21 (_type_) none)
)
)
(deftype editable-work (basic)
((num-found int16 :offset-assert 4)
(last-found int16 :offset-assert 6)
(last-x float :offset-assert 8)
(last-y float :offset-assert 12)
(found editable 256 :offset-assert 16)
(dists uint32 256 :offset-assert 1040)
((num-found int16)
(last-found int16)
(last-x float)
(last-y float)
(found editable 256)
(dists uint32 256)
)
:method-count-assert 9
:size-assert #x810
:flag-assert #x900000810
)
@@ -1106,7 +1106,7 @@
#t
)
(defmethod editable-array-method-9 editable-array ((this editable-array) (arg0 editable-command) (arg1 mouse-info))
(defmethod editable-array-method-9 ((this editable-array) (arg0 editable-command) (arg1 mouse-info))
(if (execute-select this arg0 arg1)
(return #f)
)
@@ -1419,7 +1419,7 @@
#f
)
(defmethod deactivate editable-player ((this editable-player))
(defmethod deactivate ((this editable-player))
;; og:preserve-this
;; Put the pad back to normal
(pc-treat-pad0-as-pad1 #f)
@@ -1437,7 +1437,7 @@
)
;; WARN: Return type mismatch process-drawable vs editable-player.
(defmethod relocate editable-player ((this editable-player) (arg0 int))
(defmethod relocate ((this editable-player) (arg0 int))
(let ((v1-0 *kernel-context*))
(set! (-> v1-0 relocating-process) this)
(set! (-> v1-0 relocating-min) (the-as int (&-> this type)))
@@ -1456,7 +1456,7 @@
(the-as editable-player ((method-of-type process-drawable relocate) this arg0))
)
(defmethod editable-player-method-21 editable-player ((this editable-player))
(defmethod editable-player-method-21 ((this editable-player))
(set! *display-region-marks* #f)
(let* ((s5-0 (-> this current length))
(s4-0 0)
+82 -88
View File
@@ -30,12 +30,12 @@
)
)
(defmethod print editable-region ((this editable-region))
(defmethod print ((this editable-region))
(format #t "#<~A region-~D ~A ~A @ #x~X>" (-> this type) (-> this id) (-> this level) (-> this tree) this)
this
)
(defmethod editable-region-method-10 editable-region ((this editable-region) (arg0 int))
(defmethod editable-region-method-10 ((this editable-region) (arg0 int))
(local-vars (sv-16 string) (sv-32 string))
(when (nonzero? (-> this id))
(let ((s5-0 (clear *temp-string*)))
@@ -112,7 +112,7 @@
#f
)
(defmethod editable-region-method-9 editable-region ((this editable-region) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-region-method-9 ((this editable-region) (arg0 editable-array) (arg1 int) (arg2 int))
(local-vars (v0-0 symbol) (v1-5 object) (v1-28 object))
(set! v0-0
(when (-> this changed)
@@ -301,7 +301,7 @@
v0-0
)
(defmethod editable-region-method-11 editable-region ((this editable-region) (arg0 vector) (arg1 int))
(defmethod editable-region-method-11 ((this editable-region) (arg0 vector) (arg1 int))
(local-vars (sv-32 vector2h))
(set! sv-32 (new 'stack 'vector2h))
(add-debug-x #t (bucket-id debug-no-zbuf1) arg0 (new 'static 'rgba :r #xff :g #xff :a #x80))
@@ -356,7 +356,7 @@
)
;; WARN: Return type mismatch int vs editable-filter.
(defmethod editable-region-method-12 editable-region ((this editable-region))
(defmethod editable-region-method-12 ((this editable-region))
(let* ((s5-0 0)
(s4-0 (lambda ((arg0 string)) (let ((gp-0 0))
(when (not (type? arg0 string))
@@ -422,11 +422,11 @@
)
)
(defmethod editable-method-23 editable ((this editable))
(defmethod editable-method-23 ((this editable))
#t
)
(defmethod editable-method-28 editable ((this editable) (arg0 editable-filter))
(defmethod editable-method-28 ((this editable) (arg0 editable-filter))
(let* ((s5-0 (-> this owner))
(a0-1 (car s5-0))
)
@@ -441,7 +441,7 @@
)
;; WARN: Return type mismatch int vs symbol.
(defmethod editable-method-29 editable ((this editable) (arg0 editable-filter))
(defmethod editable-method-29 ((this editable) (arg0 editable-filter))
(let* ((s5-0 (-> this owner))
(a0-1 (car s5-0))
)
@@ -454,7 +454,7 @@
(the-as symbol 0)
)
(defmethod editable-method-21 editable ((this editable) (arg0 editable-region))
(defmethod editable-method-21 ((this editable) (arg0 editable-region))
(when (not (and (-> this region) (-> this region locked)))
(if arg0
(set! (-> arg0 changed) #t)
@@ -470,7 +470,7 @@
)
;; WARN: Return type mismatch int vs rgba.
(defmethod get-color editable ((this editable) (arg0 int))
(defmethod get-color ((this editable) (arg0 int))
"Returns the [[rgba]] that corresponds to the type of [[editable]] TODO - document the colors"
(the-as rgba (cond
((and (logtest? (-> this flags) (editable-flag selected))
@@ -500,7 +500,7 @@
)
)
(defmethod editable-method-10 editable ((this editable))
(defmethod editable-method-10 ((this editable))
(when (logtest? (-> this flags) (editable-flag selected))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(when (editable-method-11 this s5-0)
@@ -514,7 +514,7 @@
(none)
)
(defmethod select-editable! editable ((this editable) (arg0 symbol))
(defmethod select-editable! ((this editable) (arg0 symbol))
(case arg0
(('toggle)
(logxor! (-> this flags) (editable-flag selected))
@@ -530,12 +530,12 @@
(none)
)
(defmethod edit-get-distance editable ((this editable) (arg0 vector))
(defmethod edit-get-distance ((this editable) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
-1.0
)
(defmethod editable-method-20 editable ((this editable) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(defmethod editable-method-20 ((this editable) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(local-vars (sv-48 vector) (sv-52 vector))
(set! sv-48 (new 'stack-no-clear 'vector))
(set! sv-52 (new 'stack-no-clear 'vector))
@@ -553,7 +553,7 @@
(none)
)
(defmethod editable-method-11 editable ((this editable) (arg0 vector))
(defmethod editable-method-11 ((this editable) (arg0 vector))
(with-pp
(let ((s5-0 (new 'stack 'collide-query)))
(set! (-> s5-0 start-pos quad) (-> (edit-get-trans this) quad))
@@ -576,51 +576,51 @@
)
)
(defmethod editable-method-24 editable ((this editable))
(defmethod editable-method-24 ((this editable))
0
(none)
)
(defmethod editable-method-17 editable ((this editable) (arg0 vector))
(defmethod editable-method-17 ((this editable) (arg0 vector))
0
(none)
)
(defmethod editable-method-22 editable ((this editable) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable) (arg0 editable-array) (arg1 int) (arg2 int))
#t
)
(defmethod editable-method-15 editable ((this editable) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable) (arg0 vector) (arg1 int))
0
(none)
)
(defmethod edit-coord! editable ((this editable) (arg0 vector) (arg1 editable-flag))
(defmethod edit-coord! ((this editable) (arg0 vector) (arg1 editable-flag))
0
(none)
)
(defmethod editable-method-18 editable ((this editable) (arg0 vector) (arg1 matrix))
(defmethod editable-method-18 ((this editable) (arg0 vector) (arg1 matrix))
0
(none)
)
(defmethod edit-get-trans editable ((this editable))
(defmethod edit-get-trans ((this editable))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
*null-vector*
)
(defmethod editable-method-19 editable ((this editable) (arg0 vector))
(defmethod editable-method-19 ((this editable) (arg0 vector))
0
(none)
)
(defmethod editable-method-26 editable ((this editable) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable) (arg0 editable) (arg1 editable-array))
0
(none)
)
(defmethod editable-method-25 editable ((this editable) (arg0 editable-array))
(defmethod editable-method-25 ((this editable) (arg0 editable-array))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -640,7 +640,7 @@
(none)
)
(defmethod editable-method-27 editable ((this editable) (arg0 editable-array))
(defmethod editable-method-27 ((this editable) (arg0 editable-array))
(local-vars (s4-0 editable))
(let ((v1-0 0))
(while (< v1-0 (-> arg0 selection length))
@@ -681,7 +681,7 @@
s4-0
)
(defmethod print editable-point ((this editable-point))
(defmethod print ((this editable-point))
(format
#t
"#<~A~S~m ~m ~m :r ~m"
@@ -700,7 +700,7 @@
)
;; WARN: Function (method 28 editable-point) has a return type of none, but the expression builder found a return statement.
(defmethod editable-method-28 editable-point ((this editable-point) (arg0 editable-filter))
(defmethod editable-method-28 ((this editable-point) (arg0 editable-filter))
(if (logtest? arg0 (editable-filter water-command))
(return #f)
)
@@ -741,7 +741,7 @@
(none)
)
(defmethod editable-method-15 editable-point ((this editable-point) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable-point) (arg0 vector) (arg1 int))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -754,7 +754,7 @@
(none)
)
(defmethod edit-coord! editable-point ((this editable-point) (arg0 vector) (arg1 editable-flag))
(defmethod edit-coord! ((this editable-point) (arg0 vector) (arg1 editable-flag))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -775,12 +775,12 @@
(none)
)
(defmethod edit-get-trans editable-point ((this editable-point))
(defmethod edit-get-trans ((this editable-point))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
(-> this trans)
)
(defmethod editable-method-18 editable-point ((this editable-point) (arg0 vector) (arg1 matrix))
(defmethod editable-method-18 ((this editable-point) (arg0 vector) (arg1 matrix))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -795,7 +795,7 @@
(none)
)
(defmethod editable-method-10 editable-point ((this editable-point))
(defmethod editable-method-10 ((this editable-point))
(let* ((s5-0 vector-vector-distance)
(a0-1 (math-camera-pos))
(a1-0 (-> this trans))
@@ -831,7 +831,7 @@
(none)
)
(defmethod edit-get-distance editable-point ((this editable-point) (arg0 vector))
(defmethod edit-get-distance ((this editable-point) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((a0-1 (new 'stack-no-clear 'sphere))
(s5-0 (new 'stack-no-clear 'vector))
@@ -850,7 +850,7 @@
-1.0
)
(defmethod editable-method-19 editable-point ((this editable-point) (arg0 vector))
(defmethod editable-method-19 ((this editable-point) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -865,7 +865,7 @@
(none)
)
(defmethod editable-method-22 editable-point ((this editable-point) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-point) (arg0 editable-array) (arg1 int) (arg2 int))
(case arg1
((2)
(let ((s3-0 (clear *temp-string*)))
@@ -891,7 +891,7 @@
)
)
(defmethod editable-method-17 editable-sphere ((this editable-sphere) (arg0 vector))
(defmethod editable-method-17 ((this editable-sphere) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -910,7 +910,7 @@
(none)
)
(defmethod editable-method-22 editable-sphere ((this editable-sphere) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-sphere) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((gp-0 (clear *temp-string*)))
(format
gp-0
@@ -925,7 +925,7 @@
)
)
(defmethod editable-method-22 editable-sample ((this editable-sample) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-sample) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((s5-0 (clear *temp-string*)))
(format
s5-0
@@ -944,7 +944,7 @@
)
)
(defmethod print editable-light ((this editable-light))
(defmethod print ((this editable-light))
(format
#t
"#<~A~S ~S ~m ~m ~m"
@@ -962,7 +962,7 @@
this
)
(defmethod editable-method-23 editable-light ((this editable-light))
(defmethod editable-method-23 ((this editable-light))
(let ((v1-0 *light-hash*))
(let* ((a2-0 (-> v1-0 num-lights))
(a1-1 (-> v1-0 light-sphere-array a2-0))
@@ -999,7 +999,7 @@
(none)
)
(defmethod editable-method-17 editable-light ((this editable-light) (arg0 vector))
(defmethod editable-method-17 ((this editable-light) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1019,7 +1019,7 @@
(none)
)
(defmethod editable-method-15 editable-light ((this editable-light) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable-light) (arg0 vector) (arg1 int))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1034,7 +1034,7 @@
)
;; WARN: Function (method 25 editable-light) has a return type of none, but the expression builder found a return statement.
(defmethod editable-method-25 editable-light ((this editable-light) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-light) (arg0 editable-array))
(call-parent-method this arg0)
(when (nonzero? (-> this id))
(let ((s5-1 (clear *temp-string*)))
@@ -1051,7 +1051,7 @@
(none)
)
(defmethod editable-method-22 editable-light ((this editable-light) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-light) (arg0 editable-array) (arg1 int) (arg2 int))
(cond
((logtest? (-> this flags) (editable-flag changed))
(let ((s5-0 (clear *temp-string*)))
@@ -1124,7 +1124,7 @@
)
)
(defmethod editable-method-10 editable-light ((this editable-light))
(defmethod editable-method-10 ((this editable-light))
(if (!= (-> this direction w) 0.0)
(add-debug-vector
#t
@@ -1148,7 +1148,7 @@
(none)
)
(defmethod edit-get-trans editable-face ((this editable-face))
(defmethod edit-get-trans ((this editable-face))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
"The center of the obj."
(cond
@@ -1175,7 +1175,7 @@
)
)
(defmethod editable-method-22 editable-face ((this editable-face) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-face) (arg0 editable-array) (arg1 int) (arg2 int))
(let ((s4-0 (clear *temp-string*)))
(format s4-0 "insert into region_face set kind='face',region_id=~D" (-> this region id))
(if (logtest? (-> this flags) (editable-flag orient))
@@ -1194,7 +1194,7 @@
#t
)
(defmethod editable-method-25 editable-face ((this editable-face) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-face) (arg0 editable-array))
(dotimes (s4-0 (-> this length))
(let ((s3-0 (-> this vertex s4-0)))
(set! (-> s3-0 owner) (delete! this (-> s3-0 owner)))
@@ -1204,7 +1204,7 @@
(none)
)
(defmethod editable-method-26 editable-face ((this editable-face) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable-face) (arg0 editable) (arg1 editable-array))
(-> this length)
(countdown (v1-1 (-> this length))
(when (= (-> this vertex v1-1) arg0)
@@ -1227,7 +1227,7 @@
)
;; WARN: Return type mismatch editable-face vs editable.
(defmethod editable-method-27 editable-face ((this editable-face) (arg0 editable-array))
(defmethod editable-method-27 ((this editable-face) (arg0 editable-array))
(let ((gp-1 (the-as editable-face (call-parent-method this arg0))))
(dotimes (s4-0 (-> gp-1 length))
(set! (-> gp-1 vertex s4-0) (the-as editable-point (editable-method-27 (-> gp-1 vertex s4-0) arg0)))
@@ -1237,7 +1237,7 @@
)
)
(defmethod editable-method-24 editable-face ((this editable-face))
(defmethod editable-method-24 ((this editable-face))
(logxor! (-> this flags) (editable-flag orient))
(editable-face-method-31 this (-> this normal))
(logior! (-> this flags) (editable-flag changed))
@@ -1246,7 +1246,7 @@
(none)
)
(defmethod editable-face-method-30 editable-face ((this editable-face) (arg0 (inline-array vector)))
(defmethod editable-face-method-30 ((this editable-face) (arg0 (inline-array vector)))
(let ((v1-0 (-> this length)))
(cond
((or (zero? v1-0) (= v1-0 1))
@@ -1275,7 +1275,7 @@
)
)
(defmethod editable-face-method-31 editable-face ((this editable-face) (arg0 vector))
(defmethod editable-face-method-31 ((this editable-face) (arg0 vector))
(let ((s4-0 (new 'stack-no-clear 'matrix)))
(dotimes (v1-0 6)
(set! (-> s4-0 quad v1-0) (the-as uint128 0))
@@ -1290,7 +1290,7 @@
arg0
)
(defmethod edit-get-distance editable-face ((this editable-face) (arg0 vector))
(defmethod edit-get-distance ((this editable-face) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (editable-face-method-31 this (new 'stack-no-clear 'vector)))
@@ -1325,7 +1325,7 @@
)
;; WARN: Return type mismatch int vs symbol.
(defmethod editable-method-29 editable-face ((this editable-face) (arg0 editable-filter))
(defmethod editable-method-29 ((this editable-face) (arg0 editable-filter))
(local-vars
(sv-208 (inline-array vector))
(sv-216 int)
@@ -1495,7 +1495,7 @@
(the-as symbol 0)
)
(defmethod editable-method-10 editable-face ((this editable-face))
(defmethod editable-method-10 ((this editable-face))
;; Greatly simplify the code here
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
(dotimes (point-idx 4)
@@ -1590,7 +1590,7 @@
(none)
)
(defmethod edit-get-trans editable-plane ((this editable-plane))
(defmethod edit-get-trans ((this editable-plane))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
(if (>= (-> this length) 1)
(edit-get-trans (-> this vertex 0))
@@ -1598,7 +1598,7 @@
)
)
(defmethod editable-method-22 editable-plane ((this editable-plane) (arg0 editable-array) (arg1 int) (arg2 int))
(defmethod editable-method-22 ((this editable-plane) (arg0 editable-array) (arg1 int) (arg2 int))
(format 0 "TODO - UPDATE THIS")
;; (let ((s4-0 (clear *temp-string*)))
;; (format
@@ -1620,31 +1620,25 @@
#t
)
(defmethod editable-method-25 editable-plane ((this editable-plane) (arg0 editable-array))
(defmethod editable-method-25 ((this editable-plane) (arg0 editable-array))
(dotimes (s4-0 (-> this length))
(let ((s3-0 (-> this vertex s4-0)))
(set! (-> s3-0 owner) (delete! this (-> s3-0 owner)))
)
)
((the-as (function editable-plane editable-array none) (find-parent-method editable-plane 25)) this arg0)
(call-parent-method this arg0)
(none)
)
(defmethod editable-method-26 editable-plane ((this editable-plane) (arg0 editable) (arg1 editable-array))
(defmethod editable-method-26 ((this editable-plane) (arg0 editable) (arg1 editable-array))
(editable-array-method-15 arg1 this)
((method-of-type editable editable-method-26) this arg0 arg1)
(none)
)
;; WARN: Return type mismatch editable-plane vs editable.
(defmethod editable-method-27 editable-plane ((this editable-plane) (arg0 editable-array))
(let ((gp-1
(the-as
editable-plane
((the-as (function editable-plane editable-array editable) (find-parent-method editable-plane 27)) this arg0)
)
)
)
(defmethod editable-method-27 ((this editable-plane) (arg0 editable-array))
(let ((gp-1 (the-as editable-plane (call-parent-method this arg0))))
(dotimes (s4-0 (-> gp-1 length))
(set! (-> gp-1 vertex s4-0) (the-as editable-point (editable-method-27 (-> gp-1 vertex s4-0) arg0)))
(set! (-> gp-1 vertex s4-0 owner) (cons gp-1 (-> gp-1 vertex s4-0 owner)))
@@ -1653,7 +1647,7 @@
)
)
(defmethod editable-method-24 editable-plane ((this editable-plane))
(defmethod editable-method-24 ((this editable-plane))
(let ((s5-1
(vector-!
(new 'stack-no-clear 'vector)
@@ -1674,7 +1668,7 @@
(none)
)
(defmethod editable-plane-method-30 editable-plane ((this editable-plane) (arg0 (inline-array vector)))
(defmethod editable-plane-method-30 ((this editable-plane) (arg0 (inline-array vector)))
;; og:preserve-this
;; This function converts 2 points (defining the normal) along with the radius into the 4 points that describe the plane
;; this means that they can only generate square planes, so this code is no longer used
@@ -1713,7 +1707,7 @@
0
)
(defmethod editable-plane-method-31 editable-plane ((this editable-plane) (arg0 vector))
(defmethod editable-plane-method-31 ((this editable-plane) (arg0 vector))
(case (-> this length)
((2)
(let ((s3-0 (-> this vertex 0))
@@ -1727,7 +1721,7 @@
arg0
)
(defmethod edit-get-distance editable-plane ((this editable-plane) (arg0 vector))
(defmethod edit-get-distance ((this editable-plane) (arg0 vector))
"Returns the distance from the camera to the [[editable]], or -1.0"
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (editable-plane-method-31 this (new 'stack-no-clear 'vector)))
@@ -1762,7 +1756,7 @@
-1.0
)
(defmethod editable-method-10 editable-plane ((this editable-plane))
(defmethod editable-method-10 ((this editable-plane))
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
(dotimes (point-idx 4)
;; (inspect this)
@@ -1793,7 +1787,7 @@
(none)
)
(defmethod editable-method-17 editable-plane ((this editable-plane) (arg0 vector))
(defmethod editable-method-17 ((this editable-plane) (arg0 vector))
(format 0 "TODO - UPDATE THIS")
;; (let ((v1-0 (-> this region)))
;; (if v1-0
@@ -1814,7 +1808,7 @@
)
;; WARN: Return type mismatch (array editable) vs editable-array.
(defmethod relocate editable-array ((this editable-array) (arg0 int))
(defmethod relocate ((this editable-array) (arg0 int))
(the-as editable-array (when (nonzero? (-> this selection))
(let ((v0-0 (&+ (-> this selection) arg0)))
(set! (-> this selection) v0-0)
@@ -1824,16 +1818,16 @@
)
)
(defmethod length editable-array ((this editable-array))
(defmethod length ((this editable-array))
(-> this length)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of editable-array ((this editable-array))
(defmethod asize-of ((this editable-array))
(the-as int (+ (-> this type size) (* (-> this allocated-length) 4)))
)
(defmethod editable-array-method-11 editable-array ((this editable-array))
(defmethod editable-array-method-11 ((this editable-array))
(dotimes (v1-0 (-> this length))
(if (not (-> this data v1-0))
(return v1-0)
@@ -1846,7 +1840,7 @@
-1
)
(defmethod editable-array-method-10 editable-array ((this editable-array) (arg0 vector) (arg1 int))
(defmethod editable-array-method-10 ((this editable-array) (arg0 vector) (arg1 int))
(when (or (!= (-> arg0 x) (-> *editable-work* last-x)) (!= (-> arg0 y) (-> *editable-work* last-y)))
(set! (-> *editable-work* last-found) 0)
(set! (-> *editable-work* last-x) (-> arg0 x))
@@ -1917,7 +1911,7 @@
)
)
(defmethod editable-array-method-14 editable-array ((this editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
(defmethod editable-array-method-14 ((this editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
(let ((gp-0 (-> this selection)))
(set! (-> gp-0 length) 0)
(let* ((s2-0 (-> this length))
@@ -1939,7 +1933,7 @@
)
)
(defmethod editable-array-method-15 editable-array ((this editable-array) (arg0 editable))
(defmethod editable-array-method-15 ((this editable-array) (arg0 editable))
(let ((gp-0 (-> arg0 region)))
(when gp-0
(editable-method-25 arg0 this)
@@ -1977,7 +1971,7 @@
;; WARN: Return type mismatch symbol vs none.
;; WARN: Function (method 12 editable-array) has a return type of none, but the expression builder found a return statement.
(defmethod editable-array-method-12 editable-array ((this editable-array) (arg0 editable-array))
(defmethod editable-array-method-12 ((this editable-array) (arg0 editable-array))
(local-vars
(sv-16 sql-result)
(sv-20 sql-result)
@@ -2250,7 +2244,7 @@
)
)
)
(set! sv-64 (+ sv-64 12))
(set! sv-64 (+ sv-64 5))
)
(let* ((v1-293 (-> this length))
(a0-158 0)
@@ -2364,7 +2358,7 @@
(none)
)
(defmethod editable-array-method-13 editable-array ((this editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
(defmethod editable-array-method-13 ((this editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
(set! (-> this target) #f)
(set! (-> this target-mode) arg0)
(set! (-> this target-command) arg1)
@@ -2373,7 +2367,7 @@
(none)
)
(defmethod editable-array-method-16 editable-array ((this editable-array))
(defmethod editable-array-method-16 ((this editable-array))
(cond
((-> this edit-plane)
(editable-plane-method-31 (-> this edit-plane) (-> this edit-plane-normal))
@@ -2390,7 +2384,7 @@
(none)
)
(defmethod editable-array-method-17 editable-array ((this editable-array) (arg0 vector) (arg1 vector))
(defmethod editable-array-method-17 ((this editable-array) (arg0 vector) (arg1 vector))
(cond
((and (cpad-hold? 0 up) *target*)
(set! (-> arg0 quad) (-> (get-trans *target* 0) quad))
+37 -46
View File
@@ -88,69 +88,60 @@
)
(deftype history-elt (structure)
((record-tag-bytes uint8 4 :offset-assert 0)
(record-tag uint32 :offset 0)
(record-id uint16 :offset 0)
(owner uint8 :offset 2)
(channel history-channel :offset-assert 4)
(timestamp time-frame :offset-assert 8)
(origin vector :inline :offset-assert 16)
(bytes uint8 16 :offset-assert 32)
(vector vector :inline :offset 32)
(float float :offset 32)
(collide-status collide-status :offset 32)
(collide-reaction-flag uint32 :offset 40)
(pat pat-surface :offset 32)
((record-tag-bytes uint8 4)
(record-tag uint32 :overlay-at (-> record-tag-bytes 0))
(record-id uint16 :overlay-at (-> record-tag-bytes 0))
(owner uint8 :overlay-at (-> record-tag-bytes 2))
(channel history-channel)
(timestamp time-frame)
(origin vector :inline)
(bytes uint8 16)
(vector vector :inline :overlay-at (-> bytes 0))
(float float :overlay-at (-> bytes 0))
(collide-status collide-status :overlay-at (-> bytes 0))
(collide-reaction-flag uint32 :overlay-at (-> bytes 8))
(pat pat-surface :overlay-at (-> bytes 0))
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(deftype history-iterator (basic)
((max-age uint32 :offset-assert 4)
(owner uint8 :offset-assert 8)
(proc process :offset-assert 12)
(out object :offset-assert 16)
(channel-mask uint64 :offset-assert 24)
(index int32 :offset-assert 32)
(done? symbol :offset-assert 36)
((max-age uint32)
(owner uint8)
(proc process)
(out object)
(channel-mask uint64)
(index int32)
(done? symbol)
)
:method-count-assert 12
:size-assert #x28
:flag-assert #xc00000028
(:methods
(new (symbol type uint) _type_ 0)
(frame-counter-delta (_type_ history-elt) time-frame 9)
(update-entries! (_type_) history-elt 10)
(get-age (_type_ history-elt) float 11)
(new (symbol type uint) _type_)
(frame-counter-delta (_type_ history-elt) time-frame)
(update-entries! (_type_) history-elt)
(get-age (_type_ history-elt) float)
)
)
(deftype history (basic)
((alloc-index int32 :offset-assert 4)
(allocated-length int32 :offset-assert 8)
(elts history-elt :inline :dynamic :offset 16)
((alloc-index int32)
(allocated-length int32)
(elts history-elt :inline :dynamic :offset 16)
)
:method-count-assert 11
:size-assert #x10
:flag-assert #xb00000010
(:methods
(new (symbol type int) _type_ 0)
(clear-record-tags! (_type_ history-channel uint uint) history-elt 9)
(clear-history-entries! (_type_) none 10)
(new (symbol type int) _type_)
(clear-record-tags! (_type_ history-channel uint uint) history-elt)
(clear-history-entries! (_type_) none)
)
)
(defmethod length history ((this history))
(defmethod length ((this history))
(-> this allocated-length)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of history ((this history))
(defmethod asize-of ((this history))
(the-as int (+ (-> this type size) (* 48 (-> this allocated-length))))
)
@@ -161,7 +152,7 @@
)
)
(defmethod clear-history-entries! history ((this history))
(defmethod clear-history-entries! ((this history))
"Iterates through each [[history-elt]] in the `elt` dynamic array
For each entry:
- clear `timestamp`
@@ -183,7 +174,7 @@ For each entry:
(clear-history-entries! *history*)
;; WARN: new jak 2 until loop case, check carefully
(defmethod clear-record-tags! history ((this history) (arg0 history-channel) (arg1 uint) (arg2 uint))
(defmethod clear-record-tags! ((this history) (arg0 history-channel) (arg1 uint) (arg2 uint))
"First grab the latest [[history-elt]] at `alloc-index`
1. update it's `channel`, `record-id` and `owner` from the provided args
2. - if it's `record-tag` is zero -- return it
@@ -235,7 +226,7 @@ For each entry:
)
)
(defmethod update-entries! history-iterator ((this history-iterator))
(defmethod update-entries! ((this history-iterator))
"Iterate through each [[history-elt]] in [[*history*]]
- If we hit the end set `done?` to true
- If the `timestamp` on the elt, minus the current framecounter exceeds `max-age`, we are also done, return #f
@@ -269,7 +260,7 @@ For each entry:
(the-as history-elt #f)
)
(defmethod get-age history-iterator ((this history-iterator) (arg0 history-elt))
(defmethod get-age ((this history-iterator) (arg0 history-elt))
"Get the age of a history element"
(- 1.0 (fmin 1.0 (/ (the float (+ (- 1 (-> arg0 timestamp)) (-> *display* base-clock frame-counter)))
(the float (+ (-> this max-age) 1))
@@ -278,7 +269,7 @@ For each entry:
)
)
(defmethod frame-counter-delta history-iterator ((this history-iterator) (arg0 history-elt))
(defmethod frame-counter-delta ((this history-iterator) (arg0 history-elt))
"Returns the difference between [[*display*]]'s `base-clock.frame-counter` and the elt's `timestamp`"
(- (-> *display* base-clock frame-counter) (-> arg0 timestamp))
)
+10 -16
View File
@@ -105,29 +105,23 @@
(declare-file (debug))
(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
)
(deftype memory-usage-block (basic)
((work-bsp basic :offset-assert 4)
(length int32 :offset-assert 8)
(data memory-usage-info 112 :inline :offset-assert 16)
((work-bsp basic)
(length int32)
(data memory-usage-info 112 :inline)
)
:method-count-assert 12
:size-assert #x710
:flag-assert #xc00000710
(:methods
(reset! (_type_) _type_ 9)
(calculate-total (_type_) int 10)
(print-mem-usage (_type_ level object) _type_ 11)
(reset! (_type_) _type_)
(calculate-total (_type_) int)
(print-mem-usage (_type_ level object) _type_)
)
)
+6 -6
View File
@@ -39,11 +39,11 @@
obj
)
(defmethod mem-usage object ((this object) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((this object) (arg0 memory-usage-block) (arg1 int))
this
)
(defmethod calculate-total memory-usage-block ((this memory-usage-block))
(defmethod calculate-total ((this memory-usage-block))
"@returns The total sum of all [[memory-usage-info]] `total`s"
(let ((sum 0))
(dotimes (idx (-> this length))
@@ -53,7 +53,7 @@
)
)
(defmethod reset! memory-usage-block ((this memory-usage-block))
(defmethod reset! ((this memory-usage-block))
"Sets `length` to 0 as well as resets all fields except `name` in the associated [[memory-usage-info]]"
(set! (-> this length) 0)
(dotimes (idx 112)
@@ -78,7 +78,7 @@
)
)
(defmethod compute-memory-usage! level ((this level) (force? symbol))
(defmethod compute-memory-usage! ((this level) (force? symbol))
"Calculates the memory usage of the level, returns and stores the [[memory-usage-block]]
in `mem-usage-block` as well as the total size in `mem-usage`
@@ -97,7 +97,7 @@ in `mem-usage-block` as well as the total size in `mem-usage`
(-> this mem-usage-block)
)
(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 90))
(let* ((a0-1 *dead-pool-list*)
(a3-0 (car a0-1))
@@ -310,7 +310,7 @@ in `mem-usage-block` as well as the total size in `mem-usage`
(define *max-dma* 0)
(defmethod print-mem-usage memory-usage-block ((this memory-usage-block) (level level) (fmt-dest object))
(defmethod print-mem-usage ((this memory-usage-block) (level level) (fmt-dest object))
(local-vars (sv-16 object) (sv-32 string) (sv-48 int))
(let ((s3-0 (&- (-> level heap current) (the-as uint (-> level heap base)))))
(let ((v1-2 (+ (-> this data 61 total) (-> this data 62 total))))
+58 -81
View File
@@ -11,21 +11,18 @@
(declare-file (debug))
(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 int none) :offset-assert 48)
(joypad-item basic :offset-assert 52)
(font font-context :offset-assert 56)
(is-hidden symbol :offset-assert 60)
(joypad-number int32 :offset-assert 64)
((is-active symbol)
(sel-length int32)
(sel-menu debug-menu 8)
(root-menu debug-menu)
(joypad-func (function basic int none))
(joypad-item basic)
(font font-context)
(is-hidden symbol)
(joypad-number int32)
)
:method-count-assert 9
:size-assert #x44
:flag-assert #x900000044
(:methods
(new (symbol type) _type_ 0)
(new (symbol type) _type_)
)
)
@@ -39,6 +36,7 @@
(set! (-> gp-0 joypad-func) #f)
(set! (-> gp-0 joypad-item) #f)
(set! (-> gp-0 font)
;; og:preserve-this
(new 'debug 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning pc-hack))
)
(set! (-> gp-0 joypad-number) 0)
@@ -47,34 +45,28 @@
)
(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
)
(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
)
(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_)
)
)
@@ -91,22 +83,16 @@
)
(deftype debug-menu-item (debug-menu-node)
((id int32 :offset-assert 20)
((id int32)
)
:method-count-assert 9
:size-assert #x18
:flag-assert #x900000018
)
(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_)
)
)
@@ -124,14 +110,11 @@
)
(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_)
)
)
@@ -150,14 +133,11 @@
)
(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_)
)
)
@@ -182,38 +162,35 @@
)
(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_)
)
)
+84 -108
View File
@@ -84,152 +84,128 @@
(declare-file (debug))
(deftype mysql-nav-node (structure)
((mysql-save-flag mysql-save-flag :offset-assert 0)
(runtime-id uint32 :offset-assert 4)
(temp-edge-list (inline-array mysql-nav-edge) :offset-assert 8)
(level-node-index int32 :offset-assert 12)
(cam-dist float :offset-assert 16)
(visible symbol :offset-assert 20)
(nav_node_id uint32 :offset-assert 24)
(nav_graph_id uint32 :offset-assert 28)
(position vector :inline :offset-assert 32)
(level_name symbol :offset-assert 48)
(angle float :offset-assert 52)
(radius float :offset-assert 56)
(nav_node_flag nav-node-flag :offset-assert 60)
(nav_mesh_id uint32 :offset-assert 64)
((mysql-save-flag mysql-save-flag)
(runtime-id uint32)
(temp-edge-list (inline-array mysql-nav-edge))
(level-node-index int32)
(cam-dist float)
(visible symbol)
(nav_node_id uint32)
(nav_graph_id uint32)
(position vector :inline)
(level_name symbol)
(angle float)
(radius float)
(nav_node_flag nav-node-flag)
(nav_mesh_id uint32)
)
:pack-me
:method-count-assert 11
:size-assert #x44
:flag-assert #xb00000044
(:methods
(exec-sql! (_type_) symbol 9)
(temp-edge-size (_type_) int 10)
(exec-sql! (_type_) symbol)
(temp-edge-size (_type_) int)
)
)
(deftype mysql-nav-node-array (inline-array-class)
((data mysql-nav-node :inline :dynamic :offset-assert 16)
((data mysql-nav-node :inline :dynamic)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(set! (-> mysql-nav-node-array heap-base) (the-as uint 80))
(deftype mysql-nav-edge (structure)
((mysql-save-flag mysql-save-flag :offset-assert 0)
(runtime-id uint32 :offset-assert 4)
(runtime-node-id-1 int32 :offset-assert 8)
(runtime-node-id-2 int32 :offset-assert 12)
(temp-next-edge mysql-nav-edge :offset-assert 16)
(nav_edge_id uint32 :offset-assert 20)
(nav_graph_id uint32 :offset-assert 24)
(nav_node_id_1 uint32 :offset-assert 28)
(nav_node_id_2 uint32 :offset-assert 32)
(directionality nav-directionality :offset-assert 36)
(speed_limit float :offset-assert 40)
(density float :offset-assert 44)
(traffic_edge_flag int32 :offset-assert 48)
(nav_clock_mask nav-clock-mask :offset-assert 52)
(nav_clock_type nav-clock-type :offset-assert 56)
(width float :offset-assert 60)
(minimap_edge_flag nav-minimap-edge-flag :offset-assert 64)
((mysql-save-flag mysql-save-flag)
(runtime-id uint32)
(runtime-node-id-1 int32)
(runtime-node-id-2 int32)
(temp-next-edge mysql-nav-edge)
(nav_edge_id uint32)
(nav_graph_id uint32)
(nav_node_id_1 uint32)
(nav_node_id_2 uint32)
(directionality nav-directionality)
(speed_limit float)
(density float)
(traffic_edge_flag int32)
(nav_clock_mask nav-clock-mask)
(nav_clock_type nav-clock-type)
(width float)
(minimap_edge_flag nav-minimap-edge-flag)
)
:allow-misaligned
:method-count-assert 10
:size-assert #x44
:flag-assert #xa00000044
(:methods
(exec-sql! (_type_) symbol 9)
(exec-sql! (_type_) symbol)
)
)
(deftype mysql-nav-edge-array (inline-array-class)
((data mysql-nav-edge :inline :dynamic :offset-assert 16)
((data mysql-nav-edge :inline :dynamic)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(set! (-> mysql-nav-edge-array heap-base) (the-as uint 80))
(deftype mysql-nav-visnode (structure)
((mysql-save-flag mysql-save-flag :offset-assert 0)
(runtime-node-id int32 :offset-assert 4)
(runtime-edge-id int32 :offset-assert 8)
(nav_visnode_id uint32 :offset-assert 12)
(nav_graph_id uint32 :offset-assert 16)
(nav_node_id uint32 :offset-assert 20)
(nav_edge_id uint32 :offset-assert 24)
((mysql-save-flag mysql-save-flag)
(runtime-node-id int32)
(runtime-edge-id int32)
(nav_visnode_id uint32)
(nav_graph_id uint32)
(nav_node_id uint32)
(nav_edge_id uint32)
)
:method-count-assert 10
:size-assert #x1c
:flag-assert #xa0000001c
(:methods
(exec-sql! (_type_) symbol 9)
(exec-sql! (_type_) symbol)
)
)
(deftype mysql-nav-visnode-array (inline-array-class)
((data mysql-nav-visnode :inline :dynamic :offset-assert 16)
((data mysql-nav-visnode :inline :dynamic)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(set! (-> mysql-nav-visnode-array heap-base) (the-as uint 32))
(deftype mysql-nav-graph-level-info (structure)
((level symbol :offset-assert 0)
(level-id uint32 :offset-assert 4)
(node-count int32 :offset-assert 8)
(branch-count int32 :offset-assert 12)
(to-link-count int32 :offset-assert 16)
((level symbol)
(level-id uint32)
(node-count int32)
(branch-count int32)
(to-link-count int32)
)
:allow-misaligned
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
(deftype mysql-nav-graph (basic)
((nav_graph_id uint32 :offset-assert 4)
(node-array mysql-nav-node-array :offset-assert 8)
(edge-array mysql-nav-edge-array :offset-assert 12)
(visnode-array mysql-nav-visnode-array :offset-assert 16)
(level-info-array-length int32 :offset-assert 20)
(level-info-last-lookup int32 :offset-assert 24)
(level-info-array mysql-nav-graph-level-info 32 :inline :offset-assert 28)
((nav_graph_id uint32)
(node-array mysql-nav-node-array)
(edge-array mysql-nav-edge-array)
(visnode-array mysql-nav-visnode-array)
(level-info-array-length int32)
(level-info-last-lookup int32)
(level-info-array mysql-nav-graph-level-info 32 :inline)
)
:method-count-assert 21
:size-assert #x41c
:flag-assert #x150000041c
(:methods
(new (symbol type string) _type_ 0)
(init-from-sql! (_type_ string string) symbol 9)
(exec-sql! (_type_) symbol 10)
(indexof-nav-node (_type_ int) int 11)
(indexof-nav-edge (_type_ int) int 12)
(alloc-new-node! (_type_) int 13)
(alloc-new-edge! (_type_) int 14)
(indexof-visnode (_type_ int int) int 15)
(alloc-new-visnode! (_type_ int int) int 16)
(mysql-nav-graph-method-17 (_type_) none 17)
(lookup-level-info2 (_type_ mysql-nav-node symbol) mysql-nav-graph-level-info 18)
(mysql-nav-graph-method-19 (_type_) none 19)
(mysql-nav-graph-method-20 (_type_) none 20)
(new (symbol type string) _type_)
(init-from-sql! (_type_ string string) symbol)
(exec-sql! (_type_) symbol)
(indexof-nav-node (_type_ int) int)
(indexof-nav-edge (_type_ int) int)
(alloc-new-node! (_type_) int)
(alloc-new-edge! (_type_) int)
(indexof-visnode (_type_ int int) int)
(alloc-new-visnode! (_type_ int int) int)
(mysql-nav-graph-method-17 (_type_) none)
(lookup-level-info2 (_type_ mysql-nav-node symbol) mysql-nav-graph-level-info)
(mysql-nav-graph-method-19 (_type_) none)
(mysql-nav-graph-method-20 (_type_) none)
)
)
@@ -260,7 +236,7 @@
)
)
(defmethod alloc-new-node! mysql-nav-graph ((this mysql-nav-graph))
(defmethod alloc-new-node! ((this mysql-nav-graph))
"Allocates a new `[[mysql-nav-node]]`, if `node-array`'s `length` exceeds `3000` return `-1`
otherwise, return the new size of the array"
(cond
@@ -284,7 +260,7 @@ otherwise, return the new size of the array"
)
)
(defmethod alloc-new-edge! mysql-nav-graph ((this mysql-nav-graph))
(defmethod alloc-new-edge! ((this mysql-nav-graph))
"Allocates a new `[[mysql-nav-edge]]`, if `edge-array`'s `length` exceeds `5000` return `-1`
otherwise, return the new size of the array"
(cond
@@ -308,7 +284,7 @@ otherwise, return the new size of the array"
)
)
(defmethod indexof-visnode mysql-nav-graph ((this mysql-nav-graph) (edge-id int) (node-id int))
(defmethod indexof-visnode ((this mysql-nav-graph) (edge-id int) (node-id int))
"Returns the index in the `visnode-array` whom's [[mysql-nav-visnode]] has the provided `runtime-edge-id` and `runtime-node-id`
if none exist, return `-1`"
(dotimes (v1-0 (-> this visnode-array length))
@@ -321,7 +297,7 @@ if none exist, return `-1`"
-1
)
(defmethod alloc-new-visnode! mysql-nav-graph ((this mysql-nav-graph) (edge-id int) (node-id int))
(defmethod alloc-new-visnode! ((this mysql-nav-graph) (edge-id int) (node-id int))
"Potentially allocates a new `[[mysql-nav-visnode]]`:
- if `visnode-array`'s `length` exceeds `3000` return `-1`
- otherwise, if the node already exists, TODO
@@ -356,7 +332,7 @@ if none exist, return `-1`"
)
)
(defmethod exec-sql! mysql-nav-node ((this mysql-nav-node))
(defmethod exec-sql! ((this mysql-nav-node))
"Executes the respective SQL operation specified by `mysql-save-flag`, return value indicates success"
(if (and (logtest? (-> this mysql-save-flag) (mysql-save-flag insert))
(logtest? (-> this mysql-save-flag) (mysql-save-flag delete))
@@ -461,7 +437,7 @@ if none exist, return `-1`"
#t
)
(defmethod exec-sql! mysql-nav-edge ((this mysql-nav-edge))
(defmethod exec-sql! ((this mysql-nav-edge))
"Executes the respective SQL operation specified by `mysql-save-flag`, return value indicates success"
(if (and (logtest? (-> this mysql-save-flag) (mysql-save-flag insert))
(logtest? (-> this mysql-save-flag) (mysql-save-flag delete))
@@ -665,7 +641,7 @@ if none exist, return `-1`"
#t
)
(defmethod exec-sql! mysql-nav-visnode ((this mysql-nav-visnode))
(defmethod exec-sql! ((this mysql-nav-visnode))
"Executes the respective SQL operation specified by `mysql-save-flag`, return value indicates success"
(if (and (logtest? (-> this mysql-save-flag) (mysql-save-flag insert))
(logtest? (-> this mysql-save-flag) (mysql-save-flag delete))
@@ -719,7 +695,7 @@ if none exist, return `-1`"
#t
)
(defmethod indexof-nav-node mysql-nav-graph ((this mysql-nav-graph) (node-id int))
(defmethod indexof-nav-node ((this mysql-nav-graph) (node-id int))
"Iterate through the `node-array` and return the index for the first [[mysql-nav-node]] whom's `nav_node_id` matches the provided id
returns `-1` if none is found"
(dotimes (v1-0 (-> this node-array length))
@@ -730,7 +706,7 @@ returns `-1` if none is found"
-1
)
(defmethod indexof-nav-edge mysql-nav-graph ((this mysql-nav-graph) (edge-id int))
(defmethod indexof-nav-edge ((this mysql-nav-graph) (edge-id int))
"Iterate through the `edge-array` and return the index for the first [[mysql-nav-edge]] whom's `nav_edge_id` matches the provided id
returns `-1` if none is found"
(dotimes (v1-0 (-> this edge-array length))
@@ -748,7 +724,7 @@ returns `-1` if none is found"
;; WARN: new jak 2 until loop case, check carefully
;; WARN: new jak 2 until loop case, check carefully
;; WARN: new jak 2 until loop case, check carefully
(defmethod init-from-sql! mysql-nav-graph ((this mysql-nav-graph) (arg0 string) (arg1 string))
(defmethod init-from-sql! ((this mysql-nav-graph) (arg0 string) (arg1 string))
"Query the database and initialize the [[mysql-nav-graph]] and all it's related components"
(local-vars (sv-16 string) (sv-32 int) (sv-48 int) (sv-64 int))
(set! (-> this node-array length) 0)
@@ -1080,7 +1056,7 @@ returns `-1` if none is found"
#t
)
(defmethod temp-edge-size mysql-nav-node ((this mysql-nav-node))
(defmethod temp-edge-size ((this mysql-nav-node))
"Returns the number of [[mysql-nav-edge]] stored in the `temp-edge-list`"
(let ((v0-0 0))
(let ((v1-0 (the-as object (-> this temp-edge-list))))
@@ -1093,7 +1069,7 @@ returns `-1` if none is found"
)
)
(defmethod mysql-nav-graph-method-17 mysql-nav-graph ((this mysql-nav-graph))
(defmethod mysql-nav-graph-method-17 ((this mysql-nav-graph))
(dotimes (v1-0 (-> this node-array length))
(set! (-> (the-as mysql-nav-node (-> this node-array data v1-0)) temp-edge-list)
(the-as (inline-array mysql-nav-edge) #f)
@@ -1125,7 +1101,7 @@ returns `-1` if none is found"
(none)
)
(defmethod lookup-level-info2 mysql-nav-graph ((this mysql-nav-graph) (arg0 mysql-nav-node) (arg1 symbol))
(defmethod lookup-level-info2 ((this mysql-nav-graph) (arg0 mysql-nav-node) (arg1 symbol))
"TODO - this was originally called `lookup-level-info` but it clashes with the function defined in `level`"
(let ((s5-0 (the-as mysql-nav-graph-level-info #f)))
(b! (>= (-> this level-info-last-lookup) (-> this level-info-array-length)) cfg-3 :delay #f)
@@ -1193,7 +1169,7 @@ returns `-1` if none is found"
)
(defmethod mysql-nav-graph-method-20 mysql-nav-graph ((this mysql-nav-graph))
(defmethod mysql-nav-graph-method-20 ((this mysql-nav-graph))
(mysql-nav-graph-method-17 this)
(mysql-nav-graph-method-19 this)
0
+123 -131
View File
@@ -17,113 +17,105 @@
(declare-file (debug))
(deftype nav-graph-command (structure)
((com-type uint32 :offset-assert 0)
(id int32 :offset-assert 4)
(index int32 :offset-assert 8)
(move-vec vector :inline :offset-assert 16)
((com-type uint32)
(id int32)
(index int32)
(move-vec vector :inline)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
(deftype nav-graph-command-array (inline-array-class)
((data nav-graph-command :inline :dynamic :offset-assert 16)
((data nav-graph-command :inline :dynamic)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(set! (-> nav-graph-command-array heap-base) (the-as uint 32))
(deftype nav-graph-editor (process)
((self nav-graph-editor :override)
(nav-graph mysql-nav-graph :offset-assert 128)
(mode symbol :offset-assert 132)
(command-id int32 :offset-assert 136)
(max-command int32 :offset-assert 140)
(selected-index int32 :offset-assert 144)
(selected-dist float :offset-assert 148)
(selected-node-edge? symbol :offset-assert 152)
(closest-node int32 :offset-assert 156)
(dist-closest-node float :offset-assert 160)
(closest-edge int32 :offset-assert 164)
(dist-closest-edge float :offset-assert 168)
(mouse-pos vector :inline :offset-assert 176)
(mouse-hit vector :inline :offset-assert 192)
(mouse-hit-pick vector :inline :offset-assert 208)
(mouse-normal vector :inline :offset-assert 224)
(mouse-spos-hold vector :inline :offset-assert 240)
(edge-src int32 :offset-assert 256)
(edge-dst int32 :offset-assert 260)
(edge-visibility int32 :offset-assert 264)
(vehicle-edit-mode symbol :offset-assert 268)
(hover-edit-mode symbol :offset-assert 272)
(clipping-dist float :offset-assert 276)
(plane-height float :offset-assert 280)
(plane-height-hold float :offset-assert 284)
(default-node mysql-nav-node :inline :offset-assert 288)
(default-edge mysql-nav-edge :inline :offset-assert 356)
(command-array nav-graph-command-array :offset-assert 424)
((self nav-graph-editor :override)
(nav-graph mysql-nav-graph)
(mode symbol)
(command-id int32)
(max-command int32)
(selected-index int32)
(selected-dist float)
(selected-node-edge? symbol)
(closest-node int32)
(dist-closest-node float)
(closest-edge int32)
(dist-closest-edge float)
(mouse-pos vector :inline)
(mouse-hit vector :inline)
(mouse-hit-pick vector :inline)
(mouse-normal vector :inline)
(mouse-spos-hold vector :inline)
(edge-src int32)
(edge-dst int32)
(edge-visibility int32)
(vehicle-edit-mode symbol)
(hover-edit-mode symbol)
(clipping-dist float)
(plane-height float)
(plane-height-hold float)
(default-node mysql-nav-node :inline)
(default-edge mysql-nav-edge :inline)
(command-array nav-graph-command-array)
)
:heap-base #x130
:method-count-assert 64
:size-assert #x1ac
:flag-assert #x40013001ac
(:state-methods
move-node
move-plane
create
edit-edge
create-edge
adjust-plane
adjust-it
adjust-minimap
adjust-node-angle
adjust-node-radius
adjust-edge-visibility
adjust-edge-width
adjust-edge-density
draw-closest-minimap
)
(:methods
(move-node () _type_ :state 14)
(move-plane () _type_ :state 15)
(create () _type_ :state 16)
(edit-edge () _type_ :state 17)
(create-edge () _type_ :state 18)
(adjust-plane () _type_ :state 19)
(adjust-it () _type_ :state 20)
(adjust-minimap () _type_ :state 21)
(adjust-node-angle () _type_ :state 22)
(adjust-node-radius () _type_ :state 23)
(adjust-edge-visibility () _type_ :state 24)
(adjust-edge-width () _type_ :state 25)
(adjust-edge-density () _type_ :state 26)
(draw-closest-minimap () _type_ :state 27)
(nav-graph-editor-method-28 (_type_) none 28)
(nav-graph-editor-method-29 (_type_ string string string) none 29)
(nav-graph-editor-method-30 (_type_ int) symbol 30)
(nav-graph-editor-method-31 (_type_ int) symbol 31)
(nav-graph-editor-method-32 (_type_ symbol int) none 32)
(nav-graph-editor-method-33 (_type_ int) none 33)
(nav-graph-editor-method-34 (_type_) object 34)
(nav-graph-editor-method-35 (_type_) none 35)
(nav-graph-editor-method-36 (_type_) none 36)
(nav-graph-editor-method-37 (_type_) none 37)
(nav-graph-editor-method-38 (_type_) none 38)
(nav-graph-editor-method-39 (_type_) none 39)
(nav-graph-editor-method-40 (_type_) none 40)
(nav-graph-editor-method-41 (_type_) none 41)
(nav-graph-editor-method-42 (_type_) symbol 42)
(nav-graph-editor-method-43 (_type_) none 43)
(nav-graph-editor-method-44 (_type_) symbol 44)
(nav-graph-editor-method-45 (_type_) none 45)
(nav-graph-editor-method-46 (_type_) pad-buttons 46)
(nav-graph-editor-method-47 (_type_) none 47)
(nav-graph-editor-method-48 (_type_ uint) nav-graph-command 48)
(nav-graph-editor-method-49 (_type_) nav-graph-command 49)
(nav-graph-editor-method-50 (_type_) none 50)
(nav-graph-editor-method-51 (_type_) none 51)
(nav-graph-editor-method-52 (_type_) uint 52)
(nav-graph-editor-method-53 (_type_ int int) none 53)
(nav-graph-editor-method-54 (_type_ int) none 54)
(nav-graph-editor-method-55 (_type_ int) none 55)
(nav-graph-editor-method-56 (_type_ int) none 56)
(nav-graph-editor-method-57 (_type_ int int) int 57)
(nav-graph-editor-method-58 (_type_) symbol 58)
(nav-graph-editor-method-59 (_type_) pad-buttons 59)
(nav-graph-editor-method-60 (_type_) none 60)
(nav-graph-editor-method-61 (_type_) none 61)
(nav-graph-editor-method-62 (_type_ symbol symbol) none 62)
(nav-graph-editor-method-63 (_type_) none 63)
(nav-graph-editor-method-28 (_type_) none)
(nav-graph-editor-method-29 (_type_ string string string) none)
(nav-graph-editor-method-30 (_type_ int) symbol)
(nav-graph-editor-method-31 (_type_ int) symbol)
(nav-graph-editor-method-32 (_type_ symbol int) none)
(nav-graph-editor-method-33 (_type_ int) none)
(nav-graph-editor-method-34 (_type_) object)
(nav-graph-editor-method-35 (_type_) none)
(nav-graph-editor-method-36 (_type_) none)
(nav-graph-editor-method-37 (_type_) none)
(nav-graph-editor-method-38 (_type_) none)
(nav-graph-editor-method-39 (_type_) none)
(nav-graph-editor-method-40 (_type_) none)
(nav-graph-editor-method-41 (_type_) none)
(nav-graph-editor-method-42 (_type_) symbol)
(nav-graph-editor-method-43 (_type_) none)
(nav-graph-editor-method-44 (_type_) symbol)
(nav-graph-editor-method-45 (_type_) none)
(nav-graph-editor-method-46 (_type_) pad-buttons)
(nav-graph-editor-method-47 (_type_) none)
(nav-graph-editor-method-48 (_type_ uint) nav-graph-command)
(nav-graph-editor-method-49 (_type_) nav-graph-command)
(nav-graph-editor-method-50 (_type_) none)
(nav-graph-editor-method-51 (_type_) none)
(nav-graph-editor-method-52 (_type_) uint)
(nav-graph-editor-method-53 (_type_ int int) none)
(nav-graph-editor-method-54 (_type_ int) none)
(nav-graph-editor-method-55 (_type_ int) none)
(nav-graph-editor-method-56 (_type_ int) none)
(nav-graph-editor-method-57 (_type_ int int) int)
(nav-graph-editor-method-58 (_type_) symbol)
(nav-graph-editor-method-59 (_type_) pad-buttons)
(nav-graph-editor-method-60 (_type_) none)
(nav-graph-editor-method-61 (_type_) none)
(nav-graph-editor-method-62 (_type_ symbol symbol) none)
(nav-graph-editor-method-63 (_type_) none)
)
)
@@ -131,7 +123,7 @@
(define *nav-graph-editor* (the-as (pointer nav-graph-editor) #f))
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-62 nav-graph-editor ((this nav-graph-editor) (arg0 symbol) (arg1 symbol))
(defmethod nav-graph-editor-method-62 ((this nav-graph-editor) (arg0 symbol) (arg1 symbol))
(case arg0
(('minimap)
(set! (-> this vehicle-edit-mode) #t)
@@ -150,24 +142,24 @@
)
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-63 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-63 ((this nav-graph-editor))
(set! (-> this command-array length) 0)
(exec-sql! (-> this nav-graph))
(none)
)
(defmethod deactivate nav-graph-editor ((this nav-graph-editor))
(defmethod deactivate ((this nav-graph-editor))
(set! *nav-graph-editor* (the-as (pointer nav-graph-editor) #f))
((method-of-type process deactivate) this)
(none)
)
(defmethod relocate nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod relocate ((this nav-graph-editor) (arg0 int))
(call-parent-method this arg0)
)
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-60 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-60 ((this nav-graph-editor))
(let ((v0-0 (not (-> this vehicle-edit-mode))))
(set! (-> this vehicle-edit-mode) v0-0)
(set! (-> this default-node nav_node_flag) (if v0-0
@@ -180,14 +172,14 @@
)
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-61 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-61 ((this nav-graph-editor))
(set! (-> this hover-edit-mode) (not (-> this hover-edit-mode)))
(none)
)
;; WARN: Return type mismatch symbol vs none.
;; WARN: Function (method 54 nav-graph-editor) has a return type of none, but the expression builder found a return statement.
(defmethod nav-graph-editor-method-54 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-54 ((this nav-graph-editor) (arg0 int))
(when (not (-> this hover-edit-mode))
(let ((gp-0 (-> this nav-graph node-array data arg0)))
(dotimes (s5-0 (-> *level* length))
@@ -233,7 +225,7 @@
(none)
)
(defmethod nav-graph-editor-method-30 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-30 ((this nav-graph-editor) (arg0 int))
(let ((s3-0 (-> this nav-graph edge-array data arg0))
(s4-0 (new 'stack-no-clear 'matrix))
)
@@ -330,7 +322,7 @@
#f
)
(defmethod nav-graph-editor-method-33 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-33 ((this nav-graph-editor) (arg0 int))
(let* ((gp-0 (-> this nav-graph edge-array data arg0))
(s5-0 (-> this nav-graph node-array data (-> gp-0 runtime-node-id-1)))
(s3-0 (-> this nav-graph node-array data (-> gp-0 runtime-node-id-2)))
@@ -363,7 +355,7 @@
(none)
)
(defmethod nav-graph-editor-method-31 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-31 ((this nav-graph-editor) (arg0 int))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
@@ -431,7 +423,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-29 nav-graph-editor ((this nav-graph-editor) (arg0 string) (arg1 string) (arg2 string))
(defmethod nav-graph-editor-method-29 ((this nav-graph-editor) (arg0 string) (arg1 string) (arg2 string))
(format *stdcon* "~0K")
;; og:preserve-this
(format *stdcon* "~%~%~3L~18S~18S~18S~%~0L" "Left button" "Middle button" "Right button")
@@ -440,7 +432,7 @@
(none)
)
(defmethod nav-graph-editor-method-28 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-28 ((this nav-graph-editor))
(local-vars (sv-144 int) (sv-160 (function _varargs_ object)))
(rlet ((vf0 :class vf)
(vf4 :class vf)
@@ -608,7 +600,7 @@
)
)
(defmethod nav-graph-editor-method-34 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-34 ((this nav-graph-editor))
(with-pp
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -910,12 +902,12 @@
)
)
(defmethod nav-graph-editor-method-41 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-41 ((this nav-graph-editor))
(set! (-> this selected-index) -1)
(none)
)
(defmethod nav-graph-editor-method-42 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-42 ((this nav-graph-editor))
(let ((s5-0 (-> this nav-graph)))
(dotimes (s4-0 (-> s5-0 node-array length))
(let ((s3-0 (-> s5-0 node-array data s4-0)))
@@ -952,7 +944,7 @@
#f
)
(defmethod nav-graph-editor-method-44 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-44 ((this nav-graph-editor))
(set! (-> this closest-node) -1)
(set! (-> this dist-closest-node) 0.0)
(let ((s5-0 (-> this nav-graph)))
@@ -976,7 +968,7 @@
)
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-45 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-45 ((this nav-graph-editor))
(set! (-> this closest-edge) -1)
(set! (-> this dist-closest-edge) 0.0)
(let ((s5-0 (-> this nav-graph)))
@@ -1011,7 +1003,7 @@
)
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-43 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-43 ((this nav-graph-editor))
(local-vars (sv-128 vector) (sv-144 vector))
(rlet ((vf0 :class vf)
(vf4 :class vf)
@@ -1086,7 +1078,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-32 nav-graph-editor ((this nav-graph-editor) (arg0 symbol) (arg1 int))
(defmethod nav-graph-editor-method-32 ((this nav-graph-editor) (arg0 symbol) (arg1 int))
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
@@ -1155,13 +1147,13 @@
)
)
(defmethod nav-graph-editor-method-47 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-47 ((this nav-graph-editor))
(+! (-> this command-id) 1)
(-> this command-id)
(none)
)
(defmethod nav-graph-editor-method-48 nav-graph-editor ((this nav-graph-editor) (arg0 uint))
(defmethod nav-graph-editor-method-48 ((this nav-graph-editor) (arg0 uint))
"TODO - enum / com-type"
(let* ((v1-1 (-> this command-array length))
(v0-0 (-> this command-array data v1-1))
@@ -1174,18 +1166,18 @@
)
)
(defmethod nav-graph-editor-method-49 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-49 ((this nav-graph-editor))
(-> this command-array data (+ (-> this command-array length) -1))
)
(defmethod nav-graph-editor-method-50 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-50 ((this nav-graph-editor))
(+! (-> this command-array length) -1)
(set! (-> this max-command) (-> this command-array length))
(none)
)
;; WARN: new jak 2 until loop case, check carefully
(defmethod nav-graph-editor-method-58 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-58 ((this nav-graph-editor))
(if (zero? (-> this command-array length))
(return #f)
)
@@ -1242,7 +1234,7 @@
#f
)
(defmethod nav-graph-editor-method-51 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-51 ((this nav-graph-editor))
(let ((gp-0 (alloc-new-node! (-> this nav-graph))))
(when (!= gp-0 -1)
(let ((v1-6 (-> this nav-graph node-array data gp-0))
@@ -1261,7 +1253,7 @@
(none)
)
(defmethod nav-graph-editor-method-53 nav-graph-editor ((this nav-graph-editor) (arg0 int) (arg1 int))
(defmethod nav-graph-editor-method-53 ((this nav-graph-editor) (arg0 int) (arg1 int))
(let ((s5-0 (indexof-visnode (-> this nav-graph) arg0 arg1)))
(if (= s5-0 -1)
(set! s5-0 (alloc-new-visnode! (-> this nav-graph) arg0 arg1))
@@ -1275,7 +1267,7 @@
)
;; WARN: Return type mismatch int vs uint.
(defmethod nav-graph-editor-method-52 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-52 ((this nav-graph-editor))
(let ((gp-0 (alloc-new-edge! (-> this nav-graph))))
(when (!= gp-0 -1)
(let ((v1-6 (-> this nav-graph edge-array data gp-0))
@@ -1298,7 +1290,7 @@
)
)
(defmethod nav-graph-editor-method-57 nav-graph-editor ((this nav-graph-editor) (arg0 int) (arg1 int))
(defmethod nav-graph-editor-method-57 ((this nav-graph-editor) (arg0 int) (arg1 int))
(case (indexof-visnode (-> this nav-graph) arg0 arg1)
((-1)
(return (the-as int #f))
@@ -1314,7 +1306,7 @@
0
)
(defmethod nav-graph-editor-method-55 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-55 ((this nav-graph-editor) (arg0 int))
(nav-graph-editor-method-47 this)
(let ((s5-0 (-> this nav-graph node-array data arg0)))
(logior! (-> s5-0 mysql-save-flag) (mysql-save-flag delete))
@@ -1344,7 +1336,7 @@
(none)
)
(defmethod nav-graph-editor-method-56 nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod nav-graph-editor-method-56 ((this nav-graph-editor) (arg0 int))
(nav-graph-editor-method-47 this)
(let ((s5-0 (-> this nav-graph edge-array data arg0)))
(logior! (-> s5-0 mysql-save-flag) (mysql-save-flag delete))
@@ -1389,7 +1381,7 @@
(none)
)
(defmethod nav-graph-editor-method-59 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-59 ((this nav-graph-editor))
(if (cpad-pressed? 0 triangle)
(nav-graph-editor-method-58 this)
)
@@ -1400,7 +1392,7 @@
)
)
(defmethod nav-graph-editor-method-46 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-46 ((this nav-graph-editor))
(if (cpad-pressed? 0 up)
(go (method-of-object this create))
)
@@ -1427,7 +1419,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-35 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-35 ((this nav-graph-editor))
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-32 this (-> this selected-node-edge?) (-> this selected-index))
(cond
@@ -1531,7 +1523,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-38 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-38 ((this nav-graph-editor))
(nav-graph-editor-method-41 this)
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-42 this)
@@ -1616,7 +1608,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-37 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-37 ((this nav-graph-editor))
(nav-graph-editor-method-41 this)
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-42 this)
@@ -1799,7 +1791,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-39 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-39 ((this nav-graph-editor))
(nav-graph-editor-method-41 this)
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-42 this)
@@ -1858,7 +1850,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-40 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-40 ((this nav-graph-editor))
(nav-graph-editor-method-41 this)
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-43 this)
@@ -1956,7 +1948,7 @@
)
;; WARN: Return type mismatch object vs none.
(defmethod nav-graph-editor-method-36 nav-graph-editor ((this nav-graph-editor))
(defmethod nav-graph-editor-method-36 ((this nav-graph-editor))
(nav-graph-editor-method-41 this)
(nav-graph-editor-method-34 this)
(nav-graph-editor-method-42 this)
+4 -8
View File
@@ -25,14 +25,10 @@
)
(deftype part-tester (process)
((root trsqv :offset-assert 128)
(part sparticle-launch-control :offset-assert 132)
(old-group sparticle-launch-group :offset-assert 136)
((root trsqv)
(part sparticle-launch-control)
(old-group sparticle-launch-group)
)
:heap-base #x10
:method-count-assert 14
:size-assert #x8c
:flag-assert #xe0010008c
(:states
part-tester-idle
)
@@ -41,7 +37,7 @@
(define *part-tester-name* (the-as string #f))
(defmethod deactivate part-tester ((this part-tester))
(defmethod deactivate ((this part-tester))
(if (nonzero? (-> this part))
(kill-and-free-particles (-> this part))
)
+35 -51
View File
@@ -65,56 +65,50 @@
;; DECOMP BEGINS
(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
)
(deftype merc-global-stats (structure)
((merc tr-stat :inline :offset-assert 0)
(emerc tr-stat :inline :offset-assert 16)
(mercneric tr-stat :inline :offset-assert 32)
((merc tr-stat :inline)
(emerc tr-stat :inline)
(mercneric tr-stat :inline)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(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 () 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 () none)
(print-to-stream (_type_ string basic) none)
(reset! (_type_) none)
(read! (_type_) none)
(update-wait-stats (_type_ uint uint uint) none)
)
)
(defun-debug perf-stat-bucket->string ((arg0 perf-stat-bucket))
(case arg0
(((perf-stat-bucket collide-fill))
@@ -276,13 +270,9 @@
)
)
;; 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
@@ -300,9 +290,10 @@
)
(set! (-> perf-stat-array heap-base) (the-as uint 52))
;; og:preserve-this
(define *pc-perf-stat-counter* (the-as uint 0))
(defmethod reset! perf-stat ((this perf-stat))
(defmethod reset! ((this perf-stat))
; (let ((v1-0 (-> this ctrl)))
(+! (-> this count) 1)
(when (nonzero? (-> this ctrl))
@@ -326,7 +317,7 @@
)
(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!))
(when (nonzero? (-> this ctrl))
@@ -344,9 +335,7 @@
(none)
)
;; 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)
@@ -356,13 +345,8 @@
(none)
)
;; failed to figure out what this is:
(when (not *debug-segment*)
(set! (-> perf-stat method-table 11) nothing)
(set! (-> perf-stat method-table 12) nothing)
(set! (-> perf-stat method-table 13) nothing)
)
+2 -6
View File
@@ -17,12 +17,8 @@
)
(deftype viewer (process-drawable)
((janim art-joint-anim :offset-assert 200)
((janim art-joint-anim)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xcc
:flag-assert #x14005000cc
(:states
viewer-process
)
@@ -206,7 +202,7 @@
)
;; WARN: 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))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size