This commit is contained in:
Hat Kid
2026-04-15 02:29:58 +02:00
parent 21a148f9ea
commit c8653b2d51
256 changed files with 18768 additions and 22290 deletions
+27 -27
View File
@@ -4,7 +4,6 @@
;; definition for function make-debug-sphere-table
;; INFO: Used lq/sq
(defun make-debug-sphere-table ((points vector-array) (h-lines float) (v-lines float))
(local-vars (next-hz vector) (next-vt vector) (h-line int))
(let ((offset (new-stack-vector0))
(scale 1.0)
(num-points 0)
@@ -14,27 +13,29 @@
(let ((f28-0 (* scale (sin (* (the float v-line) (/ 32768.0 v-lines)))))
(f26-0 (* scale (sin (* (the float (+ v-line 1)) (/ 32768.0 v-lines)))))
(current (new-stack-vector0))
(next-hz (new 'stack-no-clear 'vector))
)
(set! next-hz (new 'stack-no-clear 'vector))
(set! (-> next-hz quad) (the-as uint128 0))
(set! next-vt (new 'stack-no-clear 'vector))
(set! (-> next-vt quad) (the-as uint128 0))
(set! (-> current y) (+ (-> offset y) (* (cos (* (the float v-line) (/ 32768.0 v-lines))) scale)))
(set! (-> next-hz y) (-> current y))
(set! (-> next-vt y) (+ (-> offset y) (* (cos (* (the float (+ v-line 1)) (/ 32768.0 v-lines))) scale)))
(set! h-line 0)
(while (< h-line (the int h-lines))
(set! (-> current x) (+ (-> offset x) (* (cos (* (the float h-line) (/ 65536.0 h-lines))) f28-0)))
(set! (-> current z) (+ (-> offset z) (* (sin (* (the float h-line) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-hz x) (+ (-> offset x) (* (cos (* (the float (+ h-line 1)) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-hz z) (+ (-> offset z) (* (sin (* (the float (+ h-line 1)) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-vt x) (+ (-> offset x) (* (cos (* (the float h-line) (/ 65536.0 h-lines))) f26-0)))
(set! (-> next-vt z) (+ (-> offset z) (* (sin (* (the float h-line) (/ 65536.0 h-lines))) f26-0)))
(set! (-> points data num-points quad) (-> current quad))
(set! (-> points data (+ num-points 1) quad) (-> next-hz quad))
(set! (-> points data (+ num-points 2) quad) (-> next-vt quad))
(+! num-points 3)
(set! h-line (+ h-line 1))
(let ((next-vt (new 'stack-no-clear 'vector)))
(set! (-> next-vt quad) (the-as uint128 0))
(set! (-> current y) (+ (-> offset y) (* (cos (* (the float v-line) (/ 32768.0 v-lines))) scale)))
(set! (-> next-hz y) (-> current y))
(set! (-> next-vt y) (+ (-> offset y) (* (cos (* (the float (+ v-line 1)) (/ 32768.0 v-lines))) scale)))
(let ((h-line 0))
(while (< h-line (the int h-lines))
(set! (-> current x) (+ (-> offset x) (* (cos (* (the float h-line) (/ 65536.0 h-lines))) f28-0)))
(set! (-> current z) (+ (-> offset z) (* (sin (* (the float h-line) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-hz x) (+ (-> offset x) (* (cos (* (the float (+ h-line 1)) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-hz z) (+ (-> offset z) (* (sin (* (the float (+ h-line 1)) (/ 65536.0 h-lines))) f28-0)))
(set! (-> next-vt x) (+ (-> offset x) (* (cos (* (the float h-line) (/ 65536.0 h-lines))) f26-0)))
(set! (-> next-vt z) (+ (-> offset z) (* (sin (* (the float h-line) (/ 65536.0 h-lines))) f26-0)))
(set! (-> points data num-points quad) (-> current quad))
(set! (-> points data (+ num-points 1) quad) (-> next-hz quad))
(set! (-> points data (+ num-points 2) quad) (-> next-vt quad))
(+! num-points 3)
(+! h-line 1)
)
)
)
)
)
@@ -53,7 +54,6 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun add-debug-sphere-from-table ((bucket bucket-id) (position vector) (radius meters) (color rgba) (table-idx int))
(local-vars (sphere-points vector-array) (point-3 vector))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
@@ -68,12 +68,12 @@
)
)
)
(set! sphere-points (-> *debug-sphere-table* table-idx))
(set! point-3 (the-as vector (new-stack-vector0)))
(let ((point-1 (new-stack-vector0))
(point-2 (new-stack-vector0))
(points (-> sphere-points data))
)
(let* ((sphere-points (-> *debug-sphere-table* table-idx))
(point-3 (the-as vector (new-stack-vector0)))
(point-1 (new-stack-vector0))
(point-2 (new-stack-vector0))
(points (-> sphere-points data))
)
(.lvf vf1 (&-> position quad))
(.mov vf2 radius)
(countdown (s4-1 (/ (-> sphere-points length) 3))
+183 -207
View File
@@ -156,9 +156,8 @@
;; definition (debug) for function internal-draw-debug-line
;; INFO: Used lq/sq
(defun-debug internal-draw-debug-line ((bucket bucket-id) (start vector) (end vector) (start-color rgba) (mode symbol) (end-color rgba))
(local-vars (var-end vector) (sv-128 vector) (sv-144 vector))
(set! var-end end)
(let ((var-start-color start-color)
(let ((var-end end)
(var-start-color start-color)
(var-mode mode)
(var-end-color end-color)
)
@@ -183,9 +182,9 @@
)
(let ((s4-0 (new 'stack 'vector4w-2))
(s3-0 (new 'stack 'vector4w-2))
(sv-128 (new 'stack-no-clear 'vector))
(sv-144 (new 'stack-no-clear 'vector))
)
(set! sv-128 (new 'stack-no-clear 'vector))
(set! sv-144 (new 'stack-no-clear 'vector))
(when (debug-line-clip? sv-128 sv-144 start var-end)
(set! (-> sv-128 w) 1.0)
(set! (-> sv-144 w) 1.0)
@@ -345,10 +344,9 @@
;; definition (debug) for function add-debug-flat-triangle
;; INFO: Used lq/sq
(defun-debug add-debug-flat-triangle ((enable symbol) (bucket bucket-id) (p0 vector) (p1 vector) (p2 vector) (color rgba))
(local-vars (sv-160 vector) (sv-176 vector))
(set! sv-160 p0)
(set! sv-176 p1)
(let ((s0-0 p2)
(let ((sv-160 p0)
(sv-176 p1)
(s0-0 p2)
(s3-0 color)
)
(if (not enable)
@@ -1039,73 +1037,61 @@
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Return type mismatch int vs none.
(defun-debug add-debug-line-sphere ((enable symbol) (bucket bucket-id) (position vector) (forward vector) (arg4 float) (color rgba))
(local-vars
(var-bucket bucket-id)
(var-position vector)
(var-forward vector)
(var-arg4 float)
(var-color rgba)
(mat matrix)
(forward-length float)
)
(b! (not enable) cfg-8 :delay (nop!))
(set! var-bucket bucket)
(set! var-position position)
(set! var-forward forward)
(set! var-arg4 arg4)
(set! var-color color)
(set! mat (new 'stack-no-clear 'matrix))
(set! forward-length (vector-length var-forward))
(let ((mat-forward (new 'stack-no-clear 'vector))
(mat-down (new 'stack-no-clear 'vector))
)
(vector-normalize-copy! mat-forward var-forward 1.0)
(vector-reset! mat-down)
(let* ((f0-2 (-> mat-forward y))
(f0-4 (* f0-2 f0-2))
(f1-0 (-> mat-forward z))
)
(if (< f0-4 (* f1-0 f1-0))
(let* ((var-bucket bucket)
(var-position position)
(var-forward forward)
(var-arg4 arg4)
(var-color color)
(mat (new 'stack-no-clear 'matrix))
(forward-length (vector-length var-forward))
)
(let ((mat-forward (new 'stack-no-clear 'vector))
(mat-down (new 'stack-no-clear 'vector))
)
(vector-normalize-copy! mat-forward var-forward 1.0)
(vector-reset! mat-down)
(if (< (square (-> mat-forward y)) (square (-> mat-forward z)))
(set! (-> mat-down y) -1.0)
(set! (-> mat-down z) -1.0)
)
(forward-down->inv-matrix mat mat-forward mat-down)
)
(forward-down->inv-matrix mat mat-forward mat-down)
)
(set! (-> mat trans quad) (-> var-position quad))
(set! (-> mat trans w) 1.0)
(let ((gp-1 (new 'static 'inline-array vector 3
(new 'static 'vector :y 0.5877 :z 0.951 :w 0.951)
(new 'static 'vector :x 0.5877 :z -0.5877 :w -0.951)
(new 'static 'vector :x -0.951 :y -0.5878)
(set! (-> mat trans quad) (-> var-position quad))
(set! (-> mat trans w) 1.0)
(let ((gp-1 (new 'static 'inline-array vector 3
(new 'static 'vector :y 0.5877 :z 0.951 :w 0.951)
(new 'static 'vector :x 0.5877 :z -0.5877 :w -0.951)
(new 'static 'vector :x -0.951 :y -0.5878)
)
)
)
(s5-1 (new 'static 'inline-array vector 3
(new 'static 'vector :x 1.0 :y 0.809 :z 0.3089 :w -0.3088)
(new 'static 'vector :x -0.809 :y -1.0 :z -0.809 :w -0.309)
(new 'static 'vector :x 0.3089 :y 0.8089)
(s5-1 (new 'static 'inline-array vector 3
(new 'static 'vector :x 1.0 :y 0.809 :z 0.3089 :w -0.3088)
(new 'static 'vector :x -0.809 :y -1.0 :z -0.809 :w -0.309)
(new 'static 'vector :x 0.3089 :y 0.8089)
)
)
)
(s4-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(set! (-> s1-0 z) 0.0)
(set! (-> s1-0 w) 1.0)
(set! (-> s1-0 x) (* var-arg4 (-> s5-1 2 y)))
(set! (-> s1-0 y) (* var-arg4 (-> gp-1 2 y)))
(vector-matrix*! s3-0 s1-0 mat)
(dotimes (i 10)
(set! (-> s4-0 quad) (-> s3-0 quad))
(set! (-> s1-0 x) (* var-arg4 (-> (&-> s5-1 0 data i) 0)))
(set! (-> s1-0 y) (* var-arg4 (-> (&-> gp-1 0 data i) 0)))
(s4-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(set! (-> s1-0 z) 0.0)
(set! (-> s1-0 w) 1.0)
(set! (-> s1-0 x) (* var-arg4 (-> s5-1 2 y)))
(set! (-> s1-0 y) (* var-arg4 (-> gp-1 2 y)))
(vector-matrix*! s3-0 s1-0 mat)
(add-debug-line #t var-bucket s4-0 s3-0 var-color #f (the-as rgba -1))
(vector+float*! s2-0 s3-0 (-> mat vector 2) forward-length)
(add-debug-line #t var-bucket s3-0 s2-0 var-color #f (the-as rgba -1))
(vector+float*! s4-0 s4-0 (-> mat vector 2) forward-length)
(add-debug-line #t var-bucket s4-0 s2-0 var-color #f (the-as rgba -1))
(dotimes (i 10)
(set! (-> s4-0 quad) (-> s3-0 quad))
(set! (-> s1-0 x) (* var-arg4 (-> (&-> s5-1 0 data i) 0)))
(set! (-> s1-0 y) (* var-arg4 (-> (&-> gp-1 0 data i) 0)))
(vector-matrix*! s3-0 s1-0 mat)
(add-debug-line #t var-bucket s4-0 s3-0 var-color #f (the-as rgba -1))
(vector+float*! s2-0 s3-0 (-> mat vector 2) forward-length)
(add-debug-line #t var-bucket s3-0 s2-0 var-color #f (the-as rgba -1))
(vector+float*! s4-0 s4-0 (-> mat vector 2) forward-length)
(add-debug-line #t var-bucket s4-0 s2-0 var-color #f (the-as rgba -1))
)
)
)
(label cfg-8)
@@ -1117,27 +1103,28 @@
;; INFO: Used lq/sq
(defun-debug add-debug-circle ((enable symbol) (bucket bucket-id) (position vector) (radius float) (color rgba) (orientation matrix))
"note: you may pass #f for orientation"
(local-vars (i int) (sv-64 vector) (sv-80 vector))
(if (not enable)
(return #f)
)
(let ((angle 0.0)
(line-start (new-stack-vector0))
(line-end (new-stack-vector0))
(i 0)
)
(set! i 0)
(while (< i 12)
(set! sv-64 line-start)
(set! (-> sv-64 x) (* radius (cos angle)))
(set! (-> sv-64 y) 0.0)
(set! (-> sv-64 z) (* radius (sin angle)))
(set! (-> sv-64 w) 1.0)
(let ((sv-64 line-start))
(set! (-> sv-64 x) (* radius (cos angle)))
(set! (-> sv-64 y) 0.0)
(set! (-> sv-64 z) (* radius (sin angle)))
(set! (-> sv-64 w) 1.0)
)
(set! angle (+ 5461.3335 angle))
(set! sv-80 line-end)
(set! (-> sv-80 x) (* radius (cos angle)))
(set! (-> sv-80 y) 0.0)
(set! (-> sv-80 z) (* radius (sin angle)))
(set! (-> sv-80 w) 1.0)
(let ((sv-80 line-end))
(set! (-> sv-80 x) (* radius (cos angle)))
(set! (-> sv-80 y) 0.0)
(set! (-> sv-80 z) (* radius (sin angle)))
(set! (-> sv-80 w) 1.0)
)
(when orientation
(vector-matrix*! line-start line-start orientation)
(vector-matrix*! line-end line-end orientation)
@@ -1145,7 +1132,7 @@
(vector+! line-start line-start position)
(vector+! line-end line-end position)
(add-debug-line #t bucket line-start line-end color #f (the-as rgba -1))
(set! i (+ i 1))
(+! i 1)
)
)
#f
@@ -1230,9 +1217,8 @@
;; WARN: Stack slot offset 32 signed mismatch
;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16
(defun-debug add-debug-yrot-vector ((enable symbol) (bucket bucket-id) (position vector) (angle float) (line-length float) (color rgba))
(local-vars (var-angle float))
(set! var-angle angle)
(let ((var-line-length line-length)
(let ((var-angle angle)
(var-line-length line-length)
(var-color color)
)
(if (not enable)
@@ -1264,44 +1250,48 @@
(orientation matrix)
)
"note: you may pass #f for orientation"
(local-vars (line-start vector) (line-end vector) (i int) (sv-96 vector) (sv-112 vector))
(if (not enable)
(return #f)
)
(let ((angle start-angle))
(set! line-start (new 'stack-no-clear 'vector))
(let ((angle start-angle)
(line-start (new 'stack-no-clear 'vector))
)
(set! (-> line-start quad) (the-as uint128 0))
(set! line-end (new 'stack-no-clear 'vector))
(set! (-> line-end quad) (the-as uint128 0))
(set! i 0)
(while (< i 12)
(set! sv-96 line-start)
(set! (-> sv-96 x) (* radius (sin angle)))
(set! (-> sv-96 y) 0.0)
(set! (-> sv-96 z) (* radius (cos angle)))
(set! (-> sv-96 w) 1.0)
(+! angle (the float (/ (the int (- end-angle start-angle)) 12)))
(set! sv-112 line-end)
(set! (-> sv-112 x) (* radius (sin angle)))
(set! (-> sv-112 y) 0.0)
(set! (-> sv-112 z) (* radius (cos angle)))
(set! (-> sv-112 w) 1.0)
(when orientation
(vector-matrix*! line-start line-start orientation)
(vector-matrix*! line-end line-end orientation)
(let ((line-end (new 'stack-no-clear 'vector)))
(set! (-> line-end quad) (the-as uint128 0))
(let ((i 0))
(while (< i 12)
(let ((sv-96 line-start))
(set! (-> sv-96 x) (* radius (sin angle)))
(set! (-> sv-96 y) 0.0)
(set! (-> sv-96 z) (* radius (cos angle)))
(set! (-> sv-96 w) 1.0)
)
(+! angle (the float (/ (the int (- end-angle start-angle)) 12)))
(let ((sv-112 line-end))
(set! (-> sv-112 x) (* radius (sin angle)))
(set! (-> sv-112 y) 0.0)
(set! (-> sv-112 z) (* radius (cos angle)))
(set! (-> sv-112 w) 1.0)
)
(when orientation
(vector-matrix*! line-start line-start orientation)
(vector-matrix*! line-end line-end orientation)
)
(vector+! line-start line-start position)
(vector+! line-end line-end position)
(add-debug-line #t bucket line-start line-end color #f (the-as rgba -1))
(cond
((zero? i)
(add-debug-line #t bucket line-start position color #f (the-as rgba -1))
)
((= i 11)
(add-debug-line #t bucket line-end position color #f (the-as rgba -1))
)
)
(+! i 1)
)
)
(vector+! line-start line-start position)
(vector+! line-end line-end position)
(add-debug-line #t bucket line-start line-end color #f (the-as rgba -1))
(cond
((zero? i)
(add-debug-line #t bucket line-start position color #f (the-as rgba -1))
)
((= i 11)
(add-debug-line #t bucket line-end position color #f (the-as rgba -1))
)
)
(set! i (+ i 1))
)
)
#f
@@ -1317,21 +1307,23 @@
(num-knots int)
(color rgba)
)
(local-vars (p1 vector) (iterations int) (i int))
(if (not enable)
(return #f)
)
(let ((p0 (new-stack-vector0)))
(set! p1 (new 'stack-no-clear 'vector))
(let ((p0 (new-stack-vector0))
(p1 (new 'stack-no-clear 'vector))
)
(set! (-> p1 quad) (the-as uint128 0))
(set! iterations (* num-cverts 4))
(curve-evaluate! p1 (-> knots 0) cverts num-cverts knots num-knots)
(set! i 0)
(while (< i iterations)
(set! (-> p0 quad) (-> p1 quad))
(curve-evaluate! p1 (/ (the float (+ i 1)) (the float iterations)) cverts num-cverts knots num-knots)
(add-debug-line #t bucket p0 p1 color #f (the-as rgba -1))
(set! i (+ i 1))
(let ((iterations (* num-cverts 4)))
(curve-evaluate! p1 (-> knots 0) cverts num-cverts knots num-knots)
(let ((i 0))
(while (< i iterations)
(set! (-> p0 quad) (-> p1 quad))
(curve-evaluate! p1 (/ (the float (+ i 1)) (the float iterations)) cverts num-cverts knots num-knots)
(add-debug-line #t bucket p0 p1 color #f (the-as rgba -1))
(+! i 1)
)
)
)
)
#f
@@ -1363,48 +1355,26 @@
(y-override float)
(highlight int)
)
(local-vars
(sv-32 (function symbol bucket-id string vector font-color vector2h symbol))
(sv-48 symbol)
(sv-64 bucket-id)
(sv-80 (function _varargs_ object))
(position vector)
)
(when enable
(dotimes (i num-points)
(set! position (new 'stack-no-clear 'vector))
(set! (-> position quad) (the-as uint128 0))
(set! (-> position quad) (-> points i quad))
(if (!= y-override 0.0)
(set! (-> position y) y-override)
(let ((position (new 'stack-no-clear 'vector)))
(set! (-> position quad) (the-as uint128 0))
(set! (-> position quad) (-> points i quad))
(if (!= y-override 0.0)
(set! (-> position y) y-override)
)
(let ((sv-32 add-debug-text-3d)
(sv-48 #t)
(sv-64 bucket)
)
(format (clear *temp-string*) "~d" i)
(sv-32 sv-48 sv-64 *temp-string* position (font-color white) (the-as vector2h #f))
)
(set! sv-32 add-debug-text-3d)
(set! sv-48 #t)
(set! sv-64 bucket)
(set! sv-80 format)
(let ((a0-5 (clear *temp-string*))
(a1-1 "~d")
(a2-1 i)
)
(sv-80 a0-5 a1-1 a2-1)
)
(let ((a2-2 *temp-string*)
(a3-1 position)
(t0-1 1)
(t1-1 #f)
)
(sv-32 sv-48 sv-64 a2-2 a3-1 (the-as font-color t0-1) (the-as vector2h t1-1))
)
(let ((t9-3 add-debug-x)
(a0-7 #t)
(a1-3 bucket)
(a3-2 (if (= i highlight)
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
color
)
)
)
(t9-3 a0-7 a1-3 position a3-2)
(add-debug-x #t bucket position (if (= i highlight)
(the-as rgba (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
(the-as rgba color)
)
)
)
)
)
@@ -1416,10 +1386,9 @@
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
(defun-debug debug-percent-bar ((enable symbol) (bucket bucket-id) (x int) (y int) (percentage float) (color rgba) (width int) (height int))
(local-vars (sv-16 int) (sv-32 float))
(set! sv-16 y)
(set! sv-32 percentage)
(let ((s2-0 color)
(let ((sv-16 y)
(sv-32 percentage)
(s2-0 color)
(s1-0 width)
(s3-0 height)
)
@@ -1867,44 +1836,51 @@
;; WARN: Return type mismatch int vs none.
;; WARN: Function add-debug-bound has a return type of none, but the expression builder found a return statement.
(defun-debug add-debug-bound ((buf bucket-id) (pts (inline-array vector)) (c0 int) (c1 rgba) (flash rgba) (arg5 int))
(local-vars (sv-16 pointer) (sv-32 int))
(set! sv-32 arg5)
(if (< c0 3)
(return 0)
(let ((sv-32 arg5))
(if (< c0 3)
(return 0)
)
(case sv-32
((1)
(set! sv-32 (cond
((logtest? (-> *display* real-frame-clock integral-frame-counter) 4)
(set! sv-32 1)
sv-32
)
(else
0
)
)
)
sv-32
)
)
(case sv-32
((1)
(if (logtest? (-> *display* real-frame-clock integral-frame-counter) 4)
(set! sv-32 1)
(set! sv-32 0)
)
sv-32
)
)
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
buf
)
(dma-buffer-add-gs-set s4-0
(zbuf-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)))
(test-1 (new 'static 'gs-test
:ate #x1
:atst (gs-atest greater-equal)
:aref #x26
:zte #x1
:ztst (gs-ztest greater-equal)
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
buf
)
(dma-buffer-add-gs-set s4-0
(zbuf-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)))
(test-1 (new 'static 'gs-test
:ate #x1
:atst (gs-atest greater-equal)
:aref #x26
:zte #x1
:ztst (gs-ztest greater-equal)
)
)
)
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
)
(set! sv-16 (-> s4-0 base))
(&+! (-> s4-0 base) 16)
(add-boundary-shader (new 'static 'texture-id :index #x3 :page #x70c) s4-0)
(add-debug-bound-internal s4-0 pts c0 c1 flash sv-32)
(close-sky-buffer s4-0)
(let ((v1-25 (/ (the-as int (+ (- -16 (the-as int sv-16)) (the-as int (-> s4-0 base)))) 16)))
(set! (-> (the-as dma-packet sv-16) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc v1-25))
(set! (-> (the-as dma-packet sv-16) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet sv-16) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm v1-25))
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
)
(let ((sv-16 (-> s4-0 base)))
(&+! (-> s4-0 base) 16)
(add-boundary-shader (new 'static 'texture-id :index #x3 :page #x70c) s4-0)
(add-debug-bound-internal s4-0 pts c0 c1 flash sv-32)
(close-sky-buffer s4-0)
(let ((v1-25 (/ (the-as int (+ (- -16 (the-as int sv-16)) (the-as int (-> s4-0 base)))) 16)))
(set! (-> (the-as dma-packet sv-16) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc v1-25))
(set! (-> (the-as dma-packet sv-16) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet sv-16) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm v1-25))
)
)
)
)
0
+24 -133
View File
@@ -2732,20 +2732,6 @@
;; definition for function debug-menu-make-continue-sub-menu
;; INFO: Used lq/sq
(defun debug-menu-make-continue-sub-menu ((arg0 game-info) (arg1 symbol))
(local-vars
(sv-16 (function symbol type object object pair))
(sv-32 symbol)
(sv-48 type)
(sv-64 symbol)
(sv-80 (function symbol type object object pair))
(sv-96 symbol)
(sv-112 type)
(sv-128 string)
(sv-144 (function symbol type object object pair))
(sv-160 symbol)
(sv-176 type)
(sv-192 string)
)
(let ((s4-0 *level-load-list*)
(s5-0 '())
)
@@ -2757,34 +2743,20 @@
(let ((v1-2 (car s3-0))
(a0-5 arg1)
)
(when (if (= a0-5 'test)
(logtest? (continue-flags test) (-> (the-as continue-point v1-2) flags))
#t
)
(let ((s2-0 (method-of-type pair new))
(s1-0 'global)
(s0-0 pair)
(if (if (= a0-5 'test)
(logtest? (continue-flags test) (-> (the-as continue-point v1-2) flags))
#t
)
(set! sv-16 (method-of-type pair new))
(set! sv-32 'global)
(set! sv-48 pair)
(set! sv-64 'flag)
(set! sv-80 (method-of-type pair new))
(set! sv-96 'global)
(set! sv-112 pair)
(set! sv-128 (-> (the-as continue-point v1-2) name))
(set! sv-144 (method-of-type pair new))
(set! sv-160 'global)
(set! sv-176 pair)
(set! sv-192 (-> (the-as continue-point v1-2) name))
(let* ((a3-1 (cons 'dm-current-continue '()))
(a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1))
(a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2))
)
(set! s5-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) s5-0))
)
(set! s5-0 (cons
(cons 'flag (cons
(-> (the-as continue-point v1-2) name)
(cons (-> (the-as continue-point v1-2) name) (cons 'dm-current-continue '()))
)
)
s5-0
)
)
)
)
)
(set! s3-0 (cdr s3-0))
)
@@ -2810,50 +2782,16 @@
;; INFO: Used lq/sq
(defun debug-menu-make-task-sub-menu ((arg0 symbol))
"TODO - need to know more about game-info"
(local-vars
(sv-16 (function symbol type object object pair))
(sv-32 symbol)
(sv-48 type)
(sv-64 symbol)
(sv-80 (function symbol type object object pair))
(sv-96 symbol)
(sv-112 type)
(sv-128 string)
(sv-144 (function symbol type object object pair))
(sv-160 symbol)
(sv-176 type)
(sv-192 int)
)
(let ((gp-0 '()))
(let ((s4-0 (-> *game-info* sub-task-list)))
(countdown (s3-0 (-> s4-0 length))
(when (nonzero? s3-0)
(let ((v1-4 (-> s4-0 s3-0)))
(when (= (-> v1-4 level) arg0)
(let ((s2-0 (method-of-type pair new))
(s1-0 'global)
(s0-0 pair)
)
(set! sv-16 (method-of-type pair new))
(set! sv-32 'global)
(set! sv-48 pair)
(set! sv-64 'flag)
(set! sv-80 (method-of-type pair new))
(set! sv-96 'global)
(set! sv-112 pair)
(set! sv-128 (-> v1-4 name))
(set! sv-144 (method-of-type pair new))
(set! sv-160 'global)
(set! sv-176 pair)
(set! sv-192 (* s3-0 8))
(let* ((a3-1 (cons 'dm-task-menu-pick-func '()))
(a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1))
(a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2))
)
(set! gp-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) gp-0))
)
(if (= (-> v1-4 level) arg0)
(set! gp-0
(cons (cons 'flag (cons (-> v1-4 name) (cons (* s3-0 8) (cons 'dm-task-menu-pick-func '())))) gp-0)
)
)
)
)
)
)
@@ -2865,7 +2803,6 @@
;; definition for function debug-menu-make-task-menu
;; INFO: Used lq/sq
(defun debug-menu-make-task-menu ((arg0 debug-menu-context))
(local-vars (sv-16 debug-menu-context))
(let* ((s5-0 (new 'debug 'debug-menu arg0 "Task menu"))
(s4-0 (new 'debug 'debug-menu-item-submenu "Task" s5-0))
)
@@ -2894,14 +2831,9 @@
(a0-3 (car s3-0))
)
(while (not (null? s3-0))
(let ((s2-0 debug-menu-append-item)
(s1-0 s5-0)
(s0-0 debug-menu-make-from-template)
)
(set! sv-16 arg0)
(let ((a1-2 (debug-menu-make-task-sub-menu (the-as symbol a0-3))))
(s2-0 s1-0 (s0-0 sv-16 a1-2))
)
(debug-menu-append-item
s5-0
(debug-menu-make-from-template arg0 (debug-menu-make-task-sub-menu (the-as symbol a0-3)))
)
(set! s3-0 (cdr s3-0))
(set! a0-3 (car s3-0))
@@ -3012,47 +2944,12 @@
;; definition for function debug-menu-make-play-menu
;; INFO: Used lq/sq
(defun debug-menu-make-play-menu ((arg0 debug-menu-context))
(local-vars
(sv-16 symbol)
(sv-32 type)
(sv-48 symbol)
(sv-64 (function symbol type object object pair))
(sv-80 symbol)
(sv-96 type)
(sv-112 string)
(sv-128 (function symbol type object object pair))
(sv-144 symbol)
(sv-160 type)
(sv-176 int)
)
(let ((gp-0 '()))
(countdown (s4-0 (-> *game-info* play-list length))
(let ((v1-4 (-> *game-info* play-list s4-0)))
(when (-> v1-4 play-continue)
(let ((s3-0 (method-of-type pair new))
(s2-0 'global)
(s1-0 pair)
(s0-0 (method-of-type pair new))
)
(set! sv-16 'global)
(set! sv-32 pair)
(set! sv-48 'function)
(set! sv-64 (method-of-type pair new))
(set! sv-80 'global)
(set! sv-96 pair)
(set! sv-112 (-> v1-4 name))
(set! sv-128 (method-of-type pair new))
(set! sv-144 'global)
(set! sv-160 pair)
(set! sv-176 (* s4-0 8))
(let* ((a3-1 (cons 'dm-play-task '()))
(a3-2 (sv-128 sv-144 sv-160 sv-176 a3-1))
(a3-3 (sv-64 sv-80 sv-96 sv-112 a3-2))
)
(set! gp-0 (s3-0 s2-0 s1-0 (s0-0 sv-16 sv-32 sv-48 a3-3) gp-0))
)
(if (-> v1-4 play-continue)
(set! gp-0 (cons (cons 'function (cons (-> v1-4 name) (cons (* s4-0 8) (cons 'dm-play-task '())))) gp-0))
)
)
)
)
(debug-menu-make-from-template arg0 (cons 'menu (cons "Play" gp-0)))
@@ -3137,7 +3034,6 @@
;; definition for function debug-menu-context-make-default-menus
;; INFO: Used lq/sq
(defun debug-menu-context-make-default-menus ((arg0 debug-menu-context))
(local-vars (sv-16 debug-menu-context))
(let ((s5-0 (new 'debug 'debug-menu arg0 "Main menu")))
(debug-menu-context-set-root-menu arg0 s5-0)
(debug-menu-append-item
@@ -3555,14 +3451,9 @@
(a1-7 (car s3-2))
)
(while (not (null? s3-2))
(let ((s2-0 debug-menu-append-item)
(s1-0 s4-2)
(s0-0 debug-menu-make-from-template)
)
(set! sv-16 arg0)
(let ((a1-8 (debug-menu-make-continue-sub-menu *game-info* (the-as symbol a1-7))))
(s2-0 s1-0 (s0-0 sv-16 a1-8))
)
(debug-menu-append-item
s4-2
(debug-menu-make-from-template arg0 (debug-menu-make-continue-sub-menu *game-info* (the-as symbol a1-7)))
)
(set! s3-2 (cdr s3-2))
(set! a1-7 (car s3-2))
File diff suppressed because it is too large Load Diff
+222 -228
View File
@@ -462,150 +462,143 @@
;; WARN: Return type mismatch int vs none.
;; WARN: new jak 2 until loop case, check carefully
(defun history-print ((arg0 history-iterator))
(local-vars
(sv-16 object)
(sv-24 int)
(sv-32 int)
(sv-40 history-elt)
(sv-48 time-frame)
(sv-56 uint)
(sv-64 collide-status)
(sv-72 float)
(sv-80 string)
(sv-96 string)
)
(set! sv-16 (-> arg0 out))
(set! sv-24 -1)
(set! sv-32 0)
(until #f
(set! sv-40 (update-entries! arg0))
(if (not sv-40)
(goto cfg-71)
(let ((sv-16 (-> arg0 out))
(sv-24 -1)
(sv-32 0)
)
(when (logtest? (-> arg0 channel-mask) (ash 1 (-> sv-40 channel)))
(set! sv-48 (frame-counter-delta arg0 sv-40))
(set! sv-56 (-> sv-40 record-id))
(cond
((!= sv-24 sv-48)
(set! sv-24 (the-as int sv-48))
(set! sv-32 (the-as int sv-56))
(format sv-16 "~3D ~4X " sv-48 (-> sv-40 record-id))
)
((!= sv-32 sv-56)
(set! sv-32 (the-as int sv-56))
(format sv-16 " ~4X " (-> sv-40 record-id))
)
(else
(format sv-16 " ")
)
)
(let ((v1-22 (-> sv-40 channel)))
(cond
((or (= v1-22 (history-channel trans))
(or (= v1-22 (history-channel transv))
(= v1-22 (history-channel transv-in))
(= v1-22 (history-channel transv-out))
(= v1-22 (history-channel intersect))
(until #f
(let ((sv-40 (update-entries! arg0)))
(if (not sv-40)
(goto cfg-71)
)
(when (logtest? (-> arg0 channel-mask) (ash 1 (-> sv-40 channel)))
(let ((sv-48 (frame-counter-delta arg0 sv-40))
(sv-56 (-> sv-40 record-id))
)
(cond
((!= sv-24 sv-48)
(set! sv-24 (the-as int sv-48))
(set! sv-32 (the-as int sv-56))
(format sv-16 "~3D ~4X " sv-48 (-> sv-40 record-id))
)
((!= sv-32 sv-56)
(set! sv-32 (the-as int sv-56))
(format sv-16 " ~4X " (-> sv-40 record-id))
)
(else
(format sv-16 " ")
)
)
)
(let ((v1-22 (-> sv-40 channel)))
(cond
((or (= v1-22 (history-channel trans))
(or (= v1-22 (history-channel transv))
(= v1-22 (history-channel transv-in))
(= v1-22 (history-channel transv-out))
(= v1-22 (history-channel intersect))
)
)
(format
sv-16
"~-15S: ~14Mm ~14Mm ~14Mm~%"
(history-channel->string (-> sv-40 channel))
(-> sv-40 vector x)
(-> sv-40 vector y)
(-> sv-40 vector z)
)
)
(format
sv-16
"~-15S: ~14Mm ~14Mm ~14Mm~%"
(history-channel->string (-> sv-40 channel))
(-> sv-40 vector x)
(-> sv-40 vector y)
(-> sv-40 vector z)
)
)
((or (= v1-22 (history-channel local-normal)) (= v1-22 (history-channel surface-normal)))
(format
sv-16
"~-15S: ~14f ~14f ~14f~%"
(history-channel->string (-> sv-40 channel))
(-> sv-40 vector x)
(-> sv-40 vector y)
(-> sv-40 vector z)
)
)
((= v1-22 (history-channel pat))
(let* ((s2-0 (-> sv-40 vector x))
(s5-2 format)
(s4-2 sv-16)
(s3-2 "~-15S: #x~6X mode:~-8S material:~-10S event:~S~%")
(s1-0 (history-channel->string (-> sv-40 channel)))
(s0-0 s2-0)
)
(set! sv-80 (pat-mode->string (the-as pat-surface s2-0)))
(set! sv-96 (pat-material->string (the-as pat-surface s2-0)))
(let ((t2-0 (pat-event->string (the-as pat-surface s2-0))))
(s5-2 s4-2 s3-2 s1-0 s0-0 sv-80 sv-96 t2-0)
((or (= v1-22 (history-channel local-normal)) (= v1-22 (history-channel surface-normal)))
(format
sv-16
"~-15S: ~14f ~14f ~14f~%"
(history-channel->string (-> sv-40 channel))
(-> sv-40 vector x)
(-> sv-40 vector y)
(-> sv-40 vector z)
)
)
)
)
((= v1-22 (history-channel collide-status))
(set! sv-64 (-> sv-40 collide-status))
(set! sv-72 (-> sv-40 vector z))
(format sv-16 "~-15S: #x~6X " (history-channel->string (-> sv-40 channel)) sv-64)
(let ((s5-4 sv-64))
(if (= (logand s5-4 (collide-status touch-background)) (collide-status touch-background))
(format sv-16 "touch-background ")
((= v1-22 (history-channel pat))
(let ((s2-0 (-> sv-40 vector x)))
(format
sv-16
"~-15S: #x~6X mode:~-8S material:~-10S event:~S~%"
(history-channel->string (-> sv-40 channel))
s2-0
(pat-mode->string (the-as pat-surface s2-0))
(pat-material->string (the-as pat-surface s2-0))
(pat-event->string (the-as pat-surface s2-0))
)
)
(if (= (logand s5-4 (collide-status on-special-surface)) (collide-status on-special-surface))
(format sv-16 "on-special-surface ")
)
((= v1-22 (history-channel collide-status))
(let ((sv-64 (-> sv-40 collide-status))
(sv-72 (-> sv-40 vector z))
)
(format sv-16 "~-15S: #x~6X " (history-channel->string (-> sv-40 channel)) sv-64)
(let ((s5-4 sv-64))
(if (= (logand s5-4 (collide-status touch-background)) (collide-status touch-background))
(format sv-16 "touch-background ")
)
(if (= (logand s5-4 (collide-status on-special-surface)) (collide-status on-special-surface))
(format sv-16 "on-special-surface ")
)
(if (= (logand s5-4 (collide-status touch-wall)) (collide-status touch-wall))
(format sv-16 "touch-wall ")
)
(if (= (logand s5-4 (collide-status on-surface)) (collide-status on-surface))
(format sv-16 "on-surface ")
)
(if (= (logand s5-4 (collide-status impact-surface)) (collide-status impact-surface))
(format sv-16 "impact-surface ")
)
(if (= (logand s5-4 (collide-status touch-ceiling)) (collide-status touch-ceiling))
(format sv-16 "touch-ceiling ")
)
(if (= (logand s5-4 (collide-status on-ground)) (collide-status on-ground))
(format sv-16 "on-ground ")
)
(if (= (logand s5-4 (collide-status glance)) (collide-status glance))
(format sv-16 "glance ")
)
(if (= (logand s5-4 (collide-status blocked)) (collide-status blocked))
(format sv-16 "blocked ")
)
(if (= (logand s5-4 (collide-status touch-edge)) (collide-status touch-edge))
(format sv-16 "touch-edge ")
)
(if (= (logand s5-4 (collide-status touch-ceiling-sticky)) (collide-status touch-ceiling-sticky))
(format sv-16 "touch-ceiling-sticky ")
)
(if (= (logand s5-4 (collide-status on-water)) (collide-status on-water))
(format sv-16 "on-water ")
)
(if (= (logand s5-4 (collide-status touch-actor)) (collide-status touch-actor))
(format sv-16 "touch-actor ")
)
(if (= (logand (collide-status probe-hit) s5-4) (collide-status probe-hit))
(format sv-16 "probe-hit ")
)
(if (= (logand s5-4 (collide-status stuck)) (collide-status stuck))
(format sv-16 "stuck ")
)
(if (= (logand s5-4 (collide-status no-touch)) (collide-status no-touch))
(format sv-16 "no-touch ")
)
(if (= (logand s5-4 (collide-status touch-surface)) (collide-status touch-surface))
(format sv-16 "touch-surface ")
)
)
(format sv-16 " #x~6X~%" sv-72)
)
(if (= (logand s5-4 (collide-status touch-wall)) (collide-status touch-wall))
(format sv-16 "touch-wall ")
)
((= v1-22 (history-channel friction))
(let ((f30-0 (-> sv-40 vector x)))
(format sv-16 "~-15S: ~f~%" (history-channel->string (-> sv-40 channel)) f30-0)
)
(if (= (logand s5-4 (collide-status on-surface)) (collide-status on-surface))
(format sv-16 "on-surface ")
)
(if (= (logand s5-4 (collide-status impact-surface)) (collide-status impact-surface))
(format sv-16 "impact-surface ")
)
(if (= (logand s5-4 (collide-status touch-ceiling)) (collide-status touch-ceiling))
(format sv-16 "touch-ceiling ")
)
(if (= (logand s5-4 (collide-status on-ground)) (collide-status on-ground))
(format sv-16 "on-ground ")
)
(if (= (logand s5-4 (collide-status glance)) (collide-status glance))
(format sv-16 "glance ")
)
(if (= (logand s5-4 (collide-status blocked)) (collide-status blocked))
(format sv-16 "blocked ")
)
(if (= (logand s5-4 (collide-status touch-edge)) (collide-status touch-edge))
(format sv-16 "touch-edge ")
)
(if (= (logand s5-4 (collide-status touch-ceiling-sticky)) (collide-status touch-ceiling-sticky))
(format sv-16 "touch-ceiling-sticky ")
)
(if (= (logand s5-4 (collide-status on-water)) (collide-status on-water))
(format sv-16 "on-water ")
)
(if (= (logand s5-4 (collide-status touch-actor)) (collide-status touch-actor))
(format sv-16 "touch-actor ")
)
(if (= (logand (collide-status probe-hit) s5-4) (collide-status probe-hit))
(format sv-16 "probe-hit ")
)
(if (= (logand s5-4 (collide-status stuck)) (collide-status stuck))
(format sv-16 "stuck ")
)
(if (= (logand s5-4 (collide-status no-touch)) (collide-status no-touch))
(format sv-16 "no-touch ")
)
(if (= (logand s5-4 (collide-status touch-surface)) (collide-status touch-surface))
(format sv-16 "touch-surface ")
)
)
(format sv-16 " #x~6X~%" sv-72)
)
((= v1-22 (history-channel friction))
(let ((f30-0 (-> sv-40 vector x)))
(format sv-16 "~-15S: ~f~%" (history-channel->string (-> sv-40 channel)) f30-0)
)
)
)
)
)
)
)
)
@@ -620,113 +613,114 @@
;; WARN: Return type mismatch int vs none.
;; WARN: new jak 2 until loop case, check carefully
(defun history-draw ((arg0 history-iterator))
(local-vars (sv-16 vector) (sv-20 vector) (sv-24 pat-surface))
(set! sv-16 (the-as vector #f))
(set! sv-20 (the-as vector #f))
(set! sv-24 (new 'static 'pat-surface))
(until #f
(let ((s5-0 (update-entries! arg0)))
(if (not s5-0)
(goto cfg-34)
)
(when (logtest? (-> arg0 channel-mask) (ash 1 (-> s5-0 channel)))
(let* ((f0-0 (get-age arg0 s5-0))
(v1-8 (the int (lerp 4.0 128.0 f0-0)))
)
(case (-> s5-0 channel)
(((history-channel trans))
(if sv-16
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
sv-16
(-> s5-0 vector)
(the-as rgba (logior #xffff00 (shl v1-8 24)))
#f
(the-as rgba -1)
)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 vector) (the-as rgba (logior #xffff00 (shl v1-8 24))))
(let ((sv-16 (the-as vector #f))
(sv-20 (the-as vector #f))
(sv-24 (new 'static 'pat-surface))
)
(until #f
(let ((s5-0 (update-entries! arg0)))
(if (not s5-0)
(goto cfg-34)
)
(when (logtest? (-> arg0 channel-mask) (ash 1 (-> s5-0 channel)))
(let* ((f0-0 (get-age arg0 s5-0))
(v1-8 (the int (lerp 4.0 128.0 f0-0)))
)
(set! sv-16 (-> s5-0 vector))
)
(((history-channel intersect))
(if sv-20
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
sv-20
(-> s5-0 vector)
(the-as rgba (logior #xffffff (shl v1-8 24)))
#f
(the-as rgba -1)
)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 vector) (the-as rgba (logior #xffffff (shl v1-8 24))))
)
(set! sv-20 (-> s5-0 vector))
)
(((history-channel transv))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 0.000024414063)
(the-as rgba (logior (shl v1-8 24) #xff00))
)
)
(((history-channel transv-in))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 0.000024414063)
(the-as rgba (logior #x408040 (shl v1-8 24)))
)
)
(((history-channel transv-out))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 0.000024414063)
(the-as rgba (logior #x404080 (shl v1-8 24)))
)
)
(((history-channel local-normal) (history-channel surface-normal))
(let ((t1-7
(logand (the-as uint (-> *pat-mode-info* (-> sv-24 mode) hilite-color)) (the-as uint #xffffffff00ffffff))
(case (-> s5-0 channel)
(((history-channel trans))
(if sv-16
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
sv-16
(-> s5-0 vector)
(the-as rgba (logior #xffff00 (shl v1-8 24)))
#f
(the-as rgba -1)
)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 vector) (the-as rgba (logior #xffff00 (shl v1-8 24))))
)
(set! sv-16 (-> s5-0 vector))
)
(((history-channel intersect))
(if sv-20
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
sv-20
(-> s5-0 vector)
(the-as rgba (logior #xffffff (shl v1-8 24)))
#f
(the-as rgba -1)
)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 vector) (the-as rgba (logior #xffffff (shl v1-8 24))))
)
(set! sv-20 (-> s5-0 vector))
)
(((history-channel transv))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 1)
(the-as rgba (logior t1-7 (shl v1-8 24)))
(meters 0.000024414063)
(the-as rgba (logior (shl v1-8 24) #xff00))
)
)
)
(((history-channel pat))
(set! sv-24 (the-as pat-surface (-> s5-0 vector x)))
)
(((history-channel friction))
(let ((f0-3 (-> s5-0 vector x))
(a3-10 (new 'stack-no-clear 'vector))
)
(set-vector! a3-10 0.0 (* -8192.0 f0-3) 0.0 1.0)
(((history-channel transv-in))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
a3-10
(meters 0.00024414062)
(the-as rgba (logior #xffffff (shl v1-8 24)))
(-> s5-0 vector)
(meters 0.000024414063)
(the-as rgba (logior #x408040 (shl v1-8 24)))
)
)
)
(((history-channel transv-out))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 0.000024414063)
(the-as rgba (logior #x404080 (shl v1-8 24)))
)
)
(((history-channel local-normal) (history-channel surface-normal))
(let ((t1-7
(logand (the-as uint (-> *pat-mode-info* (-> sv-24 mode) hilite-color)) (the-as uint #xffffffff00ffffff))
)
)
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
(-> s5-0 vector)
(meters 1)
(the-as rgba (logior t1-7 (shl v1-8 24)))
)
)
)
(((history-channel pat))
(set! sv-24 (the-as pat-surface (-> s5-0 vector x)))
)
(((history-channel friction))
(let ((f0-3 (-> s5-0 vector x))
(a3-10 (new 'stack-no-clear 'vector))
)
(set-vector! a3-10 0.0 (* -8192.0 f0-3) 0.0 1.0)
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
(-> s5-0 origin)
a3-10
(meters 0.00024414062)
(the-as rgba (logior #xffffff (shl v1-8 24)))
)
)
)
)
)
)
)
+200 -209
View File
@@ -314,7 +314,6 @@
;; definition for method 11 of type memory-usage-block
;; INFO: Used lq/sq
(defmethod print-mem-usage ((this memory-usage-block) (level level) (fmt-dest object))
(local-vars (sv-16 object) (sv-32 string) (sv-48 int))
(let ((s3-0 (&- (-> level heap current) (the-as uint (-> level heap base)))))
(let ((v1-2 (+ (-> this data 61 total) (-> this data 62 total))))
(< #x10000 v1-2)
@@ -351,218 +350,210 @@
(if (< (the-as int s2-0) s3-0)
(format fmt-dest "~3L")
)
(let ((s0-0 format))
(set! sv-16 fmt-dest)
(set! sv-32 "~0K~10,'-S--~5,'-DK-of-~5,'-DK--~5,'-DK-of-~5,'-DK--")
(let ((s4-1 (-> level name))
(s3-1 (sar s3-0 10))
(s2-1 (shr s2-0 10))
)
(set! sv-48 (sar (memory-used *nk-dead-pool*) 10))
(let ((t2-0 (sar (memory-total *nk-dead-pool*) 10))
(t9-4 s0-0)
(a0-22 sv-16)
(a1-8 sv-32)
(a2-1 s4-1)
(a3-0 s3-1)
(t0-0 s2-1)
(t1-0 sv-48)
)
(t9-4 a0-22 a1-8 a2-1 a3-0 t0-0 t1-0 t2-0)
(format fmt-dest "~5,'-DK/~5,'-DK--~%" (shr s1-0 10) (sar *max-dma* 10))
(when *stats-memory-short*
(let ((s3-2 (if (cpad-hold? 1 l3)
#t
fmt-dest
)
(let* ((s0-0 format)
(sv-16 fmt-dest)
(sv-32 "~0K~10,'-S--~5,'-DK-of-~5,'-DK--~5,'-DK-of-~5,'-DK--")
(s4-1 (-> level name))
(s3-1 (sar s3-0 10))
(s2-1 (shr s2-0 10))
(sv-48 (sar (memory-used *nk-dead-pool*) 10))
(t2-0 (sar (memory-total *nk-dead-pool*) 10))
(t0-0 s2-1)
(t1-0 sv-48)
)
(s0-0 sv-16 sv-32 s4-1 s3-1 t0-0 t1-0 t2-0)
(format fmt-dest "~5,'-DK/~5,'-DK--~%" (shr s1-0 10) (sar *max-dma* 10))
(when *stats-memory-short*
(let ((s3-2 (if (cpad-hold? 1 l3)
#t
fmt-dest
)
(s4-2 format)
(s2-2 "heap-~5,'-DK/~5,'-DK----~D---~D/~D~%")
(s1-1 (sar (memory-used *nk-dead-pool*) 10))
(s0-1 (sar (memory-total *nk-dead-pool*) 10))
)
(set! t0-0 (compact-time *nk-dead-pool*))
(set! t1-0 (the-as int (-> *nk-dead-pool* compact-count)))
(set! t2-0 (the-as int (-> *nk-dead-pool* compact-count-targ)))
(s4-2 s3-2 s2-2 s1-1 s0-1 t0-0 (the-as uint t1-0) (the-as uint t2-0))
)
)
(when (not *stats-memory-short*)
(set! (-> *dma-mem-usage* data 87 total)
(* (dma-buffer-length (-> *display* frames (-> *display* last-screen) debug-buf)) 16)
)
(let ((t9-11 format)
(a0-31 fmt-dest)
(a1-11 " bsp ~192H~5DK ~280Hdebug~456H~5DK~%")
(a2-6 (sar (+ (-> this data 58 total) (-> this data 59 total) (-> this data 60 total)) 10))
(a3-3 (sar (-> *dma-mem-usage* data 87 total) 10))
)
(t9-11 a0-31 a1-11 a2-6 a3-3 (the-as none t0-0) (the-as none t1-0) (the-as none t2-0))
(format
fmt-dest
" bsp-leaf-vis ~192H~5DK~%"
(sar (+ (-> this data 61 total) (-> this data 62 total)) 10)
(the-as none a3-3)
)
(format fmt-dest " level-code ~192H~5DK~%" (sar (-> this data 65 total) 10) (the-as none a3-3))
)
(format
fmt-dest
" tfrag ~192H~5DK ~280Htfragment~456H~5DK~%"
(sar
(+ (-> this data 1 total)
(-> this data 2 total)
(-> this data 3 total)
(-> this data 4 total)
(-> this data 5 total)
(-> this data 6 total)
(-> this data 7 total)
(-> this data 8 total)
)
10
)
(sar (-> *dma-mem-usage* data 1 total) 10)
)
(format
fmt-dest
" tie-proto ~192H~5DK ~280Hsky~456H~5DK~%"
(sar
(+ (-> this data 9 total)
(-> this data 10 total)
(-> this data 11 total)
(-> this data 12 total)
(-> this data 13 total)
(-> this data 14 total)
(-> this data 16 total)
(-> this data 17 total)
)
10
)
(sar (-> *dma-mem-usage* data 88 total) 10)
)
(format
fmt-dest
" tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%"
(sar (+ (-> this data 18 total) (-> this data 20 total) (-> this data 21 total) (-> this data 22 total)) 10)
(sar (-> *dma-mem-usage* data 9 total) 10)
)
(format
fmt-dest
" shrub-proto ~192H~5DK ~280Htie-scissor~456H~5DK~%"
(sar
(+ (-> this data 25 total)
(-> this data 26 total)
(-> this data 27 total)
(-> this data 28 total)
(-> this data 29 total)
(-> this data 30 total)
(-> this data 31 total)
(-> this data 32 total)
(-> this data 33 total)
)
10
)
(sar (-> *dma-mem-usage* data 15 total) 10)
)
(format
fmt-dest
" shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%"
(sar (-> this data 34 total) 10)
(sar (-> *dma-mem-usage* data 27 total) 10)
)
(format
fmt-dest
" collision ~192H~5DK ~280Htie-generic~456H~5DK~%"
(sar
(+ (-> this data 50 total)
(-> this data 51 total)
(-> this data 52 total)
(-> this data 53 total)
(-> this data 54 total)
(-> this data 55 total)
(-> this data 56 total)
(-> this data 57 total)
)
10
)
(sar (-> *dma-mem-usage* data 17 total) 10)
)
(format
fmt-dest
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%"
(sar
(+ (-> this data 35 total)
(-> this data 36 total)
(-> this data 37 total)
(-> this data 38 total)
(-> this data 39 total)
(-> this data 40 total)
(-> this data 41 total)
(-> this data 42 total)
(-> this data 73 total)
(-> this data 74 total)
(-> this data 75 total)
(-> this data 76 total)
(-> this data 78 total)
(-> this data 81 total)
(-> this data 80 total)
(-> this data 111 total)
)
10
)
(sar (-> *dma-mem-usage* data 35 total) 10)
)
(format
fmt-dest
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%"
(sar
(+ (-> this data 67 total)
(-> this data 68 total)
(-> this data 69 total)
(-> this data 70 total)
(-> this data 71 total)
(-> this data 77 total)
(-> this data 79 total)
(-> this data 72 total)
)
10
)
(sar (-> *dma-mem-usage* data 89 total) 10)
)
(format
fmt-dest
" textures ~192H~5DK ~280Htextures~456H~5DK~%"
(sar (-> this data 82 total) 10)
(sar (-> *dma-mem-usage* data 82 total) 10)
)
(format fmt-dest " entity ~192H~5DK~%" (sar
(+ (-> this data 66 total)
(-> this data 43 total)
(-> this data 44 total)
(-> this data 45 total)
(-> this data 49 total)
(-> this data 48 total)
(-> this data 46 total)
(-> this data 47 total)
)
10
)
)
(format
fmt-dest
" misc ~192H~5DK ~280Hsprite~456H~5DK~%"
(sar
(+ (-> this data 0 total)
(-> this data 63 total)
(-> this data 64 total)
(-> this data 83 total)
(-> this data 84 total)
)
10
)
(sar (-> *dma-mem-usage* data 85 total) 10)
(s4-2 format)
(s2-2 "heap-~5,'-DK/~5,'-DK----~D---~D/~D~%")
(s1-1 (sar (memory-used *nk-dead-pool*) 10))
(s0-1 (sar (memory-total *nk-dead-pool*) 10))
)
(set! t0-0 (compact-time *nk-dead-pool*))
(set! t1-0 (the-as int (-> *nk-dead-pool* compact-count)))
(set! t2-0 (the-as int (-> *nk-dead-pool* compact-count-targ)))
(s4-2 s3-2 s2-2 s1-1 s0-1 t0-0 (the-as uint t1-0) (the-as uint t2-0))
)
)
(when (not *stats-memory-short*)
(set! (-> *dma-mem-usage* data 87 total)
(* (dma-buffer-length (-> *display* frames (-> *display* last-screen) debug-buf)) 16)
)
(let ((t9-11 format)
(a0-31 fmt-dest)
(a1-11 " bsp ~192H~5DK ~280Hdebug~456H~5DK~%")
(a2-6 (sar (+ (-> this data 58 total) (-> this data 59 total) (-> this data 60 total)) 10))
(a3-3 (sar (-> *dma-mem-usage* data 87 total) 10))
)
(t9-11 a0-31 a1-11 a2-6 a3-3 (the-as none t0-0) (the-as none t1-0) (the-as none t2-0))
(format
fmt-dest
" bsp-leaf-vis ~192H~5DK~%"
(sar (+ (-> this data 61 total) (-> this data 62 total)) 10)
(the-as none a3-3)
)
(format fmt-dest " level-code ~192H~5DK~%" (sar (-> this data 65 total) 10) (the-as none a3-3))
)
(format
fmt-dest
" tfrag ~192H~5DK ~280Htfragment~456H~5DK~%"
(sar
(+ (-> this data 1 total)
(-> this data 2 total)
(-> this data 3 total)
(-> this data 4 total)
(-> this data 5 total)
(-> this data 6 total)
(-> this data 7 total)
(-> this data 8 total)
)
10
)
(sar (-> *dma-mem-usage* data 1 total) 10)
)
(format
fmt-dest
" tie-proto ~192H~5DK ~280Hsky~456H~5DK~%"
(sar
(+ (-> this data 9 total)
(-> this data 10 total)
(-> this data 11 total)
(-> this data 12 total)
(-> this data 13 total)
(-> this data 14 total)
(-> this data 16 total)
(-> this data 17 total)
)
10
)
(sar (-> *dma-mem-usage* data 88 total) 10)
)
(format
fmt-dest
" tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%"
(sar (+ (-> this data 18 total) (-> this data 20 total) (-> this data 21 total) (-> this data 22 total)) 10)
(sar (-> *dma-mem-usage* data 9 total) 10)
)
(format
fmt-dest
" shrub-proto ~192H~5DK ~280Htie-scissor~456H~5DK~%"
(sar
(+ (-> this data 25 total)
(-> this data 26 total)
(-> this data 27 total)
(-> this data 28 total)
(-> this data 29 total)
(-> this data 30 total)
(-> this data 31 total)
(-> this data 32 total)
(-> this data 33 total)
)
10
)
(sar (-> *dma-mem-usage* data 15 total) 10)
)
(format
fmt-dest
" shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%"
(sar (-> this data 34 total) 10)
(sar (-> *dma-mem-usage* data 27 total) 10)
)
(format
fmt-dest
" collision ~192H~5DK ~280Htie-generic~456H~5DK~%"
(sar
(+ (-> this data 50 total)
(-> this data 51 total)
(-> this data 52 total)
(-> this data 53 total)
(-> this data 54 total)
(-> this data 55 total)
(-> this data 56 total)
(-> this data 57 total)
)
10
)
(sar (-> *dma-mem-usage* data 17 total) 10)
)
(format
fmt-dest
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%"
(sar
(+ (-> this data 35 total)
(-> this data 36 total)
(-> this data 37 total)
(-> this data 38 total)
(-> this data 39 total)
(-> this data 40 total)
(-> this data 41 total)
(-> this data 42 total)
(-> this data 73 total)
(-> this data 74 total)
(-> this data 75 total)
(-> this data 76 total)
(-> this data 78 total)
(-> this data 81 total)
(-> this data 80 total)
(-> this data 111 total)
)
10
)
(sar (-> *dma-mem-usage* data 35 total) 10)
)
(format
fmt-dest
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%"
(sar
(+ (-> this data 67 total)
(-> this data 68 total)
(-> this data 69 total)
(-> this data 70 total)
(-> this data 71 total)
(-> this data 77 total)
(-> this data 79 total)
(-> this data 72 total)
)
10
)
(sar (-> *dma-mem-usage* data 89 total) 10)
)
(format
fmt-dest
" textures ~192H~5DK ~280Htextures~456H~5DK~%"
(sar (-> this data 82 total) 10)
(sar (-> *dma-mem-usage* data 82 total) 10)
)
(format fmt-dest " entity ~192H~5DK~%" (sar
(+ (-> this data 66 total)
(-> this data 43 total)
(-> this data 44 total)
(-> this data 45 total)
(-> this data 49 total)
(-> this data 48 total)
(-> this data 46 total)
(-> this data 47 total)
)
10
)
)
(format
fmt-dest
" misc ~192H~5DK ~280Hsprite~456H~5DK~%"
(sar
(+ (-> this data 0 total)
(-> this data 63 total)
(-> this data 64 total)
(-> this data 83 total)
(-> this data 84 total)
)
10
)
(sar (-> *dma-mem-usage* data 85 total) 10)
)
)
)
+49 -94
View File
@@ -682,18 +682,7 @@
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16
(defun debug-menu-make-from-template ((arg0 debug-menu-context) (arg1 pair))
(local-vars
(s4-0 debug-menu-node)
(sv-16 object)
(sv-32 (function object int int))
(sv-48 int)
(sv-64 (function object int int))
(sv-80 (function object float float))
(sv-96 float)
(sv-112 (function object float float))
(sv-128 float)
(sv-144 (function object int int))
)
(local-vars (s4-0 debug-menu-node))
(when (or (not arg1) (null? arg1))
(set! s4-0 (the-as debug-menu-node #f))
(goto cfg-39)
@@ -768,79 +757,44 @@
)
)
((or (= s5-0 'int-var) (= s5-0 'int-var-gat1) (= s5-0 'hex-var))
(set! s4-0 (new
'debug
'debug-menu-item-var
(the-as string s4-1)
(the-as int (car (cdr (cdr arg1))))
(the-as int (ref arg1 4))
)
)
(let ((s3-4 debug-menu-item-var-make-int)
(s2-3 (the-as debug-menu-item-var s4-0))
(s1-3 (debug-menu-func-decode (car (cdr (cdr (cdr arg1))))))
(s0-2 (command-get-int (ref arg1 5) 0))
)
(set! sv-16 (ref arg1 6))
(set! sv-32 command-get-int)
(let ((a0-24 (ref arg1 7))
(a1-18 0)
(set! s4-0
(new
'debug
'debug-menu-item-var
(the-as string s4-1)
(the-as int (car (cdr (cdr arg1))))
(the-as int (ref arg1 4))
)
(set! sv-48 (sv-32 a0-24 a1-18))
)
(set! sv-64 command-get-int)
(let* ((a0-26 (ref arg1 8))
(a1-20 0)
(t1-0 (sv-64 a0-26 a1-20))
(t2-0 (= s5-0 'hex-var))
)
(s3-4 s2-3 (the-as (function int debug-menu-msg int int int) s1-3) s0-2 (the-as symbol sv-16) sv-48 t1-0 t2-0)
)
)
(debug-menu-item-var-make-int
(the-as debug-menu-item-var s4-0)
(the-as (function int debug-menu-msg int int int) (debug-menu-func-decode (car (cdr (cdr (cdr arg1))))))
(command-get-int (ref arg1 5) 0)
(the-as symbol (ref arg1 6))
(command-get-int (ref arg1 7) 0)
(command-get-int (ref arg1 8) 0)
(= s5-0 'hex-var)
)
s4-0
)
((= s5-0 'float-var)
(set! s4-0 (new
'debug
'debug-menu-item-var
(the-as string s4-1)
(the-as int (car (cdr (cdr arg1))))
(the-as int (ref arg1 4))
)
)
(let ((s5-5 debug-menu-item-var-make-float)
(s3-6 (the-as debug-menu-item-var s4-0))
(s2-5 (debug-menu-func-decode (car (cdr (cdr (cdr arg1))))))
(s1-6 (command-get-float (ref arg1 5) 0.0))
(s0-3 (ref arg1 6))
)
(set! sv-80 command-get-float)
(let ((a0-35 (ref arg1 7))
(a1-28 0.0)
(set! s4-0
(new
'debug
'debug-menu-item-var
(the-as string s4-1)
(the-as int (car (cdr (cdr arg1))))
(the-as int (ref arg1 4))
)
(set! sv-96 (sv-80 a0-35 a1-28))
)
(set! sv-112 command-get-float)
(let ((a0-37 (ref arg1 8))
(a1-30 0.0)
)
(set! sv-128 (sv-112 a0-37 a1-30))
)
(set! sv-144 command-get-int)
(let* ((a0-39 (ref arg1 9))
(a1-32 0)
(t2-1 (sv-144 a0-39 a1-32))
)
(s5-5
s3-6
(the-as (function int debug-menu-msg float float float) s2-5)
s1-6
(the-as symbol s0-3)
sv-96
sv-128
t2-1
)
)
(debug-menu-item-var-make-float
(the-as debug-menu-item-var s4-0)
(the-as (function int debug-menu-msg float float float) (debug-menu-func-decode (car (cdr (cdr (cdr arg1))))))
(command-get-float (ref arg1 5) 0.0)
(the-as symbol (ref arg1 6))
(command-get-float (ref arg1 7) 0.0)
(command-get-float (ref arg1 8) 0.0)
(command-get-int (ref arg1 9) 0)
)
s4-0
)
@@ -1071,7 +1025,6 @@
;; definition for function debug-menu-render
;; INFO: Used lq/sq
(defun debug-menu-render ((arg0 debug-menu) (arg1 int) (arg2 int) (arg3 debug-menu-node) (arg4 int))
(local-vars (sv-16 dma-buffer) (sv-32 pointer))
(let ((v1-0 0))
(let* ((a0-1 (-> arg0 items))
(a1-1 (car a0-1))
@@ -1108,21 +1061,23 @@
)
)
(set-origin! (-> arg0 context font) s3-1 s2-1)
(set! sv-16 (-> *display* frames (-> *display* on-screen) debug-buf))
(set! sv-32 (-> sv-16 base))
(draw-string ">" sv-16 (-> arg0 context font))
(let ((a3-3 (-> sv-16 base)))
(let ((v1-32 (the-as object (-> sv-16 base))))
(set! (-> (the-as dma-packet v1-32) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> (the-as dma-packet v1-32) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet v1-32) vif1) (new 'static 'vif-tag))
(set! (-> sv-16 base) (&+ (the-as pointer v1-32) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug3)
sv-32
(the-as (pointer dma-tag) a3-3)
(let* ((sv-16 (-> *display* frames (-> *display* on-screen) debug-buf))
(sv-32 (-> sv-16 base))
)
(draw-string ">" sv-16 (-> arg0 context font))
(let ((a3-3 (-> sv-16 base)))
(let ((v1-32 (the-as object (-> sv-16 base))))
(set! (-> (the-as dma-packet v1-32) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> (the-as dma-packet v1-32) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet v1-32) vif1) (new 'static 'vif-tag))
(set! (-> sv-16 base) (&+ (the-as pointer v1-32) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug3)
sv-32
(the-as (pointer dma-tag) a3-3)
)
)
)
)
+176 -176
View File
@@ -809,7 +809,6 @@
;; WARN: new jak 2 until loop case, check carefully
(defmethod init-from-sql! ((this mysql-nav-graph) (arg0 string) (arg1 string))
"Query the database and initialize the [[mysql-nav-graph]] and all it's related components"
(local-vars (sv-16 string) (sv-32 int) (sv-48 int) (sv-64 int))
(set! (-> this node-array length) 0)
(set! (-> this edge-array length) 0)
(set! (-> this visnode-array length) 0)
@@ -857,35 +856,36 @@
(set! (-> nav-node angle) (* 182.04445 (string->float (-> s2-1 data (+ s1-0 5)))))
(set! (-> nav-node radius) (* 4096.0 (string->float (-> s2-1 data (+ s1-0 6)))))
(set! (-> nav-node nav_node_flag) (nav-node-flag))
(set! sv-16 (new 'global 'string 0 (-> s2-1 data (+ s1-0 7))))
(copy-string<-string sv-16 (-> s2-1 data (+ s1-0 7)))
(until #f
(cond
((string-prefix= "visited" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag visited))
)
((string-prefix= "blocked" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag blocked))
)
((string-prefix= "pedestrian" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag pedestrian))
)
((string-prefix= "selected" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag selected))
)
((string-prefix= "hidden" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag hidden))
)
(else
#t
(goto cfg-27)
)
)
(let ((a1-16 (string-skip-to-char (-> sv-16 data) (the-as uint 44))))
(if (= (-> a1-16 0) 44)
(set! a1-16 (&-> a1-16 1))
(let ((sv-16 (new 'global 'string 0 (-> s2-1 data (+ s1-0 7)))))
(copy-string<-string sv-16 (-> s2-1 data (+ s1-0 7)))
(until #f
(cond
((string-prefix= "visited" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag visited))
)
((string-prefix= "blocked" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag blocked))
)
((string-prefix= "pedestrian" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag pedestrian))
)
((string-prefix= "selected" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag selected))
)
((string-prefix= "hidden" sv-16)
(logior! (-> nav-node nav_node_flag) (nav-node-flag hidden))
)
(else
#t
(goto cfg-27)
)
(string-suck-up! sv-16 a1-16)
)
(let ((a1-16 (string-skip-to-char (-> sv-16 data) (the-as uint 44))))
(if (= (-> a1-16 0) 44)
(set! a1-16 (&-> a1-16 1))
)
(string-suck-up! sv-16 a1-16)
)
)
)
#f
@@ -929,155 +929,155 @@
(let ((s2-2 0))
(while (< s2-2 (-> s3-3 len))
(when (= (string->int (-> s3-3 data (+ s2-2 11))) (-> this nav_graph_id))
(let ((s0-2 (string->int (-> s3-3 data (+ s2-2 1)))))
(set! sv-32 (string->int (-> s3-3 data (+ s2-2 2))))
(set! sv-48 (indexof-nav-node this s0-2))
(set! sv-64 (indexof-nav-node this sv-32))
(let ((nav-edge (-> this edge-array data (-> this edge-array length))))
(when (and (!= sv-48 -1) (!= sv-64 -1))
(set! (-> nav-edge nav_graph_id) (-> this nav_graph_id))
(set! (-> nav-edge nav_edge_id) (the-as uint (string->int (-> s3-3 data s2-2))))
(set! (-> nav-edge nav_node_id_1) (the-as uint s0-2))
(set! (-> nav-edge nav_node_id_2) (the-as uint sv-32))
(set! (-> nav-edge mysql-save-flag) (mysql-save-flag))
(set! (-> nav-edge runtime-id) (the-as uint (-> this edge-array length)))
(set! (-> nav-edge runtime-node-id-1) sv-48)
(set! (-> nav-edge runtime-node-id-2) sv-64)
(let ((s0-3 (-> s3-3 data (+ s2-2 3))))
(cond
((string= "default" s0-3)
(set! (-> nav-edge directionality) (nav-directionality default))
0
)
((string= "directed" s0-3)
(set! (-> nav-edge directionality) (nav-directionality directed))
)
((string= "bi_directional" s0-3)
(set! (-> nav-edge directionality) (nav-directionality bi_directional))
)
)
(let* ((s0-2 (string->int (-> s3-3 data (+ s2-2 1))))
(sv-32 (string->int (-> s3-3 data (+ s2-2 2))))
(sv-48 (indexof-nav-node this s0-2))
(sv-64 (indexof-nav-node this sv-32))
(nav-edge (-> this edge-array data (-> this edge-array length)))
)
(when (and (!= sv-48 -1) (!= sv-64 -1))
(set! (-> nav-edge nav_graph_id) (-> this nav_graph_id))
(set! (-> nav-edge nav_edge_id) (the-as uint (string->int (-> s3-3 data s2-2))))
(set! (-> nav-edge nav_node_id_1) (the-as uint s0-2))
(set! (-> nav-edge nav_node_id_2) (the-as uint sv-32))
(set! (-> nav-edge mysql-save-flag) (mysql-save-flag))
(set! (-> nav-edge runtime-id) (the-as uint (-> this edge-array length)))
(set! (-> nav-edge runtime-node-id-1) sv-48)
(set! (-> nav-edge runtime-node-id-2) sv-64)
(let ((s0-3 (-> s3-3 data (+ s2-2 3))))
(cond
((string= "default" s0-3)
(set! (-> nav-edge directionality) (nav-directionality default))
0
)
((string= "directed" s0-3)
(set! (-> nav-edge directionality) (nav-directionality directed))
)
((string= "bi_directional" s0-3)
(set! (-> nav-edge directionality) (nav-directionality bi_directional))
)
)
(set! (-> nav-edge speed_limit) (* 4096.0 (string->float (-> s3-3 data (+ s2-2 4)))))
(set! (-> nav-edge density) (string->float (-> s3-3 data (+ s2-2 5))))
(set! (-> nav-edge traffic_edge_flag) 0)
(let ((s0-4 (new 'global 'string 0 (-> s3-3 data (+ s2-2 6)))))
(copy-string<-string s0-4 (-> s3-3 data (+ s2-2 6)))
(until #f
(cond
((string-prefix= "pedestrian" s0-4)
(logior! (-> nav-edge traffic_edge_flag) 1)
)
(else
#t
(goto cfg-58)
)
)
(let ((a1-30 (string-skip-to-char (-> s0-4 data) (the-as uint 44))))
(if (= (-> a1-30 0) 44)
(set! a1-30 (&-> a1-30 1))
)
(string-suck-up! s0-4 a1-30)
)
)
)
#f
(label cfg-58)
(set! (-> nav-edge nav_clock_mask) (nav-clock-mask))
(let ((s0-5 (new 'global 'string 0 (-> s3-3 data (+ s2-2 7)))))
(copy-string<-string s0-5 (-> s3-3 data (+ s2-2 7)))
(until #f
(cond
((string-prefix= "phase-1a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-1a))
)
((string-prefix= "phase-1" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-1))
)
((string-prefix= "phase-2a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-2a))
)
((string-prefix= "phase-2" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-2))
)
((string-prefix= "phase-3a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-3a))
)
((string-prefix= "phase-3" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-3))
)
((string-prefix= "phase-4a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-4a))
)
((string-prefix= "phase-4" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-4))
)
(else
#t
(goto cfg-80)
)
)
(let ((a1-42 (string-skip-to-char (-> s0-5 data) (the-as uint 44))))
(if (= (-> a1-42 0) 44)
(set! a1-42 (&-> a1-42 1))
)
(string-suck-up! s0-5 a1-42)
)
)
)
#f
(label cfg-80)
(let ((s0-6 (-> s3-3 data (+ s2-2 8))))
(cond
((string= "no-clock" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type no-clock))
0
)
((string= "clock2" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock2))
)
((string= "clock3" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock3))
)
((string= "clock4" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock4))
)
)
)
(set! (-> nav-edge width) (* 4096.0 (string->float (-> s3-3 data (+ s2-2 9)))))
(set! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag))
(let ((s0-7 (new 'global 'string 0 (-> s3-3 data (+ s2-2 10)))))
(copy-string<-string s0-7 (-> s3-3 data (+ s2-2 10)))
(until #f
(cond
((string-prefix= "pass-red" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-red))
)
((string-prefix= "pass-green" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-green))
)
((string-prefix= "pass-yellow" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-yellow))
)
((string-prefix= "pass-blue" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-blue))
)
(else
#t
(goto cfg-102)
)
)
(let ((a1-54 (string-skip-to-char (-> s0-7 data) (the-as uint 44))))
(if (= (-> a1-54 0) 44)
(set! a1-54 (&-> a1-54 1))
)
(string-suck-up! s0-7 a1-54)
)
)
)
#f
(label cfg-102)
(+! (-> this edge-array length) 1)
)
(set! (-> nav-edge speed_limit) (* 4096.0 (string->float (-> s3-3 data (+ s2-2 4)))))
(set! (-> nav-edge density) (string->float (-> s3-3 data (+ s2-2 5))))
(set! (-> nav-edge traffic_edge_flag) 0)
(let ((s0-4 (new 'global 'string 0 (-> s3-3 data (+ s2-2 6)))))
(copy-string<-string s0-4 (-> s3-3 data (+ s2-2 6)))
(until #f
(cond
((string-prefix= "pedestrian" s0-4)
(logior! (-> nav-edge traffic_edge_flag) 1)
)
(else
#t
(goto cfg-58)
)
)
(let ((a1-30 (string-skip-to-char (-> s0-4 data) (the-as uint 44))))
(if (= (-> a1-30 0) 44)
(set! a1-30 (&-> a1-30 1))
)
(string-suck-up! s0-4 a1-30)
)
)
)
#f
(label cfg-58)
(set! (-> nav-edge nav_clock_mask) (nav-clock-mask))
(let ((s0-5 (new 'global 'string 0 (-> s3-3 data (+ s2-2 7)))))
(copy-string<-string s0-5 (-> s3-3 data (+ s2-2 7)))
(until #f
(cond
((string-prefix= "phase-1a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-1a))
)
((string-prefix= "phase-1" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-1))
)
((string-prefix= "phase-2a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-2a))
)
((string-prefix= "phase-2" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-2))
)
((string-prefix= "phase-3a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-3a))
)
((string-prefix= "phase-3" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-3))
)
((string-prefix= "phase-4a" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-4a))
)
((string-prefix= "phase-4" s0-5)
(logior! (-> nav-edge nav_clock_mask) (nav-clock-mask phase-4))
)
(else
#t
(goto cfg-80)
)
)
(let ((a1-42 (string-skip-to-char (-> s0-5 data) (the-as uint 44))))
(if (= (-> a1-42 0) 44)
(set! a1-42 (&-> a1-42 1))
)
(string-suck-up! s0-5 a1-42)
)
)
)
#f
(label cfg-80)
(let ((s0-6 (-> s3-3 data (+ s2-2 8))))
(cond
((string= "no-clock" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type no-clock))
0
)
((string= "clock2" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock2))
)
((string= "clock3" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock3))
)
((string= "clock4" s0-6)
(set! (-> nav-edge nav_clock_type) (nav-clock-type clock4))
)
)
)
(set! (-> nav-edge width) (* 4096.0 (string->float (-> s3-3 data (+ s2-2 9)))))
(set! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag))
(let ((s0-7 (new 'global 'string 0 (-> s3-3 data (+ s2-2 10)))))
(copy-string<-string s0-7 (-> s3-3 data (+ s2-2 10)))
(until #f
(cond
((string-prefix= "pass-red" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-red))
)
((string-prefix= "pass-green" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-green))
)
((string-prefix= "pass-yellow" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-yellow))
)
((string-prefix= "pass-blue" s0-7)
(logior! (-> nav-edge minimap_edge_flag) (nav-minimap-edge-flag pass-blue))
)
(else
#t
(goto cfg-102)
)
)
(let ((a1-54 (string-skip-to-char (-> s0-7 data) (the-as uint 44))))
(if (= (-> a1-54 0) 44)
(set! a1-54 (&-> a1-54 1))
)
(string-suck-up! s0-7 a1-54)
)
)
)
#f
(label cfg-102)
(+! (-> this edge-array length) 1)
)
)
)
+116 -131
View File
@@ -499,7 +499,6 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod nav-graph-editor-method-28 ((this nav-graph-editor))
(local-vars (sv-144 int) (sv-160 (function _varargs_ object)))
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
@@ -520,11 +519,7 @@
(set! (-> v1-8 w) (-> s2-0 radius))
)
(set! (-> s2-0 cam-dist) (vector-vector-distance-squared s3-0 (camera-pos)))
(let ((f0-6 (-> s2-0 cam-dist))
(f1-0 (-> this clipping-dist))
)
(set! (-> s2-0 visible) (< f0-6 (* f1-0 f1-0)))
)
(set! (-> s2-0 visible) (< (-> s2-0 cam-dist) (square (-> this clipping-dist))))
(if (or (and (-> this vehicle-edit-mode) (logtest? (-> s2-0 nav_node_flag) (nav-node-flag pedestrian)))
(and (not (-> this vehicle-edit-mode)) (not (logtest? (-> s2-0 nav_node_flag) (nav-node-flag pedestrian))))
)
@@ -559,48 +554,46 @@
(add-debug-x #t (bucket-id debug2) s3-0 *color-red*)
(let ((s1-1 add-debug-text-3d)
(s0-1 #t)
(sv-144 324)
)
(set! sv-144 324)
(set! sv-160 format)
(let ((a0-16 (clear *temp-string*))
(a1-8 "~D")
(a2-6 (-> s2-0 nav_mesh_id))
(format (clear *temp-string*) "~D" (-> s2-0 nav_mesh_id))
(let ((a2-7 *temp-string*)
(a3-2 s3-0)
(v1-24 (-> s2-0 level_name))
)
(sv-160 a0-16 a1-8 a2-6)
)
(let* ((a2-7 *temp-string*)
(a3-2 s3-0)
(v1-24 (-> s2-0 level_name))
(t0-1 (cond
((= v1-24 'ctyport)
3
)
((= v1-24 'ctyinda)
4
)
((= v1-24 'ctyindb)
5
)
((= v1-24 'ctypal)
6
)
((= v1-24 'ctysluma)
7
)
((= v1-24 'ctyslumb)
8
)
((= v1-24 'ctyslumc)
9
)
(else
1
)
)
)
(t1-0 #f)
(s1-1
s0-1
(the-as bucket-id sv-144)
a2-7
a3-2
(cond
((= v1-24 'ctyport)
(font-color red)
)
(s1-1 s0-1 (the-as bucket-id sv-144) a2-7 a3-2 (the-as font-color t0-1) (the-as vector2h t1-0))
((= v1-24 'ctyinda)
(font-color orange)
)
((= v1-24 'ctyindb)
(font-color yellow)
)
((= v1-24 'ctypal)
(font-color green)
)
((= v1-24 'ctysluma)
(font-color blue)
)
((= v1-24 'ctyslumb)
(font-color cyan)
)
((= v1-24 'ctyslumc)
(font-color pink)
)
(else
(font-color white)
)
)
(the-as vector2h #f)
)
)
)
(let ((s1-2 (new 'stack-no-clear 'vector)))
@@ -1077,7 +1070,6 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch symbol vs none.
(defmethod nav-graph-editor-method-43 ((this nav-graph-editor))
(local-vars (sv-128 vector) (sv-144 vector))
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
@@ -1111,9 +1103,9 @@
)
(let ((f30-0 0.0)
(s0-1 ray-cylinder-intersect)
(sv-128 (-> this mouse-pos))
(sv-144 (new 'stack-no-clear 'vector))
)
(set! sv-128 (-> this mouse-pos))
(set! sv-144 (new 'stack-no-clear 'vector))
(let ((v1-18 (-> this mouse-hit-pick))
(a0-13 (-> this mouse-pos))
)
@@ -1123,18 +1115,21 @@
(.mov.vf.w vf6 vf0)
(.sub.vf.xyz vf6 vf4 vf5)
(.svf (&-> sv-144 quad) vf6)
(let ((a3-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-0 1.0))
(t0-0 1024.0)
(t1-0 (vector-length s2-0))
(t2-0 s3-0)
)
(when (< f30-0 (s0-1 sv-128 sv-144 s1-0 a3-3 t0-0 t1-0 t2-0))
(let ((f0-1 (vector-vector-distance s3-0 (-> this mouse-pos))))
(when (or (= (-> this selected-index) -1) (< f0-1 (-> this selected-dist)))
(set! (-> this selected-index) s4-0)
(set! (-> this selected-dist) f0-1)
(set! (-> this selected-node-edge?) #f)
)
(when (< f30-0 (s0-1
sv-128
sv-144
s1-0
(vector-normalize-copy! (new 'stack-no-clear 'vector) s2-0 1.0)
1024.0
(vector-length s2-0)
s3-0
)
)
(let ((f0-1 (vector-vector-distance s3-0 (-> this mouse-pos))))
(when (or (= (-> this selected-index) -1) (< f0-1 (-> this selected-dist)))
(set! (-> this selected-index) s4-0)
(set! (-> this selected-dist) f0-1)
(set! (-> this selected-node-edge?) #f)
)
)
)
@@ -2235,16 +2230,6 @@
;; definition for function smooth-nav-graph
;; INFO: Used lq/sq
(defun smooth-nav-graph ((arg0 string))
(local-vars
(sv-96 int)
(sv-112 int)
(sv-128 int)
(sv-144 mysql-nav-edge)
(sv-160 vector)
(sv-176 vector)
(sv-192 vector)
(sv-208 vector)
)
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
@@ -2257,52 +2242,54 @@
(s2-0 (new-stack-vector0))
(s0-0 (new-stack-vector0))
(s1-0 (new-stack-vector0))
(sv-96 0)
(sv-112 0)
)
(set! sv-96 0)
(set! sv-112 0)
(when (and (not (logtest? (-> s3-0 mysql-save-flag) (mysql-save-flag delete))) (= (-> s3-0 level_name) arg0))
(set! sv-128 0)
(while (< sv-128 (-> s5-0 edge-array length))
(set! sv-144 (-> s5-0 edge-array data sv-128))
(when (not (logtest? (-> sv-144 mysql-save-flag) (mysql-save-flag delete)))
(when (= (-> sv-144 runtime-node-id-1) s4-0)
(let ((v1-27 (-> s5-0 node-array data (-> sv-144 runtime-node-id-1)))
(a1-3 (-> s5-0 node-array data (-> sv-144 runtime-node-id-2)))
)
(set! sv-176 s1-0)
(set! sv-160 s1-0)
(let ((v0-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-3 position) (-> v1-27 position)) 1.0))
(let ((sv-128 0))
(while (< sv-128 (-> s5-0 edge-array length))
(let ((sv-144 (-> s5-0 edge-array data sv-128)))
(when (not (logtest? (-> sv-144 mysql-save-flag) (mysql-save-flag delete)))
(when (= (-> sv-144 runtime-node-id-1) s4-0)
(let ((v1-27 (-> s5-0 node-array data (-> sv-144 runtime-node-id-1)))
(a1-3 (-> s5-0 node-array data (-> sv-144 runtime-node-id-2)))
(sv-176 s1-0)
)
(let ((sv-160 s1-0)
(v0-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-3 position) (-> v1-27 position)) 1.0))
)
(.mov.vf.w vf6 vf0)
(.lvf vf4 (&-> sv-160 quad))
(.lvf vf5 (&-> v0-0 quad))
)
(.mov.vf.w vf6 vf0)
(.lvf vf4 (&-> sv-160 quad))
(.lvf vf5 (&-> v0-0 quad))
(.add.vf.xyz vf6 vf4 vf5)
(.svf (&-> sv-176 quad) vf6)
)
(+! sv-112 1)
sv-112
)
(when (= (-> sv-144 runtime-node-id-2) s4-0)
(let ((v1-40 (-> s5-0 node-array data (-> sv-144 runtime-node-id-1)))
(a1-9 (-> s5-0 node-array data (-> sv-144 runtime-node-id-2)))
(sv-208 s0-0)
)
(let ((sv-192 s0-0)
(v0-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-9 position) (-> v1-40 position)) 1.0))
)
(.mov.vf.w vf6 vf0)
(.lvf vf4 (&-> sv-192 quad))
(.lvf vf5 (&-> v0-1 quad))
)
(.add.vf.xyz vf6 vf4 vf5)
(.svf (&-> sv-208 quad) vf6)
)
(+! sv-96 1)
sv-96
)
)
(.add.vf.xyz vf6 vf4 vf5)
(.svf (&-> sv-176 quad) vf6)
(set! sv-112 (+ sv-112 1))
sv-112
)
(when (= (-> sv-144 runtime-node-id-2) s4-0)
(let ((v1-40 (-> s5-0 node-array data (-> sv-144 runtime-node-id-1)))
(a1-9 (-> s5-0 node-array data (-> sv-144 runtime-node-id-2)))
)
(set! sv-208 s0-0)
(set! sv-192 s0-0)
(let ((v0-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-9 position) (-> v1-40 position)) 1.0))
)
(.mov.vf.w vf6 vf0)
(.lvf vf4 (&-> sv-192 quad))
(.lvf vf5 (&-> v0-1 quad))
)
)
(.add.vf.xyz vf6 vf4 vf5)
(.svf (&-> sv-208 quad) vf6)
(set! sv-96 (+ sv-96 1))
sv-96
)
(+! sv-128 1)
)
(set! sv-128 (+ sv-128 1))
)
(cond
((and (>= sv-112 2) (= sv-96 1))
@@ -2350,7 +2337,6 @@
;; definition for function update-width
;; INFO: Used lq/sq
(defun update-width ((arg0 string))
(local-vars (sv-16 (array entity-nav-mesh)) (sv-32 int) (sv-48 uint) (sv-64 entity-nav-mesh))
(let ((s5-0 (-> (ppointer->process *nav-graph-editor*) nav-graph)))
(dotimes (s4-0 (-> s5-0 edge-array length))
(let ((s3-0 (-> s5-0 edge-array data s4-0)))
@@ -2368,32 +2354,31 @@
(dotimes (s0-0 (-> *level* length))
(let ((v1-25 (-> *level* level s0-0)))
(when (= (-> v1-25 status) 'active)
(set! sv-16 (-> v1-25 bsp nav-meshes))
(when (nonzero? sv-16)
(set! sv-32 0)
(while (< sv-32 (-> sv-16 length))
(set! sv-64 (-> sv-16 sv-32))
(set! sv-48 (-> sv-64 aid))
(let ((v1-36 (if (type? sv-64 entity-nav-mesh)
sv-64
)
)
)
(when (and v1-36 (= sv-48 (-> s2-0 nav_mesh_id)))
(let* ((f0-0 (nav-mesh-method-35 (-> v1-36 nav-mesh) (-> s2-0 position) (-> s1-0 position) 16384.0))
(f0-1 (+ -409.6 f0-0))
(let ((sv-16 (-> v1-25 bsp nav-meshes)))
(when (nonzero? sv-16)
(let ((sv-32 0))
(while (< sv-32 (-> sv-16 length))
(let* ((sv-64 (-> sv-16 sv-32))
(sv-48 (-> sv-64 aid))
(v1-36 (as-type sv-64 entity-nav-mesh))
)
(when (and (< 0.0 f0-1) (!= f0-1 (-> s3-0 width)))
(set! (-> s3-0 width) f0-1)
(logior! (-> s3-0 mysql-save-flag) (mysql-save-flag update))
)
(if (>= 0.0 f0-1)
(format #t "!!!! edge ~D ~D outside nav-mesh~%" (-> s2-0 nav_node_id) (-> s1-0 nav_node_id))
(when (and v1-36 (= sv-48 (-> s2-0 nav_mesh_id)))
(let* ((f0-0 (nav-mesh-method-35 (-> v1-36 nav-mesh) (-> s2-0 position) (-> s1-0 position) 16384.0))
(f0-1 (+ -409.6 f0-0))
)
(when (and (< 0.0 f0-1) (!= f0-1 (-> s3-0 width)))
(set! (-> s3-0 width) f0-1)
(logior! (-> s3-0 mysql-save-flag) (mysql-save-flag update))
)
(if (>= 0.0 f0-1)
(format #t "!!!! edge ~D ~D outside nav-mesh~%" (-> s2-0 nav_node_id) (-> s1-0 nav_node_id))
)
)
)
)
(+! sv-32 1)
)
)
(set! sv-32 (+ sv-32 1))
)
)
)
+19 -21
View File
@@ -251,31 +251,29 @@
;; definition for function add-a-bunch
;; INFO: Used lq/sq
(defun add-a-bunch ((arg0 string) (arg1 int) (arg2 int) (arg3 float) (arg4 process-tree) (arg5 entity-actor))
(local-vars (sv-32 int) (sv-48 process) (sv-64 vector))
(dotimes (s0-0 arg1)
(set! sv-32 0)
(while (< sv-32 arg2)
(set! sv-64 (new 'stack-no-clear 'vector))
(set! (-> sv-64 quad) (the-as uint128 0))
(position-in-front-of-camera! sv-64 40960.0 4096.0)
(+! (-> sv-64 x) (the float (* (- s0-0 (/ arg1 2)) (the int arg3))))
(+! (-> sv-64 z) (the float (* (- sv-32 (/ arg2 2)) (the int arg3))))
(set! sv-48 (get-process *default-dead-pool* viewer #x4000))
(when sv-48
(let ((t9-2 (method-of-type viewer activate)))
(t9-2 (the-as viewer sv-48) arg4 (symbol->string (-> viewer symbol)) (the-as pointer #x70004000))
)
(let ((t9-3 run-function-in-process)
(a0-7 sv-48)
(a1-4 init-viewer-for-other)
(a2-6 arg0)
(t0-1 arg5)
(let ((sv-32 0))
(while (< sv-32 arg2)
(let ((sv-64 (new 'stack-no-clear 'vector)))
(set! (-> sv-64 quad) (the-as uint128 0))
(position-in-front-of-camera! sv-64 40960.0 4096.0)
(+! (-> sv-64 x) (the float (* (- s0-0 (/ arg1 2)) (the int arg3))))
(+! (-> sv-64 z) (the float (* (- sv-32 (/ arg2 2)) (the int arg3))))
(let ((sv-48 (get-process *default-dead-pool* viewer #x4000)))
(when sv-48
((method-of-type viewer activate)
(the-as viewer sv-48)
arg4
(symbol->string (-> viewer symbol))
(the-as pointer #x70004000)
)
(run-now-in-process sv-48 init-viewer-for-other arg0 sv-64 arg5)
(-> sv-48 ppointer)
)
((the-as (function object object object object object none) t9-3) a0-7 a1-4 a2-6 sv-64 t0-1)
)
)
(-> sv-48 ppointer)
(+! sv-32 1)
)
(set! sv-32 (+ sv-32 1))
)
)
#f