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
+14 -23
View File
@@ -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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -30,18 +27,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -57,17 +51,14 @@
;; 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))
(defmethod inspect ((this debug-vertex-stats))
(when (not this)
(set! this this)
(goto cfg-4)
+19 -28
View File
@@ -447,21 +447,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -480,20 +477,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 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
)
;; definition for method 3 of type debug-text-3d
(defmethod inspect debug-text-3d ((this debug-text-3d))
(defmethod inspect ((this debug-text-3d))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -511,16 +505,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -1605,7 +1596,7 @@
)
;; definition for method 3 of type debug-vertex-stats
(defmethod inspect debug-vertex-stats ((this debug-vertex-stats))
(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))
+125 -160
View File
@@ -246,30 +246,27 @@
;; definition of type editable-region
(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)
)
)
;; definition for method 3 of type editable-region
(defmethod inspect editable-region ((this editable-region))
(defmethod inspect ((this editable-region))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -290,42 +287,39 @@
;; definition of type editable
(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)
)
)
;; definition for method 3 of type editable
(defmethod inspect editable ((this editable))
(defmethod inspect ((this editable))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -381,47 +375,44 @@
;; definition of type editable-array
(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)
)
)
;; definition for method 3 of type editable-array
(defmethod inspect editable-array ((this editable-array))
(defmethod inspect ((this editable-array))
(when (not this)
(set! this this)
(goto cfg-7)
@@ -497,19 +488,16 @@
;; definition of type editable-point
(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_)
)
)
;; definition for method 3 of type editable-point
(defmethod inspect editable-point ((this editable-point))
(defmethod inspect ((this editable-point))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -591,16 +579,13 @@
;; definition of type editable-sphere
(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_)
)
)
;; definition for method 3 of type editable-sphere
(defmethod inspect editable-sphere ((this editable-sphere))
(defmethod inspect ((this editable-sphere))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -682,13 +667,10 @@
;; definition of type editable-sample
(deftype editable-sample (editable-point)
()
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
)
;; definition for method 3 of type editable-sample
(defmethod inspect editable-sample ((this editable-sample))
(defmethod inspect ((this editable-sample))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -746,22 +728,19 @@
;; definition of type editable-light
(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_)
)
)
;; definition for method 3 of type editable-light
(defmethod inspect editable-light ((this editable-light))
(defmethod inspect ((this editable-light))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -857,13 +836,10 @@
;; definition of type editable-entity
(deftype editable-entity (editable-point)
()
:method-count-assert 30
:size-assert #x30
:flag-assert #x1e00000030
)
;; definition for method 3 of type editable-entity
(defmethod inspect editable-entity ((this editable-entity))
(defmethod inspect ((this editable-entity))
(when (not this)
(set! this this)
(goto cfg-28)
@@ -921,23 +897,20 @@
;; definition of type editable-face
(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)
((length int32)
(normal vector :inline)
(center vector :inline)
(vertex editable-point 6)
)
: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)
)
)
;; definition for method 3 of type editable-face
(defmethod inspect editable-face ((this editable-face))
(defmethod inspect ((this editable-face))
(when (not this)
(set! this this)
(goto cfg-31)
@@ -1020,22 +993,19 @@
;; definition of type editable-plane
(deftype editable-plane (editable)
((length int32 :offset-assert 24)
(radius float :offset-assert 28)
(vertex editable-point 2 :offset-assert 32)
((length int32)
(radius float)
(vertex editable-point 2)
)
:method-count-assert 32
:size-assert #x28
:flag-assert #x2000000028
(: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)
)
)
;; definition for method 3 of type editable-plane
(defmethod inspect editable-plane ((this editable-plane))
(defmethod inspect ((this editable-plane))
(when (not this)
(set! this this)
(goto cfg-31)
@@ -1118,28 +1088,26 @@
;; definition of type editable-player
(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)
)
)
;; definition for method 3 of type editable-player
(defmethod inspect editable-player ((this editable-player))
(defmethod inspect ((this editable-player))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -1162,20 +1130,17 @@
;; definition of type editable-work
(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
)
;; definition for method 3 of type editable-work
(defmethod inspect editable-work ((this editable-work))
(defmethod inspect ((this editable-work))
(when (not this)
(set! this this)
(goto cfg-4)
+4 -4
View File
@@ -1110,7 +1110,7 @@
)
;; definition for method 9 of type editable-array
(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)
)
@@ -1424,7 +1424,7 @@
)
;; definition for method 10 of type editable-player
(defmethod deactivate editable-player ((this editable-player))
(defmethod deactivate ((this editable-player))
(dotimes (v1-0 (-> *level* length))
(let ((a1-3 (-> *level* level v1-0)))
(if (= (-> a1-3 status) 'active)
@@ -1440,7 +1440,7 @@
;; definition for method 7 of type editable-player
;; 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)))
@@ -1461,7 +1461,7 @@
;; definition for method 21 of type editable-player
;; WARN: Return type mismatch int vs none.
(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)
+79 -79
View File
@@ -26,14 +26,14 @@
)
;; definition for method 2 of type editable-region
(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
)
;; definition for method 10 of type editable-region
;; INFO: Used lq/sq
(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*)))
@@ -111,7 +111,7 @@
)
;; definition for method 9 of type editable-region
(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)
@@ -302,7 +302,7 @@
;; definition for method 11 of type editable-region
;; WARN: Return type mismatch int vs none.
(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))
@@ -358,7 +358,7 @@
;; definition for method 12 of type editable-region
;; 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))
@@ -425,13 +425,13 @@
)
;; definition for method 23 of type editable
(defmethod editable-method-23 editable ((this editable))
(defmethod editable-method-23 ((this editable))
#t
)
;; definition for method 28 of type editable
;; WARN: Return type mismatch int vs none.
(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))
)
@@ -447,7 +447,7 @@
;; definition for method 29 of type editable
;; 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))
)
@@ -462,7 +462,7 @@
;; definition for method 21 of type editable
;; WARN: Return type mismatch int vs none.
(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)
@@ -479,7 +479,7 @@
;; definition for method 9 of type editable
;; 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))
@@ -511,7 +511,7 @@
;; definition for method 10 of type editable
;; WARN: Return type mismatch int vs none.
(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)
@@ -527,7 +527,7 @@
;; definition for method 12 of type editable
;; WARN: Return type mismatch int vs 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))
@@ -544,14 +544,14 @@
)
;; definition for method 13 of type editable
(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
)
;; definition for method 20 of type editable
;; WARN: Return type mismatch int vs none.
(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))
@@ -571,7 +571,7 @@
;; definition for method 11 of type editable
;; INFO: Used lq/sq
(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))
@@ -596,67 +596,67 @@
;; definition for method 24 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-24 editable ((this editable))
(defmethod editable-method-24 ((this editable))
0
(none)
)
;; definition for method 17 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable ((this editable) (arg0 vector))
(defmethod editable-method-17 ((this editable) (arg0 vector))
0
(none)
)
;; definition for method 22 of type editable
(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
)
;; definition for method 15 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-15 editable ((this editable) (arg0 vector) (arg1 int))
(defmethod editable-method-15 ((this editable) (arg0 vector) (arg1 int))
0
(none)
)
;; definition for method 16 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod edit-coord! editable ((this editable) (arg0 vector) (arg1 editable-flag))
(defmethod edit-coord! ((this editable) (arg0 vector) (arg1 editable-flag))
0
(none)
)
;; definition for method 18 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-18 editable ((this editable) (arg0 vector) (arg1 matrix))
(defmethod editable-method-18 ((this editable) (arg0 vector) (arg1 matrix))
0
(none)
)
;; definition for method 14 of type editable
(defmethod edit-get-trans editable ((this editable))
(defmethod edit-get-trans ((this editable))
"Returns the `trans` [[vector]] or [[*null-vector*]]"
*null-vector*
)
;; definition for method 19 of type editable
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-19 editable ((this editable) (arg0 vector))
(defmethod editable-method-19 ((this editable) (arg0 vector))
0
(none)
)
;; definition for method 26 of type editable
;; WARN: Return type mismatch int vs 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)
)
;; definition for method 25 of type editable
;; WARN: Return type mismatch int vs 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)
@@ -677,7 +677,7 @@
)
;; definition for method 27 of type editable
(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))
@@ -719,7 +719,7 @@
)
;; definition for method 2 of type editable-point
(defmethod print editable-point ((this editable-point))
(defmethod print ((this editable-point))
(format
#t
"#<~A~S~m ~m ~m :r ~m"
@@ -740,7 +740,7 @@
;; definition for method 28 of type editable-point
;; WARN: Return type mismatch int vs none.
;; 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)
)
@@ -783,7 +783,7 @@
;; definition for method 15 of type editable-point
;; WARN: Return type mismatch int vs 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)
@@ -798,7 +798,7 @@
;; definition for method 16 of type editable-point
;; WARN: Return type mismatch int vs 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)
@@ -820,14 +820,14 @@
)
;; definition for method 14 of type editable-point
(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)
)
;; definition for method 18 of type editable-point
;; WARN: Return type mismatch int vs none.
(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)
@@ -843,7 +843,7 @@
)
;; definition for method 10 of type editable-point
(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))
@@ -881,7 +881,7 @@
;; definition for method 13 of type editable-point
;; INFO: Used lq/sq
(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))
@@ -902,7 +902,7 @@
;; definition for method 19 of type editable-point
;; WARN: Return type mismatch int vs none.
(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)
@@ -918,7 +918,7 @@
)
;; definition for method 22 of type editable-point
(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*)))
@@ -946,7 +946,7 @@
;; definition for method 17 of type editable-sphere
;; WARN: Return type mismatch int vs none.
(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)
@@ -966,7 +966,7 @@
)
;; definition for method 22 of type editable-sphere
(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
@@ -982,7 +982,7 @@
)
;; definition for method 22 of type editable-sample
(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
@@ -1002,7 +1002,7 @@
)
;; definition for method 2 of type editable-light
(defmethod print editable-light ((this editable-light))
(defmethod print ((this editable-light))
(format
#t
"#<~A~S ~S ~m ~m ~m"
@@ -1022,7 +1022,7 @@
;; definition for method 23 of type editable-light
;; INFO: Used lq/sq
(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))
@@ -1064,7 +1064,7 @@
;; definition for method 17 of type editable-light
;; WARN: Return type mismatch int vs 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)
@@ -1086,7 +1086,7 @@
;; definition for method 15 of type editable-light
;; WARN: Return type mismatch int vs 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)
@@ -1103,7 +1103,7 @@
;; definition for method 25 of type editable-light
;; WARN: Return type mismatch int vs none.
;; 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*)))
@@ -1121,7 +1121,7 @@
)
;; definition for method 22 of type editable-light
(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*)))
@@ -1195,7 +1195,7 @@
)
;; definition for method 10 of type editable-light
(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
@@ -1221,7 +1221,7 @@
;; definition for method 14 of type editable-face
;; INFO: Used lq/sq
(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
@@ -1249,7 +1249,7 @@
)
;; definition for method 22 of type editable-face
(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))
@@ -1269,7 +1269,7 @@
)
;; definition for method 25 of type editable-face
(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)))
@@ -1280,7 +1280,7 @@
)
;; definition for method 26 of type editable-face
(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)
@@ -1304,7 +1304,7 @@
;; definition for method 27 of type editable-face
;; 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)))
@@ -1316,7 +1316,7 @@
;; definition for method 24 of type editable-face
;; WARN: Return type mismatch int vs none.
(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))
@@ -1327,7 +1327,7 @@
;; definition for method 30 of type editable-face
;; INFO: Used lq/sq
(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))
@@ -1358,7 +1358,7 @@
;; definition for method 31 of type editable-face
;; INFO: Used lq/sq
(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))
@@ -1375,7 +1375,7 @@
;; definition for method 13 of type editable-face
;; INFO: Used lq/sq
(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)))
@@ -1468,7 +1468,7 @@
;; WARN: Stack slot offset 400 signed mismatch
;; WARN: Stack slot offset 292 signed mismatch
;; 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)
@@ -1629,7 +1629,7 @@
;; definition for method 10 of type editable-face
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-10 editable-face ((this editable-face))
(defmethod editable-method-10 ((this editable-face))
(local-vars (sv-112 int))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 6)))
(dotimes (v1-0 6)
@@ -1692,7 +1692,7 @@
)
;; definition for method 14 of type editable-plane
(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))
@@ -1701,7 +1701,7 @@
)
;; definition for method 22 of type editable-plane
(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))
(let ((s4-0 (clear *temp-string*)))
(format
s4-0
@@ -1723,7 +1723,7 @@
)
;; definition for method 25 of type editable-plane
(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)))
@@ -1734,7 +1734,7 @@
)
;; definition for method 26 of type editable-plane
(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)
@@ -1742,7 +1742,7 @@
;; definition for method 27 of type editable-plane
;; WARN: Return type mismatch editable-plane vs editable.
(defmethod editable-method-27 editable-plane ((this editable-plane) (arg0 editable-array))
(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)))
@@ -1754,7 +1754,7 @@
;; definition for method 24 of type editable-plane
;; WARN: Return type mismatch int vs none.
(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)
@@ -1776,7 +1776,7 @@
)
;; definition for method 30 of type editable-plane
(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)))
(case (-> this length)
((2)
(let* ((v1-2 (editable-plane-method-31 this (new 'stack-no-clear 'vector)))
@@ -1812,7 +1812,7 @@
)
;; definition for method 31 of type editable-plane
(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))
@@ -1828,7 +1828,7 @@
;; definition for method 13 of type editable-plane
;; INFO: Used lq/sq
(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)))
@@ -1866,7 +1866,7 @@
;; definition for method 10 of type editable-plane
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-10 editable-plane ((this editable-plane))
(defmethod editable-method-10 ((this editable-plane))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 4)))
(dotimes (v1-0 4)
(set! (-> gp-0 v1-0 quad) (the-as uint128 0))
@@ -1908,7 +1908,7 @@
;; definition for method 17 of type editable-plane
;; WARN: Return type mismatch int vs none.
(defmethod editable-method-17 editable-plane ((this editable-plane) (arg0 vector))
(defmethod editable-method-17 ((this editable-plane) (arg0 vector))
(let ((v1-0 (-> this region)))
(if v1-0
(set! (-> v1-0 changed) #t)
@@ -1929,7 +1929,7 @@
;; definition for method 7 of type editable-array
;; 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)
@@ -1940,18 +1940,18 @@
)
;; definition for method 4 of type editable-array
(defmethod length editable-array ((this editable-array))
(defmethod length ((this editable-array))
(-> this length)
)
;; definition for method 5 of type editable-array
;; 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)))
)
;; definition for method 11 of type editable-array
(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)
@@ -1965,7 +1965,7 @@
)
;; definition for method 10 of type editable-array
(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))
@@ -2037,7 +2037,7 @@
)
;; definition for method 14 of type editable-array
(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))
@@ -2061,7 +2061,7 @@
;; definition for method 15 of type editable-array
;; WARN: Return type mismatch int vs none.
(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)
@@ -2124,7 +2124,7 @@
;; WARN: Stack slot offset 44 signed mismatch
;; 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)
@@ -2500,7 +2500,7 @@
;; definition for method 13 of type editable-array
;; WARN: Return type mismatch int vs 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)
@@ -2512,7 +2512,7 @@
;; definition for method 16 of type editable-array
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs 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))
@@ -2531,7 +2531,7 @@
;; definition for method 17 of type editable-array
;; INFO: Used lq/sq
(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))
+40 -49
View File
@@ -48,27 +48,24 @@
;; definition of type history-elt
(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
)
;; definition for method 3 of type history-elt
(defmethod inspect history-elt ((this history-elt))
(defmethod inspect ((this history-elt))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -93,27 +90,24 @@
;; definition of type history-iterator
(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)
)
)
;; definition for method 3 of type history-iterator
(defmethod inspect history-iterator ((this history-iterator))
(defmethod inspect ((this history-iterator))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -132,22 +126,19 @@
;; definition of type history
(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)
)
)
;; definition for method 3 of type history
(defmethod inspect history ((this history))
(defmethod inspect ((this history))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -161,13 +152,13 @@
)
;; definition for method 4 of type history
(defmethod length history ((this history))
(defmethod length ((this history))
(-> this allocated-length)
)
;; definition for method 5 of type history
;; 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))))
)
@@ -181,7 +172,7 @@
;; definition for method 10 of type history
;; WARN: Return type mismatch int vs none.
(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`
@@ -206,7 +197,7 @@ For each entry:
;; definition for method 9 of type 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
@@ -260,7 +251,7 @@ For each entry:
)
;; definition for method 10 of type history-iterator
(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
@@ -295,7 +286,7 @@ For each entry:
)
;; definition for method 11 of type history-iterator
(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))
@@ -305,7 +296,7 @@ For each entry:
)
;; definition for method 9 of type history-iterator
(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))
)
+12 -18
View File
@@ -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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -33,22 +30,19 @@
;; 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 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_)
)
)
;; definition for method 3 of type memory-usage-block
(defmethod inspect memory-usage-block ((this memory-usage-block))
(defmethod inspect ((this memory-usage-block))
(when (not this)
(set! this this)
(goto cfg-4)
+7 -7
View File
@@ -5,7 +5,7 @@
(declare-file (debug))
;; definition for method 3 of type memory-usage-block
(defmethod inspect memory-usage-block ((this memory-usage-block))
(defmethod inspect ((this memory-usage-block))
(format #t "-------------------------------------------------------------~%")
(format #t " # name count bytes used aligned bytes~%")
(format #t "-------------------------------------------------------------~%")
@@ -34,12 +34,12 @@
)
;; 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))
this
)
;; 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))
"@returns The total sum of all [[memory-usage-info]] `total`s"
(let ((sum 0))
(dotimes (idx (-> this length))
@@ -50,7 +50,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))
"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)
@@ -77,7 +77,7 @@
)
;; definition for method 14 of type level
(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`
)
;; 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 90))
(let* ((a0-1 *dead-pool-list*)
(a3-0 (car a0-1))
@@ -313,7 +313,7 @@ in `mem-usage-block` as well as the total size in `mem-usage`
;; definition for method 11 of type memory-usage-block
;; INFO: Used lq/sq
(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))))
+65 -89
View File
@@ -6,26 +6,23 @@
;; 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 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_)
)
)
;; definition for method 3 of type debug-menu-context
(defmethod inspect debug-menu-context ((this debug-menu-context))
(defmethod inspect ((this debug-menu-context))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -63,18 +60,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -89,29 +83,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -144,15 +135,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -169,18 +157,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -211,19 +196,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -256,19 +238,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -306,43 +285,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))
(when (not this)
(set! this this)
(goto cfg-4)
+94 -118
View File
@@ -6,33 +6,30 @@
;; definition of type mysql-nav-node
(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)
)
)
;; definition for method 3 of type mysql-nav-node
(defmethod inspect mysql-nav-node ((this mysql-nav-node))
(defmethod inspect ((this mysql-nav-node))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -58,15 +55,12 @@
;; definition of type mysql-nav-node-array
(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
)
;; definition for method 3 of type mysql-nav-node-array
(defmethod inspect mysql-nav-node-array ((this mysql-nav-node-array))
(defmethod inspect ((this mysql-nav-node-array))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -84,35 +78,32 @@
;; definition of type mysql-nav-edge
(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)
)
)
;; definition for method 3 of type mysql-nav-edge
(defmethod inspect mysql-nav-edge ((this mysql-nav-edge))
(defmethod inspect ((this mysql-nav-edge))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -141,15 +132,12 @@
;; definition of type mysql-nav-edge-array
(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
)
;; definition for method 3 of type mysql-nav-edge-array
(defmethod inspect mysql-nav-edge-array ((this mysql-nav-edge-array))
(defmethod inspect ((this mysql-nav-edge-array))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -167,24 +155,21 @@
;; definition of type mysql-nav-visnode
(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)
)
)
;; definition for method 3 of type mysql-nav-visnode
(defmethod inspect mysql-nav-visnode ((this mysql-nav-visnode))
(defmethod inspect ((this mysql-nav-visnode))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -203,15 +188,12 @@
;; definition of type mysql-nav-visnode-array
(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
)
;; definition for method 3 of type mysql-nav-visnode-array
(defmethod inspect mysql-nav-visnode-array ((this mysql-nav-visnode-array))
(defmethod inspect ((this mysql-nav-visnode-array))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -229,20 +211,17 @@
;; definition of type mysql-nav-graph-level-info
(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
)
;; definition for method 3 of type mysql-nav-graph-level-info
(defmethod inspect mysql-nav-graph-level-info ((this mysql-nav-graph-level-info))
(defmethod inspect ((this mysql-nav-graph-level-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -259,36 +238,33 @@
;; definition of type mysql-nav-graph
(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)
)
)
;; definition for method 3 of type mysql-nav-graph
(defmethod inspect mysql-nav-graph ((this mysql-nav-graph))
(defmethod inspect ((this mysql-nav-graph))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -333,7 +309,7 @@
)
;; definition for method 13 of type mysql-nav-graph
(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
@@ -358,7 +334,7 @@ otherwise, return the new size of the array"
)
;; definition for method 14 of type mysql-nav-graph
(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
@@ -383,7 +359,7 @@ otherwise, return the new size of the array"
)
;; definition for method 15 of type mysql-nav-graph
(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))
@@ -397,7 +373,7 @@ if none exist, return `-1`"
)
;; definition for method 16 of type mysql-nav-graph
(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
@@ -433,7 +409,7 @@ if none exist, return `-1`"
)
;; definition for method 9 of type mysql-nav-node
(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))
@@ -539,7 +515,7 @@ if none exist, return `-1`"
)
;; definition for method 9 of type mysql-nav-edge
(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))
@@ -744,7 +720,7 @@ if none exist, return `-1`"
)
;; definition for method 9 of type mysql-nav-visnode
(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))
@@ -799,7 +775,7 @@ if none exist, return `-1`"
)
;; definition for method 11 of type mysql-nav-graph
(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))
@@ -811,7 +787,7 @@ returns `-1` if none is found"
)
;; definition for method 12 of type mysql-nav-graph
(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))
@@ -831,7 +807,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)
@@ -1164,7 +1140,7 @@ returns `-1` if none is found"
)
;; definition for method 10 of type mysql-nav-node
(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))))
@@ -1179,7 +1155,7 @@ returns `-1` if none is found"
;; definition for method 17 of type mysql-nav-graph
;; WARN: Return type mismatch int vs none.
(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)
@@ -1212,7 +1188,7 @@ returns `-1` if none is found"
)
;; definition for method 18 of type mysql-nav-graph
(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)
@@ -1281,7 +1257,7 @@ returns `-1` if none is found"
;; definition for method 19 of type mysql-nav-graph
;; WARN: Return type mismatch int vs none.
(defmethod mysql-nav-graph-method-19 mysql-nav-graph ((this mysql-nav-graph))
(defmethod mysql-nav-graph-method-19 ((this mysql-nav-graph))
(set! (-> this level-info-array-length) 0)
(set! (-> this level-info-last-lookup) 0)
(dotimes (v1-0 32)
@@ -1321,7 +1297,7 @@ returns `-1` if none is found"
;; definition for method 20 of type mysql-nav-graph
;; WARN: Return type mismatch int vs none.
(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
@@ -1329,7 +1305,7 @@ returns `-1` if none is found"
)
;; definition for method 10 of type mysql-nav-graph
(defmethod exec-sql! mysql-nav-graph ((this mysql-nav-graph))
(defmethod exec-sql! ((this mysql-nav-graph))
(format #t "Saving nodes ...~%")
(dotimes (s5-0 (-> this node-array length))
(let ((a0-3 (-> this node-array data s5-0)))
+126 -134
View File
@@ -6,18 +6,15 @@
;; definition of type nav-graph-command
(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
)
;; definition for method 3 of type nav-graph-command
(defmethod inspect nav-graph-command ((this nav-graph-command))
(defmethod inspect ((this nav-graph-command))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -33,15 +30,12 @@
;; definition of type nav-graph-command-array
(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
)
;; definition for method 3 of type nav-graph-command-array
(defmethod inspect nav-graph-command-array ((this nav-graph-command-array))
(defmethod inspect ((this nav-graph-command-array))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -59,95 +53,93 @@
;; definition of type nav-graph-editor
(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)
)
)
;; definition for method 3 of type nav-graph-editor
(defmethod inspect nav-graph-editor ((this nav-graph-editor))
(defmethod inspect ((this nav-graph-editor))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -191,7 +183,7 @@
;; definition for method 62 of type nav-graph-editor
;; 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)
@@ -211,27 +203,27 @@
;; definition for method 63 of type nav-graph-editor
;; 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)
)
;; definition for method 10 of type nav-graph-editor
(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)
)
;; definition for method 7 of type nav-graph-editor
(defmethod relocate nav-graph-editor ((this nav-graph-editor) (arg0 int))
(defmethod relocate ((this nav-graph-editor) (arg0 int))
(call-parent-method this arg0)
)
;; definition for method 60 of type nav-graph-editor
;; 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
@@ -245,7 +237,7 @@
;; definition for method 61 of type nav-graph-editor
;; 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)
)
@@ -253,7 +245,7 @@
;; definition for method 54 of type nav-graph-editor
;; 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))
@@ -300,7 +292,7 @@
)
;; definition for method 30 of type nav-graph-editor
(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))
)
@@ -399,7 +391,7 @@
;; definition for method 33 of type nav-graph-editor
;; WARN: Return type mismatch int vs none.
(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)))
@@ -433,7 +425,7 @@
)
;; definition for method 31 of type nav-graph-editor
(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)
@@ -502,7 +494,7 @@
;; definition for method 29 of type nav-graph-editor
;; 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")
(format *stdcon* "~3L~18S~18S~18S~%~0L" "Left button" "Middle button" "Right button")
(format *stdcon* "~18S~18S~18S~%" arg0 arg1 arg2)
@@ -513,7 +505,7 @@
;; definition for method 28 of type nav-graph-editor
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs 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)
@@ -683,7 +675,7 @@
;; definition for method 34 of type nav-graph-editor
;; INFO: Used lq/sq
(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)
@@ -987,14 +979,14 @@
;; definition for method 41 of type nav-graph-editor
;; WARN: Return type mismatch int vs none.
(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)
)
;; definition for method 42 of type nav-graph-editor
;; INFO: Used lq/sq
(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)))
@@ -1032,7 +1024,7 @@
)
;; definition for method 44 of type nav-graph-editor
(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)))
@@ -1057,7 +1049,7 @@
;; definition for method 45 of type nav-graph-editor
;; 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)))
@@ -1094,7 +1086,7 @@
;; definition for method 43 of type nav-graph-editor
;; INFO: Used lq/sq
;; 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)
@@ -1170,7 +1162,7 @@
;; definition for method 32 of type nav-graph-editor
;; 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)
@@ -1241,14 +1233,14 @@
;; definition for method 47 of type nav-graph-editor
;; WARN: Return type mismatch int vs none.
(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)
)
;; definition for method 48 of type nav-graph-editor
(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))
@@ -1262,13 +1254,13 @@
)
;; definition for method 49 of type nav-graph-editor
(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))
)
;; definition for method 50 of type nav-graph-editor
;; WARN: Return type mismatch int vs none.
(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)
@@ -1276,7 +1268,7 @@
;; definition for method 58 of type nav-graph-editor
;; 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)
)
@@ -1336,7 +1328,7 @@
;; definition for method 51 of type nav-graph-editor
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(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))
@@ -1357,7 +1349,7 @@
;; definition for method 53 of type nav-graph-editor
;; WARN: Return type mismatch int vs 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))
@@ -1372,7 +1364,7 @@
;; definition for method 52 of type nav-graph-editor
;; 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))
@@ -1396,7 +1388,7 @@
)
;; definition for method 57 of type nav-graph-editor
(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))
@@ -1414,7 +1406,7 @@
;; definition for method 55 of type nav-graph-editor
;; WARN: Return type mismatch int vs none.
(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))
@@ -1446,7 +1438,7 @@
;; definition for method 56 of type nav-graph-editor
;; WARN: Return type mismatch int vs 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))
@@ -1492,7 +1484,7 @@
)
;; definition for method 59 of type nav-graph-editor
(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)
)
@@ -1504,7 +1496,7 @@
)
;; definition for method 46 of type nav-graph-editor
(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))
)
@@ -1533,7 +1525,7 @@
;; definition for method 35 of type nav-graph-editor
;; INFO: Used lq/sq
;; 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
@@ -1641,7 +1633,7 @@
;; definition for method 38 of type nav-graph-editor
;; 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)
@@ -1728,7 +1720,7 @@
;; definition for method 37 of type nav-graph-editor
;; 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)
@@ -1918,7 +1910,7 @@
;; definition for method 39 of type nav-graph-editor
;; 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)
@@ -1979,7 +1971,7 @@
;; definition for method 40 of type nav-graph-editor
;; 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)
@@ -2080,7 +2072,7 @@
;; definition for method 36 of type nav-graph-editor
;; 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)
+5 -9
View File
@@ -15,21 +15,17 @@
;; definition of type part-tester
(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
)
)
;; definition for method 3 of type part-tester
(defmethod inspect part-tester ((this part-tester))
(defmethod inspect ((this part-tester))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -48,7 +44,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))
)
+35 -47
View File
@@ -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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -34,17 +31,14 @@
;; definition of type merc-global-stats
(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
)
;; definition for method 3 of type merc-global-stats
(defmethod inspect merc-global-stats ((this merc-global-stats))
(defmethod inspect ((this merc-global-stats))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -59,35 +53,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 () 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)
)
)
;; definition for method 3 of type perf-stat
(defmethod inspect perf-stat ((this perf-stat))
(defmethod inspect ((this perf-stat))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -274,15 +265,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))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -300,7 +288,7 @@
;; definition for method 11 of type perf-stat
;; WARN: 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!))
@@ -322,7 +310,7 @@
;; definition for method 12 of type perf-stat
;; WARN: 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)
@@ -339,7 +327,7 @@
;; definition for method 13 of type perf-stat
;; WARN: 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
View File
@@ -10,19 +10,15 @@
;; definition of type viewer
(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
)
)
;; definition for method 3 of type viewer
(defmethod inspect viewer ((this viewer))
(defmethod inspect ((this viewer))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -220,7 +216,7 @@
;; definition for method 11 of type viewer
;; 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