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
+146 -164
View File
@@ -3,17 +3,14 @@
;; definition of type check-vector-collision-with-nav-spheres-info
(deftype check-vector-collision-with-nav-spheres-info (structure)
((u float :offset-assert 0)
(intersect vector :inline :offset-assert 16)
(normal vector :inline :offset-assert 32)
((u float)
(intersect vector :inline)
(normal vector :inline)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
;; definition for method 3 of type check-vector-collision-with-nav-spheres-info
(defmethod inspect check-vector-collision-with-nav-spheres-info ((this check-vector-collision-with-nav-spheres-info))
(defmethod inspect ((this check-vector-collision-with-nav-spheres-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -28,16 +25,13 @@
;; definition of type nav-gap-info
(deftype nav-gap-info (structure)
((dest vector :inline :offset-assert 0)
(poly nav-poly :offset-assert 16)
((dest vector :inline)
(poly nav-poly)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
;; definition for method 3 of type nav-gap-info
(defmethod inspect nav-gap-info ((this nav-gap-info))
(defmethod inspect ((this nav-gap-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -51,20 +45,17 @@
;; definition of type nav-avoid-spheres-params
(deftype nav-avoid-spheres-params (structure)
((current-pos vector :inline :offset-assert 0)
(travel vector :inline :offset-assert 16)
(pref-dir vector :inline :offset-assert 32)
(out-travel vector 2 :inline :offset-assert 48)
(closest-sphere-dist2 float :offset-assert 80)
(avoiding-sphere? symbol :offset-assert 84)
((current-pos vector :inline)
(travel vector :inline)
(pref-dir vector :inline)
(out-travel vector 2 :inline)
(closest-sphere-dist2 float)
(avoiding-sphere? symbol)
)
:method-count-assert 9
:size-assert #x58
:flag-assert #x900000058
)
;; definition for method 3 of type nav-avoid-spheres-params
(defmethod inspect nav-avoid-spheres-params ((this nav-avoid-spheres-params))
(defmethod inspect ((this nav-avoid-spheres-params))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -82,16 +73,13 @@
;; definition of type nav-callback-info
(deftype nav-callback-info (structure)
((callback-count int32 :offset-assert 0)
(callback-array (function object nav-control none) 10 :offset-assert 4)
((callback-count int32)
(callback-array (function object nav-control none) 10)
)
:method-count-assert 9
:size-assert #x2c
:flag-assert #x90000002c
)
;; definition for method 3 of type nav-callback-info
(defmethod inspect nav-callback-info ((this nav-callback-info))
(defmethod inspect ((this nav-callback-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -105,83 +93,80 @@
;; definition of type nav-state
(deftype nav-state (structure)
((flags nav-state-flag :offset-assert 0)
(nav nav-control :offset-assert 4)
(user-poly nav-poly :offset-assert 8)
(mesh nav-mesh :offset-assert 12)
(current-poly nav-poly :offset-assert 16)
(virtual-current-poly nav-poly :offset-assert 20)
(next-poly nav-poly :offset-assert 24)
(target-poly nav-poly :offset-assert 28)
(rotation-rate float :offset-assert 32)
(speed meters :offset-assert 36)
(prev-speed meters :offset-assert 40)
(pad0 uint32 1 :offset-assert 44)
(travel vector :inline :offset-assert 48)
(target-post vector :inline :offset-assert 64)
(current-pos vector :inline :offset-assert 80)
(current-pos-local vector :inline :offset-assert 96)
(virtual-current-pos-local vector :inline :offset-assert 112)
(velocity vector :inline :offset-assert 128)
(heading vector :inline :offset-assert 144)
(target-dir vector :inline :offset-assert 160)
(accel vector :inline :offset 160)
((flags nav-state-flag)
(nav nav-control)
(user-poly nav-poly)
(mesh nav-mesh)
(current-poly nav-poly)
(virtual-current-poly nav-poly)
(next-poly nav-poly)
(target-poly nav-poly)
(rotation-rate float)
(speed meters)
(prev-speed meters)
(pad0 uint32 1)
(travel vector :inline)
(target-post vector :inline)
(current-pos vector :inline)
(current-pos-local vector :inline)
(virtual-current-pos-local vector :inline)
(velocity vector :inline)
(heading vector :inline)
(target-dir vector :inline)
(accel vector :inline :overlay-at target-dir)
)
:method-count-assert 55
:size-assert #xb0
:flag-assert #x37000000b0
(:methods
(debug-draw (_type_) none 9)
(nav-state-method-10 (_type_) none 10)
(plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol 11)
(get-velocity (_type_ vector) vector 12)
(get-travel (_type_ vector) vector 13)
(get-heading (_type_ vector) vector 14)
(get-target-post (_type_ vector) vector 15)
(get-speed (_type_) meters 16)
(get-rotation-rate (_type_) float 17)
(try-projecting-to-current-poly (_type_ vector object vector) symbol 18)
(get-current-poly (_type_) nav-poly 19)
(copy-nav-state! (_type_ (pointer nav-state)) none 20)
(nav-state-method-21 () none 21)
(nav-state-method-22 () none 22)
(nav-state-method-23 () none 23)
(turn-and-navigate-to-destination (_type_) none 24)
(navigate-using-route-portals-wrapper (_type_) none 25)
(navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none 26)
(navigate-within-poly-wrapper (_type_) none 27)
(compute-travel-speed (_type_) none 28)
(nav-state-method-29 (_type_) none 29)
(nav-state-method-30 (_type_) none 30)
(navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none 31)
(update-travel-dir-from-spheres (_type_) none 32)
(compute-speed-simple (_type_) none 33)
(navigate-v1! (_type_) none 34)
(reset-target! (_type_) none 35)
(add-offset-to-target! (_type_ vector) none 36)
(navigate-v2! (_type_) none 37)
(set-current-poly! (_type_ nav-poly) none 38)
(nav-state-method-39 (_type_) symbol 39)
(do-navigation-to-destination (_type_ vector) none 40)
(clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol 41)
(set-target-post! (_type_ vector) none 42)
(set-travel! (_type_ vector) none 43)
(set-velocity! (_type_ vector) none 44)
(set-heading! (_type_ vector) none 45)
(set-speed! (_type_ meters) none 46)
(reset! (_type_ nav-control) none 47)
(nav-state-method-48 () none 48)
(navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none 49)
(nav-state-method-50 (_type_) none 50)
(navigate-using-route-portals (_type_) none 51)
(navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none 52)
(navigate-within-poly (_type_) none 53)
(clamp-travel-vector (_type_) none 54)
(debug-draw (_type_) none)
(nav-state-method-10 (_type_) none)
(plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol)
(get-velocity (_type_ vector) vector)
(get-travel (_type_ vector) vector)
(get-heading (_type_ vector) vector)
(get-target-post (_type_ vector) vector)
(get-speed (_type_) meters)
(get-rotation-rate (_type_) float)
(try-projecting-to-current-poly (_type_ vector object vector) symbol)
(get-current-poly (_type_) nav-poly)
(copy-nav-state! (_type_ (pointer nav-state)) none)
(nav-state-method-21 () none)
(nav-state-method-22 () none)
(nav-state-method-23 () none)
(turn-and-navigate-to-destination (_type_) none)
(navigate-using-route-portals-wrapper (_type_) none)
(navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none)
(navigate-within-poly-wrapper (_type_) none)
(compute-travel-speed (_type_) none)
(nav-state-method-29 (_type_) none)
(nav-state-method-30 (_type_) none)
(navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none)
(update-travel-dir-from-spheres (_type_) none)
(compute-speed-simple (_type_) none)
(navigate-v1! (_type_) none)
(reset-target! (_type_) none)
(add-offset-to-target! (_type_ vector) none)
(navigate-v2! (_type_) none)
(set-current-poly! (_type_ nav-poly) none)
(nav-state-method-39 (_type_) symbol)
(do-navigation-to-destination (_type_ vector) none)
(clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol)
(set-target-post! (_type_ vector) none)
(set-travel! (_type_ vector) none)
(set-velocity! (_type_ vector) none)
(set-heading! (_type_ vector) none)
(set-speed! (_type_ meters) none)
(reset! (_type_ nav-control) none)
(nav-state-method-48 () none)
(navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none)
(nav-state-method-50 (_type_) none)
(navigate-using-route-portals (_type_) none)
(navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none)
(navigate-within-poly (_type_) none)
(clamp-travel-vector (_type_) none)
)
)
;; definition for method 3 of type nav-state
(defmethod inspect nav-state ((this nav-state))
(defmethod inspect ((this nav-state))
(when (not this)
(set! this this)
(goto cfg-34)
@@ -262,76 +247,73 @@
;; definition of type nav-control
(deftype nav-control (structure)
((flags nav-control-flag :offset-assert 0)
(callback-info nav-callback-info :offset-assert 4)
(process process :offset-assert 8)
(pad0 uint32 :offset-assert 12)
(shape collide-shape :offset-assert 16)
(nearest-y-threshold meters :offset-assert 20)
(nav-cull-radius meters :offset-assert 24)
(sec-per-frame float :offset-assert 28)
(target-speed meters :offset-assert 32)
(acceleration meters :offset-assert 36)
(turning-acceleration meters :offset-assert 40)
(max-rotation-rate float :offset-assert 44)
(speed-scale float :offset-assert 48)
(sphere-count int32 :offset-assert 52)
(sphere-array (inline-array sphere) :offset-assert 56)
(root-sphere-id uint8 :offset-assert 60)
(sphere-mask uint8 :offset-assert 61)
(pad1 uint8 2 :offset-assert 62)
(sphere-id-array uint8 16 :offset-assert 64)
(extra-nav-sphere vector :inline :offset-assert 80)
(root-nav-sphere vector :inline :offset-assert 96)
(state nav-state :inline :offset-assert 112)
((flags nav-control-flag)
(callback-info nav-callback-info)
(process process)
(pad0 uint32)
(shape collide-shape)
(nearest-y-threshold meters)
(nav-cull-radius meters)
(sec-per-frame float)
(target-speed meters)
(acceleration meters)
(turning-acceleration meters)
(max-rotation-rate float)
(speed-scale float)
(sphere-count int32)
(sphere-array (inline-array sphere))
(root-sphere-id uint8)
(sphere-mask uint8)
(pad1 uint8 2)
(sphere-id-array uint8 16)
(extra-nav-sphere vector :inline)
(root-nav-sphere vector :inline)
(state nav-state :inline)
)
:method-count-assert 47
:size-assert #x120
:flag-assert #x2f00000120
(:methods
(debug-draw (_type_) none 9)
(point-in-bsphere? (_type_ vector) symbol 10)
(find-poly-containing-point-1 (_type_ vector) nav-poly 11)
(cloest-point-on-mesh (_type_ vector vector nav-poly) nav-poly 12)
(find-nearest-poly-to-point (_type_ vector) nav-poly 13)
(project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none 14)
(find-poly-containing-point-2 (_type_ vector) nav-poly 15)
(is-above-poly-max-height? (_type_ vector float) symbol 16)
(is-in-mesh? (_type_ vector float) symbol 17)
(avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol 18)
(avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol 19)
(clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none 20)
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none 21)
(find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float 22)
(set-spheres-from-nav-ids (_type_) none 23)
(add-root-sphere-to-hash! (_type_ vector int) symbol 24)
(get-max-rotation-rate (_type_) float 25)
(get-sphere-mask (_type_) uint 26)
(get-target-speed (_type_) meters 27)
(enable-extra-sphere! (_type_) none 28)
(disable-extra-sphere! (_type_) none 29)
(copy-extra-nav-sphere! (_type_ sphere) none 30)
(set-extra-nav-sphere-xyz! (_type_ sphere) none 31)
(set-extra-nav-sphere-radius! (_type_ float) none 32)
(set-nearest-y-thres! (_type_ float) none 33)
(set-nav-cull-radius! (_type_ meters) none 34)
(set-speed-scale! (_type_ float) none 35)
(set-target-speed! (_type_ meters) none 36)
(set-acceleration! (_type_ meters) none 37)
(set-turning-acceleration! (_type_ meters) none 38)
(set-max-rotation-rate! (_type_ float) none 39)
(set-sphere-mask! (_type_ uint) none 40)
(remove! (_type_) none 41)
(init! (_type_ collide-shape) none 42)
(display-marks? (_type_) symbol 43)
(nav-control-method-44 () none 44)
(find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere 45)
(find-sphere-ids-from-sphere-hash (_type_ symbol) none 46)
(debug-draw (_type_) none)
(point-in-bsphere? (_type_ vector) symbol)
(find-poly-containing-point-1 (_type_ vector) nav-poly)
(cloest-point-on-mesh (_type_ vector vector nav-poly) nav-poly)
(find-nearest-poly-to-point (_type_ vector) nav-poly)
(project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none)
(find-poly-containing-point-2 (_type_ vector) nav-poly)
(is-above-poly-max-height? (_type_ vector float) symbol)
(is-in-mesh? (_type_ vector float) symbol)
(avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol)
(avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol)
(clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none)
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none)
(find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float)
(set-spheres-from-nav-ids (_type_) none)
(add-root-sphere-to-hash! (_type_ vector int) symbol)
(get-max-rotation-rate (_type_) float)
(get-sphere-mask (_type_) uint)
(get-target-speed (_type_) meters)
(enable-extra-sphere! (_type_) none)
(disable-extra-sphere! (_type_) none)
(copy-extra-nav-sphere! (_type_ sphere) none)
(set-extra-nav-sphere-xyz! (_type_ sphere) none)
(set-extra-nav-sphere-radius! (_type_ float) none)
(set-nearest-y-thres! (_type_ float) none)
(set-nav-cull-radius! (_type_ meters) none)
(set-speed-scale! (_type_ float) none)
(set-target-speed! (_type_ meters) none)
(set-acceleration! (_type_ meters) none)
(set-turning-acceleration! (_type_ meters) none)
(set-max-rotation-rate! (_type_ float) none)
(set-sphere-mask! (_type_ uint) none)
(remove! (_type_) none)
(init! (_type_ collide-shape) none)
(display-marks? (_type_) symbol)
(nav-control-method-44 () none)
(find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere)
(find-sphere-ids-from-sphere-hash (_type_ symbol) none)
)
)
;; definition for method 3 of type nav-control
(defmethod inspect nav-control ((this nav-control))
(defmethod inspect ((this nav-control))
(when (not this)
(set! this this)
(goto cfg-25)
+123 -126
View File
@@ -27,7 +27,7 @@
)
;; definition for method 7 of type nav-control
(defmethod relocate nav-control ((this nav-control) (arg0 int))
(defmethod relocate ((this nav-control) (arg0 int))
(&+! (-> this process) arg0)
(&+! (-> this shape) arg0)
this
@@ -35,7 +35,7 @@
;; definition for method 41 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod remove! nav-control ((this nav-control))
(defmethod remove! ((this nav-control))
"Remove this nav-control from the nav-mesh it belongs to."
(remove-nav-control (-> this state mesh) this)
0
@@ -44,7 +44,7 @@
;; definition for method 28 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod enable-extra-sphere! nav-control ((this nav-control))
(defmethod enable-extra-sphere! ((this nav-control))
"Sets a flag indicating that this nav-control has an extra-nav-sphere."
(logior! (-> this shape nav-flags) (nav-flags has-extra-sphere))
0
@@ -53,7 +53,7 @@
;; definition for method 29 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod disable-extra-sphere! nav-control ((this nav-control))
(defmethod disable-extra-sphere! ((this nav-control))
"Clears a flag indicating that this nav-control has an extra-nav-sphere."
(logclear! (-> this shape nav-flags) (nav-flags has-extra-sphere))
0
@@ -62,7 +62,7 @@
;; definition for method 30 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod copy-extra-nav-sphere! nav-control ((this nav-control) (arg0 sphere))
(defmethod copy-extra-nav-sphere! ((this nav-control) (arg0 sphere))
"Copies the given [[sphere]] into `extra-nav-sphere`"
(mem-copy! (the-as pointer (-> this extra-nav-sphere)) (the-as pointer arg0) 16)
0
@@ -72,7 +72,7 @@
;; definition for method 31 of type nav-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod set-extra-nav-sphere-xyz! nav-control ((this nav-control) (arg0 sphere))
(defmethod set-extra-nav-sphere-xyz! ((this nav-control) (arg0 sphere))
"Set the `extra-nav-sphere` with the data in the given [[sphere]]"
(let ((f0-0 (-> this extra-nav-sphere w)))
(set! (-> this extra-nav-sphere quad) (-> arg0 quad))
@@ -84,7 +84,7 @@
;; definition for method 32 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-extra-nav-sphere-radius! nav-control ((this nav-control) (arg0 float))
(defmethod set-extra-nav-sphere-radius! ((this nav-control) (arg0 float))
"Set's `extra-nav-sphere`'s radius"
(set! (-> this extra-nav-sphere w) arg0)
0
@@ -93,7 +93,7 @@
;; definition for method 33 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-nearest-y-thres! nav-control ((this nav-control) (arg0 float))
(defmethod set-nearest-y-thres! ((this nav-control) (arg0 float))
"Set `nearest-y-threshold`"
(set! (-> this nearest-y-threshold) arg0)
0
@@ -102,7 +102,7 @@
;; definition for method 34 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-nav-cull-radius! nav-control ((this nav-control) (arg0 meters))
(defmethod set-nav-cull-radius! ((this nav-control) (arg0 meters))
"Set `nav-cull-radius`"
(set! (-> this nav-cull-radius) arg0)
0
@@ -111,7 +111,7 @@
;; definition for method 35 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-speed-scale! nav-control ((this nav-control) (arg0 float))
(defmethod set-speed-scale! ((this nav-control) (arg0 float))
"Set `speed-scale`"
(set! (-> this speed-scale) arg0)
0
@@ -120,7 +120,7 @@
;; definition for method 36 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-target-speed! nav-control ((this nav-control) (arg0 meters))
(defmethod set-target-speed! ((this nav-control) (arg0 meters))
"Set `target-speed`"
(set! (-> this target-speed) arg0)
0
@@ -128,13 +128,13 @@
)
;; definition for method 27 of type nav-control
(defmethod get-target-speed nav-control ((this nav-control))
(defmethod get-target-speed ((this nav-control))
(-> this target-speed)
)
;; definition for method 37 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-acceleration! nav-control ((this nav-control) (arg0 meters))
(defmethod set-acceleration! ((this nav-control) (arg0 meters))
"Set `acceleration`"
(set! (-> this acceleration) arg0)
0
@@ -143,7 +143,7 @@
;; definition for method 38 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-turning-acceleration! nav-control ((this nav-control) (arg0 meters))
(defmethod set-turning-acceleration! ((this nav-control) (arg0 meters))
"Set `turning-acceleration`"
(set! (-> this turning-acceleration) arg0)
0
@@ -152,7 +152,7 @@
;; definition for method 39 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-max-rotation-rate! nav-control ((this nav-control) (arg0 float))
(defmethod set-max-rotation-rate! ((this nav-control) (arg0 float))
"Set `max-rotation-rate`"
(set! (-> this max-rotation-rate) arg0)
0
@@ -160,13 +160,13 @@
)
;; definition for method 25 of type nav-control
(defmethod get-max-rotation-rate nav-control ((this nav-control))
(defmethod get-max-rotation-rate ((this nav-control))
(-> this max-rotation-rate)
)
;; definition for method 40 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-sphere-mask! nav-control ((this nav-control) (arg0 uint))
(defmethod set-sphere-mask! ((this nav-control) (arg0 uint))
"TODO - probably an enum - Set `sphere-mask`"
(set! (-> this sphere-mask) arg0)
0
@@ -174,12 +174,12 @@
)
;; definition for method 26 of type nav-control
(defmethod get-sphere-mask nav-control ((this nav-control))
(defmethod get-sphere-mask ((this nav-control))
(-> this sphere-mask)
)
;; definition for method 10 of type nav-control
(defmethod point-in-bsphere? nav-control ((this nav-control) (arg0 vector))
(defmethod point-in-bsphere? ((this nav-control) (arg0 vector))
"Is the given point ([[vector]]) outside of the [[nav-mesh]]'s `bounds` [[sphere]] radius"
(let ((v1-1 (-> this state mesh bounds)))
(>= (-> v1-1 w) (vector-vector-distance arg0 v1-1))
@@ -187,14 +187,14 @@
)
;; definition for method 43 of type nav-control
(defmethod display-marks? nav-control ((this nav-control))
(defmethod display-marks? ((this nav-control))
"Returns if navigation related marks should be displayed"
(and *display-nav-marks* (logtest? (-> this flags) (nav-control-flag display-marks)))
)
;; definition for method 42 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod init! nav-control ((this nav-control) (arg0 collide-shape))
(defmethod init! ((this nav-control) (arg0 collide-shape))
"Initializes the [[nav-control]], setting `shape` with the provided [[collide-shape]]"
(set! (-> this callback-info) #f)
(logior! (-> this flags) (nav-control-flag update-heading-from-facing output-sphere-hash))
@@ -241,7 +241,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 13 of type nav-control
(defmethod find-nearest-poly-to-point nav-control ((this nav-control) (arg0 vector))
(defmethod find-nearest-poly-to-point ((this nav-control) (arg0 vector))
"Find the nav-poly closest to this point in the nav-mesh."
(let ((gp-0 (new 'stack 'nav-find-poly-parms)))
(vector-! (-> gp-0 point) arg0 (-> this state mesh bounds))
@@ -254,7 +254,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 14 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod project-point-onto-plane-of-poly nav-control ((this nav-control) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector))
(defmethod project-point-onto-plane-of-poly ((this nav-control) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector))
"Move a point to the be on the plane containing the given nav-poly. Return the normal too"
(project-point-onto-plane-of-poly-local
(-> this state mesh)
@@ -269,7 +269,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 17 of type nav-control
(defmethod is-in-mesh? nav-control ((this nav-control) (arg0 vector) (arg1 float))
(defmethod is-in-mesh? ((this nav-control) (arg0 vector) (arg1 float))
"Is this point in the mesh?"
(let ((v1-0 (new 'stack-no-clear 'vector)))
(vector-! v1-0 arg0 (-> this state mesh bounds))
@@ -281,7 +281,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 9 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw nav-control ((this nav-control))
(defmethod debug-draw ((this nav-control))
(local-vars (sv-32 nav-mesh) (sv-36 vector))
(when (display-marks? this)
(debug-draw (-> this state mesh))
@@ -336,7 +336,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 11 of type nav-control
(defmethod find-poly-containing-point-1 nav-control ((this nav-control) (arg0 vector))
(defmethod find-poly-containing-point-1 ((this nav-control) (arg0 vector))
"Find nav-poly containing this point."
(let ((v1-0 (new 'stack-no-clear 'nav-find-poly-parms)))
(vector-! (-> v1-0 point) arg0 (-> this state mesh bounds))
@@ -347,7 +347,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 15 of type nav-control
(defmethod find-poly-containing-point-2 nav-control ((this nav-control) (arg0 vector))
(defmethod find-poly-containing-point-2 ((this nav-control) (arg0 vector))
"Find nav-poly containing this point - same as 1"
(let ((v1-0 (new 'stack-no-clear 'nav-find-poly-parms)))
(vector-! (-> v1-0 point) arg0 (-> this state mesh bounds))
@@ -359,7 +359,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 16 of type nav-control
;; WARN: Return type mismatch object vs symbol.
(defmethod is-above-poly-max-height? nav-control ((this nav-control) (arg0 vector) (arg1 float))
(defmethod is-above-poly-max-height? ((this nav-control) (arg0 vector) (arg1 float))
"Is the point in a poly, and lower than a max height?"
(let ((a1-1 (new 'stack-no-clear 'nav-find-poly-parms)))
(vector-! (-> a1-1 point) arg0 (-> this state mesh bounds))
@@ -373,7 +373,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 45 of type nav-control
(defmethod find-first-sphere-intersecting-ray nav-control ((this nav-control) (arg0 vector) (arg1 vector) (arg2 vector))
(defmethod find-first-sphere-intersecting-ray ((this nav-control) (arg0 vector) (arg1 vector) (arg2 vector))
"Find the first sphere that this ray intersects"
(let ((s5-0 (the-as sphere #f)))
(let ((f30-0 -0.000001))
@@ -519,7 +519,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 46 of type nav-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod find-sphere-ids-from-sphere-hash nav-control ((this nav-control) (arg0 symbol))
(defmethod find-sphere-ids-from-sphere-hash ((this nav-control) (arg0 symbol))
"Use sphere-hash to look up navigation sphere IDs and save them."
(let ((s5-0 (new 'stack-no-clear 'find-nav-sphere-ids-params)))
(set! (-> s5-0 bsphere quad) (-> this root-nav-sphere quad))
@@ -537,7 +537,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 23 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod set-spheres-from-nav-ids nav-control ((this nav-control))
(defmethod set-spheres-from-nav-ids ((this nav-control))
"Set up spheres from sphere ids previously found by find-sphere-ids-from-sphere-hash"
(let ((v1-2 (-> this state mesh sphere-hash sphere-array))
(a1-0 (-> this sphere-id-array))
@@ -560,33 +560,30 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition of type nav-control-cfs-work
(deftype nav-control-cfs-work (structure)
((in-dir vector :inline :offset-assert 0)
(right-dir vector :inline :offset-assert 16)
(best-dir vector 2 :inline :offset-assert 32)
(temp-dir vector 2 :inline :offset-assert 64)
(away-dir vector :inline :offset-assert 96)
(best-dir-angle degrees 2 :offset-assert 112)
(ignore-mask uint64 :offset-assert 120)
(initial-ignore-mask uint64 :offset-assert 128)
(i-sphere int32 :offset-assert 136)
(i-first-sphere int32 :offset-assert 140)
(i-inside-sphere int32 :offset-assert 144)
(inside-sphere-dist float :offset-assert 148)
(sign float :offset-assert 152)
(travel-len float :offset-assert 156)
(dist2 float :offset-assert 160)
(inside-dist float :offset-assert 164)
(rand-angle float :offset-assert 168)
(dir-update basic :offset-assert 172)
(debug-offset vector :inline :offset-assert 176)
((in-dir vector :inline)
(right-dir vector :inline)
(best-dir vector 2 :inline)
(temp-dir vector 2 :inline)
(away-dir vector :inline)
(best-dir-angle degrees 2)
(ignore-mask uint64)
(initial-ignore-mask uint64)
(i-sphere int32)
(i-first-sphere int32)
(i-inside-sphere int32)
(inside-sphere-dist float)
(sign float)
(travel-len float)
(dist2 float)
(inside-dist float)
(rand-angle float)
(dir-update basic)
(debug-offset vector :inline)
)
:method-count-assert 9
:size-assert #xc0
:flag-assert #x9000000c0
)
;; definition for method 3 of type nav-control-cfs-work
(defmethod inspect nav-control-cfs-work ((this nav-control-cfs-work))
(defmethod inspect ((this nav-control-cfs-work))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -810,7 +807,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 18 of type nav-control
;; INFO: Used lq/sq
(defmethod avoid-spheres-1! nav-control ((this nav-control) (arg0 nav-avoid-spheres-params))
(defmethod avoid-spheres-1! ((this nav-control) (arg0 nav-avoid-spheres-params))
(local-vars (v1-28 int) (a0-29 int) (a1-3 float))
(rlet ((acc :class vf)
(Q :class vf)
@@ -1110,7 +1107,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 19 of type nav-control
;; INFO: Used lq/sq
(defmethod avoid-spheres-2! nav-control ((this nav-control) (arg0 nav-avoid-spheres-params))
(defmethod avoid-spheres-2! ((this nav-control) (arg0 nav-avoid-spheres-params))
(local-vars (a0-32 int) (a1-3 float))
(rlet ((acc :class vf)
(Q :class vf)
@@ -1243,12 +1240,12 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 21 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod clamp-vector-to-mesh-no-gaps nav-control ((this nav-control)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 clamp-travel-vector-to-mesh-return-info)
)
(defmethod clamp-vector-to-mesh-no-gaps ((this nav-control)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 clamp-travel-vector-to-mesh-return-info)
)
(clamp-vector-to-mesh-no-gaps (-> this state mesh) arg0 arg1 arg2 arg3)
0
(none)
@@ -1345,7 +1342,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 164 signed mismatch
;; WARN: Stack slot offset 168 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod clamp-vector-to-mesh-no-gaps nav-mesh ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 vector) (arg3 clamp-travel-vector-to-mesh-return-info))
(defmethod clamp-vector-to-mesh-no-gaps ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 vector) (arg3 clamp-travel-vector-to-mesh-return-info))
(local-vars
(v1-12 symbol)
(sv-112 nav-ray)
@@ -1567,7 +1564,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 21 of type nav-mesh
;; WARN: Return type mismatch object vs none.
;; WARN: Function (method 21 nav-mesh) has a return type of none, but the expression builder found a return statement.
(defmethod find-adjacent-bounds-one nav-mesh ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 int) (arg3 int))
(defmethod find-adjacent-bounds-one ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 int) (arg3 int))
(local-vars (sv-16 nav-poly))
(if (zero? arg3)
(set! arg2 (the-as int (mod (the-as uint (+ arg2 1)) (-> arg1 vertex-count))))
@@ -1616,7 +1613,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 20 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod set-normals-from-adjacent-bounds nav-mesh ((this nav-mesh) (arg0 clamp-travel-vector-to-mesh-return-info))
(defmethod set-normals-from-adjacent-bounds ((this nav-mesh) (arg0 clamp-travel-vector-to-mesh-return-info))
(find-adjacent-bounds-one this (-> arg0 vert-prev) (-> arg0 poly) (-> arg0 edge) -1)
(find-adjacent-bounds-one this (-> arg0 vert-next) (-> arg0 poly) (-> arg0 edge) 0)
(vector-! (-> arg0 prev-normal) (-> arg0 vert-0) (-> arg0 vert-prev))
@@ -1796,14 +1793,14 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 156 signed mismatch
;; WARN: Stack slot offset 160 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod clamp-vector-to-mesh-cross-gaps nav-mesh ((this nav-mesh)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 float)
(arg4 symbol)
(arg5 clamp-travel-vector-to-mesh-return-info)
)
(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-mesh)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 float)
(arg4 symbol)
(arg5 clamp-travel-vector-to-mesh-return-info)
)
(local-vars
(v1-11 symbol)
(v1-22 symbol)
@@ -2049,7 +2046,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 22 of type nav-control
(defmethod find-first-sphere-and-update-avoid-params nav-control ((this nav-control) (arg0 vector) (arg1 nav-avoid-spheres-params))
(defmethod find-first-sphere-and-update-avoid-params ((this nav-control) (arg0 vector) (arg1 nav-avoid-spheres-params))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -2118,7 +2115,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 24 of type nav-control
(defmethod add-root-sphere-to-hash! nav-control ((this nav-control) (arg0 vector) (arg1 int))
(defmethod add-root-sphere-to-hash! ((this nav-control) (arg0 vector) (arg1 int))
"Add our root sphere to the hash (if enabled with output-sphere-hash flag) at the given location."
(if (logtest? (-> this flags) (nav-control-flag output-sphere-hash))
(add-sphere-with-mask-and-id
@@ -2132,7 +2129,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 47 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod reset! nav-state ((this nav-state) (arg0 nav-control))
(defmethod reset! ((this nav-state) (arg0 nav-control))
(set! (-> this nav) arg0)
(set! (-> this flags) (nav-state-flag))
(set! (-> this current-poly) #f)
@@ -2144,7 +2141,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 7 of type nav-state
(defmethod relocate nav-state ((this nav-state) (arg0 int))
(defmethod relocate ((this nav-state) (arg0 int))
(break!)
(&+! (-> this nav) arg0)
this
@@ -2152,46 +2149,46 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 12 of type nav-state
;; INFO: Used lq/sq
(defmethod get-velocity nav-state ((this nav-state) (arg0 vector))
(defmethod get-velocity ((this nav-state) (arg0 vector))
(set! (-> arg0 quad) (-> this velocity quad))
arg0
)
;; definition for method 14 of type nav-state
;; INFO: Used lq/sq
(defmethod get-heading nav-state ((this nav-state) (arg0 vector))
(defmethod get-heading ((this nav-state) (arg0 vector))
(set! (-> arg0 quad) (-> this heading quad))
arg0
)
;; definition for method 15 of type nav-state
;; INFO: Used lq/sq
(defmethod get-target-post nav-state ((this nav-state) (arg0 vector))
(defmethod get-target-post ((this nav-state) (arg0 vector))
(set! (-> arg0 quad) (-> this target-post quad))
arg0
)
;; definition for method 19 of type nav-state
(defmethod get-current-poly nav-state ((this nav-state))
(defmethod get-current-poly ((this nav-state))
"@returns `current-poly`"
(-> this current-poly)
)
;; definition for method 16 of type nav-state
(defmethod get-speed nav-state ((this nav-state))
(defmethod get-speed ((this nav-state))
"@returns `speed`"
(-> this speed)
)
;; definition for method 17 of type nav-state
(defmethod get-rotation-rate nav-state ((this nav-state))
(defmethod get-rotation-rate ((this nav-state))
"@returns `rotation-rate`"
(-> this rotation-rate)
)
;; definition for method 13 of type nav-state
;; INFO: Used lq/sq
(defmethod get-travel nav-state ((this nav-state) (arg0 vector))
(defmethod get-travel ((this nav-state) (arg0 vector))
(set! (-> arg0 quad) (-> this travel quad))
arg0
)
@@ -2199,7 +2196,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 44 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod set-velocity! nav-state ((this nav-state) (velocity vector))
(defmethod set-velocity! ((this nav-state) (velocity vector))
(set! (-> this velocity quad) (-> velocity quad))
0
(none)
@@ -2208,7 +2205,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 45 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod set-heading! nav-state ((this nav-state) (arg0 vector))
(defmethod set-heading! ((this nav-state) (arg0 vector))
(set! (-> this heading quad) (-> arg0 quad))
0
(none)
@@ -2216,7 +2213,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 46 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod set-speed! nav-state ((this nav-state) (arg0 meters))
(defmethod set-speed! ((this nav-state) (arg0 meters))
(set! (-> this speed) arg0)
0
(none)
@@ -2225,7 +2222,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 42 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod set-target-post! nav-state ((this nav-state) (arg0 vector))
(defmethod set-target-post! ((this nav-state) (arg0 vector))
(logclear! (-> this flags) (nav-state-flag directional-mode))
(logior! (-> this flags) (nav-state-flag target-poly-dirty))
(set! (-> this target-post quad) (-> arg0 quad))
@@ -2236,7 +2233,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 43 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod set-travel! nav-state ((this nav-state) (arg0 vector))
(defmethod set-travel! ((this nav-state) (arg0 vector))
(logior! (-> this flags) (nav-state-flag directional-mode))
(set! (-> this travel quad) (-> arg0 quad))
0
@@ -2245,7 +2242,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 20 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod copy-nav-state! nav-state ((this nav-state) (arg0 (pointer nav-state)))
(defmethod copy-nav-state! ((this nav-state) (arg0 (pointer nav-state)))
"Copies the [[nav-state]] the given pointer points to into the current object"
(mem-copy! (the-as pointer this) arg0 176)
0
@@ -2254,7 +2251,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 10 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-10 nav-state ((this nav-state))
(defmethod nav-state-method-10 ((this nav-state))
0
(none)
)
@@ -2262,7 +2259,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 9 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw nav-state ((this nav-state))
(defmethod debug-draw ((this nav-state))
(let ((s5-0 (-> this mesh)))
(if (-> this next-poly)
(debug-draw-poly s5-0 (-> this next-poly) *color-cyan*)
@@ -2306,14 +2303,14 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 38 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod set-current-poly! nav-state ((this nav-state) (arg0 nav-poly))
(defmethod set-current-poly! ((this nav-state) (arg0 nav-poly))
(set! (-> this current-poly) arg0)
0
(none)
)
;; definition for method 41 of type nav-state
(defmethod clamp-vector-to-mesh-cross-gaps nav-state ((this nav-state) (arg0 vector))
(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-state) (arg0 vector))
(when (-> this current-poly)
(clamp-vector-to-mesh-cross-gaps
(-> this nav)
@@ -2331,7 +2328,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 40 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod do-navigation-to-destination nav-state ((this nav-state) (arg0 vector))
(defmethod do-navigation-to-destination ((this nav-state) (arg0 vector))
(local-vars (v1-15 symbol))
(rlet ((acc :class vf)
(Q :class vf)
@@ -2442,7 +2439,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 18 of type nav-state
(defmethod try-projecting-to-current-poly nav-state ((this nav-state) (arg0 vector) (arg1 object) (arg2 vector))
(defmethod try-projecting-to-current-poly ((this nav-state) (arg0 vector) (arg1 object) (arg2 vector))
(cond
((-> this current-poly)
(let ((s5-0 (-> this nav))
@@ -2473,14 +2470,14 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 20 of type nav-control
;; WARN: Return type mismatch int vs none.
(defmethod clamp-vector-to-mesh-cross-gaps nav-control ((this nav-control)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 float)
(arg4 symbol)
(arg5 clamp-travel-vector-to-mesh-return-info)
)
(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-control)
(arg0 vector)
(arg1 nav-poly)
(arg2 vector)
(arg3 float)
(arg4 symbol)
(arg5 clamp-travel-vector-to-mesh-return-info)
)
(let ((v1-0 (new 'stack-no-clear 'vector)))
(vector-! v1-0 arg0 (-> this state mesh bounds))
(clamp-vector-to-mesh-cross-gaps (-> this state mesh) v1-0 arg1 arg2 arg3 arg4 arg5)
@@ -2490,7 +2487,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
)
;; definition for method 12 of type nav-control
(defmethod cloest-point-on-mesh nav-control ((this nav-control) (arg0 vector) (arg1 vector) (arg2 nav-poly))
(defmethod cloest-point-on-mesh ((this nav-control) (arg0 vector) (arg1 vector) (arg2 nav-poly))
(local-vars (sv-16 vector))
(set! sv-16 arg0)
(let ((gp-0 (new 'stack-no-clear 'nav-find-poly-parms)))
@@ -2526,7 +2523,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 50 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-50 nav-state ((this nav-state))
(defmethod nav-state-method-50 ((this nav-state))
0
(none)
)
@@ -2594,7 +2591,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 51 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-route-portals nav-state ((this nav-state))
(defmethod navigate-using-route-portals ((this nav-state))
(local-vars
(v1-117 float)
(sv-112 vector)
@@ -2858,7 +2855,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 124 signed mismatch
;; WARN: Stack slot offset 128 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-best-dir-use-existing-avoid-spheres nav-state ((this nav-state) (arg0 nav-avoid-spheres-params))
(defmethod navigate-using-best-dir-use-existing-avoid-spheres ((this nav-state) (arg0 nav-avoid-spheres-params))
(local-vars
(sv-96 int)
(sv-104 nav-mesh-work)
@@ -3092,7 +3089,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 220 signed mismatch
;; WARN: Stack slot offset 224 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-best-dir-recompute-avoid-spheres-1 nav-state ((this nav-state))
(defmethod navigate-using-best-dir-recompute-avoid-spheres-1 ((this nav-state))
(local-vars
(sv-192 int)
(sv-200 nav-mesh-work)
@@ -3267,7 +3264,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 53 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod navigate-within-poly nav-state ((this nav-state))
(defmethod navigate-within-poly ((this nav-state))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -3386,7 +3383,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 54 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod clamp-travel-vector nav-state ((this nav-state))
(defmethod clamp-travel-vector ((this nav-state))
(let ((s5-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)))
(clamp-vector-to-mesh-cross-gaps
(-> this mesh)
@@ -3427,7 +3424,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
(defmethod plan-over-pat1-polys-using-route nav-state ((this nav-state) (arg0 nav-gap-info))
(defmethod plan-over-pat1-polys-using-route ((this nav-state) (arg0 nav-gap-info))
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
(let ((a1-1 (-> this next-poly)))
(when (logtest? (-> a1-1 pat) 1)
@@ -3470,7 +3467,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 24 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod turn-and-navigate-to-destination nav-state ((this nav-state))
(defmethod turn-and-navigate-to-destination ((this nav-state))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -3531,7 +3528,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 25 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-route-portals-wrapper nav-state ((this nav-state))
(defmethod navigate-using-route-portals-wrapper ((this nav-state))
(navigate-using-route-portals this)
0
(none)
@@ -3539,7 +3536,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 26 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-best-dir-recompute-avoid-spheres-1-wrapper nav-state ((this nav-state))
(defmethod navigate-using-best-dir-recompute-avoid-spheres-1-wrapper ((this nav-state))
(navigate-using-best-dir-recompute-avoid-spheres-1 this)
0
(none)
@@ -3547,7 +3544,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 27 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod navigate-within-poly-wrapper nav-state ((this nav-state))
(defmethod navigate-within-poly-wrapper ((this nav-state))
(navigate-within-poly this)
0
(none)
@@ -3581,7 +3578,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 204 signed mismatch
;; WARN: Stack slot offset 204 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod compute-travel-speed nav-state ((this nav-state))
(defmethod compute-travel-speed ((this nav-state))
(local-vars (sv-192 float) (sv-196 float) (sv-200 float) (sv-204 float) (sv-224 vector))
(let ((s5-0 this))
(let ((s4-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)))
@@ -3653,7 +3650,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 34 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod navigate-v1! nav-state ((this nav-state))
(defmethod navigate-v1! ((this nav-state))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -3741,7 +3738,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 35 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod reset-target! nav-state ((this nav-state))
(defmethod reset-target! ((this nav-state))
(vector-reset! (-> this target-dir))
0
(none)
@@ -3749,7 +3746,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 36 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod add-offset-to-target! nav-state ((this nav-state) (arg0 vector))
(defmethod add-offset-to-target! ((this nav-state) (arg0 vector))
(vector+! (-> this target-dir) (-> this target-dir) arg0)
0
(none)
@@ -3757,14 +3754,14 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 29 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-29 nav-state ((this nav-state))
(defmethod nav-state-method-29 ((this nav-state))
0
(none)
)
;; definition for method 30 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-30 nav-state ((this nav-state))
(defmethod nav-state-method-30 ((this nav-state))
0
(none)
)
@@ -3844,7 +3841,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; WARN: Stack slot offset 220 signed mismatch
;; WARN: Stack slot offset 224 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod navigate-using-best-dir-recompute-avoid-spheres-2 nav-state ((this nav-state))
(defmethod navigate-using-best-dir-recompute-avoid-spheres-2 ((this nav-state))
(local-vars
(sv-192 int)
(sv-200 nav-mesh-work)
@@ -4024,7 +4021,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 32 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod update-travel-dir-from-spheres nav-state ((this nav-state))
(defmethod update-travel-dir-from-spheres ((this nav-state))
(local-vars (v1-11 float) (v1-25 float))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -4089,7 +4086,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 33 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod compute-speed-simple nav-state ((this nav-state))
(defmethod compute-speed-simple ((this nav-state))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -4151,7 +4148,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 37 of type nav-state
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod navigate-v2! nav-state ((this nav-state))
(defmethod navigate-v2! ((this nav-state))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
+83 -91
View File
@@ -3,42 +3,39 @@
;; definition of type nav-enemy-info
(deftype nav-enemy-info (enemy-info)
((callback-info nav-callback-info :offset-assert 384)
(use-momentum symbol :offset-assert 388)
(use-frustration symbol :offset-assert 392)
(use-stop-chase symbol :offset-assert 396)
(use-circling symbol :offset-assert 400)
(use-pacing symbol :offset-assert 404)
(walk-anim int32 :offset-assert 408)
(turn-anim int32 :offset-assert 412)
(run-anim int32 :offset-assert 416)
(taunt-anim int32 :offset-assert 420)
(run-travel-speed meters :offset-assert 424)
(run-acceleration meters :offset-assert 428)
(run-turning-acceleration meters :offset-assert 432)
(walk-travel-speed meters :offset-assert 436)
(walk-acceleration meters :offset-assert 440)
(walk-turning-acceleration meters :offset-assert 444)
(maximum-rotation-rate degrees :offset-assert 448)
(notice-nav-radius meters :offset-assert 452)
(frustration-distance meters :offset-assert 456)
(frustration-time time-frame :offset-assert 464)
(blocked-time time-frame :offset-assert 472)
(circle-dist-lo float :offset-assert 480)
(circle-dist-hi float :offset-assert 484)
(nav-mesh nav-mesh :offset-assert 488)
((callback-info nav-callback-info)
(use-momentum symbol)
(use-frustration symbol)
(use-stop-chase symbol)
(use-circling symbol)
(use-pacing symbol)
(walk-anim int32)
(turn-anim int32)
(run-anim int32)
(taunt-anim int32)
(run-travel-speed meters)
(run-acceleration meters)
(run-turning-acceleration meters)
(walk-travel-speed meters)
(walk-acceleration meters)
(walk-turning-acceleration meters)
(maximum-rotation-rate degrees)
(notice-nav-radius meters)
(frustration-distance meters)
(frustration-time time-frame)
(blocked-time time-frame)
(circle-dist-lo float)
(circle-dist-hi float)
(nav-mesh nav-mesh)
)
:method-count-assert 11
:size-assert #x1ec
:flag-assert #xb000001ec
(:methods
(copy-nav-enemy-info! (_type_ nav-enemy-info) none 10)
(copy-nav-enemy-info! (_type_ nav-enemy-info) none)
)
)
;; definition for method 3 of type nav-enemy-info
;; INFO: Used lq/sq
(defmethod inspect nav-enemy-info ((this nav-enemy-info))
(defmethod inspect ((this nav-enemy-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -155,67 +152,65 @@
;; definition of type nav-enemy
(deftype nav-enemy (enemy)
((enemy-info nav-enemy-info :override)
(frustration-point vector :inline :offset-assert 544)
(move-dest vector :inline :offset-assert 560)
(frustration-time time-frame :offset-assert 576)
(blocked-start-time time-frame :offset-assert 584)
(restore-nav-radius-time time-frame :offset-assert 592)
(nav-radius-backup float :offset-assert 600)
((enemy-info nav-enemy-info :override)
(frustration-point vector :inline)
(move-dest vector :inline)
(frustration-time time-frame)
(blocked-start-time time-frame)
(restore-nav-radius-time time-frame)
(nav-radius-backup float)
)
:heap-base #x1e0
:method-count-assert 178
:size-assert #x25c
:flag-assert #xb201e0025c
(:state-methods
taunt
pacing
circling
stop-chase
debug-control
)
(:methods
(set-enemy-info! (_type_ nav-enemy-info) none :replace 112)
(init-enemy-behaviour-and-stats! (_type_ nav-enemy-info) none :replace 113)
(taunt () _type_ :state 137)
(pacing () _type_ :state 138)
(circling () _type_ :state 139)
(stop-chase () _type_ :state 140)
(debug-control () _type_ :state 141)
(nav-enemy-method-142 (_type_ nav-control) none 142)
(nav-enemy-method-143 (_type_ nav-control) none 143)
(nav-enemy-method-144 (_type_) time-frame :behavior nav-enemy 144)
(nav-enemy-method-145 (_type_ nav-control) none 145)
(nav-enemy-method-146 (_type_ nav-control) none 146)
(nav-enemy-method-147 (_type_ nav-control) none 147)
(nav-enemy-method-148 (_type_ nav-control) none 148)
(nav-enemy-method-149 (_type_ nav-control) none 149)
(nav-enemy-method-150 (_type_ nav-control) none 150)
(nav-enemy-method-151 (_type_ nav-control) none 151)
(nav-enemy-method-152 (_type_ nav-control) none 152)
(nav-enemy-method-153 (_type_ nav-control) none 153)
(nav-enemy-method-154 (_type_ nav-control) none 154)
(nav-enemy-method-155 (_type_) none 155)
(nav-enemy-method-156 (_type_) none 156)
(nav-enemy-method-157 (_type_ vector) nav-poly 157)
(nav-enemy-method-158 (_type_ vector) object 158)
(nav-enemy-method-159 (_type_ vector) symbol 159)
(nav-enemy-method-160 (_type_) none 160)
(nav-enemy-method-161 (_type_) none 161)
(nav-enemy-method-162 (_type_) none 162)
(nav-enemy-method-163 (_type_) symbol 163)
(nav-enemy-method-164 (_type_) none 164)
(nav-enemy-method-165 (_type_) none 165)
(nav-enemy-method-166 (_type_) none 166)
(nav-enemy-method-167 (_type_) none 167)
(nav-enemy-method-168 (_type_) float 168)
(nav-enemy-method-169 (_type_ float symbol) float 169)
(nav-enemy-method-170 (_type_) none 170)
(nav-enemy-method-171 (_type_) none 171)
(nav-enemy-method-172 (_type_) none 172)
(nav-enemy-method-173 (_type_) none 173)
(nav-enemy-method-174 (_type_) symbol 174)
(nav-enemy-method-175 (_type_) symbol 175)
(nav-enemy-method-176 (_type_) none :behavior nav-enemy 176)
(nav-enemy-method-177 (_type_) none 177)
(set-enemy-info! (_type_ nav-enemy-info) none :replace)
(init-enemy-behaviour-and-stats! (_type_ nav-enemy-info) none :replace)
(nav-enemy-method-142 (_type_ nav-control) none)
(nav-enemy-method-143 (_type_ nav-control) none)
(nav-enemy-method-144 (_type_) time-frame :behavior nav-enemy)
(nav-enemy-method-145 (_type_ nav-control) none)
(nav-enemy-method-146 (_type_ nav-control) none)
(nav-enemy-method-147 (_type_ nav-control) none)
(nav-enemy-method-148 (_type_ nav-control) none)
(nav-enemy-method-149 (_type_ nav-control) none)
(nav-enemy-method-150 (_type_ nav-control) none)
(nav-enemy-method-151 (_type_ nav-control) none)
(nav-enemy-method-152 (_type_ nav-control) none)
(nav-enemy-method-153 (_type_ nav-control) none)
(nav-enemy-method-154 (_type_ nav-control) none)
(nav-enemy-method-155 (_type_) none)
(nav-enemy-method-156 (_type_) none)
(nav-enemy-method-157 (_type_ vector) nav-poly)
(nav-enemy-method-158 (_type_ vector) object)
(nav-enemy-method-159 (_type_ vector) symbol)
(nav-enemy-method-160 (_type_) none)
(nav-enemy-method-161 (_type_) none)
(nav-enemy-method-162 (_type_) none)
(nav-enemy-method-163 (_type_) symbol)
(nav-enemy-method-164 (_type_) none)
(nav-enemy-method-165 (_type_) none)
(nav-enemy-method-166 (_type_) none)
(nav-enemy-method-167 (_type_) none)
(nav-enemy-method-168 (_type_) float)
(nav-enemy-method-169 (_type_ float symbol) float)
(nav-enemy-method-170 (_type_) none)
(nav-enemy-method-171 (_type_) none)
(nav-enemy-method-172 (_type_) none)
(nav-enemy-method-173 (_type_) none)
(nav-enemy-method-174 (_type_) symbol)
(nav-enemy-method-175 (_type_) symbol)
(nav-enemy-method-176 (_type_) none :behavior nav-enemy)
(nav-enemy-method-177 (_type_) none)
)
)
;; definition for method 3 of type nav-enemy
(defmethod inspect nav-enemy ((this nav-enemy))
(defmethod inspect ((this nav-enemy))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -236,17 +231,14 @@
;; definition of type nav-enemy-debug-control-info
(deftype nav-enemy-debug-control-info (basic)
((enable basic :offset-assert 4)
(steering float :offset-assert 8)
(throttle float :offset-assert 12)
((enable basic)
(steering float)
(throttle float)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-enemy-debug-control-info
(defmethod inspect nav-enemy-debug-control-info ((this nav-enemy-debug-control-info))
(defmethod inspect ((this nav-enemy-debug-control-info))
(when (not this)
(set! this this)
(goto cfg-4)
+52 -52
View File
@@ -3,7 +3,7 @@
;; definition for method 10 of type nav-enemy-info
;; WARN: Return type mismatch int vs none.
(defmethod copy-nav-enemy-info! nav-enemy-info ((this nav-enemy-info) (obj-to-copy nav-enemy-info))
(defmethod copy-nav-enemy-info! ((this nav-enemy-info) (obj-to-copy nav-enemy-info))
"Copies the provided [[nav-enemy-info]] into the current object"
(mem-copy! (&-> this type) (&-> obj-to-copy type) 492)
0
@@ -11,7 +11,7 @@
)
;; definition for method 61 of type nav-enemy
(defmethod enemy-method-61 nav-enemy ((this nav-enemy) (arg0 int))
(defmethod enemy-method-61 ((this nav-enemy) (arg0 int))
(let* ((t9-0 (method-of-type enemy enemy-method-61))
(s5-0 (t9-0 this arg0))
)
@@ -23,7 +23,7 @@
)
;; definition for method 74 of type nav-enemy
(defmethod general-event-handler nav-enemy ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(defmethod general-event-handler ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
@@ -61,7 +61,7 @@
;; definition for method 156 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-156 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-156 ((this nav-enemy))
(cond
((zero? (-> this path))
(go process-drawable-art-error "no path")
@@ -98,7 +98,7 @@
;; definition for method 102 of type nav-enemy
;; INFO: Used lq/sq
(defmethod enemy-method-102 nav-enemy ((this nav-enemy))
(defmethod enemy-method-102 ((this nav-enemy))
(let ((gp-0 (-> this root))
(s3-0 (-> this nav state))
)
@@ -142,7 +142,7 @@
;; definition for method 100 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch vector vs symbol.
(defmethod enemy-method-100 nav-enemy ((this nav-enemy))
(defmethod enemy-method-100 ((this nav-enemy))
(local-vars (v0-1 vector))
(when (not (-> this enemy-info move-to-ground))
(enemy-method-103 this)
@@ -205,7 +205,7 @@
;; definition for method 55 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod track-target! nav-enemy ((self nav-enemy))
(defmethod track-target! ((self nav-enemy))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@@ -293,7 +293,7 @@
;; definition for method 177 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-177 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-177 ((this nav-enemy))
(let ((v1-2 (-> this nav state current-poly)))
(when (and v1-2 (logtest? (-> v1-2 pat) 4) (!= (-> v1-2 link) 255))
(let ((v1-6 (-> this nav state mesh link-array (-> v1-2 link) dest-mesh)))
@@ -309,7 +309,7 @@
;; definition for method 176 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-176 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-176 ((this nav-enemy))
(nav-enemy-method-177 this)
(cond
((nav-enemy-method-174 this)
@@ -361,7 +361,7 @@
;; definition for method 145 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-145 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-145 ((this nav-enemy) (arg0 nav-control))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -425,7 +425,7 @@
;; definition for method 146 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-146 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-146 ((this nav-enemy) (arg0 nav-control))
(navigate-using-route-portals (-> arg0 state))
0
0
@@ -434,7 +434,7 @@
;; definition for method 147 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-147 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-147 ((this nav-enemy) (arg0 nav-control))
(navigate-using-best-dir-recompute-avoid-spheres-1 (-> arg0 state))
0
0
@@ -443,7 +443,7 @@
;; definition for method 148 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-148 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-148 ((this nav-enemy) (arg0 nav-control))
(navigate-within-poly (-> arg0 state))
0
0
@@ -452,7 +452,7 @@
;; definition for method 149 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-149 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-149 ((this nav-enemy) (arg0 nav-control))
(compute-travel-speed (-> arg0 state))
0
(none)
@@ -460,7 +460,7 @@
;; definition for method 155 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-155 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-155 ((this nav-enemy))
(navigate-v1! (-> this nav state))
0
(none)
@@ -469,7 +469,7 @@
;; definition for method 150 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-150 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-150 ((this nav-enemy) (arg0 nav-control))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -533,7 +533,7 @@
;; definition for method 151 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-151 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-151 ((this nav-enemy) (arg0 nav-control))
(navigate-using-route-portals (-> arg0 state))
0
0
@@ -542,7 +542,7 @@
;; definition for method 152 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-152 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-152 ((this nav-enemy) (arg0 nav-control))
(navigate-using-best-dir-recompute-avoid-spheres-2 (-> arg0 state))
0
(none)
@@ -550,7 +550,7 @@
;; definition for method 153 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-153 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-153 ((this nav-enemy) (arg0 nav-control))
(update-travel-dir-from-spheres (-> arg0 state))
0
(none)
@@ -558,7 +558,7 @@
;; definition for method 154 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-154 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-154 ((this nav-enemy) (arg0 nav-control))
(compute-speed-simple (-> arg0 state))
0
(none)
@@ -567,7 +567,7 @@
;; definition for method 142 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-142 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-142 ((this nav-enemy) (arg0 nav-control))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(let ((a1-1 (-> arg0 state)))
(set! (-> s5-0 quad) (-> a1-1 heading quad))
@@ -584,7 +584,7 @@
;; definition for method 143 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-143 nav-enemy ((this nav-enemy) (arg0 nav-control))
(defmethod nav-enemy-method-143 ((this nav-enemy) (arg0 nav-control))
(let ((v1-0 (new 'stack-no-clear 'vector)))
(let ((a2-0 (-> arg0 state)))
(set! (-> v1-0 quad) (-> a2-0 velocity quad))
@@ -870,7 +870,7 @@
;; definition for method 170 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-170 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-170 ((this nav-enemy))
(if (not (logtest? (enemy-flag enemy-flag36) (-> this enemy-flags)))
(set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> this enemy-flags))))
)
@@ -882,7 +882,7 @@
;; definition for method 171 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-171 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-171 ((this nav-enemy))
(set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> this nav callback-info) *nav-enemy-null-callback-info*)
0
@@ -891,7 +891,7 @@
;; definition for method 172 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-172 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-172 ((this nav-enemy))
(set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> this enemy-flags))))
0
(none)
@@ -899,24 +899,24 @@
;; definition for method 173 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-173 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-173 ((this nav-enemy))
(set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag enemy-flag37))))
0
(none)
)
;; definition for method 174 of type nav-enemy
(defmethod nav-enemy-method-174 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-174 ((this nav-enemy))
(logtest? (enemy-flag enemy-flag36) (-> this enemy-flags))
)
;; definition for method 175 of type nav-enemy
(defmethod nav-enemy-method-175 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-175 ((this nav-enemy))
(logtest? (enemy-flag enemy-flag37) (-> this enemy-flags))
)
;; definition for method 157 of type nav-enemy
(defmethod nav-enemy-method-157 nav-enemy ((this nav-enemy) (arg0 vector))
(defmethod nav-enemy-method-157 ((this nav-enemy) (arg0 vector))
(let ((v1-0 (-> this nav))
(a0-1 arg0)
(a1-1 (new 'stack-no-clear 'nav-find-poly-parms))
@@ -929,7 +929,7 @@
)
;; definition for method 158 of type nav-enemy
(defmethod nav-enemy-method-158 nav-enemy ((this nav-enemy) (arg0 vector))
(defmethod nav-enemy-method-158 ((this nav-enemy) (arg0 vector))
(let ((f1-0 (-> this root trans y))
(f0-0 (-> arg0 y))
(v1-1 (-> this fact))
@@ -950,7 +950,7 @@
)
;; definition for method 159 of type nav-enemy
(defmethod nav-enemy-method-159 nav-enemy ((this nav-enemy) (arg0 vector))
(defmethod nav-enemy-method-159 ((this nav-enemy) (arg0 vector))
(let ((f1-0 (-> this root trans y))
(f0-0 (-> arg0 y))
(v1-1 (-> this fact))
@@ -964,7 +964,7 @@
)
;; definition for method 98 of type nav-enemy
(defmethod in-aggro-range? nav-enemy ((this nav-enemy) (arg0 process-focusable) (arg1 vector))
(defmethod in-aggro-range? ((this nav-enemy) (arg0 process-focusable) (arg1 vector))
"Should the enemy activate.
- if `activate-distance` is `0.0`, always true
- otherwise, check if the provided process is close enough
@@ -995,7 +995,7 @@
;; definition for method 161 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-161 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-161 ((this nav-enemy))
(set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag not-frustrated))))
(set-time! (-> this frustration-time))
(let ((v1-7 (handle->process (-> this focus handle))))
@@ -1009,7 +1009,7 @@
;; definition for method 160 of type nav-enemy
;; WARN: Return type mismatch object vs none.
(defmethod nav-enemy-method-160 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-160 ((this nav-enemy))
(let ((s5-0 (handle->process (-> this focus handle))))
(cond
((or (not s5-0)
@@ -1033,14 +1033,14 @@
;; definition for method 162 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-162 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-162 ((this nav-enemy))
(set! (-> this blocked-start-time) 0)
0
(none)
)
;; definition for method 163 of type nav-enemy
(defmethod nav-enemy-method-163 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-163 ((this nav-enemy))
(let ((v1-0 (-> this blocked-start-time)))
(and (nonzero? v1-0) (time-elapsed? v1-0 (-> this enemy-info blocked-time)))
)
@@ -1048,7 +1048,7 @@
;; definition for method 164 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-164 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-164 ((this nav-enemy))
(if (-> this enemy-info use-momentum)
(logior! (-> this nav flags) (nav-control-flag use-momentum))
(logclear! (-> this nav flags) (nav-control-flag use-momentum))
@@ -1059,7 +1059,7 @@
;; definition for method 167 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-167 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-167 ((this nav-enemy))
(let ((v1-0 (-> this nav)))
(set! (-> v1-0 target-speed) 0.0)
)
@@ -1078,7 +1078,7 @@
;; definition for method 165 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-165 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-165 ((this nav-enemy))
(let ((v1-0 (-> this nav)))
(set! (-> v1-0 target-speed) (-> this enemy-info walk-travel-speed))
)
@@ -1097,7 +1097,7 @@
;; definition for method 166 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod nav-enemy-method-166 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-166 ((this nav-enemy))
(let ((v1-0 (-> this nav)))
(set! (-> v1-0 target-speed) (-> this enemy-info run-travel-speed))
)
@@ -1116,7 +1116,7 @@
;; definition for method 112 of type nav-enemy
;; WARN: Return type mismatch float vs none.
(defmethod set-enemy-info! nav-enemy ((this nav-enemy) (arg0 nav-enemy-info))
(defmethod set-enemy-info! ((this nav-enemy) (arg0 nav-enemy-info))
"In addition to setting the `enemy-info`, also init the `neck-joint` if applicable from it
@param info Set `enemy-info` accordingly"
(set! (-> this enemy-info) arg0)
@@ -1138,7 +1138,7 @@
;; definition for method 113 of type nav-enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-enemy-behaviour-and-stats! nav-enemy ((this nav-enemy) (arg0 nav-enemy-info))
(defmethod init-enemy-behaviour-and-stats! ((this nav-enemy) (arg0 nav-enemy-info))
"Initializes a bunch of enemy fields related to how they should react, how many hitpoints they should have, etc"
(local-vars (sv-16 res-tag))
(when (coin-flip? this)
@@ -1317,7 +1317,7 @@
;; definition for method 11 of type nav-enemy
;; WARN: Return type mismatch int vs none.
(defmethod init-from-entity! nav-enemy ((this nav-enemy) (arg0 entity-actor))
(defmethod init-from-entity! ((this nav-enemy) (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
@@ -1488,7 +1488,7 @@ This commonly includes things such as:
)
;; definition for method 169 of type nav-enemy
(defmethod nav-enemy-method-169 nav-enemy ((this nav-enemy) (arg0 float) (arg1 symbol))
(defmethod nav-enemy-method-169 ((this nav-enemy) (arg0 float) (arg1 symbol))
(if arg1
(set! (-> this nav-radius-backup) arg0)
)
@@ -1498,7 +1498,7 @@ This commonly includes things such as:
)
;; definition for method 168 of type nav-enemy
(defmethod nav-enemy-method-168 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-168 ((this nav-enemy))
(if (zero? (-> this restore-nav-radius-time))
(set! (-> this root nav-radius) (-> this nav-radius-backup))
)
@@ -1506,7 +1506,7 @@ This commonly includes things such as:
;; definition for method 144 of type nav-enemy
;; WARN: Return type mismatch int vs time-frame.
(defmethod nav-enemy-method-144 nav-enemy ((this nav-enemy))
(defmethod nav-enemy-method-144 ((this nav-enemy))
(set! (-> this root nav-radius) 4.096)
(let ((s5-1 (max (-> this restore-nav-radius-time) (+ (current-time) (get-rand-int-range this 1500 2400)))))
(set! (-> this restore-nav-radius-time) (the-as time-frame s5-1))
@@ -1582,7 +1582,7 @@ This commonly includes things such as:
)
;; definition for method 68 of type nav-enemy
(defmethod go-stare2 nav-enemy ((this nav-enemy))
(defmethod go-stare2 ((this nav-enemy))
(if (!= (-> this enemy-info taunt-anim) -1)
(go (method-of-object this taunt))
)
@@ -1590,7 +1590,7 @@ This commonly includes things such as:
)
;; definition for method 67 of type nav-enemy
(defmethod go-stare nav-enemy ((this nav-enemy))
(defmethod go-stare ((this nav-enemy))
(let ((s5-0 (-> this focus aware)))
(cond
((or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag not-frustrated) (-> this enemy-flags)))
@@ -1612,7 +1612,7 @@ This commonly includes things such as:
)
;; definition for method 70 of type nav-enemy
(defmethod go-hostile nav-enemy ((this nav-enemy))
(defmethod go-hostile ((this nav-enemy))
(if (or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag not-frustrated) (-> this enemy-flags)))
(nav-enemy-method-163 this)
)
@@ -1622,7 +1622,7 @@ This commonly includes things such as:
)
;; definition for method 71 of type nav-enemy
(defmethod go-flee nav-enemy ((this nav-enemy))
(defmethod go-flee ((this nav-enemy))
(go (method-of-object this flee))
)
@@ -2681,7 +2681,7 @@ This commonly includes things such as:
;; definition for method 82 of type nav-enemy
;; INFO: Used lq/sq
(defmethod enemy-method-82 nav-enemy ((this nav-enemy) (arg0 enemy-jump-info))
(defmethod enemy-method-82 ((this nav-enemy) (arg0 enemy-jump-info))
"@abstract"
(let ((v1-0 (new 'stack-no-clear 'vector)))
(set! (-> v1-0 quad) (-> arg0 dest-pos quad))
@@ -2692,7 +2692,7 @@ This commonly includes things such as:
;; definition for method 92 of type nav-enemy
;; WARN: Return type mismatch quaternion vs none.
(defmethod enemy-method-92 nav-enemy ((this nav-enemy) (arg0 int) (arg1 nav-poly))
(defmethod enemy-method-92 ((this nav-enemy) (arg0 int) (arg1 nav-poly))
"TODO - nav-poly is a guess
@abstract"
(let ((v1-0 arg0))
+167 -200
View File
@@ -3,27 +3,24 @@
;; definition of type nav-mesh-work-debug
(deftype nav-mesh-work-debug (structure)
((debug-vec1 vector :inline :offset-assert 0)
(debug-vec2 vector :inline :offset-assert 16)
(debug-vec3 vector :inline :offset-assert 32)
(debug-vec4 vector :inline :offset-assert 48)
(debug-vec5 vector :inline :offset-assert 64)
(debug-vec6 vector :inline :offset-assert 80)
(debug-vec7 vector :inline :offset-assert 96)
(debug-vec8 vector :inline :offset-assert 112)
(debug-vec9 vector :inline :offset-assert 128)
(debug-vec10 vector :inline :offset-assert 144)
(debug-vec11 vector :inline :offset-assert 160)
(debug-vec12 vector :inline :offset-assert 176)
(sphere-array sphere 16 :inline :offset-assert 192)
((debug-vec1 vector :inline)
(debug-vec2 vector :inline)
(debug-vec3 vector :inline)
(debug-vec4 vector :inline)
(debug-vec5 vector :inline)
(debug-vec6 vector :inline)
(debug-vec7 vector :inline)
(debug-vec8 vector :inline)
(debug-vec9 vector :inline)
(debug-vec10 vector :inline)
(debug-vec11 vector :inline)
(debug-vec12 vector :inline)
(sphere-array sphere 16 :inline)
)
:method-count-assert 9
:size-assert #x1c0
:flag-assert #x9000001c0
)
;; definition for method 3 of type nav-mesh-work-debug
(defmethod inspect nav-mesh-work-debug ((this nav-mesh-work-debug))
(defmethod inspect ((this nav-mesh-work-debug))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -48,32 +45,29 @@
;; definition of type nav-mesh-work
(deftype nav-mesh-work (structure)
((vert0-table int8 4 :offset-assert 0)
(vert1-table int8 4 :offset-assert 4)
(edge-mask-table uint8 3 :offset-assert 8)
(pad0 uint32 :offset-assert 12)
(deg-to-rad float :offset-assert 16)
(rad-to-deg float :offset-assert 20)
(nav-poly-min-dist float :offset-assert 24)
(nav-poly-epsilon float :offset-assert 28)
(sphere-array sphere 16 :inline :offset-assert 32)
(debug nav-mesh-work-debug :offset-assert 288)
(work-struct-in-scratch int8 :offset-assert 292)
(mesh-struct-in-scratch int8 :offset-assert 293)
(polys-in-scratch int8 :offset-assert 294)
(mesh nav-mesh :offset-assert 296)
(nav basic :offset-assert 300)
(poly0 nav-poly :offset-assert 304)
(poly1 nav-poly :offset-assert 308)
(poly-id int32 :offset-assert 312)
((vert0-table int8 4)
(vert1-table int8 4)
(edge-mask-table uint8 3)
(pad0 uint32)
(deg-to-rad float)
(rad-to-deg float)
(nav-poly-min-dist float)
(nav-poly-epsilon float)
(sphere-array sphere 16 :inline)
(debug nav-mesh-work-debug)
(work-struct-in-scratch int8)
(mesh-struct-in-scratch int8)
(polys-in-scratch int8)
(mesh nav-mesh)
(nav basic)
(poly0 nav-poly)
(poly1 nav-poly)
(poly-id int32)
)
:method-count-assert 9
:size-assert #x13c
:flag-assert #x90000013c
)
;; definition for method 3 of type nav-mesh-work
(defmethod inspect nav-mesh-work ((this nav-mesh-work))
(defmethod inspect ((this nav-mesh-work))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -103,21 +97,18 @@
;; definition of type nav-mesh-link
(deftype nav-mesh-link (structure)
((id uint32 :offset-assert 0)
(dest-mesh-id uint32 :offset-assert 4)
(src-link-poly-id uint8 :offset-assert 8)
(src-switch-poly-id uint8 :offset-assert 9)
(dest-link-poly-id uint8 :offset-assert 10)
(dest-switch-poly-id uint8 :offset-assert 11)
(dest-mesh nav-mesh :offset-assert 12)
((id uint32)
(dest-mesh-id uint32)
(src-link-poly-id uint8)
(src-switch-poly-id uint8)
(dest-link-poly-id uint8)
(dest-switch-poly-id uint8)
(dest-mesh nav-mesh)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-mesh-link
(defmethod inspect nav-mesh-link ((this nav-mesh-link))
(defmethod inspect ((this nav-mesh-link))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -136,31 +127,28 @@
;; definition of type nav-poly
(deftype nav-poly (structure)
((data uint8 64 :offset-assert 0)
(vertex vector 4 :inline :offset 0)
(vertex0 vector :inline :offset 0)
(vertex1 vector :inline :offset 16)
(vertex2 vector :inline :offset 32)
(vertex3 vector :inline :offset 48)
(id uint8 :offset 12)
(pat uint8 :offset 13)
(vertex-count uint8 :offset 14)
(link uint8 :offset 15)
(adj-poly uint8 4 :offset 28)
(adj-poly0 uint8 :offset 28)
(adj-poly1 uint8 :offset 29)
(adj-poly2 uint8 :offset 30)
(adj-poly3 uint8 :offset 31)
(min-y float :offset 44)
(max-y float :offset 60)
((data uint8 64)
(vertex vector 4 :inline :overlay-at (-> data 0))
(vertex0 vector :inline :overlay-at (-> data 0))
(vertex1 vector :inline :overlay-at (-> data 16))
(vertex2 vector :inline :overlay-at (-> data 32))
(vertex3 vector :inline :overlay-at (-> data 48))
(id uint8 :overlay-at (-> data 12))
(pat uint8 :overlay-at (-> data 13))
(vertex-count uint8 :overlay-at (-> data 14))
(link uint8 :overlay-at (-> data 15))
(adj-poly uint8 4 :overlay-at (-> data 28))
(adj-poly0 uint8 :overlay-at (-> data 28))
(adj-poly1 uint8 :overlay-at (-> data 29))
(adj-poly2 uint8 :overlay-at (-> data 30))
(adj-poly3 uint8 :overlay-at (-> data 31))
(min-y float :overlay-at (-> data 44))
(max-y float :overlay-at (-> data 60))
)
:method-count-assert 9
:size-assert #x40
:flag-assert #x900000040
)
;; definition for method 3 of type nav-poly
(defmethod inspect nav-poly ((this nav-poly))
(defmethod inspect ((this nav-poly))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -192,14 +180,11 @@
"A typedef for `vector`, not used because our code looks nicer if everything is `vector`s anyway
and declared out of order (cannot use forward declared structures in inline arrays)"
()
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-vertex
;; INFO: Used lq/sq
(defmethod inspect nav-vertex ((this nav-vertex))
(defmethod inspect ((this nav-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -217,15 +202,12 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type nav-sphere
(deftype nav-sphere (structure)
((trans sphere :inline :offset-assert 0)
((trans sphere :inline)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-sphere
(defmethod inspect nav-sphere ((this nav-sphere))
(defmethod inspect ((this nav-sphere))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -238,26 +220,23 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type nav-ray
(deftype nav-ray (structure)
((current-pos vector :inline :offset-assert 0)
(dir vector :inline :offset-assert 16)
(dest-pos vector :inline :offset-assert 32)
(current-poly nav-poly :offset-assert 48)
(next-poly nav-poly :offset-assert 52)
(len meters :offset-assert 56)
(last-edge int8 :offset-assert 60)
(ignore uint8 :offset-assert 61)
(terminated symbol :offset-assert 64)
(reached-dest symbol :offset-assert 68)
(hit-boundary symbol :offset-assert 72)
(hit-gap symbol :offset-assert 76)
((current-pos vector :inline)
(dir vector :inline)
(dest-pos vector :inline)
(current-poly nav-poly)
(next-poly nav-poly)
(len meters)
(last-edge int8)
(ignore uint8)
(terminated symbol)
(reached-dest symbol)
(hit-boundary symbol)
(hit-gap symbol)
)
:method-count-assert 9
:size-assert #x50
:flag-assert #x900000050
)
;; definition for method 3 of type nav-ray
(defmethod inspect nav-ray ((this nav-ray))
(defmethod inspect ((this nav-ray))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -281,17 +260,14 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type nav-route-portal
(deftype nav-route-portal (structure)
((vertex nav-vertex 2 :inline :offset-assert 0)
(next-poly nav-poly :offset-assert 32)
(edge-index int8 :offset-assert 36)
((vertex nav-vertex 2 :inline)
(next-poly nav-poly)
(edge-index int8)
)
:method-count-assert 9
:size-assert #x25
:flag-assert #x900000025
)
;; definition for method 3 of type nav-route-portal
(defmethod inspect nav-route-portal ((this nav-route-portal))
(defmethod inspect ((this nav-route-portal))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -306,20 +282,17 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type nav-find-poly-parms
(deftype nav-find-poly-parms (structure)
((point vector :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
(ignore uint8 :offset-assert 20)
(poly nav-poly :offset-assert 24)
(dist float :offset-assert 28)
(point-inside? symbol :offset-assert 32)
((point vector :inline)
(y-threshold float)
(ignore uint8)
(poly nav-poly)
(dist float)
(point-inside? symbol)
)
:method-count-assert 9
:size-assert #x24
:flag-assert #x900000024
)
;; definition for method 3 of type nav-find-poly-parms
(defmethod inspect nav-find-poly-parms ((this nav-find-poly-parms))
(defmethod inspect ((this nav-find-poly-parms))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -337,27 +310,24 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type clamp-travel-vector-to-mesh-return-info
(deftype clamp-travel-vector-to-mesh-return-info (structure)
((found-boundary symbol :offset-assert 0)
(intersection vector :inline :offset-assert 16)
(boundary-normal vector :inline :offset-assert 32)
(prev-normal vector :inline :offset-assert 48)
(next-normal vector :inline :offset-assert 64)
(poly nav-poly :offset-assert 80)
(gap-poly nav-poly :offset-assert 84)
(edge int8 :offset-assert 88)
(ignore uint8 :offset-assert 89)
(vert-prev vector :inline :offset-assert 96)
(vert-0 vector :inline :offset-assert 112)
(vert-1 vector :inline :offset-assert 128)
(vert-next vector :inline :offset-assert 144)
((found-boundary symbol)
(intersection vector :inline)
(boundary-normal vector :inline)
(prev-normal vector :inline)
(next-normal vector :inline)
(poly nav-poly)
(gap-poly nav-poly)
(edge int8)
(ignore uint8)
(vert-prev vector :inline)
(vert-0 vector :inline)
(vert-1 vector :inline)
(vert-next vector :inline)
)
:method-count-assert 9
:size-assert #xa0
:flag-assert #x9000000a0
)
;; definition for method 3 of type clamp-travel-vector-to-mesh-return-info
(defmethod inspect clamp-travel-vector-to-mesh-return-info ((this clamp-travel-vector-to-mesh-return-info))
(defmethod inspect ((this clamp-travel-vector-to-mesh-return-info))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -382,78 +352,75 @@ and declared out of order (cannot use forward declared structures in inline arra
;; definition of type nav-mesh
(deftype nav-mesh (basic)
((work nav-mesh-work :offset-assert 4)
(poly-array (inline-array nav-poly) :offset-assert 8)
(static-sphere-count uint8 :offset-assert 12)
(poly-count uint8 :offset-assert 13)
(nav-control-count uint8 :offset-assert 14)
(max-nav-control-count uint8 :offset-assert 15)
(route (pointer nav-poly) :offset-assert 16)
(poly-hash grid-hash :offset-assert 20)
(nav-control-array (inline-array nav-control) :offset-assert 24)
(sphere-hash sphere-hash :offset-assert 28)
(static-sphere (inline-array sphere) :offset-assert 32)
(user-list engine :offset-assert 36)
(next-nav-mesh surface :offset-assert 40)
(prev-nav-mesh surface :offset-assert 44)
(bounds vector :inline :offset-assert 48)
(origin vector :inline :offset 48)
(entity entity :offset-assert 64)
(link-array (inline-array nav-mesh-link) :offset-assert 68)
(link-count uint8 :offset-assert 72)
(flags nav-mesh-flag :offset-assert 73)
(pad1 uint8 2 :offset-assert 74)
(nearest-y-threshold meters :offset-assert 76)
(water-max-height meters :offset-assert 80)
(pad2 uint32 7 :offset-assert 84)
((work nav-mesh-work)
(poly-array (inline-array nav-poly))
(static-sphere-count uint8)
(poly-count uint8)
(nav-control-count uint8)
(max-nav-control-count uint8)
(route (pointer nav-poly))
(poly-hash grid-hash)
(nav-control-array (inline-array nav-control))
(sphere-hash sphere-hash)
(static-sphere (inline-array sphere))
(user-list engine)
(next-nav-mesh surface)
(prev-nav-mesh surface)
(bounds vector :inline)
(origin vector :inline :overlay-at bounds)
(entity entity)
(link-array (inline-array nav-mesh-link))
(link-count uint8)
(flags nav-mesh-flag)
(pad1 uint8 2)
(nearest-y-threshold meters)
(water-max-height meters)
(pad2 uint32 7)
)
:method-count-assert 47
:size-assert #x70
:flag-assert #x2f00000070
(:methods
(debug-draw (_type_) none 9)
(nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly 10)
(poly-centroid (_type_ nav-poly vector) vector 11)
(poly-centroid-local (_type_ nav-poly vector) vector 12)
(lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly 13)
(get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex) 14)
(initialize-mesh! (_type_) none 15)
(move-along-nav-ray! (_type_ nav-ray) none 16)
(try-move-along-ray (_type_ nav-poly vector vector float) meters 17)
(clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none 18)
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none 19)
(set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none 20)
(find-adjacent-bounds-one (_type_ vector nav-poly int int) none 21)
(compute-bounding-box-from-vertices (_type_ vector vector) none 22)
(init-from-entity (_type_ entity-nav-mesh) none 23)
(handle-birth (_type_) none 24)
(handle-kill (_type_) none 25)
(update-navigation (_type_) none 26)
(new-nav-control (_type_ process-drawable) nav-control 27)
(remove-nav-control (_type_ nav-control) none 28)
(add-process-drawable-to-navmesh (_type_ process-drawable symbol) none 29)
(remove-process-drawable (_type_ process-drawable) none 30)
(change-to (_type_ process-drawable) none 31)
(link-by-id (_type_ uint) symbol 32)
(unlink-by-id (_type_ uint) symbol 33)
(nav-mesh-method-34 (_type_ vector vector float) float 34)
(nav-mesh-method-35 (_type_ vector vector float) float 35)
(debug-draw-poly (_type_ nav-poly rgba) none 36)
(point-in-poly? (_type_ nav-poly vector) symbol 37)
(nav-mesh-method-38 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector 38)
(closest-point-on-boundary (_type_ nav-poly vector vector) none 39)
(project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none 40)
(project-point-into-poly-2d (_type_ nav-poly vector vector) none 41)
(find-poly-containing-point-local (_type_ nav-find-poly-parms) nav-poly 42)
(find-nearest-poly-to-point-local (_type_ nav-find-poly-parms) nav-find-poly-parms 43)
(is-in-mesh-local? (_type_ vector float float) symbol 44)
(link-to-other-mesh (_type_ nav-mesh-link) symbol 45)
(unlink-mesh (_type_ nav-mesh-link) none 46)
(debug-draw (_type_) none)
(nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly)
(poly-centroid (_type_ nav-poly vector) vector)
(poly-centroid-local (_type_ nav-poly vector) vector)
(lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly)
(get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex))
(initialize-mesh! (_type_) none)
(move-along-nav-ray! (_type_ nav-ray) none)
(try-move-along-ray (_type_ nav-poly vector vector float) meters)
(clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none)
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none)
(set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none)
(find-adjacent-bounds-one (_type_ vector nav-poly int int) none)
(compute-bounding-box-from-vertices (_type_ vector vector) none)
(init-from-entity (_type_ entity-nav-mesh) none)
(handle-birth (_type_) none)
(handle-kill (_type_) none)
(update-navigation (_type_) none)
(new-nav-control (_type_ process-drawable) nav-control)
(remove-nav-control (_type_ nav-control) none)
(add-process-drawable-to-navmesh (_type_ process-drawable symbol) none)
(remove-process-drawable (_type_ process-drawable) none)
(change-to (_type_ process-drawable) none)
(link-by-id (_type_ uint) symbol)
(unlink-by-id (_type_ uint) symbol)
(nav-mesh-method-34 (_type_ vector vector float) float)
(nav-mesh-method-35 (_type_ vector vector float) float)
(debug-draw-poly (_type_ nav-poly rgba) none)
(point-in-poly? (_type_ nav-poly vector) symbol)
(nav-mesh-method-38 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector)
(closest-point-on-boundary (_type_ nav-poly vector vector) none)
(project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none)
(project-point-into-poly-2d (_type_ nav-poly vector vector) none)
(find-poly-containing-point-local (_type_ nav-find-poly-parms) nav-poly)
(find-nearest-poly-to-point-local (_type_ nav-find-poly-parms) nav-find-poly-parms)
(is-in-mesh-local? (_type_ vector float float) symbol)
(link-to-other-mesh (_type_ nav-mesh-link) symbol)
(unlink-mesh (_type_ nav-mesh-link) none)
)
)
;; definition for method 3 of type nav-mesh
(defmethod inspect nav-mesh ((this nav-mesh))
(defmethod inspect ((this nav-mesh))
(when (not this)
(set! this this)
(goto cfg-6)
@@ -635,7 +602,7 @@ and declared out of order (cannot use forward declared structures in inline arra
)
;; definition for method 37 of type nav-mesh
(defmethod point-in-poly? nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(defmethod point-in-poly? ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(let* ((a3-0 this)
(v1-0 arg1)
(a0-1 (-> arg0 vertex-count))
@@ -668,7 +635,7 @@ and declared out of order (cannot use forward declared structures in inline arra
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Return type mismatch vector vs none.
(defmethod closest-point-on-boundary nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(defmethod closest-point-on-boundary ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
(set! sv-48 (new 'stack-no-clear 'vector))
(set! sv-52 (new 'stack-no-clear 'vector))
@@ -697,7 +664,7 @@ and declared out of order (cannot use forward declared structures in inline arra
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Return type mismatch vector vs none.
(defmethod project-point-into-poly-2d nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(defmethod project-point-into-poly-2d ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
(cond
((point-in-poly? this arg0 arg2)
@@ -779,7 +746,7 @@ and declared out of order (cannot use forward declared structures in inline arra
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod move-along-nav-ray! nav-mesh ((this nav-mesh) (ray nav-ray))
(defmethod move-along-nav-ray! ((this nav-mesh) (ray nav-ray))
(local-vars
(next-poly-idx int)
(work nav-mesh-work)
+91 -97
View File
@@ -354,7 +354,7 @@
;; definition for method 27 of type entity-nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod initialize-nav-mesh! entity-nav-mesh ((this entity-nav-mesh))
(defmethod initialize-nav-mesh! ((this entity-nav-mesh))
"Initialize the nav-mesh in this entity."
(let ((v1-0 (-> this nav-mesh)))
(if (nonzero? v1-0)
@@ -366,7 +366,7 @@
)
;; definition for method 22 of type entity-nav-mesh
(defmethod birth! entity-nav-mesh ((this entity-nav-mesh))
(defmethod birth! ((this entity-nav-mesh))
(let ((a0-1 (-> this nav-mesh)))
(if (nonzero? a0-1)
(handle-birth a0-1)
@@ -376,7 +376,7 @@
)
;; definition for method 23 of type entity-nav-mesh
(defmethod kill! entity-nav-mesh ((this entity-nav-mesh))
(defmethod kill! ((this entity-nav-mesh))
(if (-> this nav-mesh)
(handle-kill (-> this nav-mesh))
)
@@ -386,7 +386,7 @@
;; definition for method 28 of type entity-nav-mesh
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw entity-nav-mesh ((this entity-nav-mesh))
(defmethod debug-draw ((this entity-nav-mesh))
(add-debug-x
#t
(bucket-id debug-no-zbuf1)
@@ -434,7 +434,7 @@
;; definition for method 31 of type entity-actor
;; INFO: Used lq/sq
(defmethod get-simple-travel-vector entity-actor ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 object) (arg4 float))
(defmethod get-simple-travel-vector ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 object) (arg4 float))
(local-vars (at-0 int) (at-1 int))
(with-pp
(rlet ((vf0 :class vf)
@@ -504,7 +504,7 @@
;; definition for method 32 of type entity-actor
;; INFO: Used lq/sq
(defmethod project-point-to-nav-mesh entity-actor ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 nav-poly) (arg3 float))
(defmethod project-point-to-nav-mesh ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 nav-poly) (arg3 float))
(local-vars (sv-16 vector))
(let ((gp-0 (nav-mesh-from-res-tag this 'nav-mesh-actor 0)))
(cond
@@ -535,14 +535,14 @@
;; definition for method 4 of type nav-mesh
;; WARN: Return type mismatch uint vs int.
(defmethod length nav-mesh ((this nav-mesh))
(defmethod length ((this nav-mesh))
(the-as int (-> this poly-count))
)
;; definition for method 36 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw-poly nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 rgba))
(defmethod debug-draw-poly ((this nav-mesh) (arg0 nav-poly) (arg1 rgba))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3)))
(set! (-> gp-0 0 quad) (-> this bounds quad))
(if (logtest? (-> arg0 pat) 7)
@@ -588,7 +588,7 @@
)
;; definition for method 27 of type nav-mesh
(defmethod new-nav-control nav-mesh ((this nav-mesh) (arg0 process-drawable))
(defmethod new-nav-control ((this nav-mesh) (arg0 process-drawable))
(let ((gp-0 (the-as nav-control #f)))
(dotimes (v1-0 (the-as int (-> this nav-control-count)))
(let ((a1-2 (-> this nav-control-array v1-0)))
@@ -623,7 +623,7 @@
;; definition for method 28 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod remove-nav-control nav-mesh ((this nav-mesh) (arg0 nav-control))
(defmethod remove-nav-control ((this nav-mesh) (arg0 nav-control))
(set! (-> arg0 process) #f)
(let ((v1-1 (+ (-> this nav-control-count) -1)))
(while (and (>= v1-1 0) (not (-> this nav-control-array v1-1 process)))
@@ -637,7 +637,7 @@
;; definition for method 29 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod add-process-drawable-to-navmesh nav-mesh ((this nav-mesh) (arg0 process-drawable) (arg1 symbol))
(defmethod add-process-drawable-to-navmesh ((this nav-mesh) (arg0 process-drawable) (arg1 symbol))
(if arg1
(change-to this arg0)
(add-connection (-> this user-list) arg0 nothing arg0 #f (-> arg0 root))
@@ -648,7 +648,7 @@
;; definition for method 30 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod remove-process-drawable nav-mesh ((this nav-mesh) (arg0 process-drawable))
(defmethod remove-process-drawable ((this nav-mesh) (arg0 process-drawable))
(remove-from-process (-> this user-list) arg0)
(let ((a1-2 (-> arg0 nav)))
(when (nonzero? a1-2)
@@ -662,7 +662,7 @@
;; definition for method 31 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod change-to nav-mesh ((this nav-mesh) (arg0 process-drawable))
(defmethod change-to ((this nav-mesh) (arg0 process-drawable))
(local-vars (v1-5 symbol))
(let ((gp-0 arg0))
(b! (nonzero? (-> this user-list)) cfg-2 :delay (empty-form))
@@ -716,7 +716,7 @@
)
;; definition for method 45 of type nav-mesh
(defmethod link-to-other-mesh nav-mesh ((this nav-mesh) (arg0 nav-mesh-link))
(defmethod link-to-other-mesh ((this nav-mesh) (arg0 nav-mesh-link))
(when (not (-> arg0 dest-mesh))
(let* ((s4-0 (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id))))
(v1-1 (if (type? s4-0 entity-nav-mesh)
@@ -756,7 +756,7 @@
;; definition for method 46 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod unlink-mesh nav-mesh ((this nav-mesh) (arg0 nav-mesh-link))
(defmethod unlink-mesh ((this nav-mesh) (arg0 nav-mesh-link))
(let ((a0-1 (-> arg0 dest-mesh)))
(when a0-1
(let ((v1-0 (the-as nav-mesh-link #f)))
@@ -783,7 +783,7 @@
)
;; definition for method 32 of type nav-mesh
(defmethod link-by-id nav-mesh ((this nav-mesh) (arg0 uint))
(defmethod link-by-id ((this nav-mesh) (arg0 uint))
"arg1 is a [[nav-mesh-link]] `id`"
(let ((v1-0 (the-as nav-mesh-link #f)))
(dotimes (a2-0 (the-as int (-> this link-count)))
@@ -802,7 +802,7 @@
)
;; definition for method 33 of type nav-mesh
(defmethod unlink-by-id nav-mesh ((this nav-mesh) (arg0 uint))
(defmethod unlink-by-id ((this nav-mesh) (arg0 uint))
"arg1 is a [[nav-mesh-link]] `id`"
(let ((v1-0 (the-as nav-mesh-link #f)))
(dotimes (a2-0 (the-as int (-> this link-count)))
@@ -824,7 +824,7 @@
;; definition for method 23 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-from-entity nav-mesh ((this nav-mesh) (arg0 entity-nav-mesh))
(defmethod init-from-entity ((this nav-mesh) (arg0 entity-nav-mesh))
"Initialize this mesh from an entity."
(local-vars (sv-16 res-tag))
(set! (-> this entity) arg0)
@@ -860,7 +860,7 @@
;; definition for method 24 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod handle-birth nav-mesh ((this nav-mesh))
(defmethod handle-birth ((this nav-mesh))
"Handle the parent nav-mesh-entity birth."
(dotimes (s5-0 (the-as int (-> this link-count)))
(let ((a1-0 (-> this link-array s5-0)))
@@ -875,7 +875,7 @@
;; definition for method 25 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod handle-kill nav-mesh ((this nav-mesh))
(defmethod handle-kill ((this nav-mesh))
"Handle the parent nav-mesh-entity kill."
(when (nonzero? (-> this user-list))
(countdown (s5-0 (-> this nav-control-count))
@@ -904,24 +904,21 @@
;; definition of type nav-engine-spr-buffer
(deftype nav-engine-spr-buffer (structure)
((mem-addr (pointer nav-mesh) :offset-assert 0)
(mem-nav uint32 :offset 0)
(spr-addr (inline-array nav-control) :offset-assert 4)
(spr-nav uint32 :offset 4)
(q-size uint32 :offset-assert 8)
(i-nav uint8 :offset-assert 12)
(done int8 :offset-assert 13)
(nav-count int8 :offset-assert 14)
(i-pass int8 :offset-assert 15)
((mem-addr (pointer nav-mesh))
(mem-nav uint32 :overlay-at mem-addr)
(spr-addr (inline-array nav-control))
(spr-nav uint32 :overlay-at spr-addr)
(q-size uint32)
(i-nav uint8)
(done int8)
(nav-count int8)
(i-pass int8)
)
:pack-me
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-engine-spr-buffer
(defmethod inspect nav-engine-spr-buffer ((this nav-engine-spr-buffer))
(defmethod inspect ((this nav-engine-spr-buffer))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -942,49 +939,46 @@
;; definition of type nav-engine
(deftype nav-engine (structure)
((spr-addr uint32 :offset-assert 0)
(nav-work-addr uint32 :offset-assert 4)
(nav-mesh-addr nav-mesh :offset-assert 8)
(poly-array-addr uint32 :offset-assert 12)
(hash-sphere-addr uint32 :offset-assert 16)
(hash-buckets-addr uint32 :offset-assert 20)
(buf-nav-control-count int8 :offset-assert 24)
(max-pass-count int8 :offset-assert 25)
(output-sphere-hash uint8 :offset-assert 26)
(work-buf-array nav-engine-spr-buffer 3 :inline :offset-assert 28)
(spr-work nav-mesh-work :offset 4)
(mem-work nav-mesh-work :offset-assert 76)
(spr-mesh nav-mesh :offset 8)
(mem-mesh nav-mesh :offset-assert 80)
(spr-poly-array uint32 :offset 12)
(mem-poly-array (inline-array nav-poly) :offset-assert 84)
(hash-sphere-list uint32 :offset 16)
(hash-buckets uint32 :offset 20)
(to-spr-wait uint32 :offset-assert 88)
(from-spr-wait uint32 :offset-assert 92)
((spr-addr uint32)
(nav-work-addr uint32)
(nav-mesh-addr nav-mesh)
(poly-array-addr uint32)
(hash-sphere-addr uint32)
(hash-buckets-addr uint32)
(buf-nav-control-count int8)
(max-pass-count int8)
(output-sphere-hash uint8)
(work-buf-array nav-engine-spr-buffer 3 :inline)
(spr-work nav-mesh-work :overlay-at nav-work-addr)
(mem-work nav-mesh-work)
(spr-mesh nav-mesh :overlay-at nav-mesh-addr)
(mem-mesh nav-mesh)
(spr-poly-array uint32 :overlay-at poly-array-addr)
(mem-poly-array (inline-array nav-poly))
(hash-sphere-list uint32 :overlay-at hash-sphere-addr)
(hash-buckets uint32 :overlay-at hash-buckets-addr)
(to-spr-wait uint32)
(from-spr-wait uint32)
)
:method-count-assert 22
:size-assert #x60
:flag-assert #x1600000060
(:methods
(inc-spr-addr! (_type_ uint) uint 9)
(lay-out-spad-memory (_type_ nav-mesh) none 10)
(set-up-mem-work (_type_) none 11)
(add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none 12)
(add-all-spheres (_type_) none 13)
(do-sphere-lookups (_type_) none 14)
(update-nav-controls-pipelined-in-spr (_type_) none 15)
(update-nav-controls-in-spr (_type_) none 16)
(upload-nav-to-spr (_type_ nav-engine-spr-buffer) none 17)
(download-nav-from-spr (_type_ nav-engine-spr-buffer) none 18)
(do-callbacks (_type_ nav-engine-spr-buffer) none 19)
(reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none 20)
(reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none 21)
(inc-spr-addr! (_type_ uint) uint)
(lay-out-spad-memory (_type_ nav-mesh) none)
(set-up-mem-work (_type_) none)
(add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none)
(add-all-spheres (_type_) none)
(do-sphere-lookups (_type_) none)
(update-nav-controls-pipelined-in-spr (_type_) none)
(update-nav-controls-in-spr (_type_) none)
(upload-nav-to-spr (_type_ nav-engine-spr-buffer) none)
(download-nav-from-spr (_type_ nav-engine-spr-buffer) none)
(do-callbacks (_type_ nav-engine-spr-buffer) none)
(reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none)
(reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none)
)
)
;; definition for method 3 of type nav-engine
(defmethod inspect nav-engine ((this nav-engine))
(defmethod inspect ((this nav-engine))
(when (not this)
(set! this this)
(goto cfg-4)
@@ -1015,7 +1009,7 @@
)
;; definition for method 9 of type nav-engine
(defmethod inc-spr-addr! nav-engine ((this nav-engine) (arg0 uint))
(defmethod inc-spr-addr! ((this nav-engine) (arg0 uint))
"Adds the given integer to `spr-addr` and returns it"
(let ((v0-0 (-> this spr-addr)))
(+! (-> this spr-addr) arg0)
@@ -1025,7 +1019,7 @@
;; definition for method 10 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod lay-out-spad-memory nav-engine ((this nav-engine) (arg0 nav-mesh))
(defmethod lay-out-spad-memory ((this nav-engine) (arg0 nav-mesh))
(let ((s5-0 0))
(set! (-> this spr-addr) (the-as uint #x70000060))
(let* ((v1-1 this)
@@ -1111,7 +1105,7 @@
;; definition for method 11 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod set-up-mem-work nav-engine ((this nav-engine))
(defmethod set-up-mem-work ((this nav-engine))
(let ((v1-0 (-> this mem-mesh)))
(set! (-> v1-0 poly-array) (-> this mem-poly-array))
(set! (-> v1-0 work) (-> this mem-work))
@@ -1123,7 +1117,7 @@
;; definition for method 12 of type nav-engine
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod add-spheres-from-mesh-user-list nav-engine ((this nav-engine) (arg0 sphere-hash) (arg1 nav-mesh))
(defmethod add-spheres-from-mesh-user-list ((this nav-engine) (arg0 sphere-hash) (arg1 nav-mesh))
(countdown (s3-0 (-> arg1 static-sphere-count))
(add-a-sphere-with-flag arg0 (-> arg1 static-sphere s3-0) 64)
)
@@ -1210,7 +1204,7 @@
;; definition for method 13 of type nav-engine
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod add-all-spheres nav-engine ((this nav-engine))
(defmethod add-all-spheres ((this nav-engine))
(let ((s4-0 (-> this nav-mesh-addr))
(gp-0 (-> this nav-mesh-addr sphere-hash))
)
@@ -1247,7 +1241,7 @@
;; definition for method 14 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod do-sphere-lookups nav-engine ((this nav-engine))
(defmethod do-sphere-lookups ((this nav-engine))
(let ((s5-0 (-> this nav-mesh-addr)))
(dotimes (s4-0 (the-as int (-> s5-0 nav-control-count)))
(let ((a0-3 (-> s5-0 nav-control-array s4-0)))
@@ -1300,7 +1294,7 @@
;; definition for method 19 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod do-callbacks nav-engine ((this nav-engine) (arg0 nav-engine-spr-buffer))
(defmethod do-callbacks ((this nav-engine) (arg0 nav-engine-spr-buffer))
(local-vars (sv-16 nav-callback-info))
(with-pp
(dotimes (s4-0 (-> arg0 nav-count))
@@ -1342,7 +1336,7 @@
;; definition for method 15 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod update-nav-controls-pipelined-in-spr nav-engine ((this nav-engine))
(defmethod update-nav-controls-pipelined-in-spr ((this nav-engine))
(local-vars
(v1-33 int)
(v1-45 int)
@@ -1441,7 +1435,7 @@
;; definition for method 16 of type nav-engine
;; WARN: Return type mismatch int vs none.
(defmethod update-nav-controls-in-spr nav-engine ((this nav-engine))
(defmethod update-nav-controls-in-spr ((this nav-engine))
(flush-cache 0)
(set! (-> this max-pass-count) 1)
(let ((gp-0 (the-as object (-> this work-buf-array))))
@@ -1494,7 +1488,7 @@
;; definition for method 26 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod update-navigation nav-mesh ((this nav-mesh))
(defmethod update-navigation ((this nav-mesh))
(local-vars (sp-0 int))
(when (zero? (-> this next-nav-mesh))
(set! (-> this next-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> this entity) 'next-actor 0)))
@@ -1533,7 +1527,7 @@
;; definition for method 9 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw nav-mesh ((this nav-mesh))
(defmethod debug-draw ((this nav-mesh))
(local-vars (sv-32 vector) (sv-36 int))
(set! sv-32 (new 'stack-no-clear 'vector))
(set! sv-36 16)
@@ -1614,7 +1608,7 @@
)
;; definition for method 12 of type nav-mesh
(defmethod poly-centroid-local nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(defmethod poly-centroid-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(rlet ((vf0 :class vf))
(init-vf0-vector)
(let ((v1-0 (new 'stack-no-clear 'nav-vertex)))
@@ -1628,7 +1622,7 @@
)
;; definition for method 11 of type nav-mesh
(defmethod poly-centroid nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(defmethod poly-centroid ((this nav-mesh) (arg0 nav-poly) (arg1 vector))
(poly-centroid-local this arg0 arg1)
(vector+! arg1 arg1 (-> this bounds))
)
@@ -1692,7 +1686,7 @@
)
;; definition for method 42 of type nav-mesh
(defmethod find-poly-containing-point-local nav-mesh ((this nav-mesh) (arg0 nav-find-poly-parms))
(defmethod find-poly-containing-point-local ((this nav-mesh) (arg0 nav-find-poly-parms))
(local-vars (v1-6 symbol) (v1-15 int) (a0-3 symbol) (sv-16 nav-poly))
(let ((s4-0 (search-for-point (-> this poly-hash) (-> arg0 point)))
(s3-0 (-> this poly-hash bucket-size))
@@ -1745,7 +1739,7 @@
;; WARN: Stack slot offset 16 signed mismatch
;; WARN: Stack slot offset 24 signed mismatch
;; WARN: Stack slot offset 16 signed mismatch
(defmethod is-in-mesh-local? nav-mesh ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 float))
(defmethod is-in-mesh-local? ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 float))
(local-vars (v1-3 float) (sv-16 float) (sv-20 vector) (sv-24 float))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -1914,7 +1908,7 @@
)
;; definition for method 17 of type nav-mesh
(defmethod try-move-along-ray nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 float))
(defmethod try-move-along-ray ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 float))
(local-vars (v1-2 symbol))
(let ((gp-0 (new 'stack-no-clear 'nav-ray)))
(let ((s4-0 0))
@@ -2034,7 +2028,7 @@
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 52 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
(defmethod find-nearest-poly-to-point-local nav-mesh ((this nav-mesh) (arg0 nav-find-poly-parms))
(defmethod find-nearest-poly-to-point-local ((this nav-mesh) (arg0 nav-find-poly-parms))
(local-vars
(v1-16 int)
(v1-34 int)
@@ -2157,7 +2151,7 @@
;; definition for method 14 of type nav-mesh
;; INFO: Used lq/sq
(defmethod get-route-portal nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly) (arg2 nav-route-portal))
(defmethod get-route-portal ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly) (arg2 nav-route-portal))
(set! (-> arg2 next-poly) #f)
(cond
((and arg0 arg1 (!= arg0 arg1))
@@ -2201,7 +2195,7 @@
)
;; definition for method 13 of type nav-mesh
(defmethod lookup-poly-on-route-to-target nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly))
(defmethod lookup-poly-on-route-to-target ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly))
(cond
((and arg0 arg1 (!= arg0 arg1))
(let* ((a3-0 this)
@@ -2234,7 +2228,7 @@
;; definition for method 22 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod compute-bounding-box-from-vertices nav-mesh ((this nav-mesh) (arg0 vector) (arg1 vector))
(defmethod compute-bounding-box-from-vertices ((this nav-mesh) (arg0 vector) (arg1 vector))
(let ((f0-0 10000000000000000000000000000000000000.0)
(f1-0 -10000000000000000000000000000000000000.0)
)
@@ -2267,7 +2261,7 @@
;; definition for method 15 of type nav-mesh
;; WARN: Return type mismatch int vs none.
(defmethod initialize-mesh! nav-mesh ((this nav-mesh))
(defmethod initialize-mesh! ((this nav-mesh))
(local-vars
(sv-32 vector)
(sv-36 uint)
@@ -2415,7 +2409,7 @@
;; definition for method 38 of type nav-mesh
;; INFO: Used lq/sq
(defmethod nav-mesh-method-38 nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 (pointer nav-poly)))
(defmethod nav-mesh-method-38 ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 (pointer nav-poly)))
(local-vars
(s1-0 vector)
(sv-16 int)
@@ -2541,7 +2535,7 @@
;; definition for method 40 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod project-point-onto-plane-of-poly-local nav-mesh ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector))
(defmethod project-point-onto-plane-of-poly-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(let ((s4-0 (new 'stack-no-clear 'vector)))
(cond
@@ -2576,7 +2570,7 @@
;; definition for method 8 of type nav-mesh
;; WARN: Return type mismatch int vs nav-mesh.
(defmethod mem-usage nav-mesh ((this nav-mesh) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((this nav-mesh) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 46 (-> arg0 length)))
(set! (-> arg0 data 45 name) "nav-mesh")
(+! (-> arg0 data 45 count) 1)
@@ -2679,7 +2673,7 @@
)
;; definition for method 10 of type nav-mesh
(defmethod nav-mesh-method-10 nav-mesh ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 nav-poly))
(defmethod nav-mesh-method-10 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 nav-poly))
(local-vars (sv-16 vector))
(set! sv-16 arg0)
(let ((gp-0 (new 'stack-no-clear 'nav-find-poly-parms)))
@@ -2731,7 +2725,7 @@
;; definition for method 34 of type nav-mesh
;; INFO: Used lq/sq
(defmethod nav-mesh-method-34 nav-mesh ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float))
(defmethod nav-mesh-method-34 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float))
(local-vars (v1-8 symbol) (v1-13 int) (a1-2 symbol) (sv-80 vector) (sv-84 (pointer uint8)))
(let ((gp-0 (new 'stack-no-clear 'nav-poly)))
(set! sv-80 arg0)
@@ -2793,7 +2787,7 @@
;; definition for method 35 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: new jak 2 until loop case, check carefully
(defmethod nav-mesh-method-35 nav-mesh ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float))
(defmethod nav-mesh-method-35 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float))
(let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3)))
(set! (-> gp-0 2 vertex3 y) arg2)
(vector-! (the-as vector (-> gp-0 0)) arg0 (-> this bounds))