mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 10:16:45 -04:00
637990314b
Closes #736 --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
4900 lines
202 KiB
Common Lisp
4900 lines
202 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: nav-mesh-editor.gc
|
|
;; name in dgo: nav-mesh-editor
|
|
;; dgos: GAME
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
;; this file is debug only
|
|
(declare-file (debug))
|
|
|
|
(defun snap-level-navmesh ((arg0 vector) (arg1 vector))
|
|
(dotimes (s4-0 (-> *level* length))
|
|
(let ((v1-3 (-> *level* level s4-0)))
|
|
(when (= (-> v1-3 status) 'active)
|
|
(let ((s3-0 (-> v1-3 bsp nav-meshes)))
|
|
(when (nonzero? s3-0)
|
|
(dotimes (s2-0 (-> s3-0 length))
|
|
(let ((s1-0 (-> s3-0 s2-0)))
|
|
(-> s1-0 aid)
|
|
(let ((v1-8 (as-type s1-0 entity-nav-mesh)))
|
|
(when v1-8
|
|
(let ((s1-1 (-> v1-8 nav-mesh)))
|
|
(new 'stack-no-clear 'vector)
|
|
(dotimes (s0-0 (the-as int (-> s1-1 poly-count)))
|
|
(let ((sv-96 (-> s1-1 poly-array s0-0))
|
|
(sv-112 (new 'stack-no-clear 'vector))
|
|
(sv-128 0)
|
|
)
|
|
(while (< sv-128 (the-as int (-> sv-96 vertex-count)))
|
|
(when (transform-point-vector!
|
|
sv-112
|
|
(vector+! (new 'stack-no-clear 'vector) (the-as vector (-> s1-1 bounds)) (-> sv-96 vertex sv-128))
|
|
)
|
|
(when (and (< (fabs (- (-> arg0 x) (+ -2048.0 (-> sv-112 x)))) 8.0)
|
|
(< (fabs (- (-> arg0 y) (+ -2048.0 (-> sv-112 y)))) 8.0)
|
|
)
|
|
(vector+! arg1 (the-as vector (-> s1-1 bounds)) (-> sv-96 vertex sv-128))
|
|
(return #t)
|
|
)
|
|
)
|
|
(+! sv-128 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
(defmethod add-vert! ((this nav-mesh-editable) (arg0 vector))
|
|
(vector-copy! (-> this verts data (-> this verts length)) arg0)
|
|
(+! (-> this verts length) 1)
|
|
(+ (-> this verts length) -1)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod nav-mesh-editable-method-12 ((this nav-mesh-editable) (arg0 vector) (arg1 symbol))
|
|
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
|
(new 'stack-no-clear 'vector)
|
|
(dotimes (s2-0 (-> this polys length))
|
|
(let ((s1-0 (-> this polys data s2-0)))
|
|
(dotimes (s0-0 (-> s1-0 index length))
|
|
(when (transform-point-vector! s3-0 (-> this verts data (-> s1-0 index data s0-0)))
|
|
(if (and (< (fabs (- (-> arg0 x) (+ -2048.0 (-> s3-0 x)))) 8.0)
|
|
(and (< (fabs (- (-> arg0 y) (+ -2048.0 (-> s3-0 y)))) 8.0)
|
|
(or (not arg1) (!= (-> s1-0 index data s0-0) (-> this
|
|
polys
|
|
data
|
|
(-> this selected-poly)
|
|
index
|
|
data
|
|
(-> this polys data (-> this selected-poly) insert-pos)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(return (the-as object (-> s1-0 index data s0-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
-1
|
|
)
|
|
|
|
(defun mouse-intersect-triangle ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
|
(let ((s5-0 (normal-of-plane (new 'stack-no-clear 'vector) arg1 arg2 arg3))
|
|
(gp-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(reverse-transform-point! gp-0 arg1 s5-0 arg0)
|
|
(let ((s1-1 (vector-negate! (new 'stack-no-clear 'vector) s5-0)))
|
|
(if (or (point-in-triangle-cross gp-0 s5-0 arg1 arg2 arg3) (point-in-triangle-cross gp-0 s1-1 arg1 arg2 arg3))
|
|
(return (vector-vector-distance (camera-pos) gp-0))
|
|
)
|
|
)
|
|
)
|
|
-1.0
|
|
)
|
|
|
|
(defmethod nav-mesh-editable-method-14 ((this nav-mesh-editable) (arg0 vector))
|
|
(dotimes (s4-0 (-> this tris length))
|
|
(let ((s3-0 (-> this tris data s4-0)))
|
|
(-> this tris data s4-0)
|
|
(let ((v1-5 (new 'stack-no-clear 'inline-array 'vector 4)))
|
|
(dotimes (a0-3 4)
|
|
(set! (-> v1-5 a0-3 quad) (the-as uint128 0))
|
|
)
|
|
)
|
|
(if (< 0.0 (mouse-intersect-triangle
|
|
arg0
|
|
(-> this verts data (-> s3-0 indices 0))
|
|
(-> this verts data (-> s3-0 indices 1))
|
|
(-> this verts data (-> s3-0 indices 2))
|
|
)
|
|
)
|
|
(return (the-as int (-> s3-0 poly)))
|
|
)
|
|
)
|
|
)
|
|
(dotimes (s4-1 (-> this quads length))
|
|
(let ((s3-1 (-> this quads data s4-1)))
|
|
(-> this quads data s4-1)
|
|
(let ((v1-27 (new 'stack-no-clear 'inline-array 'vector 4)))
|
|
(dotimes (a0-9 4)
|
|
(set! (-> v1-27 a0-9 quad) (the-as uint128 0))
|
|
)
|
|
)
|
|
(if (or (< 0.0 (mouse-intersect-triangle
|
|
arg0
|
|
(-> this verts data (-> s3-1 indices 0))
|
|
(-> this verts data (-> s3-1 indices 2))
|
|
(-> this verts data (-> s3-1 indices 3))
|
|
)
|
|
)
|
|
(< 0.0 (mouse-intersect-triangle
|
|
arg0
|
|
(-> this verts data (-> s3-1 indices 0))
|
|
(-> this verts data (-> s3-1 indices 3))
|
|
(-> this verts data (-> s3-1 indices 2))
|
|
)
|
|
)
|
|
(< 0.0 (mouse-intersect-triangle
|
|
arg0
|
|
(-> this verts data (-> s3-1 indices 0))
|
|
(-> this verts data (-> s3-1 indices 2))
|
|
(-> this verts data (-> s3-1 indices 1))
|
|
)
|
|
)
|
|
(< 0.0 (mouse-intersect-triangle
|
|
arg0
|
|
(-> this verts data (-> s3-1 indices 0))
|
|
(-> this verts data (-> s3-1 indices 3))
|
|
(-> this verts data (-> s3-1 indices 1))
|
|
)
|
|
)
|
|
)
|
|
(return (the-as int (-> s3-1 poly)))
|
|
)
|
|
)
|
|
)
|
|
-1
|
|
)
|
|
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod nav-mesh-editable-method-13 ((this nav-mesh-editable))
|
|
(set! (-> this tris length) 0)
|
|
(set! (-> this quads length) 0)
|
|
(dotimes (s5-0 (-> this polys length))
|
|
(let ((a0-2 (-> this polys data s5-0)))
|
|
(if (nonzero? (-> a0-2 index length))
|
|
(nav-mesh-poly-method-10 a0-2 this)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defmethod nav-mesh-editable-method-10 ((this nav-mesh-editable) (arg0 symbol))
|
|
(let ((s4-0 (-> this tris))
|
|
(s3-0 (-> this verts))
|
|
)
|
|
(dotimes (s2-0 (-> s4-0 length))
|
|
(let ((s1-0 (-> s4-0 data s2-0)))
|
|
(if arg0
|
|
(add-debug-flat-triangle
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> s3-0 data (-> s1-0 indices 0))
|
|
(-> s3-0 data (-> s1-0 indices 1))
|
|
(-> s3-0 data (-> s1-0 indices 2))
|
|
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x20)
|
|
)
|
|
)
|
|
(add-debug-line
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> s3-0 data (-> s1-0 indices 2))
|
|
(-> s3-0 data (-> s1-0 indices 0))
|
|
(if (and arg0 (= (-> s4-0 data s2-0 poly) (-> this selected-poly)))
|
|
*color-red*
|
|
*color-light-red*
|
|
)
|
|
#f
|
|
(the-as rgba -1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((s4-1 (-> this quads))
|
|
(s3-1 (-> this verts))
|
|
)
|
|
(dotimes (s2-1 (-> s4-1 length))
|
|
(let ((s1-1 (-> s4-1 data s2-1)))
|
|
(when arg0
|
|
(add-debug-flat-triangle
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> s3-1 data (-> s1-1 indices 0))
|
|
(-> s3-1 data (-> s1-1 indices 1))
|
|
(-> s3-1 data (-> s1-1 indices 2))
|
|
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x20)
|
|
)
|
|
(add-debug-flat-triangle
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> s3-1 data (-> s1-1 indices 0))
|
|
(-> s3-1 data (-> s1-1 indices 2))
|
|
(-> s3-1 data (-> s1-1 indices 3))
|
|
(new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x20)
|
|
)
|
|
)
|
|
(add-debug-line
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> s3-1 data (-> s1-1 indices 3))
|
|
(-> s3-1 data (-> s1-1 indices 0))
|
|
(if (and arg0 (= (-> s4-1 data s2-1 poly) (-> this selected-poly)))
|
|
*color-red*
|
|
*color-light-red*
|
|
)
|
|
#f
|
|
(the-as rgba -1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(dotimes (s4-2 (-> this polys length))
|
|
(let ((s3-2 (-> this polys data s4-2))
|
|
(s2-2 (and arg0 (= s4-2 (-> this selected-poly))))
|
|
)
|
|
(let ((s1-2 (if s2-2
|
|
*color-blue*
|
|
*color-light-blue*
|
|
)
|
|
)
|
|
)
|
|
(dotimes (s0-0 (-> s3-2 index length))
|
|
(let ((a2-5 (-> s3-2 index data (mod (+ s0-0 1) (-> s3-2 index length))))
|
|
(v1-70 (-> s3-2 index data s0-0))
|
|
)
|
|
(add-debug-line
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> this verts data a2-5)
|
|
(-> this verts data v1-70)
|
|
s1-2
|
|
#f
|
|
(the-as rgba -1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (and s2-2 (< 1 (-> s3-2 index length)))
|
|
(let ((v1-86 (-> s3-2 index data (mod (the-as int (+ (-> s3-2 insert-pos) 1)) (-> s3-2 index length))))
|
|
(a2-9 (-> s3-2 index data (-> s3-2 insert-pos)))
|
|
)
|
|
(add-debug-line
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> this verts data a2-9)
|
|
(-> this verts data v1-86)
|
|
*color-green*
|
|
#f
|
|
*color-white*
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(define *clean-vertex-array* (new 'static 'inline-array vector 1024
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
(new 'static 'vector)
|
|
)
|
|
)
|
|
|
|
(define *clean-index-array* (new 'static 'array int32 1024
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod nav-mesh-editable-method-17 ((this nav-mesh-editable))
|
|
;; og:preserve-this added v1-13 and v1-17
|
|
(local-vars (v1-13 symbol) (v1-17 symbol))
|
|
(let ((s5-0 0))
|
|
(let ((s4-0 0))
|
|
(b! #t cfg-33 :delay (nop!))
|
|
(label cfg-1)
|
|
(let ((s3-0 (-> this polys data s4-0))
|
|
(s2-0 0)
|
|
)
|
|
(let ((s0-0 -1)
|
|
(s1-0 0)
|
|
)
|
|
(b! #t cfg-28 :delay (nop!))
|
|
(label cfg-2)
|
|
(let ((sv-16 (the-as symbol #f))
|
|
(sv-48 (-> this verts data (-> s3-0 index data s1-0)))
|
|
)
|
|
(b! (not #t) cfg-25 :delay (nop!))
|
|
(let ((v1-10 (or (= s0-0 -1)
|
|
(< 204.8 (vector-vector-distance (-> *clean-vertex-array* (-> *clean-index-array* s0-0)) sv-48))
|
|
)
|
|
)
|
|
)
|
|
(b! (not v1-10) cfg-13 :likely-delay (set! v1-13 v1-10))
|
|
)
|
|
(let ((a0-10 (!= s1-0 (+ (-> s3-0 index length) -1))))
|
|
(b! a0-10 cfg-13 :likely-delay (set! v1-17 a0-10))
|
|
)
|
|
(< 204.8 (vector-vector-distance (-> *clean-vertex-array* (-> *clean-index-array* 0)) sv-48))
|
|
(label cfg-13)
|
|
(let ((sv-32 0))
|
|
(while (< sv-32 s5-0)
|
|
(when (and (not sv-16) (< (vector-vector-distance (-> *clean-vertex-array* sv-32) sv-48) 204.8))
|
|
(set! sv-16 #t)
|
|
(set! s0-0 sv-32)
|
|
(set! (-> *clean-index-array* s2-0) sv-32)
|
|
(+! s2-0 1)
|
|
)
|
|
(+! sv-32 1)
|
|
)
|
|
)
|
|
(when (not sv-16)
|
|
(vector-copy! (-> *clean-vertex-array* s5-0) sv-48)
|
|
(set! s0-0 s5-0)
|
|
(set! (-> *clean-index-array* s2-0) s5-0)
|
|
(+! s2-0 1)
|
|
(+! s5-0 1)
|
|
)
|
|
)
|
|
(b! #t cfg-27 :delay (nop!))
|
|
(label cfg-25)
|
|
(if (>= (the-as int (-> s3-0 insert-pos)) s1-0)
|
|
(set! (-> s3-0 insert-pos) (the-as uint s0-0))
|
|
)
|
|
(label cfg-27)
|
|
(+! s1-0 1)
|
|
(label cfg-28)
|
|
(b! (< s1-0 (-> s3-0 index length)) cfg-2)
|
|
)
|
|
(set! (-> s3-0 index length) s2-0)
|
|
(dotimes (v1-52 s2-0)
|
|
(set! (-> s3-0 index data v1-52) (-> *clean-index-array* v1-52))
|
|
)
|
|
)
|
|
(+! s4-0 1)
|
|
(label cfg-33)
|
|
(b! (< s4-0 (-> this polys length)) cfg-1)
|
|
)
|
|
(set! (-> this verts length) s5-0)
|
|
(dotimes (v1-60 s5-0)
|
|
(vector-copy! (-> this verts data v1-60) (-> *clean-vertex-array* v1-60))
|
|
)
|
|
)
|
|
(nav-mesh-editable-method-13 this)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod nav-mesh-poly-method-14 ((this nav-mesh-poly) (arg0 int) (arg1 int))
|
|
(set! (-> this poly-id) (the-as uint arg1))
|
|
(set! (-> this index length) 0)
|
|
(let ((s3-0 (clear *temp-string*)))
|
|
(format
|
|
s3-0
|
|
"select navmesh_vertex_idx,navmesh_shape_idx from navmesh_shape where entity_id=~D and navmesh_poly_idx=~D~%"
|
|
arg0
|
|
arg1
|
|
)
|
|
(let ((s5-1 (sql-query s3-0)))
|
|
(when (!= (-> s5-1 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s5-1 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(let ((s4-1 0))
|
|
(while (< s4-1 (-> s5-1 length))
|
|
(set! (-> this index data (string->int (the-as string (-> s5-1 sql-data (+ s4-1 1)))))
|
|
(string->int (the-as string (-> s5-1 sql-data s4-1)))
|
|
)
|
|
(+! (-> this index length) 1)
|
|
(+! s4-1 2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
;; WARN: new jak 2 until loop case, check carefully
|
|
(defmethod nav-mesh-editable-method-15 ((this nav-mesh-editable) (arg0 int))
|
|
(set! (-> this verts length) 0)
|
|
(let ((s3-0 (clear *temp-string*))
|
|
(s4-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(set! (-> s4-0 x) 0.0)
|
|
(set! (-> s4-0 y) 0.0)
|
|
(set! (-> s4-0 z) 0.0)
|
|
(clear s3-0)
|
|
(format
|
|
s3-0
|
|
"select translate_x,translate_y,translate_z from level_info where level_info_id=~D~%"
|
|
(-> this level-id)
|
|
)
|
|
(let ((s2-0 (sql-query s3-0)))
|
|
(when (!= (-> s2-0 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s2-0 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(set! (-> s4-0 x) (string->float (the-as string (-> s2-0 sql-data 0))))
|
|
(set! (-> s4-0 y) (string->float (the-as string (-> s2-0 sql-data 1))))
|
|
(set! (-> s4-0 z) (string->float (the-as string (-> s2-0 sql-data 2))))
|
|
)
|
|
(clear s3-0)
|
|
(format s3-0 "select navmesh_vertex_idx,x,y,z from navmesh_vertex where entity_id=~D~%" arg0)
|
|
(let ((s3-1 (sql-query s3-0)))
|
|
(when (!= (-> s3-1 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s3-1 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(let ((s2-1 0))
|
|
0
|
|
(while (< s2-1 (-> s3-1 length))
|
|
(set-vector!
|
|
(-> this verts data (string->int (the-as string (-> s3-1 sql-data s2-1))))
|
|
(* 4096.0 (+ (-> s4-0 x) (string->float (the-as string (-> s3-1 sql-data (+ s2-1 1))))))
|
|
(* 4096.0 (+ (-> s4-0 y) (string->float (the-as string (-> s3-1 sql-data (+ s2-1 2))))))
|
|
(* 4096.0 (+ (-> s4-0 z) (string->float (the-as string (-> s3-1 sql-data (+ s2-1 3))))))
|
|
1.0
|
|
)
|
|
(+! (-> this verts length) 1)
|
|
(+! s2-1 4)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(dotimes (v1-32 92)
|
|
(set! (-> this polys data v1-32 index length) 0)
|
|
)
|
|
(let ((s4-1 (clear *temp-string*)))
|
|
(format s4-1 "select navmesh_poly_idx,flag from navmesh_poly where entity_id=~D~%" arg0)
|
|
(let ((s4-2 (sql-query s4-1)))
|
|
(when (!= (-> s4-2 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s4-2 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(let ((s3-2 0)
|
|
(s2-2 0)
|
|
)
|
|
(while (< s3-2 (-> s4-2 length))
|
|
(let ((a2-6 (string->int (the-as string (-> s4-2 sql-data s3-2)))))
|
|
(nav-mesh-poly-method-14 (-> this polys data s2-2) arg0 a2-6)
|
|
)
|
|
(set! (-> this polys data s2-2 flags) (nav-mesh-poly-flag))
|
|
(let ((s1-1 (new 'global 'string 0 (the-as string (-> s4-2 sql-data (+ s3-2 1))))))
|
|
(copy-string<-string s1-1 (the-as string (-> s4-2 sql-data (+ s3-2 1))))
|
|
(until #f
|
|
(cond
|
|
((string-prefix= "gap" s1-1)
|
|
(logior! (-> this polys data s2-2 flags) (nav-mesh-poly-flag gap))
|
|
)
|
|
((string-prefix= "off" s1-1)
|
|
(logior! (-> this polys data s2-2 flags) (nav-mesh-poly-flag off))
|
|
)
|
|
((string-prefix= "switch" s1-1)
|
|
(logior! (-> this polys data s2-2 flags) (nav-mesh-poly-flag nmpf2))
|
|
)
|
|
((string-prefix= "user0" s1-1)
|
|
(logior! (-> this polys data s2-2 flags) (nav-mesh-poly-flag user0))
|
|
)
|
|
(else
|
|
#t
|
|
(goto cfg-30)
|
|
)
|
|
)
|
|
(let ((a1-20 (string-skip-to-char (-> s1-1 data) (the-as uint 44))))
|
|
(if (= (-> a1-20 0) 44)
|
|
(set! a1-20 (&-> a1-20 1))
|
|
)
|
|
(string-suck-up! s1-1 a1-20)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
(label cfg-30)
|
|
(+! s2-2 1)
|
|
(+! s3-2 2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(logclear! (-> this flags) (nav-mesh-editable-flag nmef0))
|
|
(nav-mesh-editable-method-17 this)
|
|
(set! (-> this navmesh-id) (the-as uint arg0))
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch symbol vs object.
|
|
(defun poly-flag-to-string ((arg0 object) (arg1 nav-mesh-poly-flag))
|
|
(let ((v1-0 #t))
|
|
(when (logtest? arg1 (nav-mesh-poly-flag gap))
|
|
(if (not v1-0)
|
|
(format arg0 ",")
|
|
)
|
|
(format arg0 "gap")
|
|
(set! v1-0 #f)
|
|
)
|
|
(when (logtest? arg1 (nav-mesh-poly-flag off))
|
|
(if (not v1-0)
|
|
(format arg0 ",")
|
|
)
|
|
(format arg0 "off")
|
|
(set! v1-0 #f)
|
|
)
|
|
(when (logtest? arg1 (nav-mesh-poly-flag user0))
|
|
(if (not v1-0)
|
|
(format arg0 ",")
|
|
)
|
|
(format arg0 "user0")
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
|
|
;; WARN: Function (method 18 nav-mesh-editable) has a return type of none, but the expression builder found a return statement.
|
|
(defmethod nav-mesh-editable-method-18 ((this nav-mesh-editable))
|
|
(format #t "Deleting nav-mesh ~D...~%" (-> this navmesh-id))
|
|
(let ((s5-0 (clear *temp-string*)))
|
|
(format s5-0 "delete from navmesh_vertex where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-2 (sql-query s5-0)))
|
|
(when (!= (-> a2-2 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-2 this)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-1 (clear *temp-string*)))
|
|
(format s5-1 "delete from navmesh_shape where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-4 (sql-query s5-1)))
|
|
(when (!= (-> a2-4 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-4 this)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-2 (clear *temp-string*)))
|
|
(format s5-2 "delete from navmesh_face where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-6 (sql-query s5-2)))
|
|
(when (!= (-> a2-6 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-6 this)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-3 (clear *temp-string*)))
|
|
(format s5-3 "delete from navmesh_poly where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-8 (sql-query s5-3)))
|
|
(when (!= (-> a2-8 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-8 this)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-4 (clear *temp-string*)))
|
|
(format s5-4 "delete from entity where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-10 (sql-query s5-4)))
|
|
(when (!= (-> a2-10 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-10 this)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod nav-mesh-editable-method-16 ((this nav-mesh-editable))
|
|
(format #t "Saving nav-mesh ~D~%" (-> this navmesh-id))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
|
(let ((s5-0 (clear *temp-string*)))
|
|
(format
|
|
s5-0
|
|
"select translate_x,translate_y,translate_z from level_info where level_info_id=~D~%"
|
|
(-> this level-id)
|
|
)
|
|
(let ((s5-1 (sql-query s5-0)))
|
|
(when (!= (-> s5-1 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s5-1 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(set! (-> s4-0 x) (* 4096.0 (string->float (the-as string (-> s5-1 sql-data 0)))))
|
|
(set! (-> s4-0 y) (* 4096.0 (string->float (the-as string (-> s5-1 sql-data 1)))))
|
|
(set! (-> s4-0 z) (* 4096.0 (string->float (the-as string (-> s5-1 sql-data 2)))))
|
|
)
|
|
)
|
|
(let ((s5-2 (new-stack-vector0)))
|
|
(dotimes (v1-7 (-> this verts length))
|
|
(vector+! s5-2 s5-2 (-> this verts data v1-7))
|
|
)
|
|
(let ((v1-10 s5-2)
|
|
(a0-13 s5-2)
|
|
(f0-7 (the float (-> this verts length)))
|
|
)
|
|
(vector-float*! v1-10 a0-13 (/ 1.0 f0-7))
|
|
)
|
|
(set! (-> s5-2 x) (- (-> s5-2 x) (-> s4-0 x)))
|
|
(set! (-> s5-2 y) (- (-> s5-2 y) (-> s4-0 y)))
|
|
(set! (-> s5-2 z) (- (-> s5-2 z) (-> s4-0 z)))
|
|
(cond
|
|
((nonzero? (-> this navmesh-id))
|
|
(let ((s4-1 (clear *temp-string*)))
|
|
(format s4-1 "update entity set ")
|
|
(format s4-1 "level_id=~D," (-> this level-id))
|
|
(format s4-1 "position_x=~M," (-> s5-2 x))
|
|
(format s4-1 "position_y=~M," (-> s5-2 y))
|
|
(format s4-1 "position_z=~M " (-> s5-2 z))
|
|
(format s4-1 "where ")
|
|
(format s4-1 "entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-11 (sql-query s4-1)))
|
|
(when (!= (-> a2-11 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-11 this)
|
|
(set! (-> this navmesh-id) (the-as uint 0))
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s4-2 (clear *temp-string*)))
|
|
(format s4-2 "select ifnull(max(idx) + 1, 1) from entity where name='nav-mesh'~%")
|
|
(let ((a2-12 (sql-query s4-2)))
|
|
(when (!= (-> a2-12 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-12 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(set! (-> this idx) (the-as uint (string->int (the-as string (-> a2-12 sql-data 0)))))
|
|
)
|
|
(clear s4-2)
|
|
(format s4-2 "insert entity set ")
|
|
(format s4-2 "level_id=~D," (-> this level-id))
|
|
(format s4-2 "name='nav-mesh',")
|
|
(format s4-2 "idx=~D," (-> this idx))
|
|
(format s4-2 "path='navmesh-editor-~D'," (-> this idx))
|
|
(format s4-2 "position_x=~M," (-> s5-2 x))
|
|
(format s4-2 "position_y=~M," (-> s5-2 y))
|
|
(format s4-2 "position_z=~M~%" (-> s5-2 z))
|
|
(let ((a2-19 (sql-query s4-2)))
|
|
(when (!= (-> a2-19 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-19 this)
|
|
(set! (-> this navmesh-id) (the-as uint 0))
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-22 (sql-query "select LAST_INSERT_ID()")))
|
|
(if (= (-> v1-22 content-type) 'select)
|
|
(set! (-> this navmesh-id) (the-as uint (string->int (the-as string (-> v1-22 sql-data 0)))))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(format 0 "Saving vertices ...~%")
|
|
(let ((s5-3 (clear *temp-string*))
|
|
(s4-3 (new 'stack-no-clear 'vector))
|
|
(s3-0 0)
|
|
)
|
|
(format s5-3 "delete from navmesh_vertex where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-21 (sql-query s5-3)))
|
|
(when (!= (-> a2-21 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-21 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(clear s5-3)
|
|
(format
|
|
s5-3
|
|
"select translate_x,translate_y,translate_z from level_info where level_info_id=~D~%"
|
|
(-> this level-id)
|
|
)
|
|
(let ((s2-0 (sql-query s5-3)))
|
|
(when (!= (-> s2-0 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s2-0 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(set! (-> s4-3 x) (* 4096.0 (string->float (the-as string (-> s2-0 sql-data 0)))))
|
|
(set! (-> s4-3 y) (* 4096.0 (string->float (the-as string (-> s2-0 sql-data 1)))))
|
|
(set! (-> s4-3 z) (* 4096.0 (string->float (the-as string (-> s2-0 sql-data 2)))))
|
|
)
|
|
(clear s5-3)
|
|
(dotimes (s2-1 (-> this verts length))
|
|
(if (zero? s3-0)
|
|
(format s5-3 "insert into navmesh_vertex (entity_id,navmesh_vertex_idx,x,y,z) values ")
|
|
(format s5-3 ", ")
|
|
)
|
|
(format
|
|
s5-3
|
|
"(~D,~D,~M,~M,~M)"
|
|
(-> this navmesh-id)
|
|
s2-1
|
|
(- (-> this verts data s2-1 x) (-> s4-3 x))
|
|
(- (-> this verts data s2-1 y) (-> s4-3 y))
|
|
(- (-> this verts data s2-1 z) (-> s4-3 z))
|
|
)
|
|
(+! s3-0 1)
|
|
(when (>= s3-0 16)
|
|
(format s5-3 "~%")
|
|
(let ((a2-25 (sql-query s5-3)))
|
|
(when (!= (-> a2-25 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-25 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(set! s3-0 0)
|
|
(clear s5-3)
|
|
)
|
|
)
|
|
(when (> s3-0 0)
|
|
(format s5-3 "~%")
|
|
(let ((a2-26 (sql-query s5-3)))
|
|
(when (!= (-> a2-26 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-26 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(format 0 "Saving polygons ...~%")
|
|
(let ((s5-4 0)
|
|
(s4-4 (clear *temp-string*))
|
|
)
|
|
(format s4-4 "delete from navmesh_shape where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-28 (sql-query s4-4)))
|
|
(when (!= (-> a2-28 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-28 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(clear s4-4)
|
|
(format s4-4 "delete from navmesh_poly where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-30 (sql-query s4-4)))
|
|
(when (!= (-> a2-30 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-30 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(dotimes (s3-1 (-> this polys length))
|
|
(let ((s2-2 (-> this polys data s3-1)))
|
|
(when (< 2 (-> s2-2 index length))
|
|
(let ((s1-0 0))
|
|
(clear s4-4)
|
|
(format s4-4 "insert navmesh_poly set navmesh_poly_idx=~D,entity_id=~D,flag='" s5-4 (-> this navmesh-id))
|
|
(poly-flag-to-string s4-4 (-> s2-2 flags))
|
|
(format s4-4 "'~%")
|
|
(let ((a2-32 (sql-query s4-4)))
|
|
(when (!= (-> a2-32 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-32 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(clear s4-4)
|
|
(dotimes (s0-0 (-> s2-2 index length))
|
|
(if (zero? s1-0)
|
|
(format
|
|
s4-4
|
|
"insert into navmesh_shape (entity_id,navmesh_poly_idx,navmesh_vertex_idx,navmesh_shape_idx) values "
|
|
)
|
|
(format s4-4 ", ")
|
|
)
|
|
(format s4-4 "(~D,~D,~D,~D)" (-> this navmesh-id) s5-4 (-> s2-2 index data s0-0) s0-0)
|
|
(+! s1-0 1)
|
|
(when (>= s1-0 16)
|
|
(format s4-4 "~%")
|
|
(let ((a2-34 (sql-query s4-4)))
|
|
(when (!= (-> a2-34 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-34 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(set! s1-0 0)
|
|
(clear s4-4)
|
|
)
|
|
)
|
|
(when (> s1-0 0)
|
|
(format s4-4 "~%")
|
|
(let ((a2-35 (sql-query s4-4)))
|
|
(when (!= (-> a2-35 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-35 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(+! s5-4 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(format 0 "Saving faces ...~%")
|
|
(let ((s5-5 (clear *temp-string*))
|
|
(s4-5 0)
|
|
)
|
|
(format s5-5 "delete from navmesh_face where entity_id=~D~%" (-> this navmesh-id))
|
|
(let ((a2-37 (sql-query s5-5)))
|
|
(when (!= (-> a2-37 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-37 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(clear s5-5)
|
|
(dotimes (s3-2 (-> this tris length))
|
|
(if (zero? s4-5)
|
|
(format
|
|
s5-5
|
|
"insert into navmesh_face (entity_id,navmesh_vertex_idx_1,navmesh_vertex_idx_2,navmesh_vertex_idx_3,navmesh_vertex_idx_4,flag) values "
|
|
)
|
|
(format s5-5 ", ")
|
|
)
|
|
(format
|
|
s5-5
|
|
"(~D,~D,~D,~D,~D,'"
|
|
(-> this navmesh-id)
|
|
(-> (the-as (inline-array nav-mesh-tri-quad) (+ (* s3-2 32) (the-as int (-> this tris)))) 0 indices 3)
|
|
(-> this tris data s3-2 indices 1)
|
|
(-> this tris data s3-2 indices 2)
|
|
-1
|
|
)
|
|
(poly-flag-to-string s5-5 (-> this polys data (-> this tris data s3-2 poly) flags))
|
|
(format s5-5 "')")
|
|
(+! s4-5 1)
|
|
(when (>= s4-5 16)
|
|
(format s5-5 "~%")
|
|
(let ((a2-40 (sql-query s5-5)))
|
|
(when (!= (-> a2-40 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-40 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(set! s4-5 0)
|
|
(clear s5-5)
|
|
)
|
|
)
|
|
(dotimes (s3-3 (-> this quads length))
|
|
(if (zero? s4-5)
|
|
(format
|
|
s5-5
|
|
"insert into navmesh_face (entity_id,navmesh_vertex_idx_1,navmesh_vertex_idx_2,navmesh_vertex_idx_3,navmesh_vertex_idx_4,flag) values "
|
|
)
|
|
(format s5-5 ", ")
|
|
)
|
|
(format
|
|
s5-5
|
|
"(~D,~D,~D,~D,~D,'"
|
|
(-> this navmesh-id)
|
|
(-> this quads data s3-3 indices 0)
|
|
(-> this quads data s3-3 indices 1)
|
|
(-> this quads data s3-3 indices 2)
|
|
(-> this quads data s3-3 indices 3)
|
|
)
|
|
(poly-flag-to-string s5-5 (-> this polys data (-> this quads data s3-3 poly) flags))
|
|
(format s5-5 "')")
|
|
(+! s4-5 1)
|
|
(when (>= s4-5 16)
|
|
(format s5-5 "~%")
|
|
(let ((a2-43 (sql-query s5-5)))
|
|
(when (!= (-> a2-43 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-43 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
(set! s4-5 0)
|
|
(clear s5-5)
|
|
)
|
|
)
|
|
(when (> s4-5 0)
|
|
(format s5-5 "~%")
|
|
(let ((a2-44 (sql-query s5-5)))
|
|
(when (!= (-> a2-44 content-type) 'modify)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" a2-44 this)
|
|
(return (the-as object #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defmethod nav-mesh-poly-method-13 ((this nav-mesh-poly) (arg0 int))
|
|
(dotimes (v1-0 (-> this index length))
|
|
(if (= (-> this index data v1-0) arg0)
|
|
(return v1-0)
|
|
)
|
|
)
|
|
-1
|
|
)
|
|
|
|
(defmethod nav-mesh-poly-method-11 ((this nav-mesh-poly) (arg0 int))
|
|
(cond
|
|
((zero? (-> this index length))
|
|
(set! (-> this index data 0) arg0)
|
|
(+! (-> this index length) 1)
|
|
(set! (-> this insert-pos) (-> this insert-pos))
|
|
)
|
|
((= (-> this insert-pos) (+ (-> this index length) -1))
|
|
(set! (-> this index data (+ (-> this insert-pos) 1)) arg0)
|
|
(+! (-> this index length) 1)
|
|
(+! (-> this insert-pos) 1)
|
|
)
|
|
((< (-> this insert-pos) (the-as uint (-> this index length)))
|
|
(when (and (!= (-> this index data (-> this insert-pos)) arg0)
|
|
(!= (-> this index data (mod (the-as int (+ (-> this insert-pos) 1)) (-> this index length))) arg0)
|
|
)
|
|
(dotimes (v1-35 (+ (- (the-as int (-> this insert-pos))) (-> this index length)))
|
|
(set! (-> this index data (- (-> this index length) v1-35))
|
|
(-> this index data (+ (- -1 v1-35) (-> this index length)))
|
|
)
|
|
)
|
|
(set! (-> this index data (+ (-> this insert-pos) 1)) arg0)
|
|
(+! (-> this index length) 1)
|
|
(+! (-> this insert-pos) 1)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod nav-mesh-poly-method-12 ((this nav-mesh-poly) (arg0 int))
|
|
(when (< (the-as uint arg0) (the-as uint (-> this index length)))
|
|
(if (and (>= (-> this insert-pos) (the-as uint arg0)) (> (-> this insert-pos) 0))
|
|
(+! (-> this insert-pos) -1)
|
|
)
|
|
(dotimes (v1-9 (+ (- arg0) (-> this index length)))
|
|
(set! (-> this index data (+ arg0 v1-9)) (-> this index data (+ v1-9 1 arg0)))
|
|
)
|
|
(+! (-> this index length) -1)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype triangulation-vert (structure)
|
|
((index uint32)
|
|
(ear? symbol)
|
|
(score float)
|
|
)
|
|
)
|
|
|
|
|
|
;; WARN: disable def twice: 23. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
|
(defun point-in-cone ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
|
(let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 arg2))
|
|
(a0-2 (vector-! (new 'stack-no-clear 'vector) arg1 arg2))
|
|
(a1-2 (vector-! (new 'stack-no-clear 'vector) arg3 arg2))
|
|
)
|
|
(if (< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) a1-2 a0-2) y))
|
|
(and (< (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a1-2) y) 0.0)
|
|
(< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a0-2) y))
|
|
)
|
|
(or (< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a1-2) y))
|
|
(< (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a0-2) y) 0.0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; WARN: disable def twice: 23. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
|
(defun segment-in-cone ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
|
(let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))
|
|
(a1-2 (vector-! (new 'stack-no-clear 'vector) arg2 arg0))
|
|
(a2-2 (vector-! (new 'stack-no-clear 'vector) arg3 arg0))
|
|
)
|
|
(if (< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) a2-2 a1-2) y))
|
|
(and (< (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a2-2) y) 0.0)
|
|
(< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a1-2) y))
|
|
)
|
|
(or (< 0.0 (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a2-2) y))
|
|
(< (-> (vector-cross! (new 'stack-no-clear 'vector) v1-1 a1-2) y) 0.0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun point-in-triangle ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
|
(local-vars (v0-0 symbol))
|
|
(let ((t0-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))
|
|
(t1-2 (vector-! (new 'stack-no-clear 'vector) arg3 arg2))
|
|
(v1-3 (vector-! (new 'stack-no-clear 'vector) arg1 arg3))
|
|
)
|
|
(if (or (< 0.0
|
|
(-> (vector-cross! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) arg0 arg2) t1-2) y)
|
|
)
|
|
(< 0.0
|
|
(-> (vector-cross! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) arg0 arg1) t0-1) y)
|
|
)
|
|
(< 0.0
|
|
(-> (vector-cross! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) arg0 arg3) v1-3) y)
|
|
)
|
|
)
|
|
(return #f)
|
|
)
|
|
)
|
|
(return #t)
|
|
v0-0
|
|
)
|
|
|
|
(defun segments-intersect ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
|
(let* ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg0))
|
|
(f0-2 (- (* (-> arg1 x) (-> arg3 z)) (* (-> arg1 z) (-> arg3 x))))
|
|
(f1-5 (square f0-2))
|
|
(f2-4 (+ (square (-> arg1 x)) (square (-> arg1 z))))
|
|
(f3-6 (+ (square (-> arg3 x)) (square (-> arg3 z))))
|
|
)
|
|
(when (< (* (/ f3-6 10000) f2-4) f1-5)
|
|
(let ((f1-9 (/ (- (* (-> v1-1 x) (-> arg3 z)) (* (-> v1-1 z) (-> arg3 x))) f0-2)))
|
|
(if (or (< f1-9 0.0) (< 1.0 f1-9))
|
|
(return #f)
|
|
)
|
|
)
|
|
(let ((f0-3 (/ (- (* (-> v1-1 x) (-> arg1 z)) (* (-> v1-1 z) (-> arg1 x))) f0-2)))
|
|
(if (or (< f0-3 0.0) (< 1.0 f0-3))
|
|
(return #f)
|
|
)
|
|
)
|
|
(return #t)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
(defun is-diagonal ((arg0 int) (arg1 (inline-array triangulation-vert)) (arg2 vector-array) (arg3 int) (arg4 int) (arg5 int))
|
|
(mod (+ arg0 -1 arg3) arg0)
|
|
(mod (+ arg0 1 arg5) arg0)
|
|
(let ((v1-9 (vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> arg2 data (-> arg1 arg4 index))
|
|
(-> arg2 data (-> arg1 arg3 index))
|
|
)
|
|
)
|
|
(a0-8 (vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> arg2 data (-> arg1 arg5 index))
|
|
(-> arg2 data (-> arg1 arg4 index))
|
|
)
|
|
)
|
|
)
|
|
(if (< (-> (vector-cross! (new 'stack-no-clear 'vector) v1-9 a0-8) y) 0.0)
|
|
(return #f)
|
|
)
|
|
)
|
|
(dotimes (s0-0 arg0)
|
|
(if (and (!= s0-0 arg3)
|
|
(!= s0-0 arg4)
|
|
(!= s0-0 arg5)
|
|
(and (< (-> (vector-cross!
|
|
(new 'stack-no-clear 'vector)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> arg2 data (-> arg1 s0-0 index))
|
|
(-> arg2 data (-> arg1 (mod (+ arg0 -1 s0-0) arg0) index))
|
|
)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> arg2 data (-> arg1 (mod (+ arg0 1 s0-0) arg0) index))
|
|
(-> arg2 data (-> arg1 s0-0 index))
|
|
)
|
|
)
|
|
y
|
|
)
|
|
0.0
|
|
)
|
|
(point-in-triangle
|
|
(-> arg2 data (-> arg1 s0-0 index))
|
|
(-> arg2 data (-> arg1 arg3 index))
|
|
(-> arg2 data (-> arg1 arg4 index))
|
|
(-> arg2 data (-> arg1 arg5 index))
|
|
)
|
|
)
|
|
)
|
|
(return #f)
|
|
)
|
|
)
|
|
#t
|
|
)
|
|
|
|
(define *verts-buf-1* (new 'static 'inline-array triangulation-vert 256
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
)
|
|
)
|
|
|
|
(define *verts-buf-2* (new 'static 'inline-array triangulation-vert 256
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
(new 'static 'triangulation-vert)
|
|
)
|
|
)
|
|
|
|
;; WARN: Function (method 10 nav-mesh-poly) has a return type of none, but the expression builder found a return statement.
|
|
(defmethod nav-mesh-poly-method-10 ((this nav-mesh-poly) (arg0 nav-mesh-editable))
|
|
(rlet ((vf0 :class vf)
|
|
(vf4 :class vf)
|
|
(vf5 :class vf)
|
|
(vf6 :class vf)
|
|
)
|
|
(init-vf0-vector)
|
|
(let ((s4-0 *verts-buf-1*)
|
|
(s2-0 *verts-buf-2*)
|
|
)
|
|
*verts-buf-1*
|
|
(let ((s1-0 (-> this index length))
|
|
(s3-0 (-> arg0 verts))
|
|
)
|
|
(dotimes (v1-2 s1-0)
|
|
(set! (-> s4-0 v1-2 index) (the-as uint (-> this index data v1-2)))
|
|
)
|
|
(while (< 3 s1-0)
|
|
(let ((sv-288 0)
|
|
(sv-304 1)
|
|
(sv-320 2)
|
|
(s0-0 0)
|
|
)
|
|
(let ((sv-336 -1))
|
|
-1
|
|
(let ((f30-0 0.0))
|
|
(let ((sv-352 0))
|
|
(while (< sv-352 s1-0)
|
|
(set! (-> s4-0 sv-304 ear?) #f)
|
|
(when (is-diagonal s1-0 s4-0 s3-0 sv-288 sv-304 sv-320)
|
|
1.0
|
|
(new 'stack-no-clear 'vector)
|
|
(let ((sv-400 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-25 (-> s3-0 data (-> s4-0 sv-288 index)))
|
|
(a0-11 (-> s3-0 data (-> s4-0 sv-304 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-25 quad))
|
|
(.lvf vf5 (&-> a0-11 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-400 quad) vf6)
|
|
(let ((sv-368 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-34 (-> s3-0 data (-> s4-0 sv-304 index)))
|
|
(a0-18 (-> s3-0 data (-> s4-0 sv-320 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-34 quad))
|
|
(.lvf vf5 (&-> a0-18 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-368 quad) vf6)
|
|
(let ((sv-384 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-43 (-> s3-0 data (-> s4-0 sv-320 index)))
|
|
(a0-25 (-> s3-0 data (-> s4-0 sv-288 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-43 quad))
|
|
(.lvf vf5 (&-> a0-25 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-384 quad) vf6)
|
|
0.0
|
|
0.0
|
|
(let ((f0-5 (* (vector-vector-angle-safe sv-400 sv-368)
|
|
(vector-vector-angle-safe sv-368 sv-384)
|
|
(vector-vector-angle-safe sv-384 sv-400)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> s4-0 sv-304 ear?) #t)
|
|
(when (or (= sv-336 -1) (< f30-0 f0-5))
|
|
(set! sv-336 sv-304)
|
|
(set! f30-0 f0-5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! sv-288 (mod (+ sv-288 1) s1-0))
|
|
(set! sv-304 (mod (+ sv-304 1) s1-0))
|
|
(set! sv-320 (mod (+ sv-320 1) s1-0))
|
|
(+! sv-352 1)
|
|
)
|
|
)
|
|
)
|
|
(let ((sv-416 0)
|
|
(sv-432 1)
|
|
(sv-448 2)
|
|
(sv-464 -1)
|
|
)
|
|
(let ((f30-1 0.0))
|
|
(let ((sv-480 3)
|
|
(sv-496 0)
|
|
)
|
|
(while (< sv-496 s1-0)
|
|
(when (and (-> s4-0 sv-432 ear?)
|
|
(-> s4-0 sv-448 ear?)
|
|
(is-diagonal s1-0 s4-0 s3-0 sv-480 sv-416 sv-432)
|
|
(is-diagonal s1-0 s4-0 s3-0 sv-448 sv-480 sv-416)
|
|
)
|
|
1.0
|
|
(let ((sv-560 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-90 (-> s3-0 data (-> s4-0 sv-416 index)))
|
|
(a0-41 (-> s3-0 data (-> s4-0 sv-432 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-90 quad))
|
|
(.lvf vf5 (&-> a0-41 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-560 quad) vf6)
|
|
(let ((sv-512 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-99 (-> s3-0 data (-> s4-0 sv-432 index)))
|
|
(a0-48 (-> s3-0 data (-> s4-0 sv-448 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-99 quad))
|
|
(.lvf vf5 (&-> a0-48 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-512 quad) vf6)
|
|
(let ((sv-528 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-108 (-> s3-0 data (-> s4-0 sv-448 index)))
|
|
(a0-55 (-> s3-0 data (-> s4-0 sv-480 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-108 quad))
|
|
(.lvf vf5 (&-> a0-55 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-528 quad) vf6)
|
|
(let ((sv-544 (new 'stack-no-clear 'vector)))
|
|
(let ((v1-117 (-> s3-0 data (-> s4-0 sv-480 index)))
|
|
(a0-62 (-> s3-0 data (-> s4-0 sv-416 index)))
|
|
)
|
|
(.lvf vf4 (&-> v1-117 quad))
|
|
(.lvf vf5 (&-> a0-62 quad))
|
|
)
|
|
(.mov.vf.w vf6 vf0)
|
|
(.sub.vf.xyz vf6 vf4 vf5)
|
|
(.svf (&-> sv-544 quad) vf6)
|
|
0.0
|
|
0.0
|
|
(let ((f0-12 (* (vector-vector-angle-safe sv-560 sv-512)
|
|
(vector-vector-angle-safe sv-512 sv-528)
|
|
(vector-vector-angle-safe sv-528 sv-544)
|
|
(vector-vector-angle-safe sv-544 sv-560)
|
|
)
|
|
)
|
|
)
|
|
(when (or (= sv-464 -1) (< f30-1 f0-12))
|
|
(set! sv-336 sv-432)
|
|
(set! sv-464 sv-448)
|
|
(set! f30-1 f0-12)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! sv-416 (mod (+ sv-416 1) s1-0))
|
|
(set! sv-432 (mod (+ sv-432 1) s1-0))
|
|
(set! sv-448 (mod (+ sv-448 1) s1-0))
|
|
(set! sv-480 (mod (+ sv-480 1) s1-0))
|
|
(+! sv-496 1)
|
|
)
|
|
)
|
|
)
|
|
(when (= sv-336 -1)
|
|
(format *stdcon* "cannot find any ear~%")
|
|
(return #f)
|
|
)
|
|
(let ((a0-70 0)
|
|
(a1-15 1)
|
|
(a2-3 2)
|
|
(a3-3 3)
|
|
)
|
|
(dotimes (v1-146 s1-0)
|
|
(cond
|
|
((= a1-15 sv-336)
|
|
(cond
|
|
((!= sv-464 -1)
|
|
(let ((t0-9 (-> arg0 quads data (-> arg0 quads length)))
|
|
(t1-6 (vector-cross!
|
|
(new 'stack-no-clear 'vector)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> s3-0 data (-> s4-0 a0-70 index))
|
|
(-> s3-0 data (-> s4-0 a1-15 index))
|
|
)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> s3-0 data (-> s4-0 a2-3 index))
|
|
(-> s3-0 data (-> s4-0 a1-15 index))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (< 0.01 (vector-length t1-6))
|
|
(set! (-> t0-9 indices 0) (-> s4-0 a0-70 index))
|
|
(set! (-> t0-9 indices 1) (-> s4-0 a1-15 index))
|
|
(set! (-> t0-9 indices 2) (-> s4-0 a2-3 index))
|
|
(set! (-> t0-9 indices 3) (-> s4-0 a3-3 index))
|
|
(set! (-> t0-9 poly) (-> this poly-id))
|
|
(+! (-> arg0 quads length) 1)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((t0-17 (-> arg0 tris data (-> arg0 tris length)))
|
|
(t1-25 (vector-cross!
|
|
(new 'stack-no-clear 'vector)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> s3-0 data (-> s4-0 a0-70 index))
|
|
(-> s3-0 data (-> s4-0 a1-15 index))
|
|
)
|
|
(vector-!
|
|
(new 'stack-no-clear 'vector)
|
|
(-> s3-0 data (-> s4-0 a2-3 index))
|
|
(-> s3-0 data (-> s4-0 a1-15 index))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (< 0.01 (vector-length t1-25))
|
|
(set! (-> t0-17 indices 0) (-> s4-0 a0-70 index))
|
|
(set! (-> t0-17 indices 1) (-> s4-0 a1-15 index))
|
|
(set! (-> t0-17 indices 2) (-> s4-0 a2-3 index))
|
|
(set! (-> t0-17 poly) (-> this poly-id))
|
|
(+! (-> arg0 tris length) 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= a1-15 sv-464)
|
|
)
|
|
(else
|
|
(set! (-> s2-0 s0-0 index) (-> s4-0 a1-15 index))
|
|
(+! s0-0 1)
|
|
)
|
|
)
|
|
(set! a0-70 (mod (+ a0-70 1) s1-0))
|
|
(set! a1-15 (mod (+ a1-15 1) s1-0))
|
|
(set! a2-3 (mod (+ a2-3 1) s1-0))
|
|
(set! a3-3 (mod (+ a3-3 1) s1-0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! s1-0 s0-0)
|
|
)
|
|
(let ((v1-149 s4-0))
|
|
(set! s4-0 s2-0)
|
|
(set! s2-0 v1-149)
|
|
)
|
|
)
|
|
(when (= s1-0 3)
|
|
(let ((v1-158 (-> arg0 tris data (-> arg0 tris length)))
|
|
(a0-75
|
|
(vector-cross!
|
|
(new 'stack-no-clear 'vector)
|
|
(vector-! (new 'stack-no-clear 'vector) (-> s3-0 data (-> s4-0 0 index)) (-> s3-0 data (-> s4-0 1 index)))
|
|
(vector-! (new 'stack-no-clear 'vector) (-> s3-0 data (-> s4-0 2 index)) (-> s3-0 data (-> s4-0 1 index)))
|
|
)
|
|
)
|
|
)
|
|
(when (< 0.01 (vector-length a0-75))
|
|
(set! (-> v1-158 indices 0) (-> s4-0 0 index))
|
|
(set! (-> v1-158 indices 1) (-> s4-0 1 index))
|
|
(set! (-> v1-158 indices 2) (-> s4-0 2 index))
|
|
(set! (-> v1-158 poly) (-> this poly-id))
|
|
(+! (-> arg0 tris length) 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
)
|
|
|
|
(defmethod nav-mesh-editor-method-21 ((this nav-mesh-editor))
|
|
(set! *display-region-marks* #f)
|
|
(when #f
|
|
(format *stdcon* "~0K")
|
|
(format *stdcon* "~16S~16S~16S~%" "Left button" "Middle button" "Right button")
|
|
(when (!= *master-mode* 'menu)
|
|
)
|
|
(format *stdcon* "~1K~%")
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod nav-mesh-editor-method-22 ((this nav-mesh-editor))
|
|
(vector-copy! (-> this mouse-pos) (-> *math-camera* trans))
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector))
|
|
(s3-0 (new 'stack-no-clear 'vector))
|
|
(s2-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(vector-copy! (new 'stack-no-clear 'vector) *up-vector*)
|
|
(set-vector! s2-0 (-> *mouse* posx) (-> *mouse* posy) 0.0 1.0)
|
|
(vector-copy! (-> this mouse-screen-pos) s2-0)
|
|
(cond
|
|
(*ocean-map*
|
|
(vector-copy! s3-0 *up-vector*)
|
|
(vector-copy! s4-0 (-> this mouse-pos))
|
|
(set! (-> s4-0 y) (get-base-height *ocean-map*))
|
|
(reverse-transform-point! s5-0 s4-0 s3-0 s2-0)
|
|
(vector-copy! (-> this mouse-hit) s5-0)
|
|
(vector-copy! (-> this mouse-normal) *y-vector*)
|
|
(set! (-> this mouse-collide) (the-as basic #t))
|
|
)
|
|
(else
|
|
(vector-copy! s3-0 (-> *math-camera* inv-camera-rot fvec))
|
|
(vector+*! s4-0 (-> this mouse-pos) (-> *math-camera* inv-camera-rot fvec) 4096000.0)
|
|
(reverse-transform-point! s5-0 s4-0 s3-0 s2-0)
|
|
)
|
|
)
|
|
)
|
|
(vector-copy! (-> this mouse-end) s5-0)
|
|
(let ((s4-1 (new 'stack 'collide-query)))
|
|
(vector-copy! (-> s4-1 start-pos) (-> this mouse-pos))
|
|
(vector-! (-> s4-1 move-dist) s5-0 (-> this mouse-pos))
|
|
(let ((v1-19 s4-1))
|
|
(set! (-> v1-19 radius) 409.6)
|
|
(set! (-> v1-19 collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher))
|
|
(set! (-> v1-19 ignore-process0) #f)
|
|
(set! (-> v1-19 ignore-process1) #f)
|
|
(set! (-> v1-19 ignore-pat)
|
|
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
|
)
|
|
(set! (-> v1-19 action-mask) (collide-action solid))
|
|
)
|
|
(let ((f0-7 (fill-and-probe-using-line-sphere *collide-cache* s4-1)))
|
|
(cond
|
|
((>= f0-7 0.0)
|
|
(vector+*! (-> this mouse-hit) (-> s4-1 start-pos) (-> s4-1 move-dist) f0-7)
|
|
(vector+!
|
|
(-> this mouse-hit-pick)
|
|
(-> this mouse-hit)
|
|
(vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-1 move-dist) 4096.0)
|
|
)
|
|
(vector-copy! (-> this mouse-normal) (-> s4-1 best-other-tri normal))
|
|
(set! (-> this mouse-collide) (the-as basic #t))
|
|
)
|
|
(else
|
|
(when (not *ocean-map*)
|
|
(vector+! (-> this mouse-hit) (-> s4-1 start-pos) (-> s4-1 move-dist))
|
|
(set! (-> this mouse-collide) #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch pointer vs object.
|
|
(defun draw-square-point ((arg0 vector))
|
|
(let* ((s4-0 (new 'stack-no-clear 'vector))
|
|
(s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(gp-0 (-> s5-0 base))
|
|
)
|
|
(when (transform-point-vector! s4-0 arg0)
|
|
(let ((v1-9 (+ (the int (+ -1792.0 (-> s4-0 x))) -1))
|
|
(a0-4 (+ (the int (+ -1840.0 (-> s4-0 y))) -1))
|
|
)
|
|
(when (and (> v1-9 0) (< v1-9 512) (> a0-4 0) (< a0-4 416) (draw-sprite2d-xy
|
|
s5-0
|
|
(+ (the int (+ -1792.0 (-> s4-0 x))) -3)
|
|
(+ (the int (+ -1840.0 (-> s4-0 y))) -3)
|
|
7
|
|
7
|
|
(new 'static 'rgba :r #x80 :a #xff)
|
|
#x3fffff
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((a3-1 (-> s5-0 base)))
|
|
(when (!= gp-0 a3-1)
|
|
(let ((v1-18 (the-as object (-> s5-0 base))))
|
|
(set! (-> (the-as dma-packet v1-18) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-18) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-18) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s5-0 base) (&+ (the-as pointer v1-18) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) bucket-group)
|
|
(bucket-id debug-no-zbuf1)
|
|
gp-0
|
|
(the-as (pointer dma-tag) a3-1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defstate idle (nav-mesh-editor)
|
|
:virtual #t
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
(case message
|
|
(('exit)
|
|
(deactivate self)
|
|
)
|
|
(('menu)
|
|
(let ((v0-0 (the-as object (+ (current-time) (the-as time-frame (-> block param 0))))))
|
|
(set! (-> self close-menu-time) (the-as time-frame v0-0))
|
|
v0-0
|
|
)
|
|
)
|
|
(('new-nav-mesh)
|
|
(dotimes (v1-4 32)
|
|
(let ((a0-12 (-> self nav-meshes data v1-4)))
|
|
(when (logtest? (-> a0-12 flags) (nav-mesh-editable-flag nmef0))
|
|
(logclear! (-> a0-12 flags) (nav-mesh-editable-flag nmef0))
|
|
(set! (-> a0-12 level-id) (-> self level-id))
|
|
(set! (-> self current-nav-mesh) a0-12)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
(('delete-nav-mesh)
|
|
(let ((v1-9 (-> block param 0)))
|
|
(dotimes (a0-15 32)
|
|
(let ((gp-0 (-> self nav-meshes data a0-15)))
|
|
(when (and (not (logtest? (-> gp-0 flags) (nav-mesh-editable-flag nmef0))) (= (-> gp-0 navmesh-id) v1-9))
|
|
(if (= (-> self current-nav-mesh) gp-0)
|
|
(set! (-> self current-nav-mesh) #f)
|
|
)
|
|
(nav-mesh-editable-method-18 gp-0)
|
|
(logior! (-> gp-0 flags) (nav-mesh-editable-flag nmef0))
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(format #t "nav mesh not found~%")
|
|
)
|
|
(('translate-nav-mesh)
|
|
(let ((s5-0 (-> block param 0))
|
|
(f30-0 (the-as float (-> block param 1)))
|
|
(f28-0 (the-as float (-> block param 2)))
|
|
(f26-0 (the-as float (-> block param 3)))
|
|
)
|
|
(dotimes (s4-0 32)
|
|
(let ((gp-1 (-> self nav-meshes data s4-0)))
|
|
(format #t "~D~%" (-> gp-1 navmesh-id))
|
|
(when (and (not (logtest? (-> gp-1 flags) (nav-mesh-editable-flag nmef0))) (= (-> gp-1 navmesh-id) s5-0))
|
|
(format #t "nav mesh not found~%")
|
|
(dotimes (v1-30 (-> gp-1 verts length))
|
|
(+! (-> gp-1 verts data v1-30 x) f30-0)
|
|
(+! (-> gp-1 verts data v1-30 y) f28-0)
|
|
(+! (-> gp-1 verts data v1-30 z) f26-0)
|
|
)
|
|
(nav-mesh-editable-method-17 gp-1)
|
|
(return #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
(('rotate-nav-mesh)
|
|
(let ((f30-1 (the-as float (-> block param 0))))
|
|
(dotimes (gp-2 32)
|
|
(let ((s5-1 (-> self nav-meshes data gp-2)))
|
|
(when (not (logtest? (-> s5-1 flags) (nav-mesh-editable-flag nmef0)))
|
|
(format #t "nav mesh not found~%")
|
|
(dotimes (s4-1 (-> s5-1 verts length))
|
|
(vector-rotate-around-y! (-> s5-1 verts data s4-1) (-> s5-1 verts data s4-1) f30-1)
|
|
)
|
|
(nav-mesh-editable-method-17 s5-1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
:trans (behavior ()
|
|
(when (= (-> *keybd* keys 82) 2)
|
|
(let ((v1-2 0))
|
|
(dotimes (a0-2 32)
|
|
(case (-> self nav-meshes data a0-2)
|
|
(((-> self current-nav-mesh))
|
|
(set! v1-2 a0-2)
|
|
(goto cfg-8)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-8)
|
|
(dotimes (a1-5 32)
|
|
(+! v1-2 1)
|
|
(if (>= v1-2 32)
|
|
(set! v1-2 0)
|
|
)
|
|
(let ((a0-11 (-> self nav-meshes data v1-2)))
|
|
(when (not (logtest? (-> a0-11 flags) (nav-mesh-editable-flag nmef0)))
|
|
(set! (-> self current-nav-mesh) a0-11)
|
|
(let ((a1-6 (-> a0-11 selected-poly)))
|
|
(vector-copy!
|
|
(-> self manipulator position)
|
|
(-> a0-11 verts data (-> a0-11 polys data a1-6 index data (-> a0-11 polys data a1-6 insert-pos)))
|
|
)
|
|
)
|
|
(goto cfg-17)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-17)
|
|
(when (= (-> *keybd* keys 81) 2)
|
|
(let ((v1-9 0))
|
|
(dotimes (a0-17 32)
|
|
(case (-> self nav-meshes data a0-17)
|
|
(((-> self current-nav-mesh))
|
|
(set! v1-9 a0-17)
|
|
(goto cfg-25)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-25)
|
|
(dotimes (a1-19 32)
|
|
(+! v1-9 -1)
|
|
(if (< v1-9 0)
|
|
(set! v1-9 31)
|
|
)
|
|
(let ((a0-26 (-> self nav-meshes data v1-9)))
|
|
(when (not (logtest? (-> a0-26 flags) (nav-mesh-editable-flag nmef0)))
|
|
(set! (-> self current-nav-mesh) a0-26)
|
|
(let ((a1-20 (-> a0-26 selected-poly)))
|
|
(vector-copy!
|
|
(-> self manipulator position)
|
|
(-> a0-26 verts data (-> a0-26 polys data a1-20 index data (-> a0-26 polys data a1-20 insert-pos)))
|
|
)
|
|
)
|
|
(goto cfg-34)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-34)
|
|
(when (= (-> *keybd* keys 19) 2)
|
|
(set! (-> self allow-snap) (not (-> self allow-snap)))
|
|
(format #t "navmesh snap ~A~%" (-> self allow-snap))
|
|
)
|
|
(if (= (-> *keybd* keys 24) 2)
|
|
(nav-mesh-editor-method-27 self)
|
|
)
|
|
(if (= (-> *keybd* keys 21) 2)
|
|
(nav-mesh-editor-method-26 self)
|
|
)
|
|
(if (= (-> *keybd* keys 11) 2)
|
|
(set! (-> self hide-unselected) (not (-> self hide-unselected)))
|
|
)
|
|
(when (-> self current-nav-mesh)
|
|
(let ((v1-33 (-> self current-nav-mesh))
|
|
(a0-41 (the-as object -1))
|
|
)
|
|
(when (= (-> *keybd* keys 40) 2)
|
|
(dotimes (a1-31 92)
|
|
(when (< (-> v1-33 polys data a1-31 index length) 3)
|
|
(set! (-> v1-33 polys data a1-31 index length) 0)
|
|
(set! (-> v1-33 polys data a1-31 insert-pos) (the-as uint 0))
|
|
(if (= (the-as int a0-41) -1)
|
|
(set! a0-41 a1-31)
|
|
)
|
|
)
|
|
)
|
|
(set! a0-41 (cond
|
|
((!= (the-as int a0-41) -1)
|
|
(set! (-> v1-33 selected-poly) (the-as uint a0-41))
|
|
a0-41
|
|
)
|
|
(else
|
|
(format #t "increase MAX_NAV_MESH_POLYS (~D)~%" 92)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(nav-mesh-editor-method-22 self)
|
|
(when (not (-> self lock-action))
|
|
(manipulator-method-10 (-> self manipulator) (-> self mouse-pos) (-> self mouse-end))
|
|
(set! (-> self mouse-action) (the-as uint 0))
|
|
(cond
|
|
((or (logtest? (-> *keybd* keys 0) 4) (logtest? (-> *keybd* keys 0) 64))
|
|
(set! (-> self manipulator action) (manipulator-action ma0))
|
|
(set! (-> self mouse-action) (the-as uint 1))
|
|
(when (mouse-pressed? left)
|
|
(when (not (time-elapsed? (-> self mouse-pressed) (seconds 0.2)))
|
|
(vector-copy! (-> self mouse-tumble) (-> self mouse-hit))
|
|
(set! (-> self mouse-tumble w) 40960.0)
|
|
(send-event *camera* 'point-of-interest (-> self mouse-tumble))
|
|
)
|
|
(set-time! (-> self mouse-pressed))
|
|
)
|
|
)
|
|
(else
|
|
(if (nonzero? (-> self manipulator action))
|
|
(set! (-> self mouse-action) (the-as uint 2))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (-> self current-nav-mesh)
|
|
(manipulator-method-11 (-> self manipulator))
|
|
)
|
|
(when (and (= (-> *keybd* keys 22) 2) (or (logtest? (-> *keybd* keys 0) 1) (logtest? (-> *keybd* keys 0) 16)))
|
|
(dotimes (gp-0 32)
|
|
(let ((a0-59 (-> self nav-meshes data gp-0)))
|
|
(if (not (logtest? (-> a0-59 flags) (nav-mesh-editable-flag nmef0)))
|
|
(nav-mesh-editable-method-16 a0-59)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (and (or (logtest? (-> *keybd* keys 0) 2) (logtest? (-> *keybd* keys 0) 32)) (mouse-pressed? left))
|
|
(dotimes (gp-1 32)
|
|
(let ((s5-0 (-> self nav-meshes data gp-1)))
|
|
(when (not (logtest? (-> s5-0 flags) (nav-mesh-editable-flag nmef0)))
|
|
(let ((a0-68 (nav-mesh-editable-method-14 s5-0 (-> self mouse-screen-pos))))
|
|
(when (and (or (= s5-0 (-> self current-nav-mesh)) (not (-> self hide-unselected))) (>= a0-68 0))
|
|
(set! (-> s5-0 selected-poly) (the-as uint a0-68))
|
|
(vector-copy!
|
|
(-> self manipulator position)
|
|
(-> s5-0 verts data (-> s5-0 polys data a0-68 index data (-> s5-0 polys data a0-68 insert-pos)))
|
|
)
|
|
(set! (-> self current-nav-mesh) s5-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((gp-2 #f))
|
|
(vector-copy! (-> self mouse-snap) (-> self mouse-hit))
|
|
(when (-> self allow-snap)
|
|
(dotimes (s5-1 32)
|
|
(let ((s4-0 (-> self nav-meshes data s5-1)))
|
|
(when (and (not (logtest? (-> s4-0 flags) (nav-mesh-editable-flag nmef0)))
|
|
(or (= s4-0 (-> self current-nav-mesh)) (not (-> self hide-unselected)))
|
|
)
|
|
(let ((a0-83
|
|
(the-as int (nav-mesh-editable-method-12 s4-0 (-> self mouse-screen-pos) (= (-> self current-nav-mesh) s4-0)))
|
|
)
|
|
)
|
|
(when (>= a0-83 0)
|
|
(vector-copy! (-> self mouse-hit) (-> s4-0 verts data a0-83))
|
|
(set! gp-2 #t)
|
|
(set! (-> self mouse-collide) (the-as basic #t))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when *display-nav-marks*
|
|
(let ((s5-2 (new 'stack-no-clear 'vector)))
|
|
(when (snap-level-navmesh (-> self mouse-screen-pos) s5-2)
|
|
(vector-copy! (-> self mouse-hit) s5-2)
|
|
(set! gp-2 #t)
|
|
(set! (-> self mouse-collide) (the-as basic #t))
|
|
)
|
|
)
|
|
)
|
|
(if gp-2
|
|
(draw-square-point (-> self mouse-hit))
|
|
)
|
|
)
|
|
)
|
|
(format *stdcon* "level ~S~%" (-> self level-name))
|
|
(let ((gp-3 (-> self current-nav-mesh)))
|
|
(when gp-3
|
|
(let ((s5-3 (-> gp-3 polys data (-> gp-3 selected-poly)))
|
|
(s4-1 (the-as int (nav-mesh-editable-method-12 gp-3 (-> self mouse-screen-pos) #t)))
|
|
)
|
|
-1
|
|
(format *stdcon* "polycount = ~D~%" (+ (-> gp-3 tris length) (-> gp-3 quads length)))
|
|
(format *stdcon* "~D~%" (-> gp-3 verts length))
|
|
(format *stdcon* "nav mesh id ~D~%" (-> gp-3 navmesh-id))
|
|
(cond
|
|
((= (-> *keybd* keys 76) 2)
|
|
(when (nonzero? (-> s5-3 index length))
|
|
(nav-mesh-editor-method-25 self)
|
|
(nav-mesh-poly-method-12 s5-3 (the-as int (-> s5-3 insert-pos)))
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
(nav-mesh-editable-method-17 gp-3)
|
|
)
|
|
)
|
|
((= (-> *keybd* keys 6) 2)
|
|
(when (nonzero? (-> s5-3 index length))
|
|
(when (>= s4-1 0)
|
|
(let ((a1-57 -1))
|
|
(dotimes (v1-164 92)
|
|
(when (< (-> gp-3 polys data v1-164 index length) 3)
|
|
(set! (-> gp-3 polys data v1-164 index length) 0)
|
|
(set! (-> gp-3 polys data v1-164 insert-pos) (the-as uint 0))
|
|
(if (= a1-57 -1)
|
|
(set! a1-57 v1-164)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((= a1-57 -1)
|
|
(format #t "increase MAX_NAV_MESH_POLYS (~D)~%" 92)
|
|
)
|
|
(else
|
|
(let ((v1-169 (the-as int (-> s5-3 insert-pos)))
|
|
(s1-0 0)
|
|
(s3-0 0)
|
|
(a0-126 #f)
|
|
(s2-0 (-> gp-3 polys data a1-57))
|
|
)
|
|
(dotimes (a1-61 (+ (-> s5-3 index length) 1))
|
|
(cond
|
|
((not a0-126)
|
|
(set! (-> *clean-index-array* s1-0) (-> s5-3 index data v1-169))
|
|
(when (= (-> s5-3 index data v1-169) s4-1)
|
|
(set! a0-126 #t)
|
|
(+! a1-61 -1)
|
|
(+! v1-169 -1)
|
|
)
|
|
(+! s1-0 1)
|
|
)
|
|
(else
|
|
(set! (-> s2-0 index data s3-0) (-> s5-3 index data v1-169))
|
|
(+! s3-0 1)
|
|
)
|
|
)
|
|
(+! v1-169 1)
|
|
(if (= v1-169 (-> s5-3 index length))
|
|
(set! v1-169 0)
|
|
)
|
|
)
|
|
(when (and (>= s1-0 3) (>= s3-0 3))
|
|
(nav-mesh-editor-method-25 self)
|
|
(dotimes (v1-176 s1-0)
|
|
(set! (-> s5-3 index data v1-176) (-> *clean-index-array* v1-176))
|
|
)
|
|
(set! (-> s5-3 index length) s1-0)
|
|
(set! (-> s5-3 insert-pos) (the-as uint 0))
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
(set! (-> s2-0 index length) s3-0)
|
|
(set! (-> s2-0 insert-pos) (the-as uint 0))
|
|
0
|
|
)
|
|
)
|
|
(nav-mesh-editable-method-17 gp-3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= (-> *keybd* keys 79) 2)
|
|
(when (nonzero? (-> s5-3 index length))
|
|
(set! (-> s5-3 insert-pos) (the-as uint (mod (the-as int (+ (-> s5-3 insert-pos) 1)) (-> s5-3 index length))))
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
)
|
|
)
|
|
((= (-> *keybd* keys 80) 2)
|
|
(when (nonzero? (-> s5-3 index length))
|
|
(set! (-> s5-3 insert-pos)
|
|
(the-as uint (mod (+ (-> s5-3 index length) -1 (-> s5-3 insert-pos)) (-> s5-3 index length)))
|
|
)
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
)
|
|
)
|
|
((or (mouse-hold? left) (mouse-hold? right) (mouse-hold? middle))
|
|
(when (not (-> self lock-action))
|
|
(when (= (-> self mouse-action) 2)
|
|
(nav-mesh-editor-method-25 self)
|
|
(manipulator-method-12 (-> self manipulator) (-> self mouse-end))
|
|
)
|
|
(vector-copy! (-> self mouse-action-pos-ref) (-> self mouse-end))
|
|
(vector-copy! (-> self manipulator-back-pos) (-> self manipulator-pos))
|
|
)
|
|
(set! (-> self lock-action) (the-as basic #t))
|
|
)
|
|
(else
|
|
(when (-> self lock-action)
|
|
(when (-> self manipulator dragging?)
|
|
(manipulator-method-14 (-> self manipulator))
|
|
(nav-mesh-editable-method-17 gp-3)
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
)
|
|
)
|
|
(set! (-> self lock-action) #f)
|
|
)
|
|
)
|
|
(cond
|
|
((or (logtest? (-> *keybd* keys 0) 1) (logtest? (-> *keybd* keys 0) 16))
|
|
(set-setting! 'mouse-input 'abs #f 0)
|
|
(when (>= s4-1 0)
|
|
(vector-copy! (-> self mouse-hit) (-> gp-3 verts data s4-1))
|
|
(add-debug-sphere #t (bucket-id debug-no-zbuf1) (-> self mouse-hit) (meters 1) *color-red*)
|
|
(nav-mesh-poly-method-13 s5-3 s4-1)
|
|
)
|
|
(if (nonzero? (-> s5-3 index length))
|
|
(add-debug-sphere
|
|
#t
|
|
(bucket-id debug-no-zbuf1)
|
|
(-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos)))
|
|
(meters 1)
|
|
*color-blue*
|
|
)
|
|
)
|
|
(when (mouse-pressed? left)
|
|
(when (-> self mouse-collide)
|
|
(nav-mesh-editor-method-25 self)
|
|
(if (>= s4-1 0)
|
|
(nav-mesh-poly-method-11 s5-3 s4-1)
|
|
(nav-mesh-poly-method-11 s5-3 (add-vert! gp-3 (-> self mouse-hit)))
|
|
)
|
|
(nav-mesh-editable-method-17 gp-3)
|
|
)
|
|
)
|
|
(if (> (-> s5-3 index length) 0)
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
)
|
|
)
|
|
((= (-> self mouse-action) 1)
|
|
(set-setting! 'mouse-input 'abs #t 0)
|
|
)
|
|
((= (-> self mouse-action) 2)
|
|
(set-setting! 'mouse-input 'abs #f 0)
|
|
(when (mouse-hold? left)
|
|
(manipulator-method-13 (-> self manipulator) (-> self mouse-pos) (-> self mouse-end))
|
|
(if (and (= (-> self manipulator action) (manipulator-action ma7)) (-> self mouse-collide))
|
|
(vector-copy! (-> self manipulator position) (-> self mouse-hit))
|
|
)
|
|
(when (= (-> self manipulator action) (manipulator-action ma7))
|
|
(if (and (-> self allow-snap)
|
|
(>= s4-1 0)
|
|
(> (-> s5-3 index length) 0)
|
|
(!= s4-1 (-> s5-3 index data (-> s5-3 insert-pos)))
|
|
)
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data s4-1))
|
|
)
|
|
)
|
|
)
|
|
(if (> (-> s5-3 index length) 0)
|
|
(vector-copy! (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))) (-> self manipulator position))
|
|
)
|
|
)
|
|
((zero? (-> self mouse-action))
|
|
(set-setting! 'mouse-input 'abs #f 0)
|
|
(when (mouse-pressed? left)
|
|
(let ((a1-90 (nav-mesh-editable-method-12 gp-3 (-> self mouse-screen-pos) #t))
|
|
(a0-232 -1)
|
|
)
|
|
(if (>= (the-as int a1-90) 0)
|
|
(set! a0-232 (nav-mesh-poly-method-13 s5-3 (the-as int a1-90)))
|
|
)
|
|
(when (>= a0-232 0)
|
|
(set! (-> s5-3 insert-pos) (the-as uint a0-232))
|
|
(vector-copy! (-> self manipulator position) (-> gp-3 verts data (-> s5-3 index data (-> s5-3 insert-pos))))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(set-setting! 'mouse-input 'abs #f 0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(dotimes (gp-4 32)
|
|
(let ((v1-329 (-> self nav-meshes data gp-4)))
|
|
(when (or (= v1-329 (-> self current-nav-mesh)) (not (-> self hide-unselected)))
|
|
(if (not (logtest? (-> v1-329 flags) (nav-mesh-editable-flag nmef0)))
|
|
(nav-mesh-editable-method-10 v1-329 (= v1-329 (-> self current-nav-mesh)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(set-setting! 'mouse-input 'abs #t 0)
|
|
(until #f
|
|
(suspend)
|
|
)
|
|
#f
|
|
)
|
|
:post (behavior ()
|
|
'()
|
|
)
|
|
)
|
|
|
|
(defun get-level-id ((arg0 string))
|
|
(let ((s5-0 (clear *temp-string*)))
|
|
(format s5-0 "select level_info_id from level_info where name='~S'" arg0)
|
|
(let ((a2-1 (sql-query s5-0)))
|
|
(when (!= (-> a2-1 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A~%" a2-1)
|
|
(return (the-as int #f))
|
|
)
|
|
(string->int (the-as string (-> a2-1 sql-data 0)))
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod set-level-info! ((this nav-mesh-editor) (arg0 symbol))
|
|
(set! (-> this level-id) (the-as uint (get-level-id (the-as string arg0))))
|
|
(set! (-> this level-name) (the-as string arg0))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod select-nav-mesh-by-id ((this nav-mesh-editor) (arg0 int))
|
|
(set! (-> this undo-id) (the-as uint 0))
|
|
(set! (-> this undo-min) (the-as uint 0))
|
|
(set! (-> this undo-max) (the-as uint 0))
|
|
(dotimes (s4-0 (-> this nav-meshes length))
|
|
(init-fields! (-> this nav-meshes data s4-0))
|
|
(set! (-> this nav-meshes data s4-0 level-id) (the-as uint 0))
|
|
(set! (-> this nav-meshes data s4-0 navmesh-id) (the-as uint 0))
|
|
(logior! (-> this nav-meshes data s4-0 flags) (nav-mesh-editable-flag nmef0))
|
|
)
|
|
(let ((s4-1 (clear *temp-string*)))
|
|
(format
|
|
s4-1
|
|
"select distinct entity.entity_id from entity,navmesh_poly where entity.entity_id=navmesh_poly.entity_id and entity.name='nav-mesh' and entity.level_id=~D~%"
|
|
arg0
|
|
)
|
|
(let ((s4-2 (sql-query s4-1)))
|
|
(when (!= (-> s4-2 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A for ~A~%" s4-2 this)
|
|
(return (the-as object #f))
|
|
)
|
|
(let ((s3-0 0))
|
|
0
|
|
(while (< s3-0 (-> s4-2 length))
|
|
(let ((s2-0 (string->int (the-as string (-> s4-2 sql-data s3-0)))))
|
|
(dotimes (v1-23 32)
|
|
(let ((a0-20 (-> this nav-meshes data v1-23)))
|
|
(when (logtest? (-> a0-20 flags) (nav-mesh-editable-flag nmef0))
|
|
(set! (-> a0-20 level-id) (the-as uint arg0))
|
|
(nav-mesh-editable-method-15 a0-20 s2-0)
|
|
(set! v1-23 32)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(+! s3-0 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Function (method 25 nav-mesh-editor) has a return type of none, but the expression builder found a return statement.
|
|
(defmethod nav-mesh-editor-method-25 ((this nav-mesh-editor))
|
|
(if (not (-> this current-nav-mesh))
|
|
(return #f)
|
|
)
|
|
(let ((v1-7 (-> this undos data (logand (-> this undo-id) 31))))
|
|
(set! (-> v1-7 current-nav-mesh) (-> this current-nav-mesh))
|
|
(let ((a1-2 (-> this current-nav-mesh)))
|
|
(set! (-> v1-7 selected-poly) (-> a1-2 selected-poly))
|
|
(let ((t0-0 0))
|
|
(dotimes (a2-1 (-> a1-2 polys length))
|
|
(let ((a3-2 (-> a1-2 polys data a2-1)))
|
|
(set! (-> v1-7 index data t0-0) (-> a3-2 index length))
|
|
(let ((t0-1 (+ t0-0 1)))
|
|
(dotimes (t1-3 (-> a3-2 index length))
|
|
(set! (-> v1-7 index data t0-1) (-> a3-2 index data t1-3))
|
|
(+! t0-1 1)
|
|
)
|
|
(set! (-> v1-7 index data t0-1) (the-as int (-> a3-2 insert-pos)))
|
|
(set! t0-0 (+ t0-1 1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> v1-7 verts length) (-> a1-2 verts length))
|
|
(dotimes (a2-6 (-> a1-2 verts length))
|
|
(vector-copy! (-> v1-7 verts data a2-6) (-> a1-2 verts data a2-6))
|
|
)
|
|
)
|
|
)
|
|
(+! (-> this undo-id) 1)
|
|
(set! (-> this undo-max) (-> this undo-id))
|
|
(while (< (the-as uint 31) (- (-> this undo-id) (-> this undo-min)))
|
|
(+! (-> this undo-min) 1)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Function (method 26 nav-mesh-editor) has a return type of none, but the expression builder found a return statement.
|
|
(defmethod nav-mesh-editor-method-26 ((this nav-mesh-editor))
|
|
(if (>= (-> this undo-id) (-> this undo-max))
|
|
(return #f)
|
|
)
|
|
(+! (-> this undo-id) 1)
|
|
(let ((v1-10 (-> this undos data (logand (+ (-> this undo-id) -1) 31))))
|
|
(set! (-> this current-nav-mesh) (-> v1-10 current-nav-mesh))
|
|
(let ((a0-1 (-> this current-nav-mesh)))
|
|
(set! (-> a0-1 selected-poly) (-> v1-10 selected-poly))
|
|
(let ((a3-0 0))
|
|
(dotimes (a1-4 (-> a0-1 polys length))
|
|
(let ((a2-2 (-> a0-1 polys data a1-4)))
|
|
(set! (-> a2-2 index length) (-> v1-10 index data a3-0))
|
|
(let ((a3-1 (+ a3-0 1)))
|
|
(dotimes (t0-4 (-> a2-2 index length))
|
|
(set! (-> a2-2 index data t0-4) (-> v1-10 index data a3-1))
|
|
(+! a3-1 1)
|
|
)
|
|
(set! (-> a2-2 insert-pos) (the-as uint (-> v1-10 index data a3-1)))
|
|
(set! a3-0 (+ a3-1 1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> a0-1 verts length) (-> v1-10 verts length))
|
|
(dotimes (a1-9 (-> a0-1 verts length))
|
|
(vector-copy! (-> a0-1 verts data a1-9) (-> v1-10 verts data a1-9))
|
|
)
|
|
(nav-mesh-editable-method-17 a0-1)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defmethod nav-mesh-editor-method-27 ((this nav-mesh-editor))
|
|
(if (>= (-> this undo-min) (-> this undo-id))
|
|
(return (the-as object #f))
|
|
)
|
|
(let ((v1-8 (-> this undos data (logand (+ (-> this undo-id) -1) 31))))
|
|
(set! (-> this current-nav-mesh) (-> v1-8 current-nav-mesh))
|
|
(let ((s5-0 (-> this current-nav-mesh)))
|
|
(set! (-> s5-0 selected-poly) (-> v1-8 selected-poly))
|
|
(let ((a2-0 0))
|
|
(dotimes (a0-5 (-> s5-0 polys length))
|
|
(let ((a1-2 (-> s5-0 polys data a0-5)))
|
|
(set! (-> a1-2 index length) (-> v1-8 index data a2-0))
|
|
(let ((a2-1 (+ a2-0 1)))
|
|
(dotimes (a3-4 (-> a1-2 index length))
|
|
(set! (-> a1-2 index data a3-4) (-> v1-8 index data a2-1))
|
|
(+! a2-1 1)
|
|
)
|
|
(set! (-> a1-2 insert-pos) (the-as uint (-> v1-8 index data a2-1)))
|
|
(set! a2-0 (+ a2-1 1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> s5-0 verts length) (-> v1-8 verts length))
|
|
(dotimes (a0-10 (-> s5-0 verts length))
|
|
(vector-copy! (-> s5-0 verts data a0-10) (-> v1-8 verts data a0-10))
|
|
)
|
|
(nav-mesh-editable-method-17 s5-0)
|
|
(let ((a0-13 (-> s5-0 polys data (-> s5-0 selected-poly))))
|
|
(vector-copy! (-> this manipulator position) (-> s5-0 verts data (-> a0-13 index data (-> a0-13 insert-pos))))
|
|
)
|
|
)
|
|
)
|
|
(+! (-> this undo-id) -1)
|
|
0
|
|
)
|
|
|
|
(defmethod deactivate ((this nav-mesh-editor))
|
|
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
|
(set! *nav-mesh-editor* (the-as (pointer nav-mesh-editor) #f))
|
|
((method-of-type process-drawable deactivate) this)
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-mesh-editor-new ()
|
|
(if *nav-mesh-editor*
|
|
(send-event (ppointer->process *nav-mesh-editor*) 'new-nav-mesh)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-delete ((arg0 int))
|
|
(if *nav-mesh-editor*
|
|
(send-event (ppointer->process *nav-mesh-editor*) 'delete-nav-mesh arg0)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-mesh-editor-translate ((arg0 int) (arg1 float) (arg2 float) (arg3 float))
|
|
(if *nav-mesh-editor*
|
|
(send-event (ppointer->process *nav-mesh-editor*) 'translate-nav-mesh arg0 arg1 arg2 arg3)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-mesh-editor-rotate-y ((arg0 float))
|
|
(if *nav-mesh-editor*
|
|
(send-event (ppointer->process *nav-mesh-editor*) 'rotate-nav-mesh arg0)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-mesh-editor-load ((arg0 string))
|
|
(when *nav-mesh-editor*
|
|
(let ((s5-0 (clear *temp-string*)))
|
|
(format s5-0 "select level_info_id from level_info where name='~S'" arg0)
|
|
(let ((a2-1 (sql-query s5-0)))
|
|
(when (!= (-> a2-1 content-type) 'select)
|
|
(format 0 "ERROR: sql: modify error ~A~%" a2-1)
|
|
(return (the-as object #f))
|
|
)
|
|
(select-nav-mesh-by-id (-> *nav-mesh-editor* 0) (string->int (the-as string (-> a2-1 sql-data 0))))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-mesh-editor-set-level ((arg0 symbol))
|
|
(if *nav-mesh-editor*
|
|
(set-level-info! (-> *nav-mesh-editor* 0) arg0)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-set-lev ((arg0 string))
|
|
(when (and *nav-mesh-editor* (-> *nav-mesh-editor* 0 current-nav-mesh))
|
|
(let ((gp-0 (-> *nav-mesh-editor* 0 current-nav-mesh)))
|
|
(set! (-> gp-0 level-id) (the-as uint (get-level-id arg0)))
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs object.
|
|
(defun nav-set-flag ((arg0 nav-mesh-poly-flag))
|
|
(when (and *nav-mesh-editor* (-> *nav-mesh-editor* 0 current-nav-mesh))
|
|
(let ((a1-0 (-> *nav-mesh-editor* 0 current-nav-mesh)))
|
|
(set! (-> a1-0 polys data (-> a1-0 selected-poly) flags) arg0)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defbehavior nav-mesh-editor-init nav-mesh-editor ((arg0 symbol))
|
|
(set! *display-profile* #f)
|
|
(set! *display-entity-errors* #f)
|
|
(set! *display-actor-marks* #f)
|
|
(if (not arg0)
|
|
(set! arg0 (-> (level-get-target-inside *level*) name))
|
|
)
|
|
(logclear! (-> self mask) (process-mask freeze pause menu))
|
|
(+! (-> self clock ref-count) -1)
|
|
(+! (-> *display* real-clock ref-count) 1)
|
|
(set! (-> self clock) (-> *display* real-clock))
|
|
(add-setting! 'mouse #t 0.0 0)
|
|
(add-setting! 'cursor #t 0.0 0)
|
|
(add-setting! 'keybd #t 0.0 0)
|
|
(set! *nav-mesh-editor* (the-as (pointer nav-mesh-editor) (process->ppointer self)))
|
|
(set! (-> self event-hook) (-> (method-of-object self idle) event))
|
|
(set! (-> self external-cam-mode) *external-cam-mode*)
|
|
(set! *external-cam-mode* 'pad-1)
|
|
(matrix-identity! (-> self manipulator mat))
|
|
(set! (-> self manipulator-pos quad) (the-as uint128 0))
|
|
(set-level-info! self arg0)
|
|
(set! (-> self nav-meshes) (new 'debug 'nav-mesh-editable-array 32))
|
|
(dotimes (s5-0 (-> self nav-meshes length))
|
|
(init-fields! (-> self nav-meshes data s5-0))
|
|
(set! (-> self nav-meshes data s5-0 level-id) (the-as uint 0))
|
|
)
|
|
(set! (-> self undos) (new 'debug 'nav-mesh-editor-undo-array 32))
|
|
(dotimes (s5-1 (-> self undos length))
|
|
(init-fields! (-> self undos data s5-1))
|
|
)
|
|
(set! (-> self undo-id) (the-as uint 0))
|
|
(set! (-> self undo-min) (the-as uint 0))
|
|
(set! (-> self undo-max) (the-as uint 0))
|
|
(set! (-> self current-nav-mesh) #f)
|
|
(set! (-> self lock-action) #f)
|
|
(set! (-> self hide-unselected) #f)
|
|
(set! (-> self allow-snap) #t)
|
|
(nav-mesh-editor-load (the-as string arg0))
|
|
(go-virtual idle)
|
|
)
|