From 547e37d8f1f0040dacbee60fad0a04f50208775d Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Sat, 18 Dec 2021 17:15:11 -0500 Subject: [PATCH] decomp: finish `vol` | `helix-water` | `minecart` (#1016) * some fixes, but no file unblocked completely yet - `balloonlurker` is close * decomp: finish `vol` - i did it!...i think * decomp: finish `helix-water` * decomp: finish `minecart` * fix `define-perm`s --- decompiler/config/all-types.gc | 71 +- .../stack_structures.jsonc | 47 +- .../jak1_ntsc_black_label/type_casts.jsonc | 24 +- goal_src/engine/camera/cam-layout.gc | 7271 +++++++---------- goal_src/engine/collide/collide-shape-h.gc | 4 +- goal_src/engine/collide/collide-shape.gc | 2 - goal_src/engine/game/collectables.gc | 14 +- goal_src/engine/geometry/vol-h.gc | 176 +- goal_src/engine/geometry/vol.gc | 269 + goal_src/engine/ui/text-h.gc | 4 +- goal_src/levels/sunken/helix-water.gc | 779 ++ goal_src/levels/sunken/sunken-obs.gc | 5 +- goal_src/levels/village3/minecart.gc | 178 + scripts/update-goal-src.py | 3 +- .../reference/engine/camera/cam-layout_REF.gc | 4 +- .../engine/collide/collide-shape-h_REF.gc | 4 +- .../reference/engine/geometry/vol-h_REF.gc | 32 +- .../reference/engine/geometry/vol_REF.gc | 279 + .../reference/levels/common/baseplat_REF.gc | 1 + .../levels/sunken/helix-water_REF.gc | 836 ++ .../reference/levels/sunken/sunken-obs_REF.gc | 3 +- .../reference/levels/village3/minecart_REF.gc | 195 + 22 files changed, 5821 insertions(+), 4380 deletions(-) create mode 100644 test/decompiler/reference/engine/geometry/vol_REF.gc create mode 100644 test/decompiler/reference/levels/sunken/helix-water_REF.gc create mode 100644 test/decompiler/reference/levels/village3/minecart_REF.gc diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 427e59c72a..c09dd2c2fe 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -1061,11 +1061,13 @@ (rolling-ring-hint-be-quick-to-next #x340) (rolling-ring-hint-be-quick-all #x341) + (sunken-helix-daxter-bad-feeling #x344) (sunken-blue-eco-charger-hint #x345) - (sunken-take-it-easy-hot-pipes #x34e) (sunken-double-lurker-hint #x347) + (sunken-helix-daxter-eco-rising #x348) (sunken-qbert-plat-hint #x34a) (sunken-bully-dive-hint #x34b) + (sunken-take-it-easy-hot-pipes #x34e) (sunken-blue-eco-charger-all-hint #x34d) @@ -11294,9 +11296,9 @@ :flag-assert #x38000000b8 (:methods (new (symbol type process-drawable collide-list-enum) _type_) - (TODO-RENAME-28 (_type_ vector) none 28) + (TODO-RENAME-28 (_type_ vector) object 28) ;; ret - symbol | float (CSPG::9) (dummy-29 (_type_ int) none 29) - (TODO-RENAME-30 (_type_ vector) none 30) + (TODO-RENAME-30 (_type_ vector) object 30) ;; ret - symbol | float (CSPG::9) (dummy-31 (_type_) none 31) (dummy-32 (_type_ object uint) none 32) (dummy-33 (_type_ vector uint) none 33) @@ -19012,19 +19014,19 @@ ((volume-type symbol :offset-assert 0) (point-count int16 :offset-assert 4) (normal-count int16 :offset-assert 6) - (first-point vector :offset-assert 8) - (first-normal vector :offset-assert 12) + (first-point (pointer vector) :offset-assert 8) + (first-normal (pointer vector) :offset-assert 12) (num-planes int32 :offset-assert 16) - (plane uint32 :offset-assert 20) + (plane (inline-array plane) :offset-assert 20) ) :pack-me :method-count-assert 12 :size-assert #x18 :flag-assert #xc00000018 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) + (dummy-9 (_type_ symbol vector-array vector-array) symbol 9) + (debug-draw (_type_) none 10) + (dummy-11 (_type_ vector float) symbol 11) ) ) @@ -19035,16 +19037,16 @@ (pos-vol plane-volume 32 :inline :offset-assert 16) (neg-vol-count int32 :offset-assert 784) (neg-vol plane-volume 32 :inline :offset-assert 788) - (debug-point basic :offset-assert 1556) - (debug-normal basic :offset-assert 1560) + (debug-point vector-array :offset-assert 1556) + (debug-normal vector-array :offset-assert 1560) ) :method-count-assert 12 :size-assert #x61c :flag-assert #xc0000061c (:methods (new (symbol type process-drawable) _type_ 0) - (dummy-9 (_type_) none 9) - (dummy-10 (_type_ vector) none 10) + (dummy-9 (_type_) symbol 9) + (dummy-10 (_type_ vector) symbol 10) (TODO-RENAME-11 (_type_) symbol 11) ) ) @@ -20572,7 +20574,7 @@ ;; - Functions -(define-extern plane-volume-intersect-dist function) +(define-extern plane-volume-intersect-dist (function vector vector vector float)) ;; ---------------------- @@ -32834,7 +32836,8 @@ ) (deftype sunkencam (pov-camera) - ((seq uint64 :offset-assert 224) + ((ppointer-override (pointer sunkencam) :score 100 :offset 24) + (seq uint64 :offset-assert 224) ) :method-count-assert 30 :size-assert #xe8 @@ -33665,13 +33668,17 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:states + helix-slide-door-idle-open + helix-slide-door-idle-closed + helix-slide-door-close) ) (deftype helix-button (process-drawable) ((root-override collide-shape-moving :score 100 :offset 112) (my-water entity-actor :offset-assert 176) (my-door entity-actor :offset-assert 180) - (fcell-handle uint64 :offset-assert 184) + (fcell-handle handle :offset-assert 184) (down-y float :offset-assert 192) (spawn-trans vector :inline :offset-assert 208) ) @@ -33679,6 +33686,12 @@ :size-assert #xe0 :heap-base #x70 :flag-assert #x14007000e0 + (:states + helix-button-startup + helix-button-idle-down + helix-button-quick-activate + helix-button-activate + helix-button-idle-up) ) (deftype helix-dark-eco (dark-eco-pool) @@ -33695,35 +33708,28 @@ (transv-y float :offset-assert 184) (start-y float :offset-assert 188) (end-y float :offset-assert 192) - (dark-eco uint32 :offset-assert 196) + (dark-eco (pointer helix-dark-eco) :offset-assert 196) ) :method-count-assert 22 :size-assert #xc8 :heap-base #x60 :flag-assert #x16006000c8 (:methods - (dummy-20 () none 20) - (dummy-21 () none 21) + (dummy-20 (_type_) none 20) + (dummy-21 (_type_) object 21) ) + (:states + helix-water-idle + helix-water-activated) ) ;; - Unknowns (define-extern *helix-water* helix-water) ;; unknown type -(define-extern helix-water-idle (state helix-water)) ;; unknown type -(define-extern helix-water-activated (state helix-water)) ;; unknown type (define-extern *helix-button-sg* skeleton-group) (define-extern *helix-button* helix-button) ;; unknown type -(define-extern helix-button-startup (state helix-button)) ;; unknown type -(define-extern helix-button-idle-down (state helix-button)) ;; unknown type -(define-extern helix-button-quick-activate (state helix-button)) ;; unknown type -(define-extern helix-button-activate (state helix-button)) ;; unknown type -(define-extern helix-button-idle-up (state helix-button)) ;; unknown type (define-extern *helix-slide-door-sg* skeleton-group) (define-extern *helix-slide-door* helix-slide-door) ;; unknown type -(define-extern helix-slide-door-idle-open (state helix-slide-door)) ;; unknown type -(define-extern helix-slide-door-idle-closed (state helix-slide-door)) ;; unknown type -(define-extern helix-slide-door-close (state helix-slide-door)) ;; unknown type ;; ---------------------- @@ -34849,8 +34855,9 @@ ;; - Types (deftype minecartsteel (process-drawable) - ((index int32 :offset-assert 176) - (anim basic :offset-assert 180) + ((root-override collide-shape-moving :score 100 :offset 112) + (index int32 :offset-assert 176) + (anim spool-anim :offset-assert 180) (sync sync-info :inline :offset-assert 184) ) :method-count-assert 21 @@ -34863,7 +34870,7 @@ ;; - Functions -(define-extern minecartsteel-initialize-by-other function) +(define-extern minecartsteel-initialize-by-other (function entity-actor float object :behavior minecartsteel)) ;; - Unknowns diff --git a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc index f8415dcad8..73f59c40ea 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -2822,7 +2822,10 @@ "(method 27 sunkenfisha)": [[64, "vector"]], - "(event idle minecartsteel)": [[16, "collide-overlap-result"]], + "(event idle minecartsteel)": [ + [16, "collide-overlap-result"], + [128, "event-message-block"] + ], "(method 43 assistant-villagec)": [[16, "vector"]], @@ -5895,5 +5898,47 @@ [48, "vector"] ], + "(method 9 plane-volume)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "vector"], + [96, "vector"], + [112, "vector"], + [128, "vector"] + ], + + "(code helix-button-activate)": [ + [16, "event-message-block"], + [96, "vector"], + [112, "vector"] + ], + + "(code helix-button-quick-activate)": [ + [16, "event-message-block"], + [96, "vector"] + ], + + "(method 21 helix-water)": [ + [16, "event-message-block"] + ], + + "(code helix-water-idle)": [ + [16, "event-message-block"] + ], + + "(trans helix-water-activated)": [ + [16, "event-message-block"] + ], + + "(code helix-water-activated)": [ + [16, "event-message-block"] + ], + + "(code idle minecartsteel)": [ + [16, "vector"] + ], + "placeholder-do-not-add-below!": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 9084f44a8e..6c9e1a461a 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -3480,7 +3480,9 @@ "(code helix-slide-door-close)": [[10, "v1", "art-joint-anim"]], - "(code helix-button-startup)": [[39, "v1", "process-drawable"]], + "(code helix-button-startup)": [ + [39, "v1", "collectable"] + ], "(method 73 green-eco-lurker)": [[6, "a1", "touching-shapes-entry"]], @@ -7018,5 +7020,25 @@ [179, "s3", "collide-shape-prim-group"] ], + "(method 11 plane-volume)": [ + [14, "f2", "float"] + ], + + "(method 9 plane-volume)": [ + [245, "f2", "float"] + ], + + "(method 21 helix-water)": [ + [27, "a0", "process-drawable"] + ], + + "(method 7 helix-water)": [ + [14, "t9", "(function process-drawable int process-drawable)"] + ], + + "(code helix-button-activate)": [ + [37, "v0", "sunkencam"] + ], + "placeholder-do-not-add-below": [] } diff --git a/goal_src/engine/camera/cam-layout.gc b/goal_src/engine/camera/cam-layout.gc index 9cd3b60f01..31dbdd5c22 100644 --- a/goal_src/engine/camera/cam-layout.gc +++ b/goal_src/engine/camera/cam-layout.gc @@ -27,17 +27,15 @@ ) -(define - *CAM_LAYOUT-bank* - (new 'static 'cam-layout-bank - :spline-t 0.01 - :spline-step 0.0016666667 - :intro-t 0.01 - :intro-step 0.0016666667 - :debug-t 0.01 - :debug-step 0.0033333334 - ) - ) +(define *CAM_LAYOUT-bank* (new 'static 'cam-layout-bank + :spline-t 0.01 + :spline-step 0.0016666667 + :intro-t 0.01 + :intro-step 0.0016666667 + :debug-t 0.01 + :debug-step 0.0033333334 + ) + ) (define *camera-layout-message-ypos* 30) @@ -133,10 +131,7 @@ (define *volume-descriptor-current* 0) -(define - *volume-descriptor* - (the-as vol-control (new 'debug 'volume-descriptor-array 100)) - ) +(define *volume-descriptor* (the-as vol-control (new 'debug 'volume-descriptor-array 100))) (deftype cam-layout (process) ((cam-entity entity-camera :offset-assert 112) @@ -159,44 +154,34 @@ (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) (gp-0 (-> s5-0 base)) ) - (draw-string-xy - arg2 - s5-0 - arg0 - arg1 - (font-color white) - (font-flags shadow kerning) - ) - (let ((a3-4 (-> s5-0 base))) - (let ((v1-4 (the-as object (-> s5-0 base)))) - (set! - (-> (the-as dma-packet v1-4) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) + (draw-string-xy arg2 s5-0 arg0 arg1 (font-color white) (font-flags shadow kerning)) + (let ((a3-4 (-> s5-0 base))) + (let ((v1-4 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-4) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-4) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-4) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-4) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-4) + ) ) - (set! (-> (the-as dma-packet v1-4) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-4) vif1) (new 'static 'vif-tag)) - (set! (-> s5-0 base) (&+ (the-as pointer v1-4) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-0 - (the-as (pointer dma-tag) a3-4) - ) ) - ) ) (defun cam-layout-intersect-dist ((arg0 vector) (arg1 vector) (arg2 vector)) (let ((f0-1 (vector-dot arg1 arg0)) (f1-1 (vector-dot arg2 arg0)) ) - (the-as float (if (< 0.00001 (fabs f1-1)) - (/ (- (-> arg0 w) f0-1) f1-1) - 409600000.0 - ) + (the-as float (if (< 0.00001 (fabs f1-1)) + (/ (- (-> arg0 w) f0-1) f1-1) + 409600000.0 + ) + ) ) - ) ) ;; WARN: Stack slot offset 164 signed mismatch @@ -210,275 +195,228 @@ ;; WARN: Stack slot offset 164 signed mismatch ;; WARN: Stack slot offset 164 signed mismatch ;; WARN: Stack slot offset 164 signed mismatch -(defbehavior - cam-layout-entity-volume-info-create cam-layout - ((arg0 entity-camera) (arg1 symbol)) +(defbehavior cam-layout-entity-volume-info-create cam-layout ((arg0 entity-camera) (arg1 symbol)) (local-vars - (sv-16 res-tag) - (sv-160 vector) - (sv-164 float) - (sv-168 int) - (sv-176 vector) - (sv-192 vector) - (sv-208 vector) - (sv-224 vector) - (sv-240 vector) - (sv-256 int) - (sv-272 int) - (sv-288 int) - ) - (let ((s4-0 0)) - (while #t - (set! sv-16 (new 'static 'res-tag)) - (let - ((s3-0 - (the-as - (inline-array vector) - ((method-of-type res-lump get-property-data) - arg0 - arg1 - 'exact - (the float s4-0) - (the-as pointer #f) - (& sv-16) - *res-static-buf* - ) - ) - ) - ) - (cond - (s3-0 - (when (>= *volume-descriptor-current* 100) - (format 0 "ERROR : camera editing out of volume descriptors~%") - (return #f) - ) - (let - ((s2-0 (-> *volume-descriptor* pos-vol *volume-descriptor-current*))) - (set! (-> s2-0 volume-type) arg1) - (set! (-> s2-0 point-count) 0) - (set! - (-> s2-0 first-point) - (-> *volume-point* data *volume-point-current*) - ) - (set! (-> s2-0 normal-count) 0) - (set! - (-> s2-0 first-normal) - (-> *volume-normal* data *volume-normal-current*) - ) - (set! *volume-descriptor-current* (+ *volume-descriptor-current* 1)) - (+! (-> self num-volumes) 1) - (dotimes (s1-0 (the-as int (-> sv-16 elt-count))) - (set! sv-192 (new 'stack-no-clear 'vector)) - (set! (-> sv-192 quad) (the-as uint128 0)) - (set! sv-208 (new 'stack-no-clear 'vector)) - (set! (-> sv-208 quad) (the-as uint128 0)) - (set! sv-224 (new 'stack-no-clear 'vector)) - (set! (-> sv-224 quad) (the-as uint128 0)) - (set! sv-240 (new 'stack-no-clear 'vector)) - (set! (-> sv-240 quad) (the-as uint128 0)) - 0.0 - 0.0 - 0.0 - (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) - (let ((s0-0 (new-stack-vector0))) - (set! sv-256 0) - (set! sv-272 0) - (while (< sv-272 (the-as int (-> sv-16 elt-count))) - (when (!= s1-0 sv-272) - (vector-float*! sv-192 (-> s3-0 sv-272) (-> s3-0 sv-272 w)) - (vector-cross! sv-208 (-> s3-0 sv-272) (-> s3-0 s1-0)) - (vector-normalize! sv-208 (-> (new 'static 'array float 1 1.0) 0)) - (vector-cross! sv-224 sv-208 (-> s3-0 sv-272)) - (vector-normalize! sv-224 (-> (new 'static 'array float 1 1.0) 0)) - (let - ((f0-6 (cam-layout-intersect-dist (-> s3-0 s1-0) sv-192 sv-224))) - (when (!= f0-6 409600000.0) - (vector+float*! sv-240 sv-192 sv-224 f0-6) - (set! sv-160 (new-stack-vector0)) - (set! sv-164 0.0) - (set! sv-168 0) - (set! sv-176 (new-stack-vector0)) - (set! (-> sv-160 quad) (-> sv-240 quad)) - (set! sv-288 0) - (while (< sv-288 (the-as int (-> sv-16 elt-count))) - (when (and (!= sv-288 s1-0) (!= sv-288 sv-272)) - (let - ((f30-0 - (cam-layout-intersect-dist (-> s3-0 sv-288) sv-160 sv-208) - ) - ) - (cond - ((= f30-0 409600000.0) - ) - ((zero? sv-168) - (vector+float*! sv-160 sv-160 sv-208 f30-0) - (set! (-> sv-176 quad) (-> s3-0 sv-288 quad)) - (set! sv-164 8192000.0) - (set! sv-168 1) - ) - ((begin - (vector-float*! sv-240 sv-208 f30-0) - (>= (vector-dot sv-240 sv-176) 0.0) - ) - ) - ((>= (vector-dot sv-240 (-> s3-0 sv-288)) 0.0) - (when (< (fabs f30-0) (fabs sv-164)) - (set! sv-164 f30-0) - (set! sv-168 (+ sv-168 1)) - ) - ) - (else - (vector+float*! sv-160 sv-160 sv-208 f30-0) - (set! (-> sv-176 quad) (-> s3-0 sv-288 quad)) - (set! sv-168 (+ sv-168 1)) - (if (< (fabs f30-0) (fabs sv-164)) - (set! sv-164 (- sv-164 f30-0)) - (set! sv-164 0.0) - ) - ) - ) - ) - ) - (set! sv-288 (+ sv-288 1)) - ) - (cond - ((zero? sv-168) - ) - ((= sv-164 0.0) - ) - (else - (dotimes (v1-87 (the-as int (-> sv-16 elt-count))) - (when (and (!= v1-87 s1-0) (!= v1-87 sv-272)) - (if - (< - (-> (new 'static 'array float 1 4096.0) 0) - (- (vector-dot sv-160 (-> s3-0 v1-87)) (-> s3-0 v1-87 w)) - ) - (goto cfg-47) - ) - ) - ) - (vector+float*! sv-240 sv-160 sv-208 sv-164) - (cond - ((>= *volume-point-current* 999) - (format - 0 - "ERROR : camera editing out of volume points~%" - ) - ) - (else - (set! - (-> *volume-point* data *volume-point-current* quad) - (-> sv-160 quad) - ) - (set! - (-> *volume-point* data (+ *volume-point-current* 1) quad) - (-> sv-240 quad) - ) - (set! *volume-point-current* (+ *volume-point-current* 2)) - (+! (-> s2-0 point-count) 2) - ) - ) - (vector+! s0-0 s0-0 sv-160) - (vector+! s0-0 s0-0 sv-240) - (set! sv-256 (+ sv-256 2)) - sv-256 - ) - ) - ) - ) - ) - (label cfg-47) - (set! sv-272 (+ sv-272 1)) - ) - (when (nonzero? sv-256) - (vector-float*! - s0-0 - s0-0 - (/ (-> (new 'static 'array float 1 1.0) 0) (the float sv-256)) - ) - (cond - ((>= *volume-normal-current* 599) - (format 0 "ERROR : camera editing out of volume normals~%") - ) - (else - (set! - (-> *volume-normal* data *volume-normal-current* quad) - (-> s0-0 quad) - ) - (set! - (-> *volume-normal* data (+ *volume-normal-current* 1) quad) - (-> s3-0 s1-0 quad) - ) - (set! *volume-normal-current* (+ *volume-normal-current* 2)) - (let ((v1-132 (+ (-> s2-0 normal-count) 2))) - (set! (-> s2-0 normal-count) v1-132) - v1-132 - ) - ) - ) - ) - ) - ) - ) - ) - (else - (return #f) - ) - ) - ) - (+! s4-0 1) + (sv-16 res-tag) + (sv-160 vector) + (sv-164 float) + (sv-168 int) + (sv-176 vector) + (sv-192 vector) + (sv-208 vector) + (sv-224 vector) + (sv-240 vector) + (sv-256 int) + (sv-272 int) + (sv-288 int) + ) + (let ((s4-0 0)) + (while #t + (set! sv-16 (new 'static 'res-tag)) + (let ((s3-0 (the-as (inline-array vector) ((method-of-type res-lump get-property-data) + arg0 + arg1 + 'exact + (the float s4-0) + (the-as pointer #f) + (& sv-16) + *res-static-buf* + ) + ) + ) + ) + (cond + (s3-0 + (when (>= *volume-descriptor-current* 100) + (format 0 "ERROR : camera editing out of volume descriptors~%") + (return #f) + ) + (let ((s2-0 (-> *volume-descriptor* pos-vol *volume-descriptor-current*))) + (set! (-> s2-0 volume-type) arg1) + (set! (-> s2-0 point-count) 0) + (set! (-> s2-0 first-point) (the-as (pointer vector) (-> *volume-point* data *volume-point-current*))) + (set! (-> s2-0 normal-count) 0) + (set! (-> s2-0 first-normal) (the-as (pointer vector) (-> *volume-normal* data *volume-normal-current*))) + (set! *volume-descriptor-current* (+ *volume-descriptor-current* 1)) + (+! (-> self num-volumes) 1) + (dotimes (s1-0 (the-as int (-> sv-16 elt-count))) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! (-> sv-192 quad) (the-as uint128 0)) + (set! sv-208 (new 'stack-no-clear 'vector)) + (set! (-> sv-208 quad) (the-as uint128 0)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (set! (-> sv-224 quad) (the-as uint128 0)) + (set! sv-240 (new 'stack-no-clear 'vector)) + (set! (-> sv-240 quad) (the-as uint128 0)) + 0.0 + 0.0 + 0.0 + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s0-0 (new-stack-vector0))) + (set! sv-256 0) + (set! sv-272 0) + (while (< sv-272 (the-as int (-> sv-16 elt-count))) + (when (!= s1-0 sv-272) + (vector-float*! sv-192 (-> s3-0 sv-272) (-> s3-0 sv-272 w)) + (vector-cross! sv-208 (-> s3-0 sv-272) (-> s3-0 s1-0)) + (vector-normalize! sv-208 (-> (new 'static 'array float 1 1.0) 0)) + (vector-cross! sv-224 sv-208 (-> s3-0 sv-272)) + (vector-normalize! sv-224 (-> (new 'static 'array float 1 1.0) 0)) + (let ((f0-6 (cam-layout-intersect-dist (-> s3-0 s1-0) sv-192 sv-224))) + (when (!= f0-6 409600000.0) + (vector+float*! sv-240 sv-192 sv-224 f0-6) + (set! sv-160 (new-stack-vector0)) + (set! sv-164 0.0) + (set! sv-168 0) + (set! sv-176 (new-stack-vector0)) + (set! (-> sv-160 quad) (-> sv-240 quad)) + (set! sv-288 0) + (while (< sv-288 (the-as int (-> sv-16 elt-count))) + (when (and (!= sv-288 s1-0) (!= sv-288 sv-272)) + (let ((f30-0 (cam-layout-intersect-dist (-> s3-0 sv-288) sv-160 sv-208))) + (cond + ((= f30-0 409600000.0) + ) + ((zero? sv-168) + (vector+float*! sv-160 sv-160 sv-208 f30-0) + (set! (-> sv-176 quad) (-> s3-0 sv-288 quad)) + (set! sv-164 8192000.0) + (set! sv-168 1) + ) + ((begin (vector-float*! sv-240 sv-208 f30-0) (>= (vector-dot sv-240 sv-176) 0.0)) + ) + ((>= (vector-dot sv-240 (-> s3-0 sv-288)) 0.0) + (when (< (fabs f30-0) (fabs sv-164)) + (set! sv-164 f30-0) + (set! sv-168 (+ sv-168 1)) + ) + ) + (else + (vector+float*! sv-160 sv-160 sv-208 f30-0) + (set! (-> sv-176 quad) (-> s3-0 sv-288 quad)) + (set! sv-168 (+ sv-168 1)) + (if (< (fabs f30-0) (fabs sv-164)) + (set! sv-164 (- sv-164 f30-0)) + (set! sv-164 0.0) + ) + ) + ) + ) + ) + (set! sv-288 (+ sv-288 1)) + ) + (cond + ((zero? sv-168) + ) + ((= sv-164 0.0) + ) + (else + (dotimes (v1-87 (the-as int (-> sv-16 elt-count))) + (when (and (!= v1-87 s1-0) (!= v1-87 sv-272)) + (if (< (-> (new 'static 'array float 1 4096.0) 0) (- (vector-dot sv-160 (-> s3-0 v1-87)) (-> s3-0 v1-87 w))) + (goto cfg-47) + ) + ) + ) + (vector+float*! sv-240 sv-160 sv-208 sv-164) + (cond + ((>= *volume-point-current* 999) + (format 0 "ERROR : camera editing out of volume points~%") + ) + (else + (set! (-> *volume-point* data *volume-point-current* quad) (-> sv-160 quad)) + (set! (-> *volume-point* data (+ *volume-point-current* 1) quad) (-> sv-240 quad)) + (set! *volume-point-current* (+ *volume-point-current* 2)) + (+! (-> s2-0 point-count) 2) + ) + ) + (vector+! s0-0 s0-0 sv-160) + (vector+! s0-0 s0-0 sv-240) + (set! sv-256 (+ sv-256 2)) + sv-256 + ) + ) + ) + ) + ) + (label cfg-47) + (set! sv-272 (+ sv-272 1)) + ) + (when (nonzero? sv-256) + (vector-float*! s0-0 s0-0 (/ (-> (new 'static 'array float 1 1.0) 0) (the float sv-256))) + (cond + ((>= *volume-normal-current* 599) + (format 0 "ERROR : camera editing out of volume normals~%") + ) + (else + (set! (-> *volume-normal* data *volume-normal-current* quad) (-> s0-0 quad)) + (set! (-> *volume-normal* data (+ *volume-normal-current* 1) quad) (-> s3-0 s1-0 quad)) + (set! *volume-normal-current* (+ *volume-normal-current* 2)) + (let ((v1-132 (+ (-> s2-0 normal-count) 2))) + (set! (-> s2-0 normal-count) v1-132) + v1-132 + ) + ) + ) + ) + ) + ) + ) + ) + (else + (return #f) + ) + ) + ) + (+! s4-0 1) + ) ) - ) (the-as symbol #f) ) (defbehavior cam-layout-entity-volume-info cam-layout () (dotimes (gp-0 (-> self num-volumes)) - (cond - ((and - (= gp-0 (-> self cur-volume)) - (= *camera-layout-blink* 'volume) - (zero? (logand (-> *display* real-actual-frame-counter) 8)) - ) - ) - (else - (let ((s5-0 (-> *volume-descriptor* pos-vol gp-0))) - (let ((a0-7 (new 'static 'vector4w :w #x80))) - (cond - ((= (-> s5-0 volume-type) 'vol) - (set! (-> a0-7 x) 0) - (set! (-> a0-7 y) 192) - (set! (-> a0-7 z) 0) - 0 + (cond + ((and + (= gp-0 (-> self cur-volume)) + (= *camera-layout-blink* 'volume) + (zero? (logand (-> *display* real-actual-frame-counter) 8)) ) - ((= (-> s5-0 volume-type) 'pvol) - (set! (-> a0-7 x) 128) - (set! (-> a0-7 y) 128) - (set! (-> a0-7 z) 128) - ) - ((= (-> s5-0 volume-type) 'cutoutvol) - (set! (-> a0-7 x) 192) - (set! (-> a0-7 y) 0) - (set! (-> a0-7 z) 0) - 0 - ) - ) - (camera-line-setup a0-7) ) - (let ((s4-0 (the-as object (-> s5-0 first-point)))) - (dotimes (s3-0 (/ (-> s5-0 point-count) 2)) - (camera-line-draw (the-as vector s4-0) (&+ (the-as vector s4-0) 16)) - (set! - s4-0 - (&-> (the-as (inline-array plane-volume) s4-0) 1 first-point) - ) + (else + (let ((s5-0 (-> *volume-descriptor* pos-vol gp-0))) + (let ((a0-7 (new 'static 'vector4w :w #x80))) + (cond + ((= (-> s5-0 volume-type) 'vol) + (set! (-> a0-7 x) 0) + (set! (-> a0-7 y) 192) + (set! (-> a0-7 z) 0) + 0 + ) + ((= (-> s5-0 volume-type) 'pvol) + (set! (-> a0-7 x) 128) + (set! (-> a0-7 y) 128) + (set! (-> a0-7 z) 128) + ) + ((= (-> s5-0 volume-type) 'cutoutvol) + (set! (-> a0-7 x) 192) + (set! (-> a0-7 y) 0) + (set! (-> a0-7 z) 0) + 0 + ) + ) + (camera-line-setup a0-7) + ) + (let ((s4-0 (the-as object (-> s5-0 first-point)))) + (dotimes (s3-0 (/ (-> s5-0 point-count) 2)) + (camera-line-draw (the-as vector s4-0) (&+ (the-as vector s4-0) 16)) + (set! s4-0 (&-> (the-as (inline-array plane-volume) s4-0) 1 first-point)) + ) + ) + ) ) - ) ) - ) ) - ) #f ) @@ -487,38 +425,28 @@ (s1-0 (new-stack-vector0)) (s0-0 (new-stack-vector0)) ) - 0.0 - 0.0 - 0.0 - 0.0 - (cond - ((< (-> (new 'static 'array float 1 1.0) 0) arg3) - (set! - arg3 - (-> (the-as (pointer float) (new 'static 'array float 1 1.0)) 0) + 0.0 + 0.0 + 0.0 + 0.0 + (cond + ((< (-> (new 'static 'array float 1 1.0) 0) arg3) + (set! arg3 (-> (the-as (pointer float) (new 'static 'array float 1 1.0)) 0)) + ) + ((< arg3 0.0) + (set! arg3 (-> (the-as (pointer float) (new 'static 'array float 1 0.0)) 0)) + ) ) - ) - ((< arg3 0.0) - (set! - arg3 - (-> (the-as (pointer float) (new 'static 'array float 1 0.0)) 0) + (vector-normalize-copy! s2-0 arg1 (-> (new 'static 'array float 1 1.0) 0)) + (vector-normalize-copy! s1-0 arg2 (-> (new 'static 'array float 1 1.0) 0)) + (vector-cross! s0-0 s2-0 s1-0) + (let* ((f30-0 (vector-length s0-0)) + (f28-0 (asin f30-0)) + ) + (vector-float*! arg0 arg1 (/ (sin (* (- (-> (new 'static 'array float 1 1.0) 0) arg3) f28-0)) f30-0)) + (vector+float*! arg0 arg0 arg2 (/ (sin (* arg3 f28-0)) f30-0)) ) - ) ) - (vector-normalize-copy! s2-0 arg1 (-> (new 'static 'array float 1 1.0) 0)) - (vector-normalize-copy! s1-0 arg2 (-> (new 'static 'array float 1 1.0) 0)) - (vector-cross! s0-0 s2-0 s1-0) - (let* ((f30-0 (vector-length s0-0)) - (f28-0 (asin f30-0)) - ) - (vector-float*! - arg0 - arg1 - (/ (sin (* (- (-> (new 'static 'array float 1 1.0) 0) arg3) f28-0)) f30-0) - ) - (vector+float*! arg0 arg0 arg2 (/ (sin (* arg3 f28-0)) f30-0)) - ) - ) ) (deftype interp-test-info (structure) @@ -535,502 +463,350 @@ ) -(defun - interp-test - ((arg0 (function vector vector vector float vector float none)) - (arg1 interp-test-info) - ) +(defun interp-test ((arg0 (function vector vector vector float vector float none)) (arg1 interp-test-info)) (let ((s3-0 (new-stack-vector0)) (gp-0 (new-stack-vector0)) ) - (arg0 - s3-0 - (-> arg1 from) - (-> arg1 to) - (-> (new 'static 'array float 1 0.0) 0) - (-> arg1 axis) - (-> (new 'static 'array float 1 65536.0) 0) - ) - (vector+! s3-0 s3-0 (-> arg1 origin)) - (dotimes (s2-0 10) - (set! (-> gp-0 quad) (-> s3-0 quad)) (arg0 - s3-0 - (-> arg1 from) - (-> arg1 to) - (* 0.1 (+ (-> (new 'static 'array float 1 1.0) 0) (the float s2-0))) - (-> arg1 axis) - (-> (new 'static 'array float 1 65536.0) 0) - ) + s3-0 + (-> arg1 from) + (-> arg1 to) + (-> (new 'static 'array float 1 0.0) 0) + (-> arg1 axis) + (-> (new 'static 'array float 1 65536.0) 0) + ) (vector+! s3-0 s3-0 (-> arg1 origin)) - (camera-line s3-0 gp-0 (-> arg1 color)) + (dotimes (s2-0 10) + (set! (-> gp-0 quad) (-> s3-0 quad)) + (arg0 + s3-0 + (-> arg1 from) + (-> arg1 to) + (* 0.1 (+ (-> (new 'static 'array float 1 1.0) 0) (the float s2-0))) + (-> arg1 axis) + (-> (new 'static 'array float 1 65536.0) 0) + ) + (vector+! s3-0 s3-0 (-> arg1 origin)) + (camera-line s3-0 gp-0 (-> arg1 color)) + ) + (arg0 + gp-0 + (-> arg1 from) + (-> arg1 to) + (-> *CAM_LAYOUT-bank* debug-t) + (-> arg1 axis) + (-> (new 'static 'array float 1 65536.0) 0) + ) + (format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0)) + (vector+! gp-0 gp-0 (-> arg1 origin)) + (camera-line (-> arg1 origin) gp-0 (-> arg1 color)) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + gp-0 + (-> arg1 color) + (-> (new 'static 'array float 1 4096.0) 0) + ) ) - (arg0 - gp-0 - (-> arg1 from) - (-> arg1 to) - (-> *CAM_LAYOUT-bank* debug-t) - (-> arg1 axis) - (-> (new 'static 'array float 1 65536.0) 0) - ) - (format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0)) - (vector+! gp-0 gp-0 (-> arg1 origin)) - (camera-line (-> arg1 origin) gp-0 (-> arg1 color)) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - gp-0 - (-> arg1 color) - (-> (new 'static 'array float 1 4096.0) 0) - ) - ) ) -(defun - interp-test-deg - ((arg0 (function vector vector vector vector float none)) - (arg1 interp-test-info) - ) +(defun interp-test-deg ((arg0 (function vector vector vector vector float none)) (arg1 interp-test-info)) (let ((s3-0 (new-stack-vector0)) (gp-0 (new-stack-vector0)) ) - (arg0 - s3-0 - (-> arg1 from) - (-> arg1 to) - (-> arg1 axis) - (-> (new 'static 'array float 1 0.0) 0) - ) - (vector+! s3-0 s3-0 (-> arg1 origin)) - (dotimes (s2-0 10) - (set! (-> gp-0 quad) (-> s3-0 quad)) - (arg0 - s3-0 - (-> arg1 from) - (-> arg1 to) - (-> arg1 axis) - (* - 182.04445 - (* 18.0 (+ (-> (new 'static 'array float 1 1.0) 0) (the float s2-0))) - ) - ) + (arg0 s3-0 (-> arg1 from) (-> arg1 to) (-> arg1 axis) (-> (new 'static 'array float 1 0.0) 0)) (vector+! s3-0 s3-0 (-> arg1 origin)) - (camera-line s3-0 gp-0 (-> arg1 color)) + (dotimes (s2-0 10) + (set! (-> gp-0 quad) (-> s3-0 quad)) + (arg0 + s3-0 + (-> arg1 from) + (-> arg1 to) + (-> arg1 axis) + (* 182.04445 (* 18.0 (+ (-> (new 'static 'array float 1 1.0) 0) (the float s2-0)))) + ) + (vector+! s3-0 s3-0 (-> arg1 origin)) + (camera-line s3-0 gp-0 (-> arg1 color)) + ) + (arg0 gp-0 (-> arg1 from) (-> arg1 to) (-> arg1 axis) (* 182.04445 (* 180.0 (-> *CAM_LAYOUT-bank* debug-t)))) + (format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0)) + (vector+! gp-0 gp-0 (-> arg1 origin)) + (camera-line (-> arg1 origin) gp-0 (-> arg1 color)) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + gp-0 + (-> arg1 color) + (-> (new 'static 'array float 1 4096.0) 0) + ) ) - (arg0 - gp-0 - (-> arg1 from) - (-> arg1 to) - (-> arg1 axis) - (* 182.04445 (* 180.0 (-> *CAM_LAYOUT-bank* debug-t))) - ) - (format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0)) - (vector+! gp-0 gp-0 (-> arg1 origin)) - (camera-line (-> arg1 origin) gp-0 (-> arg1 color)) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - gp-0 - (-> arg1 color) - (-> (new 'static 'array float 1 4096.0) 0) - ) - ) ) (defun cam-layout-entity-info ((arg0 entity-actor)) (if (not arg0) - (return #f) - ) + (return #f) + ) (let ((s5-0 (new-stack-matrix0)) (s4-0 (new-stack-vector0)) ) - (when - (and - (cam-slave-get-vector-with-offset arg0 s4-0 'trans) - (or - (!= *camera-layout-blink* 'camera) - (logtest? (-> *display* real-actual-frame-counter) 8) + (when (and + (cam-slave-get-vector-with-offset arg0 s4-0 'trans) + (or (!= *camera-layout-blink* 'camera) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (cam-slave-get-rot arg0 s5-0) + (camera-fov-frame + s5-0 + s4-0 + (* 0.5 (cam-slave-get-fov arg0)) + (-> (new 'static 'array float 1 0.75) 0) + (-> (new 'static 'array float 1 1.0) 0) + (new 'static 'vector4w :z #xff :w #x80) + ) ) - ) - (cam-slave-get-rot arg0 s5-0) - (camera-fov-frame - s5-0 - s4-0 - (* 0.5 (cam-slave-get-fov arg0)) - (-> (new 'static 'array float 1 0.75) 0) - (-> (new 'static 'array float 1 1.0) 0) - (new 'static 'vector4w :z #xff :w #x80) - ) ) - ) (let ((s5-1 (new-stack-vector0))) - (if - (and - (cam-slave-get-vector-with-offset arg0 s5-1 'pivot) - (or - (!= *camera-layout-blink* 'pivot) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - ) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-1 - (new 'static 'vector4w :x #x80 :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) + (if (and + (cam-slave-get-vector-with-offset arg0 s5-1 'pivot) + (or (!= *camera-layout-blink* 'pivot) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-1 + (new 'static 'vector4w :x #x80 :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) + ) ) - ) (let ((s5-2 (new-stack-vector0))) - (if - (and - (cam-slave-get-vector-with-offset arg0 s5-2 'align) - (or - (!= *camera-layout-blink* 'align) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - ) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-2 - (new 'static 'vector4w :y #x80 :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) + (if (and + (cam-slave-get-vector-with-offset arg0 s5-2 'align) + (or (!= *camera-layout-blink* 'align) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-2 + (new 'static 'vector4w :y #x80 :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) + ) ) - ) (let ((s5-3 (new-stack-vector0))) - (if - (and - (cam-slave-get-vector-with-offset arg0 s5-3 'interesting) - (or - (!= *camera-layout-blink* 'interesting) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - ) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-3 - (new 'static 'vector4w :x #x80 :z #x80 :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) + (if (and + (cam-slave-get-vector-with-offset arg0 s5-3 'interesting) + (or (!= *camera-layout-blink* 'interesting) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-3 + (new 'static 'vector4w :x #x80 :z #x80 :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) + ) ) - ) (let ((s3-1 (new 'stack 'curve)) (s2-0 (new-stack-vector0)) (s5-4 (new-stack-vector0)) (s4-1 (new-stack-vector0)) ) - (when - (and - (get-curve-data! - arg0 - s3-1 - 'campath - 'campath-k - (the-as float -1000000000.0) - ) - (or - (!= *camera-layout-blink* 'spline) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - ) - (cond - ((cam-slave-get-vector-with-offset arg0 s4-1 'pivot) - (curve-get-pos! s5-4 (-> (new 'static 'array float 1 0.0) 0) s3-1) - (vector-! s4-1 s4-1 s5-4) - ) - (else - (set! - (-> s4-1 quad) - (-> - (the-as - vector - ((method-of-type res-lump get-property-struct) - arg0 - 'spline-offset - 'interp - (the-as float -1000000000.0) - s4-1 - (the-as (pointer res-tag) #f) - *res-static-buf* - ) + (when (and + (get-curve-data! arg0 s3-1 'campath 'campath-k (the-as float -1000000000.0)) + (or (!= *camera-layout-blink* 'spline) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (cond + ((cam-slave-get-vector-with-offset arg0 s4-1 'pivot) + (curve-get-pos! s5-4 (-> (new 'static 'array float 1 0.0) 0) s3-1) + (vector-! s4-1 s4-1 s5-4) ) - quad + (else + (set! (-> s4-1 quad) + (-> (the-as + vector + ((method-of-type res-lump get-property-struct) + arg0 + 'spline-offset + 'interp + (the-as float -1000000000.0) + s4-1 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + quad + ) + ) + ) + ) + (curve-get-pos! s5-4 (-> (new 'static 'array float 1 0.0) 0) s3-1) + (vector+! s5-4 s5-4 s4-1) + (dotimes (s1-1 8) + (set! (-> s2-0 quad) (-> s5-4 quad)) + (curve-get-pos! s5-4 (* (-> (new 'static 'array float 1 0.125) 0) (the float (+ s1-1 1))) s3-1) + (vector+! s5-4 s5-4 s4-1) + (camera-line s2-0 s5-4 (new 'static 'vector4w :x #xff :y #xff :w #x80)) + ) + (curve-get-pos! s5-4 (-> *CAM_LAYOUT-bank* spline-t) s3-1) + (vector+! s5-4 s5-4 s4-1) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-4 + (new 'static 'vector4w :x #xff :y #xff :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) ) - ) ) - ) - (curve-get-pos! s5-4 (-> (new 'static 'array float 1 0.0) 0) s3-1) - (vector+! s5-4 s5-4 s4-1) - (dotimes (s1-1 8) - (set! (-> s2-0 quad) (-> s5-4 quad)) - (curve-get-pos! - s5-4 - (* (-> (new 'static 'array float 1 0.125) 0) (the float (+ s1-1 1))) - s3-1 - ) - (vector+! s5-4 s5-4 s4-1) - (camera-line s2-0 s5-4 (new 'static 'vector4w :x #xff :y #xff :w #x80)) - ) - (curve-get-pos! s5-4 (-> *CAM_LAYOUT-bank* spline-t) s3-1) - (vector+! s5-4 s5-4 s4-1) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-4 - (new 'static 'vector4w :x #xff :y #xff :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) ) - ) (let ((s3-2 (new 'stack 'curve)) (s2-1 (new-stack-vector0)) (s5-5 (new-stack-vector0)) (s4-2 (new-stack-vector0)) (s1-2 (new 'stack 'curve)) ) - (when - (and - (get-curve-data! arg0 s3-2 'intro 'intro-k (the-as float -1000000000.0)) - (or - (!= *camera-layout-blink* 'intro) - (logtest? (-> *display* real-actual-frame-counter) 8) + (when (and + (get-curve-data! arg0 s3-2 'intro 'intro-k (the-as float -1000000000.0)) + (or (!= *camera-layout-blink* 'intro) (logtest? (-> *display* real-actual-frame-counter) 8)) + ) + (cond + ((cam-slave-get-vector-with-offset arg0 s4-2 'pivot) + (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) + (vector-! s4-2 s4-2 s5-5) + ) + ((get-curve-data! arg0 s1-2 'campath 'campath-k (the-as float -1000000000.0)) + (curve-get-pos! s4-2 (-> (new 'static 'array float 1 0.0) 0) s1-2) + (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) + (vector-! s4-2 s4-2 s5-5) + ) + ((cam-slave-get-vector-with-offset arg0 s4-2 'trans) + (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) + (vector-! s4-2 s4-2 s5-5) + ) + ) + (curve-get-pos! s5-5 (-> (new 'static 'array float 1 0.0) 0) s3-2) + (vector+! s5-5 s5-5 s4-2) + (dotimes (s1-3 8) + (set! (-> s2-1 quad) (-> s5-5 quad)) + (curve-get-pos! s5-5 (* (-> (new 'static 'array float 1 0.125) 0) (the float (+ s1-3 1))) s3-2) + (vector+! s5-5 s5-5 s4-2) + (camera-line s2-1 s5-5 (new 'static 'vector4w :z #xff :w #x80)) + ) + (curve-get-pos! s5-5 (-> *CAM_LAYOUT-bank* intro-t) s3-2) + (vector+! s5-5 s5-5 s4-2) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-5 + (new 'static 'vector4w :z #xff :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) + (curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue (-> (new 'static 'array float 1 0.0) 0)) s3-2) + (vector+! s5-5 s5-5 s4-2) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-5 + (new 'static 'vector4w :z #xff :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) ) - ) - (cond - ((cam-slave-get-vector-with-offset arg0 s4-2 'pivot) - (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) - (vector-! s4-2 s4-2 s5-5) - ) - ((get-curve-data! - arg0 - s1-2 - 'campath - 'campath-k - (the-as float -1000000000.0) - ) - (curve-get-pos! s4-2 (-> (new 'static 'array float 1 0.0) 0) s1-2) - (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) - (vector-! s4-2 s4-2 s5-5) - ) - ((cam-slave-get-vector-with-offset arg0 s4-2 'trans) - (curve-get-pos! s5-5 (-> (new 'static 'array float 1 1.0) 0) s3-2) - (vector-! s4-2 s4-2 s5-5) - ) - ) - (curve-get-pos! s5-5 (-> (new 'static 'array float 1 0.0) 0) s3-2) - (vector+! s5-5 s5-5 s4-2) - (dotimes (s1-3 8) - (set! (-> s2-1 quad) (-> s5-5 quad)) - (curve-get-pos! - s5-5 - (* (-> (new 'static 'array float 1 0.125) 0) (the float (+ s1-3 1))) - s3-2 - ) - (vector+! s5-5 s5-5 s4-2) - (camera-line s2-1 s5-5 (new 'static 'vector4w :z #xff :w #x80)) - ) - (curve-get-pos! s5-5 (-> *CAM_LAYOUT-bank* intro-t) s3-2) - (vector+! s5-5 s5-5 s4-2) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-5 - (new 'static 'vector4w :z #xff :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) - (curve-get-pos! - s5-5 - (cam-slave-get-float - arg0 - 'intro-exitValue - (-> (new 'static 'array float 1 0.0) 0) - ) - s3-2 - ) - (vector+! s5-5 s5-5 s4-2) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-5 - (new 'static 'vector4w :z #xff :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) ) - ) - (let - ((s2-3 - (res-lump-data - arg0 - 'campoints - pointer - :time - (-> (new 'static 'array float 1 1.0) 0) + (let ((s2-3 (res-lump-data arg0 'campoints pointer :time (-> (new 'static 'array float 1 1.0) 0))) + (v1-95 (res-lump-struct arg0 'campoints-offset structure :time (the-as float -1000000000.0))) + (s4-3 (new 'stack-no-clear 'vector)) + (s3-3 (new 'stack-no-clear 'vector)) + (s5-6 (new 'static 'vector)) + ) + (when (and s2-3 (or (!= *camera-layout-blink* 'index) (logtest? (-> *display* real-actual-frame-counter) 8))) + (cond + (v1-95 + (vector+! s4-3 (the-as vector (&+ s2-3 0)) (the-as vector v1-95)) + (vector+! s3-3 (the-as vector (&+ s2-3 16)) (the-as vector v1-95)) + ) + (else + (set! (-> s4-3 quad) (-> (the-as (pointer uint128) (&+ s2-3 0)))) + (set! (-> s3-3 quad) (-> (the-as (pointer uint128) (&+ s2-3 16)))) + ) + ) + (camera-line s4-3 s3-3 (new 'static 'vector4w :y #x80 :w #x80)) + (vector-lerp-clamp! s5-6 s4-3 s3-3 (-> *CAM_LAYOUT-bank* spline-t)) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-6 + (new 'static 'vector4w :x #xff :y #xff :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) ) - ) - (v1-95 - (res-lump-struct - arg0 - 'campoints-offset - structure - :time - (the-as float -1000000000.0) - ) - ) - (s4-3 (new 'stack-no-clear 'vector)) - (s3-3 (new 'stack-no-clear 'vector)) - (s5-6 (new 'static 'vector)) ) - (when - (and - s2-3 - (or - (!= *camera-layout-blink* 'index) - (logtest? (-> *display* real-actual-frame-counter) 8) + (let ((s4-4 (res-lump-data arg0 'focalpull pointer :time (-> (new 'static 'array float 1 1.0) 0))) + (s5-7 (new 'static 'vector)) + ) + (when (and s4-4 (or (!= *camera-layout-blink* 'focalpull) (logtest? (-> *display* real-actual-frame-counter) 8))) + (camera-line + (the-as vector (&+ s4-4 0)) + (the-as vector (&+ s4-4 16)) + (new 'static 'vector4w :y #xff :z #xff :w #x80) + ) + (vector-lerp-clamp! + s5-7 + (the-as vector (&+ s4-4 0)) + (the-as vector (&+ s4-4 16)) + (-> *CAM_LAYOUT-bank* spline-t) + ) + (camera-cross + (new 'static 'vector :y 1024.0) + (new 'static 'vector :z 1024.0) + s5-7 + (new 'static 'vector4w :y #xff :z #xff :w #x80) + (-> (new 'static 'array float 1 4096.0) 0) + ) ) - ) - (cond - (v1-95 - (vector+! s4-3 (the-as vector (&+ s2-3 0)) (the-as vector v1-95)) - (vector+! s3-3 (the-as vector (&+ s2-3 16)) (the-as vector v1-95)) - ) - (else - (set! (-> s4-3 quad) (-> (the-as (pointer uint128) (&+ s2-3 0)))) - (set! (-> s3-3 quad) (-> (the-as (pointer uint128) (&+ s2-3 16)))) - ) - ) - (camera-line s4-3 s3-3 (new 'static 'vector4w :y #x80 :w #x80)) - (vector-lerp-clamp! s5-6 s4-3 s3-3 (-> *CAM_LAYOUT-bank* spline-t)) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-6 - (new 'static 'vector4w :x #xff :y #xff :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) ) - ) - (let - ((s4-4 - (res-lump-data - arg0 - 'focalpull - pointer - :time - (-> (new 'static 'array float 1 1.0) 0) - ) - ) - (s5-7 (new 'static 'vector)) - ) - (when - (and - s4-4 - (or - (!= *camera-layout-blink* 'focalpull) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - ) - (camera-line - (the-as vector (&+ s4-4 0)) - (the-as vector (&+ s4-4 16)) - (new 'static 'vector4w :y #xff :z #xff :w #x80) - ) - (vector-lerp-clamp! - s5-7 - (the-as vector (&+ s4-4 0)) - (the-as vector (&+ s4-4 16)) - (-> *CAM_LAYOUT-bank* spline-t) - ) - (camera-cross - (new 'static 'vector :y 1024.0) - (new 'static 'vector :z 1024.0) - s5-7 - (new 'static 'vector4w :y #xff :z #xff :w #x80) - (-> (new 'static 'array float 1 4096.0) 0) - ) - ) - ) (let ((s5-8 (new 'stack 'interp-test-info)) (s4-5 (new-stack-vector0)) ) - (when - (and - (cam-slave-get-vector-with-offset arg0 (-> s5-8 origin) 'pivot) - (cam-slave-get-vector-with-offset arg0 (-> s5-8 to) 'align) - (cam-slave-get-vector-with-offset arg0 (-> s5-8 from) 'trans) - ) - (camera-line - (-> s5-8 from) - (-> s5-8 origin) - (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) - ) - (camera-line - (-> s5-8 to) - (-> s5-8 origin) - (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) - ) - (vector-! (-> s5-8 from) (-> s5-8 from) (-> s5-8 origin)) - (vector-! (-> s5-8 to) (-> s5-8 to) (-> s5-8 origin)) - (vector-cross! s4-5 (-> s5-8 from) (-> s5-8 to)) - (vector-normalize! s4-5 (-> (new 'static 'array float 1 8192.0) 0)) - (vector+! s4-5 s4-5 (-> s5-8 origin)) - (camera-line - (-> s5-8 origin) - s4-5 - (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) - ) - (when (not (paused?)) - (+! (-> *CAM_LAYOUT-bank* debug-t) (-> *CAM_LAYOUT-bank* debug-step)) - (if - (< (-> (new 'static 'array float 1 1.0) 0) (-> *CAM_LAYOUT-bank* debug-t)) - (set! (-> *CAM_LAYOUT-bank* debug-t) 0.0) + (when (and + (cam-slave-get-vector-with-offset arg0 (-> s5-8 origin) 'pivot) + (cam-slave-get-vector-with-offset arg0 (-> s5-8 to) 'align) + (cam-slave-get-vector-with-offset arg0 (-> s5-8 from) 'trans) + ) + (camera-line (-> s5-8 from) (-> s5-8 origin) (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)) + (camera-line (-> s5-8 to) (-> s5-8 origin) (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)) + (vector-! (-> s5-8 from) (-> s5-8 from) (-> s5-8 origin)) + (vector-! (-> s5-8 to) (-> s5-8 to) (-> s5-8 origin)) + (vector-cross! s4-5 (-> s5-8 from) (-> s5-8 to)) + (vector-normalize! s4-5 (-> (new 'static 'array float 1 8192.0) 0)) + (vector+! s4-5 s4-5 (-> s5-8 origin)) + (camera-line (-> s5-8 origin) s4-5 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)) + (when (not (paused?)) + (+! (-> *CAM_LAYOUT-bank* debug-t) (-> *CAM_LAYOUT-bank* debug-step)) + (if (< (-> (new 'static 'array float 1 1.0) 0) (-> *CAM_LAYOUT-bank* debug-t)) + (set! (-> *CAM_LAYOUT-bank* debug-t) 0.0) + ) + ) + (set! (-> s5-8 axis) #f) + (set! (-> s5-8 disp) "li") + (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :w #x80)) + (interp-test (the-as (function vector vector vector float vector float none) vector-lerp!) s5-8) + (set! (-> s5-8 disp) "si") + (set! (-> s5-8 color) (new 'static 'vector4w :y #xff :w #x80)) + (interp-test (the-as (function vector vector vector float vector float none) v-slrp!) s5-8) + (set! (-> s5-8 disp) "si2") + (set! (-> s5-8 color) (new 'static 'vector4w :z #xff :w #x80)) + (interp-test (the-as (function vector vector vector float vector float none) v-slrp2!) s5-8) + (set! (-> s5-8 disp) "si3") + (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :z #xff :w #x80)) + (interp-test-deg (the-as (function vector vector vector vector float none) v-slrp3!) s5-8) + (set! (-> s5-8 axis) (-> *camera* local-down)) + (set! (-> s5-8 disp) "si2d") + (set! (-> s5-8 color) (new 'static 'vector4w :y #xff :z #xff :w #x80)) + (interp-test (the-as (function vector vector vector float vector float none) v-slrp2!) s5-8) + (set! (-> s5-8 disp) "si3d") + (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :y #xff :w #x80)) + (interp-test-deg (the-as (function vector vector vector vector float none) v-slrp3!) s5-8) ) - ) - (set! (-> s5-8 axis) #f) - (set! (-> s5-8 disp) "li") - (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :w #x80)) - (interp-test - (the-as - (function vector vector vector float vector float none) - vector-lerp! - ) - s5-8 - ) - (set! (-> s5-8 disp) "si") - (set! (-> s5-8 color) (new 'static 'vector4w :y #xff :w #x80)) - (interp-test - (the-as (function vector vector vector float vector float none) v-slrp!) - s5-8 - ) - (set! (-> s5-8 disp) "si2") - (set! (-> s5-8 color) (new 'static 'vector4w :z #xff :w #x80)) - (interp-test - (the-as (function vector vector vector float vector float none) v-slrp2!) - s5-8 - ) - (set! (-> s5-8 disp) "si3") - (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :z #xff :w #x80)) - (interp-test-deg - (the-as (function vector vector vector vector float none) v-slrp3!) - s5-8 - ) - (set! (-> s5-8 axis) (-> *camera* local-down)) - (set! (-> s5-8 disp) "si2d") - (set! (-> s5-8 color) (new 'static 'vector4w :y #xff :z #xff :w #x80)) - (interp-test - (the-as (function vector vector vector float vector float none) v-slrp2!) - s5-8 - ) - (set! (-> s5-8 disp) "si3d") - (set! (-> s5-8 color) (new 'static 'vector4w :x #xff :y #xff :w #x80)) - (interp-test-deg - (the-as (function vector vector vector vector float none) v-slrp3!) - s5-8 - ) ) - ) ) (defun clmf-button-test () @@ -1048,11 +824,7 @@ ) (defun clmf-implement () - (cam-layout-print - 16 - *camera-layout-message-ypos* - "button not implemented yet" - ) + (cam-layout-print 16 *camera-layout-message-ypos* "button not implemented yet") (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) (set! *camera-read-analog* #f) #t @@ -1062,309 +834,198 @@ (vector-reset! arg0) (vector-reset! arg1) (cond - ((logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons l3)) - (set! - (-> arg0 z) - (- - (-> arg0 z) - (analog-input - (the-as int (-> *cpad-list* cpads arg2 rightx)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - (-> (new 'static 'array float 1 1.0) 0) - ) - ) + ((logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons l3)) + (set! (-> arg0 z) (- (-> arg0 z) (analog-input + (the-as int (-> *cpad-list* cpads arg2 rightx)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + (-> (new 'static 'array float 1 1.0) 0) + ) + ) + ) ) - ) - (else - (set! - (-> arg0 y) - (- - (-> arg0 y) - (analog-input - (the-as int (-> *cpad-list* cpads arg2 rightx)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - (-> (new 'static 'array float 1 1.0) 0) - ) - ) - ) - (+! - (-> arg0 x) - (analog-input - (the-as int (-> *cpad-list* cpads arg2 righty)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - (-> (new 'static 'array float 1 1.0) 0) - ) - ) - (set! - (-> arg1 x) - (- - (-> arg1 x) - (analog-input - (the-as int (-> *cpad-list* cpads arg2 leftx)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - (-> (new 'static 'array float 1 1.0) 0) - ) - ) - ) - (when *camera-read-buttons* - (if (logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons r1)) - (set! - (-> arg1 y) - (+ - 0.5 - (analog-input - (the-as int (-> *cpad-list* cpads arg2 abutton 9)) - (-> (new 'static 'array float 1 0.0) 0) - (-> (new 'static 'array float 1 32.0) 0) - (-> (new 'static 'array float 1 230.0) 0) - (the-as float 0.5) - ) - (-> arg1 y) - ) - ) - ) - ) - (when *camera-read-buttons* - (if (logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons l1)) - (set! - (-> arg1 y) - (- - (-> arg1 y) - (+ - 0.5 - (analog-input - (the-as int (-> *cpad-list* cpads arg2 abutton 8)) - (-> (new 'static 'array float 1 0.0) 0) - (-> (new 'static 'array float 1 32.0) 0) - (-> (new 'static 'array float 1 230.0) 0) - (the-as float 0.5) + (else + (set! (-> arg0 y) (- (-> arg0 y) (analog-input + (the-as int (-> *cpad-list* cpads arg2 rightx)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + (-> (new 'static 'array float 1 1.0) 0) + ) + ) + ) + (+! (-> arg0 x) (analog-input + (the-as int (-> *cpad-list* cpads arg2 righty)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + (-> (new 'static 'array float 1 1.0) 0) + ) ) - ) + (set! (-> arg1 x) (- (-> arg1 x) (analog-input + (the-as int (-> *cpad-list* cpads arg2 leftx)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + (-> (new 'static 'array float 1 1.0) 0) + ) + ) + ) + (when *camera-read-buttons* + (if (logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons r1)) + (set! (-> arg1 y) (+ 0.5 + (analog-input + (the-as int (-> *cpad-list* cpads arg2 abutton 9)) + (-> (new 'static 'array float 1 0.0) 0) + (-> (new 'static 'array float 1 32.0) 0) + (-> (new 'static 'array float 1 230.0) 0) + (the-as float 0.5) + ) + (-> arg1 y) + ) + ) + ) ) - ) + (when *camera-read-buttons* + (if (logtest? (-> *cpad-list* cpads arg2 button0-abs 0) (pad-buttons l1)) + (set! (-> arg1 y) (- (-> arg1 y) (+ 0.5 (analog-input + (the-as int (-> *cpad-list* cpads arg2 abutton 8)) + (-> (new 'static 'array float 1 0.0) 0) + (-> (new 'static 'array float 1 32.0) 0) + (-> (new 'static 'array float 1 230.0) 0) + (the-as float 0.5) + ) + ) + ) + ) + ) + ) + (set! (-> arg1 z) (- (-> arg1 z) (analog-input + (the-as int (-> *cpad-list* cpads arg2 lefty)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + (-> (new 'static 'array float 1 1.0) 0) + ) + ) + ) ) - ) - (set! - (-> arg1 z) - (- - (-> arg1 z) - (analog-input - (the-as int (-> *cpad-list* cpads arg2 lefty)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - (-> (new 'static 'array float 1 1.0) 0) - ) - ) - ) ) - ) (let ((s5-1 (new-stack-matrix0))) - (let ((a2-8 (new-stack-vector0))) - (set! (-> a2-8 y) -1.0) - (forward-down-nopitch->inv-matrix - s5-1 - (-> *math-camera* inv-camera-rot vector 2) - a2-8 - ) + (let ((a2-8 (new-stack-vector0))) + (set! (-> a2-8 y) -1.0) + (forward-down-nopitch->inv-matrix s5-1 (-> *math-camera* inv-camera-rot vector 2) a2-8) + ) + (vector-matrix*! arg1 arg1 s5-1) ) - (vector-matrix*! arg1 arg1 s5-1) - ) arg1 ) (defbehavior clmf-pos-rot cam-layout ((arg0 symbol) (arg1 symbol)) (local-vars (s2-0 structure) (s3-1 structure) (sv-192 matrix)) - (cam-layout-print - 16 - *camera-layout-message-ypos* - "x/z pos: left stick, down: l1, up: r1" - ) + (cam-layout-print 16 *camera-layout-message-ypos* "x/z pos: left stick, down: l1, up: r1") (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) (when (and arg1 (nonzero? arg1)) - (cam-layout-print 16 *camera-layout-message-ypos* "x/y rot: right stick") - (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) - (cam-layout-print - 16 - *camera-layout-message-ypos* - "z rot: press left stick & move right" + (cam-layout-print 16 *camera-layout-message-ypos* "x/y rot: right stick") + (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) + (cam-layout-print 16 *camera-layout-message-ypos* "z rot: press left stick & move right") + (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) ) - (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) - ) (let ((s5-0 (new-stack-vector0)) (s4-0 (new-stack-vector0)) ) - (set! s3-1 (cond - ((or (zero? arg0) (not arg0)) - #f + (set! s3-1 + (cond + ((or (zero? arg0) (not arg0)) + #f + ) + (else + (if (not (res-lump-struct (-> self cam-entity) arg0 structure :time (the-as float -1000000000.0))) + (add-data! + (-> self cam-entity) + (new 'static 'res-tag :name arg0 :key-frame -1000000000.0 :elt-count #x1 :inlined? #x1 :elt-type vector) + (the-as pointer (new 'static 'vector)) + ) + ) + (set! s3-1 (res-lump-struct (-> self cam-entity) arg0 structure :time (the-as float -1000000000.0))) + (when (and (not s3-1) (logtest? (-> *display* real-actual-frame-counter) 8)) + (clear *temp-string*) + (format *temp-string* "ERROR : can't add ~A" 'vector) + (cam-layout-print 120 100 *temp-string*) ) - (else - (if - (not - (res-lump-struct - (-> self cam-entity) - arg0 - structure - :time - (the-as float -1000000000.0) - ) + s3-1 + ) + ) + ) + (set! s2-0 + (cond + ((or (zero? arg1) (not arg1)) + #f + ) + (else + (if (not (res-lump-struct (-> self cam-entity) arg1 structure :time (the-as float -1000000000.0))) + (add-data! + (-> self cam-entity) + (new 'static 'res-tag :name arg1 :key-frame -1000000000.0 :elt-count #x1 :inlined? #x1 :elt-type quaternion) + (the-as pointer (quaternion-identity! (new 'static 'quaternion))) + ) ) - (add-data! - (-> self cam-entity) - (new 'static 'res-tag - :name arg0 - :key-frame -1000000000.0 - :elt-count #x1 - :inlined? #x1 - :elt-type vector - ) - (the-as pointer (new 'static 'vector)) - ) - ) - (set! - s3-1 - (res-lump-struct - (-> self cam-entity) - arg0 - structure - :time - (the-as float -1000000000.0) - ) - ) - (when - (and - (not s3-1) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - (clear *temp-string*) - (format *temp-string* "ERROR : can't add ~A" 'vector) - (cam-layout-print 120 100 *temp-string*) - ) - s3-1 + (set! s2-0 (res-lump-struct (-> self cam-entity) arg1 structure :time (the-as float -1000000000.0))) + (when (and (not s2-0) (logtest? (-> *display* real-actual-frame-counter) 8)) + (clear *temp-string*) + (format *temp-string* "ERROR : can't add ~A" 'quaternion) + (cam-layout-print 120 100 *temp-string*) ) - ) - ) - (set! s2-0 (cond - ((or (zero? arg1) (not arg1)) - #f - ) - (else - (if - (not - (res-lump-struct - (-> self cam-entity) - arg1 - structure - :time - (the-as float -1000000000.0) - ) - ) - (add-data! - (-> self cam-entity) - (new 'static 'res-tag - :name arg1 - :key-frame -1000000000.0 - :elt-count #x1 - :inlined? #x1 - :elt-type quaternion - ) - (the-as - pointer - (quaternion-identity! (new 'static 'quaternion)) - ) - ) - ) - (set! - s2-0 - (res-lump-struct - (-> self cam-entity) - arg1 - structure - :time - (the-as float -1000000000.0) - ) - ) - (when - (and - (not s2-0) - (logtest? (-> *display* real-actual-frame-counter) 8) - ) - (clear *temp-string*) - (format *temp-string* "ERROR : can't add ~A" 'quaternion) - (cam-layout-print 120 100 *temp-string*) - ) - s2-0 - ) - ) - ) - (let ((s1-1 (new 'stack-no-clear 'matrix))) - (set! sv-192 (new 'stack-no-clear 'matrix)) - (let ((s0-1 (new 'stack-no-clear 'vector))) - (if (not s3-1) - (return #f) - ) - (clmf-input s5-0 s4-0 0) - (vector+float*! - (the-as vector s3-1) - (the-as vector s3-1) - s4-0 - (the-as float 409.6) - ) - (cond - ((not arg1) - (the-as quaternion #f) - ) - ((zero? arg1) - (the-as quaternion #f) - ) - (else - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) sv-192) - (vector-float*! s5-0 s5-0 100.0) - (matrix-rotate-x! s1-1 (- (-> s5-0 x))) - (matrix*! sv-192 s1-1 sv-192) - (matrix-rotate-y! s1-1 (-> s5-0 y)) - (matrix*! sv-192 sv-192 s1-1) - (matrix-rotate-z! s1-1 (- (-> s5-0 z))) - (matrix*! sv-192 s1-1 sv-192) - (matrix->quaternion (the-as quaternion s0-1) sv-192) - (quaternion-inverse! - (the-as quaternion s2-0) - (the-as quaternion (-> self cam-entity connect)) + s2-0 + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'matrix))) + (set! sv-192 (new 'stack-no-clear 'matrix)) + (let ((s0-1 (new 'stack-no-clear 'vector))) + (if (not s3-1) + (return #f) + ) + (clmf-input s5-0 s4-0 0) + (vector+float*! (the-as vector s3-1) (the-as vector s3-1) s4-0 (the-as float 409.6)) + (cond + ((not arg1) + (the-as quaternion #f) + ) + ((zero? arg1) + (the-as quaternion #f) + ) + (else + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) sv-192) + (vector-float*! s5-0 s5-0 100.0) + (matrix-rotate-x! s1-1 (- (-> s5-0 x))) + (matrix*! sv-192 s1-1 sv-192) + (matrix-rotate-y! s1-1 (-> s5-0 y)) + (matrix*! sv-192 sv-192 s1-1) + (matrix-rotate-z! s1-1 (- (-> s5-0 z))) + (matrix*! sv-192 s1-1 sv-192) + (matrix->quaternion (the-as quaternion s0-1) sv-192) + (quaternion-inverse! (the-as quaternion s2-0) (the-as quaternion (-> self cam-entity connect))) + (quaternion*! (the-as quaternion s2-0) (the-as quaternion s0-1) (the-as quaternion s2-0)) + (quaternion-normalize! (the-as quaternion s2-0)) + ) + ) ) - (quaternion*! - (the-as quaternion s2-0) - (the-as quaternion s0-1) - (the-as quaternion s2-0) - ) - (quaternion-normalize! (the-as quaternion s2-0)) - ) ) - ) ) - ) (set! *camera-read-analog* #f) #t ) (defbehavior clmf-next-volume cam-layout ((arg0 int)) (if (zero? (-> self num-volumes)) - (return #f) - ) - (set! - (-> self cur-volume) - (mod (+ arg0 (-> self cur-volume)) (-> self num-volumes)) - ) + (return #f) + ) + (set! (-> self cur-volume) (mod (+ arg0 (-> self cur-volume)) (-> self num-volumes))) (while (< (-> self cur-volume) 0) - (+! (-> self cur-volume) (-> self num-volumes)) - ) + (+! (-> self cur-volume) (-> self num-volumes)) + ) #t ) @@ -1373,22 +1034,22 @@ (cam-layout-print 16 *camera-layout-message-ypos* "dpad selects volume") (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (set! a0-1 1) + ((cpad-pressed? 0 down) + (set! a0-1 1) + ) + ((cpad-pressed? 0 right) + (set! a0-1 1) + ) + ((cpad-pressed? 0 up) + (set! a0-1 -1) + ) + ((cpad-pressed? 0 left) + (set! a0-1 -1) + ) + (else + (set! a0-1 0) + ) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (set! a0-1 1) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (set! a0-1 -1) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (set! a0-1 -1) - ) - (else - (set! a0-1 0) - ) - ) (clmf-next-volume a0-1) (set! *camera-read-analog* #f) #t @@ -1404,61 +1065,55 @@ (defbehavior clmf-next-entity cam-layout ((arg0 int)) (let ((v1-0 (/ arg0 8))) - (when (zero? (-> self num-entities)) - (set! (-> self cam-entity) #f) - (return #f) + (when (zero? (-> self num-entities)) + (set! (-> self cam-entity) #f) + (return #f) + ) + (if (= (- v1-0) (-> self num-entities)) + (set! v1-0 -1) + ) + (if (= v1-0 (-> self num-entities)) + (set! v1-0 1) + ) + (set! (-> self cur-entity) (mod (+ v1-0 (-> self cur-entity)) (-> self num-entities))) ) - (if (= (- v1-0) (-> self num-entities)) - (set! v1-0 -1) - ) - (if (= v1-0 (-> self num-entities)) - (set! v1-0 1) - ) - (set! - (-> self cur-entity) - (mod (+ v1-0 (-> self cur-entity)) (-> self num-entities)) - ) - ) (while (< (-> self cur-entity) 0) - (+! (-> self cur-entity) (-> self num-entities)) - ) + (+! (-> self cur-entity) (-> self num-entities)) + ) (set! *last-cur-entity* (-> self cur-entity)) (let ((v1-8 (-> self cur-entity)) (a0-13 (-> *camera-engine* alive-list next0)) ) - *camera-engine* - (let ((a1-3 (-> a0-13 next0))) - (while (!= a0-13 (-> *camera-engine* alive-list-end)) - (let ((a0-14 (-> (the-as connection a0-13) param1))) - (cond - ((zero? v1-8) - (set! (-> self cam-entity) (the-as entity-camera a0-14)) - (set! *volume-descriptor-current* 0) - (set! *volume-point-current* 0) - (set! *volume-normal-current* 0) - (set! (-> self num-volumes) 0) - (cam-layout-entity-volume-info-create (-> self cam-entity) 'vol) - (set! (-> self first-pvol) (-> self num-volumes)) - (cam-layout-entity-volume-info-create (-> self cam-entity) 'pvol) - (set! (-> self first-cutoutvol) (-> self num-volumes)) - (cam-layout-entity-volume-info-create (-> self cam-entity) 'cutoutvol) - (set! - (-> *CAM_LAYOUT-bank* intro-step) - (cam-slave-get-intro-step (-> self cam-entity)) - ) - (return #f) + *camera-engine* + (let ((a1-3 (-> a0-13 next0))) + (while (!= a0-13 (-> *camera-engine* alive-list-end)) + (let ((a0-14 (-> (the-as connection a0-13) param1))) + (cond + ((zero? v1-8) + (set! (-> self cam-entity) (the-as entity-camera a0-14)) + (set! *volume-descriptor-current* 0) + (set! *volume-point-current* 0) + (set! *volume-normal-current* 0) + (set! (-> self num-volumes) 0) + (cam-layout-entity-volume-info-create (-> self cam-entity) 'vol) + (set! (-> self first-pvol) (-> self num-volumes)) + (cam-layout-entity-volume-info-create (-> self cam-entity) 'pvol) + (set! (-> self first-cutoutvol) (-> self num-volumes)) + (cam-layout-entity-volume-info-create (-> self cam-entity) 'cutoutvol) + (set! (-> *CAM_LAYOUT-bank* intro-step) (cam-slave-get-intro-step (-> self cam-entity))) + (return #f) + ) + (else + (+! v1-8 -1) + ) + ) + ) + (set! a0-13 a1-3) + *camera-engine* + (set! a1-3 (-> a1-3 next0)) ) - (else - (+! v1-8 -1) - ) - ) ) - (set! a0-13 a1-3) - *camera-engine* - (set! a1-3 (-> a1-3 next0)) - ) ) - ) #t ) @@ -1502,16 +1157,9 @@ (defbehavior clmf-look-through cam-layout () (set! (-> *camera-other-fov* data) (cam-slave-get-fov (-> self cam-entity))) - (cam-slave-get-vector-with-offset - (the-as entity-actor (-> self cam-entity)) - *camera-other-trans* - 'trans - ) + (cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) *camera-other-trans* 'trans) (set! (-> *camera-other-root* quad) (-> *camera-other-trans* quad)) - (cam-slave-get-rot - (the-as entity-actor (-> self cam-entity)) - *camera-other-matrix* - ) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) *camera-other-matrix*) (set! *camera-look-through-other* 10) (set! *camera-read-analog* #f) #f @@ -1519,1516 +1167,1071 @@ (defun fov->maya ((arg0 float)) (if (= arg0 0.0) - (-> (new 'static 'array float 1 0.0) 0) - (/ 12.700255 (tan (* 0.5 arg0))) - ) + (-> (new 'static 'array float 1 0.0) 0) + (/ 12.700255 (tan (* 0.5 arg0))) + ) ) (defun cam-layout-save-cam-rot ((arg0 symbol) (arg1 string) (arg2 entity-actor)) (let ((s3-0 (-> arg2 quat)) - (s5-0 - (res-lump-struct - arg2 - 'rot-offset - vector - :time - (the-as float -1000000000.0) - ) - ) + (s5-0 (res-lump-struct arg2 'rot-offset vector :time (the-as float -1000000000.0))) ) - (if arg0 - (format - #t - "setup rot ~f ~f ~f ~f~%" - (-> s3-0 x) - (-> s3-0 y) - (-> s3-0 z) - (-> s3-0 w) - ) - ) - (the-as string (when s5-0 - (if arg0 - (format - #t - "rot offset ~f ~f ~f ~f~%" - (-> s5-0 x) - (-> s5-0 y) - (-> s5-0 z) - (-> s5-0 w) + (if arg0 + (format #t "setup rot ~f ~f ~f ~f~%" (-> s3-0 x) (-> s3-0 y) (-> s3-0 z) (-> s3-0 w)) + ) + (the-as string (when s5-0 + (if arg0 + (format #t "rot offset ~f ~f ~f ~f~%" (-> s5-0 x) (-> s5-0 y) (-> s5-0 z) (-> s5-0 w)) + ) + (format + arg1 + " tag rot-offset ~f ~f ~f ~f // vector (quaternion)~%" + (-> s5-0 x) + (-> s5-0 y) + (-> s5-0 z) + (-> s5-0 w) + ) ) - ) - (format - arg1 - " tag rot-offset ~f ~f ~f ~f // vector (quaternion)~%" - (-> s5-0 x) - (-> s5-0 y) - (-> s5-0 z) - (-> s5-0 w) - ) - ) + ) ) - ) ) -(defun - cam-layout-save-cam-trans - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) +(defun cam-layout-save-cam-trans ((arg0 symbol) (arg1 string) (arg2 entity-actor)) (let ((s1-0 (-> arg2 trans)) (s5-0 (method-of-type res-lump get-property-struct)) (s2-0 arg2) ) - (format (clear *res-key-string*) "~S~S" 'trans '-offset) - (let - ((s5-1 - (the-as - vector - (s5-0 - s2-0 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - #f - (the-as (pointer res-tag) #f) - *res-static-buf* + (format (clear *res-key-string*) "~S~S" 'trans '-offset) + (let ((s5-1 (the-as vector (s5-0 + s2-0 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + #f + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (let ((s2-1 (res-lump-struct arg2 'translation_info vector :time (the-as float -1000000000.0))) + (s3-1 (new-stack-vector0)) + ) + (if arg0 + (format #t "setup trans ~M ~M ~M (maya)~%" (-> s1-0 x) (-> s1-0 y) (-> s1-0 z)) + ) + (set! (-> s3-1 quad) (-> s1-0 quad)) + (when (the-as structure s5-1) + (if arg0 + (format #t "offset ~M ~M ~M (added)~%" (-> s5-1 x) (-> s5-1 y) (-> s5-1 z)) + ) + (vector+! s3-1 s3-1 s5-1) + ) + (when s2-1 + (if arg0 + (format #t "level-trans ~M ~M ~M (subtracted)~%" (-> s2-1 x) (-> s2-1 y) (-> s2-1 z)) + ) + (vector-! s3-1 s3-1 s2-1) + ) + (set! s2-1 (the-as vector (or s5-1 s2-1))) + (set! arg0 (and (the-as symbol s2-1) arg0)) + (if arg0 + (format #t "final trans ~M ~M ~M (maya)~%" (-> s3-1 x) (-> s3-1 y) (-> s3-1 z)) + ) ) - ) + (the-as string (if s5-1 + (format + arg1 + " tag trans-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s5-1 x) + (-> s5-1 y) + (-> s5-1 z) + ) + ) + ) ) - ) - (let - ((s2-1 - (res-lump-struct - arg2 - 'translation_info - vector - :time - (the-as float -1000000000.0) - ) - ) - (s3-1 (new-stack-vector0)) - ) - (if arg0 - (format - #t - "setup trans ~M ~M ~M (maya)~%" - (-> s1-0 x) - (-> s1-0 y) - (-> s1-0 z) - ) - ) - (set! (-> s3-1 quad) (-> s1-0 quad)) - (when (the-as structure s5-1) - (if arg0 - (format - #t - "offset ~M ~M ~M (added)~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - ) - (vector+! s3-1 s3-1 s5-1) - ) - (when s2-1 - (if arg0 - (format - #t - "level-trans ~M ~M ~M (subtracted)~%" - (-> s2-1 x) - (-> s2-1 y) - (-> s2-1 z) - ) - ) - (vector-! s3-1 s3-1 s2-1) - ) - (set! s2-1 (the-as vector (or s5-1 s2-1))) - (set! arg0 (and (the-as symbol s2-1) arg0)) - (if arg0 - (format - #t - "final trans ~M ~M ~M (maya)~%" - (-> s3-1 x) - (-> s3-1 y) - (-> s3-1 z) - ) - ) - ) - (the-as string (if s5-1 - (format - arg1 - " tag trans-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - ) - ) ) - ) ) (defun cam-layout-save-pivot ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s2-0 - (res-lump-struct arg2 'pivot vector :time (the-as float -1000000000.0)) - ) - (s3-0 (method-of-type res-lump get-property-struct)) - ) - (format (clear *res-key-string*) "~S~S" 'pivot '-offset) - (let - ((s5-1 - (the-as - vector - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - #f - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((s2-0 (res-lump-struct arg2 'pivot vector :time (the-as float -1000000000.0))) + (s3-0 (method-of-type res-lump get-property-struct)) ) - ) + (format (clear *res-key-string*) "~S~S" 'pivot '-offset) + (let ((s5-1 (the-as vector (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + #f + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (s3-1 (new-stack-vector0)) + ) + (the-as string (when s2-0 + (if s5-1 + (vector+! s3-1 s2-0 s5-1) + (set! (-> s3-1 quad) (-> s2-0 quad)) + ) + (if arg0 + (format #t "setup pivot ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z)) + ) + (when s5-1 + (when arg0 + (format #t "offset ~M ~M ~M~%" (-> s5-1 x) (-> s5-1 y) (-> s5-1 z)) + (format #t "final pivot ~M ~M ~M~%" (-> s3-1 x) (-> s3-1 y) (-> s3-1 z)) + ) + (format + arg1 + " tag pivot-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s5-1 x) + (-> s5-1 y) + (-> s5-1 z) + ) + ) + ) + ) ) - (s3-1 (new-stack-vector0)) - ) - (the-as string (when s2-0 - (if s5-1 - (vector+! s3-1 s2-0 s5-1) - (set! (-> s3-1 quad) (-> s2-0 quad)) - ) - (if arg0 - (format - #t - "setup pivot ~M ~M ~M~%" - (-> s2-0 x) - (-> s2-0 y) - (-> s2-0 z) - ) - ) - (when s5-1 - (when arg0 - (format - #t - "offset ~M ~M ~M~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - (format - #t - "final pivot ~M ~M ~M~%" - (-> s3-1 x) - (-> s3-1 y) - (-> s3-1 z) - ) - ) - (format - arg1 - " tag pivot-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - ) - ) - ) ) - ) ) (defun cam-layout-save-align ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s2-0 - (res-lump-struct arg2 'align vector :time (the-as float -1000000000.0)) - ) - (s3-0 (method-of-type res-lump get-property-struct)) - ) - (format (clear *res-key-string*) "~S~S" 'align '-offset) - (let - ((s5-1 - (the-as - vector - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - #f - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((s2-0 (res-lump-struct arg2 'align vector :time (the-as float -1000000000.0))) + (s3-0 (method-of-type res-lump get-property-struct)) ) - ) + (format (clear *res-key-string*) "~S~S" 'align '-offset) + (let ((s5-1 (the-as vector (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + #f + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (s3-1 (new-stack-vector0)) + ) + (the-as string (when s2-0 + (if s5-1 + (vector+! s3-1 s2-0 s5-1) + (set! (-> s3-1 quad) (-> s2-0 quad)) + ) + (if arg0 + (format #t "setup align ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z)) + ) + (when s5-1 + (when arg0 + (format #t "offset ~M ~M ~M~%" (-> s5-1 x) (-> s5-1 y) (-> s5-1 z)) + (format #t "final align ~M ~M ~M~%" (-> s3-1 x) (-> s3-1 y) (-> s3-1 z)) + ) + (format + arg1 + " tag align-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s5-1 x) + (-> s5-1 y) + (-> s5-1 z) + ) + ) + ) + ) ) - (s3-1 (new-stack-vector0)) - ) - (the-as string (when s2-0 - (if s5-1 - (vector+! s3-1 s2-0 s5-1) - (set! (-> s3-1 quad) (-> s2-0 quad)) - ) - (if arg0 - (format - #t - "setup align ~M ~M ~M~%" - (-> s2-0 x) - (-> s2-0 y) - (-> s2-0 z) - ) - ) - (when s5-1 - (when arg0 - (format - #t - "offset ~M ~M ~M~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - (format - #t - "final align ~M ~M ~M~%" - (-> s3-1 x) - (-> s3-1 y) - (-> s3-1 z) - ) - ) - (format - arg1 - " tag align-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - ) - ) - ) ) - ) ) -(defun - cam-layout-save-interesting - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s2-0 - (res-lump-struct - arg2 - 'interesting - vector - :time - (the-as float -1000000000.0) - ) - ) - (s3-0 (method-of-type res-lump get-property-struct)) - ) - (format (clear *res-key-string*) "~S~S" 'interesting '-offset) - (let - ((s5-1 - (the-as - vector - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - #f - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-interesting ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((s2-0 (res-lump-struct arg2 'interesting vector :time (the-as float -1000000000.0))) + (s3-0 (method-of-type res-lump get-property-struct)) ) - ) + (format (clear *res-key-string*) "~S~S" 'interesting '-offset) + (let ((s5-1 (the-as vector (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + #f + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (s3-1 (new-stack-vector0)) + ) + (the-as string (when s2-0 + (if s5-1 + (vector+! s3-1 s2-0 s5-1) + (set! (-> s3-1 quad) (-> s2-0 quad)) + ) + (if arg0 + (format #t "setup interesting ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z)) + ) + (when s5-1 + (when arg0 + (format #t "offset ~M ~M ~M~%" (-> s5-1 x) (-> s5-1 y) (-> s5-1 z)) + (format #t "final interesting ~M ~M ~M~%" (-> s3-1 x) (-> s3-1 y) (-> s3-1 z)) + ) + (format + arg1 + " tag interesting-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s5-1 x) + (-> s5-1 y) + (-> s5-1 z) + ) + ) + ) + ) ) - (s3-1 (new-stack-vector0)) - ) - (the-as string (when s2-0 - (if s5-1 - (vector+! s3-1 s2-0 s5-1) - (set! (-> s3-1 quad) (-> s2-0 quad)) - ) - (if arg0 - (format - #t - "setup interesting ~M ~M ~M~%" - (-> s2-0 x) - (-> s2-0 y) - (-> s2-0 z) - ) - ) - (when s5-1 - (when arg0 - (format - #t - "offset ~M ~M ~M~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - (format - #t - "final interesting ~M ~M ~M~%" - (-> s3-1 x) - (-> s3-1 y) - (-> s3-1 z) - ) - ) - (format - arg1 - " tag interesting-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s5-1 x) - (-> s5-1 y) - (-> s5-1 z) - ) - ) - ) - ) ) - ) ) (defun cam-layout-save-fov ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'fov - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'fov + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'fov '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (cond + ((= f30-0 0.0) + (if arg0 + (format #t "setup fov deg 0.0 (defaults to 64.0)~%") + ) + (set! f30-0 11650.845) + ) + (arg0 + (format #t "setup fov deg ~R (~f in maya)~%" f30-0 (fov->maya f30-0)) + ) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~R~%" f28-0) + (format #t "final ~R (~f in maya) ~%" (+ f30-0 f28-0) (fov->maya (+ f30-0 f28-0))) + ) + (format arg1 " tag fov-offset DEG(~R) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'fov '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (cond - ((= f30-0 0.0) - (if arg0 - (format #t "setup fov deg 0.0 (defaults to 64.0)~%") - ) - (set! f30-0 11650.845) - ) - (arg0 - (format #t "setup fov deg ~R (~f in maya)~%" f30-0 (fov->maya f30-0)) - ) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~R~%" f28-0) - (format - #t - "final ~R (~f in maya) ~%" - (+ f30-0 f28-0) - (fov->maya (+ f30-0 f28-0)) - ) - ) - (format - arg1 - " tag fov-offset DEG(~R) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defun - cam-layout-save-focalpull - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'focalPull - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-focalpull ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'focalPull + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'focalPull '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup focalPull deg ~R (~f in maya)~%" f30-0 (fov->maya f30-0)) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~R~%" f28-0) + (format #t "final ~R (~f in maya) ~%" (+ f30-0 f28-0) (fov->maya (+ f30-0 f28-0))) + ) + (format arg1 " tag focalPull-offset DEG(~R) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'focalPull '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup focalPull deg ~R (~f in maya)~%" f30-0 (fov->maya f30-0)) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~R~%" f28-0) - (format - #t - "final ~R (~f in maya) ~%" - (+ f30-0 f28-0) - (fov->maya (+ f30-0 f28-0)) - ) - ) - (format - arg1 - " tag focalPull-offset DEG(~R) // float~%" - f28-0 - ) - ) - ) - ) - ) ) (defun cam-layout-save-flags ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s4-0 - (res-lump-value arg2 'flags uint128 :time (the-as float -1000000000.0)) - ) - (s5-0 (method-of-type res-lump get-property-value)) - (s1-0 arg2) - ) - (format (clear *res-key-string*) "~S~S" 'flags '-on) - (let - ((s5-1 - (s5-0 - s1-0 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s1-1 (method-of-type res-lump get-property-value)) - ) - (format (clear *res-key-string*) "~S~S" 'flags '-off) - (let - ((s3-1 - (s1-1 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((s4-0 (res-lump-value arg2 'flags uint128 :time (the-as float -1000000000.0))) + (s5-0 (method-of-type res-lump get-property-value)) + (s1-0 arg2) + ) + (format (clear *res-key-string*) "~S~S" 'flags '-on) + (let ((s5-1 (s5-0 + s1-0 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s1-1 (method-of-type res-lump get-property-value)) + ) + (format (clear *res-key-string*) "~S~S" 'flags '-off) + (let ((s3-1 (s1-1 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when arg0 + (format #t "setup flags ") + (cam-slave-options->string (the-as cam-slave-options s4-0) #t) + (format #t "~%") + (format #t "forced on ") + (cam-slave-options->string (the-as cam-slave-options s5-1) #t) + (format #t "~%") + (format #t "forced off ") + (cam-slave-options->string (the-as cam-slave-options s3-1) #t) + (format #t "~%") + (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) + (format #t "final ") + (cam-slave-options->string (the-as cam-slave-options s4-1) #t) + ) + (format #t "~%") + ) + (format arg1 " tag flags-on 0x~X // int32~%" s5-1) + (the-as string (format arg1 " tag flags-off 0x~X // int32~%" s3-1)) ) - ) ) - (when arg0 - (format #t "setup flags ") - (cam-slave-options->string (the-as cam-slave-options s4-0) #t) - (format #t "~%") - (format #t "forced on ") - (cam-slave-options->string (the-as cam-slave-options s5-1) #t) - (format #t "~%") - (format #t "forced off ") - (cam-slave-options->string (the-as cam-slave-options s3-1) #t) - (format #t "~%") - (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) - (format #t "final ") - (cam-slave-options->string (the-as cam-slave-options s4-1) #t) - ) - (format #t "~%") - ) - (format - arg1 - " tag flags-on 0x~X // int32~%" - s5-1 - ) - (the-as - string - (format - arg1 - " tag flags-off 0x~X // int32~%" - s3-1 - ) - ) - ) ) - ) ) -(defun - cam-layout-save-focalpull-flags - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s4-0 - (res-lump-value - arg2 - 'focalpull-flags - uint128 - :time - (the-as float -1000000000.0) - ) - ) - (s5-0 (method-of-type res-lump get-property-value)) - (s1-0 arg2) - ) - (format (clear *res-key-string*) "~S~S" 'focalpull-flags '-on) - (let - ((s5-1 - (s5-0 - s1-0 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s1-1 (method-of-type res-lump get-property-value)) - ) - (format (clear *res-key-string*) "~S~S" 'focalpull-flags '-off) - (let - ((s3-1 - (s1-1 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-focalpull-flags ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((s4-0 (res-lump-value arg2 'focalpull-flags uint128 :time (the-as float -1000000000.0))) + (s5-0 (method-of-type res-lump get-property-value)) + (s1-0 arg2) + ) + (format (clear *res-key-string*) "~S~S" 'focalpull-flags '-on) + (let ((s5-1 (s5-0 + s1-0 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s1-1 (method-of-type res-lump get-property-value)) + ) + (format (clear *res-key-string*) "~S~S" 'focalpull-flags '-off) + (let ((s3-1 + (s1-1 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when arg0 + (format #t "setup focalpull-flags ") + (cam-index-options->string (the-as cam-index-options s4-0) #t) + (format #t "~%") + (format #t "forced on ") + (cam-index-options->string (the-as cam-index-options s5-1) #t) + (format #t "~%") + (format #t "forced off ") + (cam-index-options->string (the-as cam-index-options s3-1) #t) + (format #t "~%") + (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) + (format #t "final ") + (cam-index-options->string (the-as cam-index-options s4-1) #t) + ) + (format #t "~%") + ) + (format arg1 " tag focalpull-flags-on 0x~X // int32~%" s5-1) + (the-as + string + (format arg1 " tag focalpull-flags-off 0x~X // int32~%" s3-1) + ) ) - ) ) - (when arg0 - (format #t "setup focalpull-flags ") - (cam-index-options->string (the-as cam-index-options s4-0) #t) - (format #t "~%") - (format #t "forced on ") - (cam-index-options->string (the-as cam-index-options s5-1) #t) - (format #t "~%") - (format #t "forced off ") - (cam-index-options->string (the-as cam-index-options s3-1) #t) - (format #t "~%") - (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) - (format #t "final ") - (cam-index-options->string (the-as cam-index-options s4-1) #t) - ) - (format #t "~%") - ) - (format - arg1 - " tag focalpull-flags-on 0x~X // int32~%" - s5-1 - ) - (the-as - string - (format - arg1 - " tag focalpull-flags-off 0x~X // int32~%" - s3-1 - ) - ) - ) ) - ) ) -(defun - cam-layout-save-campoints-flags - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s4-0 - (res-lump-value - arg2 - 'campoints-flags - uint128 - :time - (the-as float -1000000000.0) - ) - ) - (s5-0 (method-of-type res-lump get-property-value)) - (s1-0 arg2) - ) - (format (clear *res-key-string*) "~S~S" 'campoints-flags '-on) - (let - ((s5-1 - (s5-0 - s1-0 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s1-1 (method-of-type res-lump get-property-value)) - ) - (format (clear *res-key-string*) "~S~S" 'campoints-flags '-off) - (let - ((s3-1 - (s1-1 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-campoints-flags ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((s4-0 (res-lump-value arg2 'campoints-flags uint128 :time (the-as float -1000000000.0))) + (s5-0 (method-of-type res-lump get-property-value)) + (s1-0 arg2) + ) + (format (clear *res-key-string*) "~S~S" 'campoints-flags '-on) + (let ((s5-1 (s5-0 + s1-0 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s1-1 (method-of-type res-lump get-property-value)) + ) + (format (clear *res-key-string*) "~S~S" 'campoints-flags '-off) + (let ((s3-1 + (s1-1 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when arg0 + (format #t "setup campoints-flags ") + (cam-index-options->string (the-as cam-index-options s4-0) #t) + (format #t "~%") + (format #t "forced on ") + (cam-index-options->string (the-as cam-index-options s5-1) #t) + (format #t "~%") + (format #t "forced off ") + (cam-index-options->string (the-as cam-index-options s3-1) #t) + (format #t "~%") + (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) + (format #t "final ") + (cam-index-options->string (the-as cam-index-options s4-1) #t) + ) + (format #t "~%") + ) + (format arg1 " tag campoints-flags-on 0x~X // int32~%" s5-1) + (the-as + string + (format arg1 " tag campoints-flags-off 0x~X // int32~%" s3-1) + ) ) - ) ) - (when arg0 - (format #t "setup campoints-flags ") - (cam-index-options->string (the-as cam-index-options s4-0) #t) - (format #t "~%") - (format #t "forced on ") - (cam-index-options->string (the-as cam-index-options s5-1) #t) - (format #t "~%") - (format #t "forced off ") - (cam-index-options->string (the-as cam-index-options s3-1) #t) - (format #t "~%") - (let ((s4-1 (logclear (logior s4-0 s5-1) s3-1))) - (format #t "final ") - (cam-index-options->string (the-as cam-index-options s4-1) #t) - ) - (format #t "~%") - ) - (format - arg1 - " tag campoints-flags-on 0x~X // int32~%" - s5-1 - ) - (the-as - string - (format - arg1 - " tag campoints-flags-off 0x~X // int32~%" - s3-1 - ) - ) - ) ) - ) ) -(defun - cam-layout-save-introsplinetime - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'intro-time - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-introsplinetime ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'intro-time + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'intro-time '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (cond + ((= f30-0 0.0) + (if arg0 + (format #t "setup intro-time 0.0 (defaults to 1 sec)~%") + ) + (set! f30-0 (-> (new 'static 'array float 1 1.0) 0)) + ) + (arg0 + (format #t "setup intro-time ~f~%" f30-0) + ) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~f~%" f28-0) + (format #t "final ~f~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag intro-time-offset SECONDS(~f) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'intro-time '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) + ) + +(defun cam-layout-save-introsplineexitval ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'intro-exitValue + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'intro-exitValue '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when arg0 + (if (= f30-0 0.0) + (format #t "setup intro-exitValue 0.0 (defaults to 0.5)~%") + (format #t "setup intro-exitValue ~f~%" f30-0) + ) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~f~%" f28-0) + (format #t "final ~f~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag intro-exitValue-offset ~f // float~%" f28-0) + ) + ) ) - ) - (cond - ((= f30-0 0.0) + ) + ) + +(defun cam-layout-save-interptime ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'interpTime + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'interpTime '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) (if arg0 - (format #t "setup intro-time 0.0 (defaults to 1 sec)~%") - ) - (set! f30-0 (-> (new 'static 'array float 1 1.0) 0)) + (format #t "setup interpTime ~f~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~f~%" f28-0) + (format #t "final ~f~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag interpTime-offset SECONDS(~f) // float~%" f28-0) + ) + ) ) - (arg0 - (format #t "setup intro-time ~f~%" f30-0) - ) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~f~%" f28-0) - (format #t "final ~f~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag intro-time-offset SECONDS(~f) // float~%" - f28-0 - ) - ) - ) ) - ) ) -(defun - cam-layout-save-introsplineexitval - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'intro-exitValue - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) - ) - (format (clear *res-key-string*) "~S~S" 'intro-exitValue '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (when arg0 - (if (= f30-0 0.0) - (format #t "setup intro-exitValue 0.0 (defaults to 0.5)~%") - (format #t "setup intro-exitValue ~f~%" f30-0) - ) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~f~%" f28-0) - (format #t "final ~f~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag intro-exitValue-offset ~f // float~%" - f28-0 - ) - ) - ) - ) - ) - ) - -(defun - cam-layout-save-interptime - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'interpTime - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) - ) - (format (clear *res-key-string*) "~S~S" 'interpTime '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup interpTime ~f~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~f~%" f28-0) - (format #t "final ~f~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag interpTime-offset SECONDS(~f) // float~%" - f28-0 - ) - ) - ) - ) - ) - ) - -(defun - cam-layout-save-splineoffset - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) +(defun cam-layout-save-splineoffset ((arg0 symbol) (arg1 string) (arg2 entity-actor)) (the-as - string - (when - (and - (not - (res-lump-struct arg2 'pivot structure :time (the-as float -1000000000.0)) - ) - (res-lump-struct - arg2 - 'spline-offset - structure - :time - (the-as float -1000000000.0) - ) - ) - (let - ((s4-1 - (res-lump-struct - arg2 - 'spline-offset - vector - :time - (the-as float -1000000000.0) + string + (when (and + (not (res-lump-struct arg2 'pivot structure :time (the-as float -1000000000.0))) + (res-lump-struct arg2 'spline-offset structure :time (the-as float -1000000000.0)) + ) + (let ((s4-1 (res-lump-struct arg2 'spline-offset vector :time (the-as float -1000000000.0)))) + (when s4-1 + (if arg0 + (format #t "spline offset ~M ~M ~M~%" (-> s4-1 x) (-> s4-1 y) (-> s4-1 z)) + ) + (format + arg1 + " tag spline-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s4-1 x) + (-> s4-1 y) + (-> s4-1 z) + ) + ) ) - ) ) - (when s4-1 - (if arg0 - (format - #t - "spline offset ~M ~M ~M~%" - (-> s4-1 x) - (-> s4-1 y) - (-> s4-1 z) - ) - ) - (format - arg1 - " tag spline-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s4-1 x) - (-> s4-1 y) - (-> s4-1 z) - ) - ) - ) ) - ) ) -(defun - cam-layout-save-spline-follow-dist-offset - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (the-as - string - (when - (and - (not - (res-lump-struct arg2 'pivot structure :time (the-as float -1000000000.0)) - ) - ((method-of-type res-lump get-property-value-float) - arg2 - 'spline-follow-dist-offset - 'interp - (the-as float -1000000000.0) - (the-as float #f) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'spline-follow-dist-offset - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (when (the int f30-0) - (if arg0 - (format #t "spline follow dist offset ~M~%" f30-0) - ) - (format - arg1 - " tag spline-follow-dist-offset METERS(~M)~%" - f30-0 - ) - ) - ) - ) - ) - ) - -(defun - cam-layout-save-campointsoffset - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((s5-0 - (res-lump-struct - arg2 - 'campoints-offset - vector - :time - (the-as float -1000000000.0) - ) - ) - ) - (the-as string (when s5-0 - (if arg0 - (format - #t - "index offset ~M ~M ~M~%" - (-> s5-0 x) - (-> s5-0 y) - (-> s5-0 z) +(defun cam-layout-save-spline-follow-dist-offset ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (the-as string (when (and + (not (res-lump-struct arg2 'pivot structure :time (the-as float -1000000000.0))) + ((method-of-type res-lump get-property-value-float) + arg2 + 'spline-follow-dist-offset + 'interp + (the-as float -1000000000.0) + (the-as float #f) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'spline-follow-dist-offset + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when (the int f30-0) + (if arg0 + (format #t "spline follow dist offset ~M~%" f30-0) + ) + (format arg1 " tag spline-follow-dist-offset METERS(~M)~%" f30-0) + ) ) - ) - (format - arg1 - " tag campoints-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" - (-> s5-0 x) - (-> s5-0 y) - (-> s5-0 z) - ) ) - ) - ) + ) ) -(defun - cam-layout-save-tiltAdjust - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'tiltAdjust - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) - ) - (format (clear *res-key-string*) "~S~S" 'tiltAdjust '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup tiltAdjust deg ~R~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~R~%" f28-0) - (format #t "final ~R~%" (+ f30-0 f28-0)) +(defun cam-layout-save-campointsoffset ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((s5-0 (res-lump-struct arg2 'campoints-offset vector :time (the-as float -1000000000.0)))) + (the-as string (when s5-0 + (if arg0 + (format #t "index offset ~M ~M ~M~%" (-> s5-0 x) (-> s5-0 y) (-> s5-0 z)) + ) + (format + arg1 + " tag campoints-offset METERS(~M) METERS(~M) METERS(~M) 1.0 // vector~%" + (-> s5-0 x) + (-> s5-0 y) + (-> s5-0 z) + ) ) - (format - arg1 - " tag tiltAdjust-offset DEG(~R) // float~%" - f28-0 - ) - ) - ) + ) ) - ) ) -(defun - cam-layout-save-stringMinLength - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'stringMinLength - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-tiltAdjust ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'tiltAdjust + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'tiltAdjust '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup tiltAdjust deg ~R~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~R~%" f28-0) + (format #t "final ~R~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag tiltAdjust-offset DEG(~R) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'stringMinLength '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup stringMinLength ~M~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~M~%" f28-0) - (format #t "final ~M~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag stringMinLength-offset METERS(~M) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defun - cam-layout-save-stringMaxLength - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'stringMaxLength - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-stringMinLength ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'stringMinLength + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'stringMinLength '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup stringMinLength ~M~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~M~%" f28-0) + (format #t "final ~M~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag stringMinLength-offset METERS(~M) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'stringMaxLength '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup stringMaxLength ~M~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~M~%" f28-0) - (format #t "final ~M~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag stringMaxLength-offset METERS(~M) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defun - cam-layout-save-stringMinHeight - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'stringMinHeight - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-stringMaxLength ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'stringMaxLength + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'stringMaxLength '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup stringMaxLength ~M~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~M~%" f28-0) + (format #t "final ~M~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag stringMaxLength-offset METERS(~M) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'stringMinHeight '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup stringMinHeight ~M~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~M~%" f28-0) - (format #t "final ~M~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag stringMinHeight-offset METERS(~M) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defun - cam-layout-save-stringMaxHeight - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'stringMaxHeight - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-stringMinHeight ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'stringMinHeight + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'stringMinHeight '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup stringMinHeight ~M~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~M~%" f28-0) + (format #t "final ~M~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag stringMinHeight-offset METERS(~M) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'stringMaxHeight '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup stringMaxHeight ~M~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~M~%" f28-0) - (format #t "final ~M~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag stringMaxHeight-offset METERS(~M) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defun - cam-layout-save-stringCliffHeight - ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'stringCliffHeight - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* +(defun cam-layout-save-stringMaxHeight ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'stringMaxHeight + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'stringMaxHeight '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup stringMaxHeight ~M~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~M~%" f28-0) + (format #t "final ~M~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag stringMaxHeight-offset METERS(~M) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'stringCliffHeight '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) + ) + +(defun cam-layout-save-stringCliffHeight ((arg0 symbol) (arg1 string) (arg2 entity-actor)) + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'stringCliffHeight + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'stringCliffHeight '-offset) + (let ((f28-0 + (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup stringCliffHeight ~M~%" f30-0) + ) + (the-as + string + (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~M~%" f28-0) + (format #t "final ~M~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag stringCliffHeight-offset METERS(~M) // float~%" f28-0) + ) + ) ) - ) - (if arg0 - (format #t "setup stringCliffHeight ~M~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~M~%" f28-0) - (format #t "final ~M~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag stringCliffHeight-offset METERS(~M) // float~%" - f28-0 - ) - ) - ) ) - ) ) (defun cam-layout-save-maxAngle ((arg0 symbol) (arg1 string) (arg2 entity-actor)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - arg2 - 'maxAngle - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + arg2 + 'maxAngle + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s3-0 (method-of-type res-lump get-property-value-float)) + ) + (format (clear *res-key-string*) "~S~S" 'maxAngle '-offset) + (let ((f28-0 (s3-0 + arg2 + (string->symbol *res-key-string*) + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if arg0 + (format #t "setup maxAngle ~R~%" f30-0) + ) + (the-as string (when (!= f28-0 0.0) + (when arg0 + (format #t "offset ~R~%" f28-0) + (format #t "final ~R~%" (+ f30-0 f28-0)) + ) + (format arg1 " tag maxAngle-offset DEG(~R) // float~%" f28-0) + ) + ) ) - ) - (s3-0 (method-of-type res-lump get-property-value-float)) ) - (format (clear *res-key-string*) "~S~S" 'maxAngle '-offset) - (let - ((f28-0 - (s3-0 - arg2 - (string->symbol *res-key-string*) - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - (if arg0 - (format #t "setup maxAngle ~R~%" f30-0) - ) - (the-as string (when (!= f28-0 0.0) - (when arg0 - (format #t "offset ~R~%" f28-0) - (format #t "final ~R~%" (+ f30-0 f28-0)) - ) - (format - arg1 - " tag maxAngle-offset DEG(~R) // float~%" - f28-0 - ) - ) - ) - ) - ) ) -(defbehavior - clmf-save-single cam-layout - ((arg0 entity-camera) (arg1 symbol) (arg2 symbol)) +(defbehavior clmf-save-single cam-layout ((arg0 entity-camera) (arg1 symbol) (arg2 symbol)) (clear *temp-string*) (if arg2 - (format - *temp-string* - "dd_next/caminfo/~s.cam" - (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0)) - ) - (format *temp-string* "dd_next/caminfo/garbage") - ) + (format + *temp-string* + "dd_next/caminfo/~s.cam" + (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0)) + ) + (format *temp-string* "dd_next/caminfo/garbage") + ) (let ((s4-2 (new 'stack 'file-stream *temp-string* 'write))) - (if arg1 - (format - #t - "---------camera '~S'------------~%" - (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0)) - ) + (if arg1 + (format + #t + "---------camera '~S'------------~%" + (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0)) + ) + ) + (format s4-2 "#include /next/config_data/standard.m2d~%") + (format s4-2 "camera ~s {~%" (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0))) + (cam-layout-save-cam-rot arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-cam-trans arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-pivot arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-align arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-interesting arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-fov arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-focalpull arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-flags arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-introsplinetime arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-introsplineexitval arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-interptime arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-splineoffset arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-spline-follow-dist-offset arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-campointsoffset arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-tiltAdjust arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-stringMinLength arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-stringMaxLength arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-stringMinHeight arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-stringMaxHeight arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-stringCliffHeight arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-maxAngle arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-campoints-flags arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (cam-layout-save-focalpull-flags arg1 (the-as string s4-2) (the-as entity-actor arg0)) + (format s4-2 "}~%") + (file-stream-close s4-2) ) - (format s4-2 "#include /next/config_data/standard.m2d~%") - (format - s4-2 - "camera ~s {~%" - (res-lump-struct arg0 'name structure :time (the-as float -1000000000.0)) - ) - (cam-layout-save-cam-rot - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-cam-trans - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-pivot arg1 (the-as string s4-2) (the-as entity-actor arg0)) - (cam-layout-save-align arg1 (the-as string s4-2) (the-as entity-actor arg0)) - (cam-layout-save-interesting - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-fov arg1 (the-as string s4-2) (the-as entity-actor arg0)) - (cam-layout-save-focalpull - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-flags arg1 (the-as string s4-2) (the-as entity-actor arg0)) - (cam-layout-save-introsplinetime - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-introsplineexitval - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-interptime - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-splineoffset - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-spline-follow-dist-offset - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-campointsoffset - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-tiltAdjust - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-stringMinLength - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-stringMaxLength - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-stringMinHeight - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-stringMaxHeight - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-stringCliffHeight - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-maxAngle - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-campoints-flags - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (cam-layout-save-focalpull-flags - arg1 - (the-as string s4-2) - (the-as entity-actor arg0) - ) - (format s4-2 "}~%") - (file-stream-close s4-2) - ) ) (defbehavior clmf-save-one cam-layout ((arg0 symbol)) (let ((s5-1 (logtest? (the-as int arg0) 8)) (gp-1 (logtest? (the-as int arg0) 16)) ) - (if s5-1 - (format #t "~%~%~%=================================~%") + (if s5-1 + (format #t "~%~%~%=================================~%") + ) + (clmf-save-single (-> self cam-entity) s5-1 gp-1) + (if s5-1 + (format #t "===============================~%~%~%~%") + ) + (if gp-1 + (format + #t + "'~S' save completed~%" + (res-lump-struct (-> self cam-entity) 'name structure :time (the-as float -1000000000.0)) + ) + ) ) - (clmf-save-single (-> self cam-entity) s5-1 gp-1) - (if s5-1 - (format #t "===============================~%~%~%~%") - ) - (if gp-1 - (format - #t - "'~S' save completed~%" - (res-lump-struct - (-> self cam-entity) - 'name - structure - :time - (the-as float -1000000000.0) - ) - ) - ) - ) #t ) @@ -3036,29 +2239,29 @@ (let ((s5-1 (logtest? (the-as int arg0) 8)) (gp-1 (logtest? (the-as int arg0) 16)) ) - (if s5-1 - (format #t "~%~%~%=================================~%") - ) - (let ((v1-5 (-> *camera-engine* alive-list next0))) - *camera-engine* - (let ((s4-0 (-> v1-5 next0))) - (while (!= v1-5 (-> *camera-engine* alive-list-end)) - (let ((a0-4 (-> (the-as connection v1-5) param1))) - (clmf-save-single (the-as entity-camera a0-4) s5-1 gp-1) - ) - (set! v1-5 s4-0) + (if s5-1 + (format #t "~%~%~%=================================~%") + ) + (let ((v1-5 (-> *camera-engine* alive-list next0))) *camera-engine* - (set! s4-0 (-> s4-0 next0)) + (let ((s4-0 (-> v1-5 next0))) + (while (!= v1-5 (-> *camera-engine* alive-list-end)) + (let ((a0-4 (-> (the-as connection v1-5) param1))) + (clmf-save-single (the-as entity-camera a0-4) s5-1 gp-1) + ) + (set! v1-5 s4-0) + *camera-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) ) - ) + (if s5-1 + (format #t "===============================~%~%~%~%") + ) + (if gp-1 + (format #t "camera save all completed~%") + ) ) - (if s5-1 - (format #t "===============================~%~%~%~%") - ) - (if gp-1 - (format #t "camera save all completed~%") - ) - ) #t ) @@ -3077,171 +2280,122 @@ (let ((s4-0 (/ arg0 8)) (gp-0 (new 'stack 'clmf-cam-flag-toggle-info)) ) - (set! (-> gp-0 key) (-> self res-key)) - (cond - ((and - (= arg1 'vol-flags) - (>= (-> self res-key) (the float (-> self first-cutoutvol))) - ) - (set! - (-> gp-0 key) - (- (-> gp-0 key) (the float (-> self first-cutoutvol))) - ) - (set! arg1 (the-as int 'cutoutvol-flags)) - ) - ((and - (= arg1 'vol-flags) - (>= (-> self res-key) (the float (-> self first-pvol))) - ) - (set! (-> gp-0 key) (- (-> gp-0 key) (the float (-> self first-pvol)))) - (set! arg1 (the-as int 'pvol-flags)) - ) - ) - (let ((s3-0 (method-of-type res-lump get-property-value)) - (s2-0 (-> self cam-entity)) - ) - (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-on) - (set! - (-> gp-0 force-on) - (the-as - int - (s3-0 - s2-0 - (string->symbol *res-key-string*) - 'exact - (-> gp-0 key) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + (set! (-> gp-0 key) (-> self res-key)) + (cond + ((and (= arg1 'vol-flags) (>= (-> self res-key) (the float (-> self first-cutoutvol)))) + (set! (-> gp-0 key) (- (-> gp-0 key) (the float (-> self first-cutoutvol)))) + (set! arg1 (the-as int 'cutoutvol-flags)) + ) + ((and (= arg1 'vol-flags) (>= (-> self res-key) (the float (-> self first-pvol)))) + (set! (-> gp-0 key) (- (-> gp-0 key) (the float (-> self first-pvol)))) + (set! arg1 (the-as int 'pvol-flags)) ) ) - ) - ) - (let ((s3-1 (method-of-type res-lump get-property-value)) - (s2-1 (-> self cam-entity)) - ) - (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-off) - (set! - (-> gp-0 force-off) - (the-as - int - (s3-1 - s2-1 - (string->symbol *res-key-string*) - 'exact - (-> gp-0 key) - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) - ) - (cond - ((logtest? (-> gp-0 force-off) s4-0) - (logclear! (-> gp-0 force-off) s4-0) - (logior! (-> gp-0 force-on) s4-0) - (let* ((s4-1 (-> self cam-entity)) - (s3-2 (method-of-object s4-1 add-32bit-data!)) - (s2-2 - (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32)) - ) - (s1-2 (shl (the-as int (-> gp-0 key)) 32)) - ) - (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-off) - (s3-2 - s4-1 - (the-as - res-tag - (make-u128 - s2-2 - (logior - s1-2 - (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32) + (let ((s3-0 (method-of-type res-lump get-property-value)) + (s2-0 (-> self cam-entity)) ) - ) - ) - (-> gp-0 force-off) - ) - ) - (let* ((s4-2 (-> self cam-entity)) - (s3-3 (method-of-object s4-2 add-32bit-data!)) - (s2-3 - (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32)) - ) - (s1-3 (shl (the-as int (-> gp-0 key)) 32)) - ) (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-on) - (s3-3 - s4-2 - (the-as - res-tag - (make-u128 - s2-3 - (logior - s1-3 - (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32) - ) - ) - ) - (-> gp-0 force-on) - ) - ) - ) - ((logtest? (-> gp-0 force-on) s4-0) - (logclear! (-> gp-0 force-on) s4-0) - (let* ((s4-3 (-> self cam-entity)) - (s3-4 (method-of-object s4-3 add-32bit-data!)) - (s2-4 - (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32)) - ) - (s1-4 (shl (the-as int (-> gp-0 key)) 32)) + (set! (-> gp-0 force-on) (the-as int (s3-0 + s2-0 + (string->symbol *res-key-string*) + 'exact + (-> gp-0 key) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) ) - (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-on) - (s3-4 - s4-3 - (the-as - res-tag - (make-u128 - s2-4 - (logior - s1-4 - (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32) - ) - ) - ) - (-> gp-0 force-on) - ) ) - ) - (else - (logior! (-> gp-0 force-off) s4-0) - (let* ((s4-4 (-> self cam-entity)) - (s3-5 (method-of-object s4-4 add-32bit-data!)) - (s2-5 - (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32)) - ) - (s1-5 (shl (the-as int (-> gp-0 key)) 32)) - ) + (let ((s3-1 (method-of-type res-lump get-property-value)) + (s2-1 (-> self cam-entity)) + ) (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-off) - (s3-5 - s4-4 - (the-as - res-tag - (make-u128 - s2-5 - (logior - s1-5 - (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32) - ) - ) - ) - (-> gp-0 force-off) - ) + (set! (-> gp-0 force-off) (the-as int (s3-1 + s2-1 + (string->symbol *res-key-string*) + 'exact + (-> gp-0 key) + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (cond + ((logtest? (-> gp-0 force-off) s4-0) + (logclear! (-> gp-0 force-off) s4-0) + (logior! (-> gp-0 force-on) s4-0) + (let* ((s4-1 (-> self cam-entity)) + (s3-2 (method-of-object s4-1 add-32bit-data!)) + (s2-2 (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32))) + (s1-2 (shl (the-as int (-> gp-0 key)) 32)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-off) + (s3-2 + s4-1 + (the-as + res-tag + (make-u128 s2-2 (logior s1-2 (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32))) + ) + (-> gp-0 force-off) + ) + ) + (let* ((s4-2 (-> self cam-entity)) + (s3-3 (method-of-object s4-2 add-32bit-data!)) + (s2-3 (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32))) + (s1-3 (shl (the-as int (-> gp-0 key)) 32)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-on) + (s3-3 + s4-2 + (the-as + res-tag + (make-u128 s2-3 (logior s1-3 (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32))) + ) + (-> gp-0 force-on) + ) + ) + ) + ((logtest? (-> gp-0 force-on) s4-0) + (logclear! (-> gp-0 force-on) s4-0) + (let* ((s4-3 (-> self cam-entity)) + (s3-4 (method-of-object s4-3 add-32bit-data!)) + (s2-4 (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32))) + (s1-4 (shl (the-as int (-> gp-0 key)) 32)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-on) + (s3-4 + s4-3 + (the-as + res-tag + (make-u128 s2-4 (logior s1-4 (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32))) + ) + (-> gp-0 force-on) + ) + ) + ) + (else + (logior! (-> gp-0 force-off) s4-0) + (let* ((s4-4 (-> self cam-entity)) + (s3-5 (method-of-object s4-4 add-32bit-data!)) + (s2-5 (logior (shl #x10000 32) (shr (shl (the-as int int32) 32) 32))) + (s1-5 (shl (the-as int (-> gp-0 key)) 32)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg1) '-off) + (s3-5 + s4-4 + (the-as + res-tag + (make-u128 s2-5 (logior s1-5 (shr (shl (the-as int (string->symbol *res-key-string*)) 32) 32))) + ) + (-> gp-0 force-off) + ) + ) + ) ) - ) ) - ) #t ) @@ -3249,149 +2403,123 @@ (let ((s5-0 (/ (the-as int arg1) 8)) (f30-0 (-> self res-key)) ) - (cond - ((and - (= arg2 'vol-flags) - (>= (-> self res-key) (the float (-> self first-cutoutvol))) - ) - (set! f30-0 (- f30-0 (the float (-> self first-cutoutvol)))) - (set! arg2 (the-as uint 'cutoutvol-flags)) - ) - ((and - (= arg2 'vol-flags) - (>= (-> self res-key) (the float (-> self first-pvol))) - ) - (set! f30-0 (- f30-0 (the float (-> self first-pvol)))) - (set! arg2 (the-as uint 'pvol-flags)) - ) - ) - (let ((s3-0 (method-of-type res-lump get-property-value)) - (s2-0 (-> self cam-entity)) - ) - (format (clear *res-key-string*) "~S~S" (the-as object arg2) '-off) (cond - ((logtest? - (s3-0 - s2-0 - (string->symbol *res-key-string*) - 'exact - f30-0 - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - s5-0 + ((and (= arg2 'vol-flags) (>= (-> self res-key) (the float (-> self first-cutoutvol)))) + (set! f30-0 (- f30-0 (the float (-> self first-cutoutvol)))) + (set! arg2 (the-as uint 'cutoutvol-flags)) + ) + ((and (= arg2 'vol-flags) (>= (-> self res-key) (the float (-> self first-pvol)))) + (set! f30-0 (- f30-0 (the float (-> self first-pvol)))) + (set! arg2 (the-as uint 'pvol-flags)) ) - (format arg0 ": off") ) - ((let ((s3-1 (method-of-type res-lump get-property-value)) - (s2-1 (-> self cam-entity)) - ) - (format (clear *res-key-string*) "~S~S" (the-as object arg2) '-on) - (logtest? - (s3-1 - s2-1 - (string->symbol *res-key-string*) - 'exact - f30-0 - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + (let ((s3-0 (method-of-type res-lump get-property-value)) + (s2-0 (-> self cam-entity)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg2) '-off) + (cond + ((logtest? + (s3-0 + s2-0 + (string->symbol *res-key-string*) + 'exact + f30-0 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + s5-0 + ) + (format arg0 ": off") ) - s5-0 - ) - ) - (format arg0 ": on") - ) - ((zero? - (logand - ((method-of-type res-lump get-property-value) - (-> self cam-entity) - (the-as symbol arg2) - 'exact - f30-0 - (the-as uint128 0) - (the-as (pointer res-tag) #f) - *res-static-buf* + ((let ((s3-1 (method-of-type res-lump get-property-value)) + (s2-1 (-> self cam-entity)) + ) + (format (clear *res-key-string*) "~S~S" (the-as object arg2) '-on) + (logtest? + (s3-1 + s2-1 + (string->symbol *res-key-string*) + 'exact + f30-0 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + s5-0 + ) + ) + (format arg0 ": on") ) - s5-0 + ((zero? (logand + ((method-of-type res-lump get-property-value) + (-> self cam-entity) + (the-as symbol arg2) + 'exact + f30-0 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + s5-0 + ) + ) + (format arg0 ": off(maya)") + ) + (else + (format arg0 ": on(maya)") + ) ) - ) - (format arg0 ": off(maya)") ) - (else - (format arg0 ": on(maya)") - ) - ) ) - ) #t ) -(defbehavior - clmf-cam-float-adjust cam-layout - ((arg0 symbol) (arg1 (pointer float))) +(defbehavior clmf-cam-float-adjust cam-layout ((arg0 symbol) (arg1 (pointer float))) (cam-layout-print 16 *camera-layout-message-ypos* "left stick adjusts value") (set! *camera-layout-message-ypos* (+ *camera-layout-message-ypos* 8)) - (let - ((f30-0 - ((method-of-type res-lump get-property-value-float) - (-> self cam-entity) - arg0 - 'interp - (the-as float -1000000000.0) - (-> (new 'static 'array float 1 0.0) 0) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - (f0-0 (-> arg1 0)) - ) - (if (= f0-0 0.0) - (set! f0-0 (-> (new 'static 'array float 1 1.0) 0)) - ) - (let - ((f0-2 - (+ - f30-0 - (analog-input - (the-as int (-> *cpad-list* cpads 0 leftx)) - (-> (new 'static 'array float 1 128.0) 0) - (-> (new 'static 'array float 1 48.0) 0) - (-> (new 'static 'array float 1 110.0) 0) - f0-0 + (let ((f30-0 ((method-of-type res-lump get-property-value-float) + (-> self cam-entity) + arg0 + 'interp + (the-as float -1000000000.0) + (-> (new 'static 'array float 1 0.0) 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (f0-0 (-> arg1 0)) + ) + (if (= f0-0 0.0) + (set! f0-0 (-> (new 'static 'array float 1 1.0) 0)) + ) + (let ((f0-2 + (+ f30-0 + (analog-input + (the-as int (-> *cpad-list* cpads 0 leftx)) + (-> (new 'static 'array float 1 128.0) 0) + (-> (new 'static 'array float 1 48.0) 0) + (-> (new 'static 'array float 1 110.0) 0) + f0-0 + ) + ) + ) + ) + (add-32bit-data! + (-> self cam-entity) + (new 'static 'res-tag :name arg0 :key-frame -1000000000.0 :elt-count #x1 :elt-type float) + f0-2 ) - ) ) - ) - (add-32bit-data! - (-> self cam-entity) - (new 'static 'res-tag - :name arg0 - :key-frame -1000000000.0 - :elt-count #x1 - :elt-type float - ) - f0-2 - ) ) - ) (set! *camera-read-analog* #f) #t ) (defbehavior clmf-cam-meters cam-layout ((arg0 meters) (arg1 symbol)) - (let - ((f0-0 - (cam-slave-get-float - (-> self cam-entity) - arg1 - (-> (new 'static 'array float 1 0.0) 0) - ) - ) + (let ((f0-0 (cam-slave-get-float (-> self cam-entity) arg1 (-> (new 'static 'array float 1 0.0) 0)))) + (format arg0 ": ~M" f0-0) ) - (format arg0 ": ~M" f0-0) - ) #t ) @@ -3401,23 +2529,15 @@ ) (defbehavior clmf-cam-deg cam-layout ((arg0 degrees) (arg1 symbol)) - (format - arg0 - ": ~R" - (cam-slave-get-float - (-> self cam-entity) - arg1 - (-> (new 'static 'array float 1 0.0) 0) - ) - ) + (format arg0 ": ~R" (cam-slave-get-float (-> self cam-entity) arg1 (-> (new 'static 'array float 1 0.0) 0))) #t ) (defbehavior clmf-cam-intro-time cam-layout ((arg0 float) (arg1 symbol)) (let ((f30-0 (cam-slave-get-intro-step (-> self cam-entity)))) - (format arg0 ": ~f" (/ 0.016666668 f30-0)) - (set! (-> *CAM_LAYOUT-bank* intro-step) f30-0) - ) + (format arg0 ": ~f" (/ 0.016666668 f30-0)) + (set! (-> *CAM_LAYOUT-bank* intro-step) f30-0) + ) #t ) @@ -3427,15 +2547,7 @@ ) (defbehavior clmf-cam-float cam-layout ((arg0 float) (arg1 symbol)) - (format - arg0 - ": ~f" - (cam-slave-get-float - (-> self cam-entity) - arg1 - (-> (new 'static 'array float 1 0.0) 0) - ) - ) + (format arg0 ": ~f" (cam-slave-get-float (-> self cam-entity) arg1 (-> (new 'static 'array float 1 0.0) 0))) #t ) @@ -3443,1291 +2555,1109 @@ (local-vars (sv-16 res-tag)) (format arg0 ":") (set! sv-16 (new 'static 'res-tag)) - (let - ((s5-1 - (res-lump-data - (-> self cam-entity) - arg1 - pointer - :tag-ptr - (& sv-16) - :time - (the-as float -1000000000.0) + (let ((s5-1 (res-lump-data (-> self cam-entity) arg1 pointer :tag-ptr (& sv-16) :time (the-as float -1000000000.0))) + ) + (when s5-1 + (dotimes (s4-0 (the-as int (-> sv-16 elt-count))) + (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) + ) ) - ) ) - (when s5-1 - (dotimes (s4-0 (the-as int (-> sv-16 elt-count))) - (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) - ) - ) - ) #t ) (define *clm-focalpull-attr* (new 'static 'clm - :title "---focalpull attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---focalpull attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 2 :allocated-length 2 - (new 'static 'clm-list-item - :description "radial " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 16 - :val-parm1-basic 'focalpull-flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 16 - :parm1-basic 'focalpull-flags - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) ) - ) - (new 'static 'clm-list-item - :description "spherical " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 8 - :val-parm1-basic 'focalpull-flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 8 - :parm1-basic 'focalpull-flags - ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) + ) + (new 'static 'clm-list + :tracker #f + :items + (new + 'static + 'boxed-array + :type clm-list-item :length 2 :allocated-length 2 + (new 'static 'clm-list-item + :description "radial " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 16 + :val-parm1-basic 'focalpull-flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 16 + :parm1-basic 'focalpull-flags + ) + ) + ) + (new 'static 'clm-list-item + :description "spherical " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 8 + :val-parm1-basic 'focalpull-flags + :actions + (new 'static 'boxed-array :type clm-item-action :length 1 :allocated-length 1 (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 8 + :parm1-basic 'focalpull-flags + ) + ) + ) + ) ) - ) ) - ) ) - ) ) (define *clm-index-attr* (new 'static 'clm - :title "---index attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---index attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 2 :allocated-length 2 - (new 'static 'clm-list-item - :description "radial " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 16 - :val-parm1-basic 'campoints-flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 16 - :parm1-basic 'campoints-flags - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) ) - ) - (new 'static 'clm-list-item - :description "spherical " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 8 - :val-parm1-basic 'campoints-flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 8 - :parm1-basic 'campoints-flags - ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) + ) + (new 'static 'clm-list + :tracker #f + :items + (new + 'static + 'boxed-array + :type clm-list-item :length 2 :allocated-length 2 + (new 'static 'clm-list-item + :description "radial " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 16 + :val-parm1-basic 'campoints-flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 16 + :parm1-basic 'campoints-flags + ) + ) + ) + (new 'static 'clm-list-item + :description "spherical " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 8 + :val-parm1-basic 'campoints-flags + :actions + (new 'static 'boxed-array :type clm-item-action :length 1 :allocated-length 1 (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 8 + :parm1-basic 'campoints-flags + ) + ) + ) + ) ) - ) ) - ) ) - ) ) (define *clm-intro-attr* (new 'static 'clm - :title "---intro attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---intro attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 2 :allocated-length 2 - (new 'static 'clm-list-item - :description "time " - :track-val #f - :val-func 'clmf-cam-intro-time - :val-parm0-basic 'intro-time - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'intro-time-offset - :parm1-basic (new 'static 'bfloat :data 0.01) - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) ) - ) - (new 'static 'clm-list-item - :description "exitValue" - :track-val #f - :val-func 'clmf-cam-float - :val-parm0-basic 'intro-exitValue - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'intro-exitValue-offset - :parm1-basic (new 'static 'bfloat :data 0.001) - ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) ) - ) + (new 'static 'clm-list :tracker #f :items (new + 'static + 'boxed-array + :type clm-list-item :length 2 :allocated-length 2 + (new 'static 'clm-list-item + :description "time " + :track-val #f + :val-func 'clmf-cam-intro-time + :val-parm0-basic 'intro-time + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'intro-time-offset + :parm1-basic (new 'static 'bfloat :data 0.01) + ) + ) + ) + (new 'static 'clm-list-item + :description "exitValue" + :track-val #f + :val-func 'clmf-cam-float + :val-parm0-basic 'intro-exitValue + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'intro-exitValue-offset + :parm1-basic (new 'static 'bfloat :data 0.001) + ) + ) + ) + ) + ) ) - ) ) - ) ) (define *clm-spline-attr* (new 'static 'clm - :title "---spline attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---spline attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 1 :allocated-length 1 - (new 'static 'clm-list-item - :description "followDist" - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'spline-follow-dist - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'spline-follow-dist-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) ) - ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) + ) + (new 'static 'clm-list :tracker #f :items (new + 'static + 'boxed-array + :type clm-list-item :length 1 :allocated-length 1 + (new 'static 'clm-list-item + :description "followDist" + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'spline-follow-dist + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'spline-follow-dist-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + ) + ) ) - ) ) - ) ) (define *clm-vol-attr* (new 'static 'clm - :title "---volume attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---volume attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 1 :allocated-length 1 - (new 'static 'clm-list-item - :description "airSwitch" - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 8 - :val-parm1-basic 'vol-flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 8 - :parm1-basic 'vol-flags - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) + ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) + ) + (new 'static 'clm-list + :tracker #f + :items + (new + 'static + 'boxed-array + :type clm-list-item :length 1 :allocated-length 1 + (new 'static 'clm-list-item + :description "airSwitch" + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 8 + :val-parm1-basic 'vol-flags + :actions + (new 'static 'boxed-array :type clm-item-action :length 1 :allocated-length 1 (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 8 + :parm1-basic 'vol-flags + ) + ) + ) + ) ) - ) ) - ) ) - ) ) (define *clm-cam-attr* (new 'static 'clm - :title "---camera attributes--" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func '*clm-edit* - ) - ) - (new 'static 'clm-item - :description "adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---camera attributes--" + :items + (new 'static 'boxed-array - :type clm-list-item :length 18 :allocated-length 18 - (new 'static 'clm-list-item - :description "drag " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 #x400 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 #x400 - :parm1-basic 'flags - ) + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func '*clm-edit*) ) - ) - (new 'static 'clm-list-item - :description "fov " - :track-val #f - :val-func 'clmf-cam-fov - :val-parm0-basic 'fov - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'fov-offset - :parm1-basic (new 'static 'bfloat :data 91.022224) - ) + (new 'static 'clm-item + :description "adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) ) - ) - (new 'static 'clm-list-item - :description "focalPull " - :track-val #f - :val-func 'clmf-cam-deg - :val-parm0-basic 'focalPull - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'focalPull-offset - :parm1-basic (new 'static 'bfloat :data 91.022224) - ) + (new 'static 'clm-list + :tracker #f + :items + (new + 'static + 'boxed-array + :type clm-list-item :length 18 :allocated-length 18 + (new 'static 'clm-list-item + :description "drag " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 #x400 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 #x400 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "fov " + :track-val #f + :val-func 'clmf-cam-fov + :val-parm0-basic 'fov + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'fov-offset + :parm1-basic (new 'static 'bfloat :data 91.022224) + ) + ) + ) + (new 'static 'clm-list-item + :description "focalPull " + :track-val #f + :val-func 'clmf-cam-deg + :val-parm0-basic 'focalPull + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'focalPull-offset + :parm1-basic (new 'static 'bfloat :data 91.022224) + ) + ) + ) + (new 'static 'clm-list-item + :description "interpTime " + :track-val #f + :val-func 'clmf-cam-interp-time + :val-parm0-basic 'interpTime + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'interpTime-offset + :parm1-basic (new 'static 'bfloat :data 0.01) + ) + ) + ) + (new 'static 'clm-list-item + :description "sameSide " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 16 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 16 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "spherical " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 32 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 32 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "MinLength " + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'stringMinLength + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'stringMinLength-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + (new 'static 'clm-list-item + :description "MaxLength " + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'stringMaxLength + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'stringMaxLength-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + (new 'static 'clm-list-item + :description "MinHeight " + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'stringMinHeight + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'stringMinHeight-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + (new 'static 'clm-list-item + :description "MaxHeight " + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'stringMaxHeight + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'stringMaxHeight-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + (new 'static 'clm-list-item + :description "cliffHeight" + :track-val #f + :val-func 'clmf-cam-meters + :val-parm0-basic 'stringCliffHeight + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'stringCliffHeight-offset + :parm1-basic (new 'static 'bfloat :data 409.6) + ) + ) + ) + (new 'static 'clm-list-item + :description "alternates " + :track-val #f + :val-func 'clmf-cam-string + :val-parm0-basic 'alternates + :actions + (new 'static 'boxed-array :type clm-item-action :length 0 :allocated-length 0) + ) + (new 'static 'clm-list-item + :description "maxAngle " + :track-val #f + :val-func 'clmf-cam-deg + :val-parm0-basic 'maxAngle + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'maxAngle-offset + :parm1-basic (new 'static 'bfloat :data 91.022224) + ) + ) + ) + (new 'static 'clm-list-item + :description "shrinkAngle" + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 #x4000 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 #x4000 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "noRotate " + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 #x40000 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 #x40000 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "tiltAdjust " + :track-val #f + :val-func 'clmf-cam-deg + :val-parm0-basic 'tiltAdjust + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'tiltAdjust-offset + :parm1-basic (new 'static 'bfloat :data 91.022224) + ) + ) + ) + (new 'static 'clm-list-item + :description "stickyAngle" + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 #x80000 + :val-parm1-basic 'flags + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 #x80000 + :parm1-basic 'flags + ) + ) + ) + (new 'static 'clm-list-item + :description "airExit" + :track-val #f + :val-func 'clmf-cam-flag + :val-parm0 #x100000 + :val-parm1-basic 'flags + :actions + (new 'static 'boxed-array :type clm-item-action :length 1 :allocated-length 1 (new 'static 'clm-item-action + :button #x4000 + :options #x1 + :func 'clmf-cam-flag-toggle + :parm0 #x100000 + :parm1-basic 'flags + ) + ) + ) + ) ) - ) - (new 'static 'clm-list-item - :description "interpTime " - :track-val #f - :val-func 'clmf-cam-interp-time - :val-parm0-basic 'interpTime - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'interpTime-offset - :parm1-basic (new 'static 'bfloat :data 0.01) - ) - ) - ) - (new 'static 'clm-list-item - :description "sameSide " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 16 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 16 - :parm1-basic 'flags - ) - ) - ) - (new 'static 'clm-list-item - :description "spherical " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 32 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 32 - :parm1-basic 'flags - ) - ) - ) - (new 'static 'clm-list-item - :description "MinLength " - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'stringMinLength - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'stringMinLength-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) - ) - ) - (new 'static 'clm-list-item - :description "MaxLength " - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'stringMaxLength - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'stringMaxLength-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) - ) - ) - (new 'static 'clm-list-item - :description "MinHeight " - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'stringMinHeight - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'stringMinHeight-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) - ) - ) - (new 'static 'clm-list-item - :description "MaxHeight " - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'stringMaxHeight - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'stringMaxHeight-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) - ) - ) - (new 'static 'clm-list-item - :description "cliffHeight" - :track-val #f - :val-func 'clmf-cam-meters - :val-parm0-basic 'stringCliffHeight - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'stringCliffHeight-offset - :parm1-basic (new 'static 'bfloat :data 409.6) - ) - ) - ) - (new 'static 'clm-list-item - :description "alternates " - :track-val #f - :val-func 'clmf-cam-string - :val-parm0-basic 'alternates - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 0 :allocated-length 0 - ) - ) - (new 'static 'clm-list-item - :description "maxAngle " - :track-val #f - :val-func 'clmf-cam-deg - :val-parm0-basic 'maxAngle - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'maxAngle-offset - :parm1-basic (new 'static 'bfloat :data 91.022224) - ) - ) - ) - (new 'static 'clm-list-item - :description "shrinkAngle" - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 #x4000 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 #x4000 - :parm1-basic 'flags - ) - ) - ) - (new 'static 'clm-list-item - :description "noRotate " - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 #x40000 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 #x40000 - :parm1-basic 'flags - ) - ) - ) - (new 'static 'clm-list-item - :description "tiltAdjust " - :track-val #f - :val-func 'clmf-cam-deg - :val-parm0-basic 'tiltAdjust - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'tiltAdjust-offset - :parm1-basic (new 'static 'bfloat :data 91.022224) - ) - ) - ) - (new 'static 'clm-list-item - :description "stickyAngle" - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 #x80000 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 #x80000 - :parm1-basic 'flags - ) - ) - ) - (new 'static 'clm-list-item - :description "airExit" - :track-val #f - :val-func 'clmf-cam-flag - :val-parm0 #x100000 - :val-parm1-basic 'flags - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-cam-flag-toggle - :parm0 #x100000 - :parm1-basic 'flags - ) - ) - ) ) - ) ) - ) ) (define *clm-cam-lookthrough* (new 'static 'clm - :title "---cam-lookthrough---" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 5 :allocated-length 5 - (new 'static 'clm-item - :description " " - :button-symbol 'x - :action - (new 'static 'clm-item-action - :button #x4000 - :options #x4 - :func 'clmf-look-through - ) - ) - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func 'clmf-to-edit - ) - ) - (new 'static 'clm-item - :description "pos/rot" - :button-symbol 'x - :action - (new 'static 'clm-item-action - :button #x4000 - :options #x8 - :func 'clmf-pos-rot - :parm0-basic 'trans-offset - :parm1-basic 'rot-offset - ) - ) - (new 'static 'clm-item - :description " adjust" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :func #f) - ) - (new 'static 'clm-list - :tracker #f - :items - (new + :title "---cam-lookthrough---" + :items + (new 'static 'boxed-array - :type clm-list-item :length 1 :allocated-length 1 - (new 'static 'clm-list-item - :description "fov" - :track-val #f - :val-func 'clmf-cam-fov - :val-parm0-basic 'fov - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 1 :allocated-length 1 - (new 'static 'clm-item-action - :button #x4000 - :func 'clmf-cam-float-adjust - :parm0-basic 'fov-offset - :parm1-basic (new 'static 'bfloat :data 91.022224) - ) + :type clm-basic :length 5 :allocated-length 5 + (new 'static 'clm-item + :description " " + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :options #x4 :func 'clmf-look-through) ) - ) + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func 'clmf-to-edit) + ) + (new 'static 'clm-item + :description "pos/rot" + :button-symbol 'x + :action + (new 'static 'clm-item-action + :button #x4000 + :options #x8 + :func 'clmf-pos-rot + :parm0-basic 'trans-offset + :parm1-basic 'rot-offset + ) + ) + (new 'static 'clm-item + :description " adjust" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :func #f) + ) + (new 'static 'clm-list :tracker #f :items (new + 'static + 'boxed-array + :type clm-list-item :length 1 :allocated-length 1 + (new 'static 'clm-list-item + :description "fov" + :track-val #f + :val-func 'clmf-cam-fov + :val-parm0-basic 'fov + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 1 :allocated-length 1 + (new 'static 'clm-item-action + :button #x4000 + :func 'clmf-cam-float-adjust + :parm0-basic 'fov-offset + :parm1-basic (new 'static 'bfloat :data 91.022224) + ) + ) + ) + ) + ) ) - ) ) - ) ) (define *clm-edit* (new 'static 'clm - :title "---edit---" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 6 :allocated-length 6 - (new 'static 'clm-item - :description " ok" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func 'clmf-to-select - ) - ) - (new 'static 'clm-item - :description "attributes" - :button-symbol 'x - :action - (new 'static 'clm-item-action :button #x4000 :options #x1 :func #f) - ) - (new 'static 'clm-item - :description " edit part" - :button-symbol 'circle - :action - (new 'static 'clm-item-action :button #x2000 :options #x1 :func #f) - ) - (new 'static 'clm-item - :description "scale/next" - :button-symbol 'r2 - :action - (new 'static 'clm-item-action :button #x200 :func #f) - ) - (new 'static 'clm-item - :description " pos/rot" - :button-symbol 'l2 - :action - (new 'static 'clm-item-action :button #x100 :func #f) - ) - (new 'static 'clm-list - :tracker '*camera-layout-blink* - :items - (new + :title "---edit---" + :items + (new 'static 'boxed-array - :type clm-list-item :length 9 :allocated-length 9 - (new 'static 'clm-list-item - :description "camera " - :track-val 'camera - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func '*clm-cam-attr* - ) - (new 'static 'clm-item-action - :button #x2000 - :func '*clm-cam-lookthrough* - ) - (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'trans-offset - :parm1-basic 'rot-offset - ) + :type clm-basic :length 6 :allocated-length 6 + (new 'static 'clm-item + :description " ok" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func 'clmf-to-select) ) - ) - (new 'static 'clm-list-item - :description "volume " - :track-val 'volume - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-to-vol-attr - ) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x200 :func 'clmf-next-vol-dpad) - (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) + (new 'static 'clm-item + :description "attributes" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :options #x1 :func #f) ) - ) - (new 'static 'clm-list-item - :description "align " - :track-val 'align - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'align-offset - :parm1-basic #f - ) + (new 'static 'clm-item + :description " edit part" + :button-symbol 'circle + :action + (new 'static 'clm-item-action :button #x2000 :options #x1 :func #f) ) - ) - (new 'static 'clm-list-item - :description "pivot " - :track-val 'pivot - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'pivot-offset - :parm1-basic #f - ) + (new 'static 'clm-item + :description "scale/next" + :button-symbol 'r2 + :action + (new 'static 'clm-item-action :button #x200 :func #f) ) - ) - (new 'static 'clm-list-item - :description "interesting" - :track-val 'interesting - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) - (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'interesting-offset - :parm1-basic #f - ) + (new 'static 'clm-item + :description " pos/rot" + :button-symbol 'l2 + :action + (new 'static 'clm-item-action :button #x100 :func #f) ) - ) - (new 'static 'clm-list-item - :description "spline " - :track-val 'spline - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action :button #x4000 :func 'clmf-to-spline-attr) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'spline-offset - :parm1-basic #f - ) + (new 'static 'clm-list + :tracker '*camera-layout-blink* + :items + (new + 'static + 'boxed-array + :type clm-list-item :length 9 :allocated-length 9 + (new 'static 'clm-list-item + :description "camera " + :track-val 'camera + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :options #x1 :func '*clm-cam-attr*) + (new 'static 'clm-item-action :button #x2000 :func '*clm-cam-lookthrough*) + (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) + (new 'static 'clm-item-action + :button #x100 + :func 'clmf-pos-rot + :parm0-basic 'trans-offset + :parm1-basic 'rot-offset + ) + ) + ) + (new 'static 'clm-list-item + :description "volume " + :track-val 'volume + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-to-vol-attr) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x200 :func 'clmf-next-vol-dpad) + (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) + ) + ) + (new 'static 'clm-list-item + :description "align " + :track-val 'align + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x100 :func 'clmf-pos-rot :parm0-basic 'align-offset :parm1-basic #f) + ) + ) + (new 'static 'clm-list-item + :description "pivot " + :track-val 'pivot + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x100 :func 'clmf-pos-rot :parm0-basic 'pivot-offset :parm1-basic #f) + ) + ) + (new 'static 'clm-list-item + :description "interesting" + :track-val 'interesting + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-bna) + (new 'static 'clm-item-action :button #x200 :func 'clmf-bna) + (new 'static 'clm-item-action + :button #x100 + :func 'clmf-pos-rot + :parm0-basic 'interesting-offset + :parm1-basic #f + ) + ) + ) + (new 'static 'clm-list-item + :description "spline " + :track-val 'spline + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :func 'clmf-to-spline-attr) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x100 :func 'clmf-pos-rot :parm0-basic 'spline-offset :parm1-basic #f) + ) + ) + (new 'static 'clm-list-item + :description "intro " + :track-val 'intro + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-to-intro-attr) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) + ) + ) + (new 'static 'clm-list-item + :description "index " + :track-val 'index + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-to-index-attr) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x100 :func 'clmf-pos-rot :parm0-basic 'campoints-offset) + ) + ) + (new 'static 'clm-list-item + :description "focalpull" + :track-val 'focalpull + :val-func #f + :actions + (new + 'static + 'boxed-array + :type clm-item-action :length 4 :allocated-length 4 + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-to-focalpull-attr) + (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) + (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) + ) + ) + ) ) - ) - (new 'static 'clm-list-item - :description "intro " - :track-val 'intro - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-to-intro-attr - ) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) - ) - ) - (new 'static 'clm-list-item - :description "index " - :track-val 'index - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-to-index-attr - ) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) - (new 'static 'clm-item-action - :button #x100 - :func 'clmf-pos-rot - :parm0-basic 'campoints-offset - ) - ) - ) - (new 'static 'clm-list-item - :description "focalpull" - :track-val 'focalpull - :val-func #f - :actions - (new - 'static - 'boxed-array - :type clm-item-action :length 4 :allocated-length 4 - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-to-focalpull-attr - ) - (new 'static 'clm-item-action :button #x2000 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x200 :func 'clmf-implement) - (new 'static 'clm-item-action :button #x100 :func 'clmf-implement) - ) - ) ) - ) ) - ) ) (define *clm-save-all* (new 'static 'clm - :title "---save all?---" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " save all" - :button-symbol 'x - :action - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-save-all - :parm0 16 + :title "---save all?---" + :items + (new + 'static + 'boxed-array + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " save all" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-save-all :parm0 16) + ) + (new 'static 'clm-item + :description "print all" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func 'clmf-save-all :parm0 8) + ) + (new 'static 'clm-item + :description " done" + :button-symbol 'triangle + :action + (new 'static 'clm-item-action :button #x1000 :options #x1 :func 'clmf-to-select) + ) ) - ) - (new 'static 'clm-item - :description "print all" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func 'clmf-save-all - :parm0 8 - ) - ) - (new 'static 'clm-item - :description " done" - :button-symbol 'triangle - :action - (new 'static 'clm-item-action - :button #x1000 - :options #x1 - :func 'clmf-to-select - ) - ) ) - ) ) (define *clm-save-one* (new 'static 'clm - :title "---single save?---" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 3 :allocated-length 3 - (new 'static 'clm-item - :description " single save" - :button-symbol 'x - :action - (new 'static 'clm-item-action - :button #x4000 - :options #x1 - :func 'clmf-save-one - :parm0 16 + :title "---single save?---" + :items + (new + 'static + 'boxed-array + :type clm-basic :length 3 :allocated-length 3 + (new 'static 'clm-item + :description " single save" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :options #x1 :func 'clmf-save-one :parm0 16) + ) + (new 'static 'clm-item + :description "single print" + :button-symbol 'square + :action + (new 'static 'clm-item-action :button #x8000 :options #x1 :func 'clmf-save-one :parm0 8) + ) + (new 'static 'clm-item + :description " done" + :button-symbol 'triangle + :action + (new 'static 'clm-item-action :button #x1000 :options #x1 :func 'clmf-to-select) + ) ) - ) - (new 'static 'clm-item - :description "single print" - :button-symbol 'square - :action - (new 'static 'clm-item-action - :button #x8000 - :options #x1 - :func 'clmf-save-one - :parm0 8 - ) - ) - (new 'static 'clm-item - :description " done" - :button-symbol 'triangle - :action - (new 'static 'clm-item-action - :button #x1000 - :options #x1 - :func 'clmf-to-select - ) - ) ) - ) ) (define *clm-select* (new 'static 'clm - :title "---camera---" - :items - (new - 'static - 'boxed-array - :type clm-basic :length 6 :allocated-length 6 - (new 'static 'clm-item - :description " edit" - :button-symbol 'x - :action - (new 'static 'clm-item-action - :button #x4000 - :options #x3 - :func 'clmf-to-edit-cam + :title "---camera---" + :items + (new + 'static + 'boxed-array + :type clm-basic :length 6 :allocated-length 6 + (new 'static 'clm-item + :description " edit" + :button-symbol 'x + :action + (new 'static 'clm-item-action :button #x4000 :options #x3 :func 'clmf-to-edit-cam) + ) + (new 'static 'clm-item + :description "save one" + :button-symbol 'triangle + :action + (new 'static 'clm-item-action :button #x1000 :options #x3 :func '*clm-save-one*) + ) + (new 'static 'clm-item + :description " next" + :button-symbol 'down + :action + (new 'static 'clm-item-action :button #x40 :options #x3 :func 'clmf-next-entity :parm0 8) + ) + (new 'static 'clm-item + :description " prev" + :button-symbol 'up + :action + (new 'static 'clm-item-action :button #x10 :options #x3 :func 'clmf-next-entity :parm0 -8) + ) + (new 'static 'clm-item + :description " next 5" + :button-symbol 'right + :action + (new 'static 'clm-item-action :button #x20 :options #x3 :func 'clmf-next-entity :parm0 40) + ) + (new 'static 'clm-item + :description " prev 5" + :button-symbol 'left + :action + (new 'static 'clm-item-action :button #x80 :options #x3 :func 'clmf-next-entity :parm0 -40) + ) ) - ) - (new 'static 'clm-item - :description "save one" - :button-symbol 'triangle - :action - (new 'static 'clm-item-action - :button #x1000 - :options #x3 - :func '*clm-save-one* - ) - ) - (new 'static 'clm-item - :description " next" - :button-symbol 'down - :action - (new 'static 'clm-item-action - :button #x40 - :options #x3 - :func 'clmf-next-entity - :parm0 8 - ) - ) - (new 'static 'clm-item - :description " prev" - :button-symbol 'up - :action - (new 'static 'clm-item-action - :button #x10 - :options #x3 - :func 'clmf-next-entity - :parm0 -8 - ) - ) - (new 'static 'clm-item - :description " next 5" - :button-symbol 'right - :action - (new 'static 'clm-item-action - :button #x20 - :options #x3 - :func 'clmf-next-entity - :parm0 40 - ) - ) - (new 'static 'clm-item - :description " prev 5" - :button-symbol 'left - :action - (new 'static 'clm-item-action - :button #x80 - :options #x3 - :func 'clmf-next-entity - :parm0 -40 - ) - ) ) - ) ) (define *clm* *clm-select*) (defbehavior cam-layout-do-action cam-layout ((arg0 clm-item-action)) (let ((s5-0 (-> arg0 func value))) - (cond - ((not s5-0) - #f - ) - ((zero? s5-0) - #f - ) - ((and (not (-> self cam-entity)) (logtest? (-> arg0 options) 2)) - #f - ) - ((and - (logtest? (-> arg0 options) 8) - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)) + (cond + ((not s5-0) + #f + ) + ((zero? s5-0) + #f + ) + ((and (not (-> self cam-entity)) (logtest? (-> arg0 options) 2)) + #f + ) + ((and (logtest? (-> arg0 options) 8) (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button))) + #f + ) + ((and + (zero? (logand (-> arg0 options) 12)) + (logtest? (-> arg0 options) 1) + (zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button))) + ) + #f + ) + ((and + (zero? (logand (-> arg0 options) 13)) + (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button))) + ) + #f + ) + ((type-type? (-> (the-as basic s5-0) type) clm) + (set! *clm* (the-as clm s5-0)) + #t + ) + ((type-type? (-> (the-as basic s5-0) type) function) + ((the-as (function object symbol symbol) s5-0) (-> arg0 parm0) (the-as symbol (-> arg0 parm1-basic))) + ) ) - #f - ) - ((and - (zero? (logand (-> arg0 options) 12)) - (logtest? (-> arg0 options) 1) - (zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button))) - ) - #f - ) - ((and - (zero? (logand (-> arg0 options) 13)) - (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button))) - ) - #f - ) - ((type-type? (-> (the-as basic s5-0) type) clm) - (set! *clm* (the-as clm s5-0)) - #t - ) - ((type-type? (-> (the-as basic s5-0) type) function) - ((the-as (function object symbol symbol) s5-0) - (-> arg0 parm0) - (the-as symbol (-> arg0 parm1-basic)) - ) - ) ) - ) ) -(defbehavior - cam-layout-function-call cam-layout - ((arg0 symbol) (arg1 string) (arg2 int) (arg3 basic)) +(defbehavior cam-layout-function-call cam-layout ((arg0 symbol) (arg1 string) (arg2 int) (arg3 basic)) (let ((gp-0 (-> arg0 value))) - (cond - ((not gp-0) - ) - ((zero? gp-0) - ) - ((type-type? (-> (the-as basic gp-0) type) function) - ((the-as (function string int basic none) gp-0) arg1 arg2 arg3) - ) + (cond + ((not gp-0) + ) + ((zero? gp-0) + ) + ((type-type? (-> (the-as basic gp-0) type) function) + ((the-as (function string int basic none) gp-0) arg1 arg2 arg3) + ) + ) ) - ) #f ) @@ -4735,180 +3665,143 @@ (set! *camera-layout-message-ypos* 30) (+! (-> *CAM_LAYOUT-bank* spline-t) (-> *CAM_LAYOUT-bank* spline-step)) (if (< 1.01 (-> *CAM_LAYOUT-bank* spline-t)) - (set! (-> *CAM_LAYOUT-bank* spline-t) -0.09) - ) + (set! (-> *CAM_LAYOUT-bank* spline-t) -0.09) + ) (+! (-> *CAM_LAYOUT-bank* intro-t) (-> *CAM_LAYOUT-bank* intro-step)) (if (< 1.01 (-> *CAM_LAYOUT-bank* intro-t)) - (set! (-> *CAM_LAYOUT-bank* intro-t) -0.09) - ) + (set! (-> *CAM_LAYOUT-bank* intro-t) -0.09) + ) (let ((s5-0 30)) - (let ((s4-0 (cam-state-from-entity (-> self cam-entity)))) - (set! *camera-read-analog* #t) - (let ((s3-0 (-> self cam-entity))) - (clear *temp-string*) - (if s3-0 - (format - *temp-string* - "\"~S\"~%" - (res-lump-struct s3-0 'name structure :time (the-as float -1000000000.0)) - ) - ) - ) - (if (not s4-0) - (format *temp-string* "no cameras in this level") - (format *temp-string* "~S" (-> s4-0 name)) - ) - ) - (cam-layout-print 320 s5-0 *temp-string*) - (let ((s5-1 (+ s5-0 16))) - (clear *temp-string*) - (format *temp-string* "~S~%" (-> arg0 title)) - (cam-layout-print 320 s5-1 *temp-string*) - (let ((s4-1 (+ s5-1 8))) - (dotimes (s5-2 (-> arg0 items length)) - (cond - ((type-type? (-> arg0 items s5-2 type) clm-list) + (let ((s4-0 (cam-state-from-entity (-> self cam-entity)))) + (set! *camera-read-analog* #t) + (let ((s3-0 (-> self cam-entity))) (clear *temp-string*) - (format *temp-string* "------------") - (cam-layout-print 320 s4-1 *temp-string*) - (let ((s4-2 (+ s4-1 8))) - (let ((s3-1 (the-as clm-list (-> arg0 items s5-2)))) - (dotimes (s2-1 (-> s3-1 items length)) - (clear *temp-string*) - (format *temp-string* "~S~S" (if (= s2-1 (-> s3-1 cur-list-item)) - "> " - " " - ) - (-> s3-1 items s2-1 description) + (if s3-0 + (format *temp-string* "\"~S\"~%" (res-lump-struct s3-0 'name structure :time (the-as float -1000000000.0))) ) - (cam-layout-function-call - (-> s3-1 items s2-1 val-func) - *temp-string* - (-> s3-1 items s2-1 val-parm0) - (-> s3-1 items s2-1 val-parm1-basic) - ) - (cam-layout-print 320 s4-2 *temp-string*) - (+! s4-2 8) - ) + ) + (if (not s4-0) + (format *temp-string* "no cameras in this level") + (format *temp-string* "~S" (-> s4-0 name)) ) - (clear *temp-string*) - (format *temp-string* "------------") - (cam-layout-print 320 s4-2 *temp-string*) - (set! s4-1 (+ s4-2 8)) - ) - ) - ((and - (not (-> self cam-entity)) - (logtest? (-> (the-as clm-item (-> arg0 items s5-2)) action options) 2) - ) - ) - ((logtest? (-> (the-as clm-item (-> arg0 items s5-2)) action options) 4) - ) - (else - (let ((s3-2 (-> arg0 items s5-2))) - (clear *temp-string*) - (format - *temp-string* - "~S: ~A~%" - (-> (the-as clm-item s3-2) description) - (if - (logtest? - (-> (the-as clm-item (-> arg0 items s5-2)) action options) - 8 - ) - 'default - (-> (the-as clm-item s3-2) button-symbol) - ) - ) - ) - (cam-layout-print 320 s4-1 *temp-string*) - (+! s4-1 8) - ) - ) ) - ) - ) - ) - (if (= *master-mode* 'menu) - (goto cfg-65) - ) - (dotimes (s5-3 (-> arg0 items length)) - (cond - ((type-type? (-> arg0 items s5-3 type) clm-list) - (let ((s4-3 (-> arg0 items s5-3)) - (s3-3 0) - ) - (if (-> (the-as clm-list s4-3) tracker) - (set! - (-> (the-as clm-list s4-3) tracker value) - (-> - (the-as clm-list s4-3) - items - (-> (the-as clm-list s4-3) cur-list-item) - track-val - ) - ) - ) - (dotimes - (s2-2 - (-> - (the-as clm-list s4-3) - items - (-> (the-as clm-list s4-3) cur-list-item) - actions - length - ) - ) - (if - (cam-layout-do-action - (-> - (the-as clm-list s4-3) - items - (-> (the-as clm-list s4-3) cur-list-item) - actions - s2-2 + (cam-layout-print 320 s5-0 *temp-string*) + (let ((s5-1 (+ s5-0 16))) + (clear *temp-string*) + (format *temp-string* "~S~%" (-> arg0 title)) + (cam-layout-print 320 s5-1 *temp-string*) + (let ((s4-1 (+ s5-1 8))) + (dotimes (s5-2 (-> arg0 items length)) + (cond + ((type-type? (-> arg0 items s5-2 type) clm-list) + (clear *temp-string*) + (format *temp-string* "------------") + (cam-layout-print 320 s4-1 *temp-string*) + (let ((s4-2 (+ s4-1 8))) + (let ((s3-1 (the-as clm-list (-> arg0 items s5-2)))) + (dotimes (s2-1 (-> s3-1 items length)) + (clear *temp-string*) + (format + *temp-string* + "~S~S" + (if (= s2-1 (-> s3-1 cur-list-item)) + "> " + " " + ) + (-> s3-1 items s2-1 description) + ) + (cam-layout-function-call + (-> s3-1 items s2-1 val-func) + *temp-string* + (-> s3-1 items s2-1 val-parm0) + (-> s3-1 items s2-1 val-parm1-basic) + ) + (cam-layout-print 320 s4-2 *temp-string*) + (+! s4-2 8) + ) + ) + (clear *temp-string*) + (format *temp-string* "------------") + (cam-layout-print 320 s4-2 *temp-string*) + (set! s4-1 (+ s4-2 8)) + ) + ) + ((and (not (-> self cam-entity)) (logtest? (-> (the-as clm-item (-> arg0 items s5-2)) action options) 2)) + ) + ((logtest? (-> (the-as clm-item (-> arg0 items s5-2)) action options) 4) + ) + (else + (let ((s3-2 (-> arg0 items s5-2))) + (clear *temp-string*) + (format + *temp-string* + "~S: ~A~%" + (-> (the-as clm-item s3-2) description) + (if (logtest? (-> (the-as clm-item (-> arg0 items s5-2)) action options) 8) + 'default + (-> (the-as clm-item s3-2) button-symbol) + ) + ) + ) + (cam-layout-print 320 s4-1 *temp-string*) + (+! s4-1 8) + ) + ) ) - ) - (goto cfg-65) ) + ) + ) + (if (= *master-mode* 'menu) + (goto cfg-65) + ) + (dotimes (s5-3 (-> arg0 items length)) + (cond + ((type-type? (-> arg0 items s5-3 type) clm-list) + (let ((s4-3 (-> arg0 items s5-3)) + (s3-3 0) + ) + (if (-> (the-as clm-list s4-3) tracker) + (set! (-> (the-as clm-list s4-3) tracker value) + (-> (the-as clm-list s4-3) items (-> (the-as clm-list s4-3) cur-list-item) track-val) + ) + ) + (dotimes (s2-2 (-> (the-as clm-list s4-3) items (-> (the-as clm-list s4-3) cur-list-item) actions length)) + (if (cam-layout-do-action + (-> (the-as clm-list s4-3) items (-> (the-as clm-list s4-3) cur-list-item) actions s2-2) + ) + (goto cfg-65) + ) + ) + (cond + ((cpad-pressed? 0 down) + (set! s3-3 1) + ) + ((cpad-pressed? 0 right) + (set! s3-3 1) + ) + ((cpad-pressed? 0 up) + (set! s3-3 -1) + ) + ((cpad-pressed? 0 left) + (set! s3-3 -1) + ) + ) + (when (nonzero? s3-3) + (set! (-> (the-as clm-list s4-3) cur-list-item) + (mod (+ (-> (the-as clm-list s4-3) cur-list-item) s3-3) (-> (the-as clm-list s4-3) items length)) + ) + (while (< (-> (the-as clm-list s4-3) cur-list-item) 0) + (+! (-> (the-as clm-list s4-3) cur-list-item) (-> (the-as clm-list s4-3) items length)) + ) + (goto cfg-65) + ) + ) ) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (set! s3-3 1) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (set! s3-3 1) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (set! s3-3 -1) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (set! s3-3 -1) - ) - ) - (when (nonzero? s3-3) - (set! - (-> (the-as clm-list s4-3) cur-list-item) - (mod - (+ (-> (the-as clm-list s4-3) cur-list-item) s3-3) - (-> (the-as clm-list s4-3) items length) - ) - ) - (while (< (-> (the-as clm-list s4-3) cur-list-item) 0) - (+! - (-> (the-as clm-list s4-3) cur-list-item) - (-> (the-as clm-list s4-3) items length) - ) - ) + ((cam-layout-do-action (-> (the-as clm-item (-> arg0 items s5-3)) action)) (goto cfg-65) ) ) - ) - ((cam-layout-do-action (-> (the-as clm-item (-> arg0 items s5-3)) action)) - (goto cfg-65) - ) ) - ) (label cfg-65) (none) ) @@ -4916,31 +3809,31 @@ (defstate cam-layout-active (cam-layout) :code (behavior () - (while #t - (cam-layout-entity-info (the-as entity-actor (-> self cam-entity))) - (cam-layout-entity-volume-info) - (cam-layout-do-menu *clm*) - (suspend) + (while #t + (cam-layout-entity-info (the-as entity-actor (-> self cam-entity))) + (cam-layout-entity-volume-info) + (cam-layout-do-menu *clm*) + (suspend) + ) + (none) ) - (none) - ) ) (defbehavior cam-layout-init cam-layout () (set! (-> self res-key) -1000000000.0) (set! (-> self num-entities) 0) (let ((v1-2 (-> *camera-engine* alive-list next0))) - *camera-engine* - (let ((a0-2 (-> v1-2 next0))) - (while (!= v1-2 (-> *camera-engine* alive-list-end)) - (-> (the-as connection v1-2) param1) - (+! (-> self num-entities) 1) - (set! v1-2 a0-2) - *camera-engine* - (set! a0-2 (-> a0-2 next0)) - ) + *camera-engine* + (let ((a0-2 (-> v1-2 next0))) + (while (!= v1-2 (-> *camera-engine* alive-list-end)) + (-> (the-as connection v1-2) param1) + (+! (-> self num-entities) 1) + (set! v1-2 a0-2) + *camera-engine* + (set! a0-2 (-> a0-2 next0)) + ) + ) ) - ) (set! (-> self cur-entity) *last-cur-entity*) (clmf-next-entity 0) (set! *clm* *clm-select*) @@ -4955,44 +3848,36 @@ (defun cam-layout-start () (let ((a0-1 (new 'global 'file-stream "dd_next/caminfo/garbage" 'read))) - (file-stream-close a0-1) - ) + (file-stream-close a0-1) + ) (cond - ((not *cam-layout*) - (let* ((gp-0 (get-process *camera-dead-pool* cam-layout #x4000)) - (v1-4 (when gp-0 - (let ((t9-3 (method-of-type cam-layout activate))) - (t9-3 - (the-as cam-layout gp-0) - *default-pool* - 'cam-layout - (the-as pointer #x70004000) + ((not *cam-layout*) + (let* ((gp-0 (get-process *camera-dead-pool* cam-layout #x4000)) + (v1-4 (when gp-0 + (let ((t9-3 (method-of-type cam-layout activate))) + (t9-3 (the-as cam-layout gp-0) *default-pool* 'cam-layout (the-as pointer #x70004000)) + ) + (run-next-time-in-process gp-0 cam-layout-init) + (-> gp-0 ppointer) ) - ) - (run-next-time-in-process gp-0 cam-layout-init) - (-> gp-0 ppointer) ) ) + (cond + (v1-4 + (logclear! (-> v1-4 0 mask) (process-mask pause menu)) + (set! *cam-layout* #t) + (set! *camera-layout-blink* #f) ) - (cond - (v1-4 - (logclear! (-> v1-4 0 mask) (process-mask pause menu)) - (set! *cam-layout* #t) - (set! *camera-layout-blink* #f) + (else + (format 0 "ERROR : no process available to start cam editing mode~%") + ) + ) ) - (else - (format - 0 - "ERROR : no process available to start cam editing mode~%" - ) - ) - ) ) + (else + (format 0 "ERROR : cam editing mode already started~%") + ) ) - (else - (format 0 "ERROR : cam editing mode already started~%") - ) - ) *cam-layout* (none) ) diff --git a/goal_src/engine/collide/collide-shape-h.gc b/goal_src/engine/collide/collide-shape-h.gc index 2d0deac6e8..b72a75abe5 100644 --- a/goal_src/engine/collide/collide-shape-h.gc +++ b/goal_src/engine/collide/collide-shape-h.gc @@ -253,9 +253,9 @@ :flag-assert #x38000000b8 (:methods (new (symbol type process-drawable collide-list-enum) _type_) - (TODO-RENAME-28 (_type_ vector) none 28) + (TODO-RENAME-28 (_type_ vector) object 28) ;; ret - symbol | float (CSPG::9) (dummy-29 (_type_ int) none 29) - (TODO-RENAME-30 (_type_ vector) none 30) + (TODO-RENAME-30 (_type_ vector) object 30) ;; ret - symbol | float (CSPG::9) (dummy-31 (_type_) none 31) (dummy-32 (_type_ object uint) none 32) (dummy-33 (_type_ vector uint) none 33) diff --git a/goal_src/engine/collide/collide-shape.gc b/goal_src/engine/collide/collide-shape.gc index 7fbff44343..cde68b230f 100644 --- a/goal_src/engine/collide/collide-shape.gc +++ b/goal_src/engine/collide/collide-shape.gc @@ -1387,7 +1387,6 @@ (defmethod TODO-RENAME-28 collide-shape ((obj collide-shape) (arg0 vector)) (vector+! (-> obj trans) (-> obj trans) arg0) (dummy-9 (-> obj root-prim) arg0) - (none) ) (defmethod dummy-9 collide-shape-prim ((obj collide-shape-prim) (arg0 vector)) @@ -1422,7 +1421,6 @@ (vector-! v1-0 arg0 (-> obj trans)) (TODO-RENAME-28 obj v1-0) ) - (none) ) (defmethod set-root-prim! collide-shape ((obj collide-shape) (arg0 collide-shape-prim)) diff --git a/goal_src/engine/game/collectables.gc b/goal_src/engine/game/collectables.gc index 03c64dafac..9df08c8fbd 100644 --- a/goal_src/engine/game/collectables.gc +++ b/goal_src/engine/game/collectables.gc @@ -143,7 +143,7 @@ (set! (-> s4-0 prim-core collide-as) (the-as uint #x8040)) (set! (-> s4-0 collide-with) (the-as uint 16)) (set-vector! (-> s4-0 local-sphere) 0.0 3276.8 0.0 3276.8) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -1137,7 +1137,7 @@ (set! (-> s4-0 prim-core collide-as) (the-as uint #x8040)) (set! (-> s4-0 collide-with) (the-as uint 16)) (set-vector! (-> s4-0 local-sphere) 0.0 3276.8 0.0 8192.0) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -1295,7 +1295,7 @@ (set! (-> s4-0 prim-core collide-as) (the-as uint #x8040)) (set! (-> s4-0 collide-with) (the-as uint 16)) (set-vector! (-> s4-0 local-sphere) 0.0 2048.0 0.0 4915.2) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -2090,7 +2090,7 @@ (set! (-> s4-0 collide-with) (the-as uint 16)) (set! (-> s4-0 transform-index) 3) (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -2443,7 +2443,7 @@ (set! (-> s4-0 prim-core collide-as) (the-as uint #x8040)) (set! (-> s4-0 collide-with) (the-as uint 16)) (set-vector! (-> s4-0 local-sphere) 0.0 2457.6 0.0 4915.2) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -2894,7 +2894,7 @@ (set! (-> s4-0 prim-core offense) 1) (set! (-> s4-0 transform-index) 3) (set-vector! (-> s4-0 local-sphere) 0.0 3686.4 0.0 6144.0) - (set-root-prim! s5-0 (the-as collide-shape-prim-group s4-0)) + (set-root-prim! s5-0 s4-0) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (backup-collide-with-as s5-0) @@ -2954,7 +2954,7 @@ (set! (-> s2-0 prim-core collide-as) (the-as uint 64)) (set! (-> s2-0 collide-with) (the-as uint 16)) (set-vector! (-> s2-0 local-sphere) 0.0 4915.2 0.0 6553.6) - (set-root-prim! s3-0 (the-as collide-shape-prim-group s2-0)) + (set-root-prim! s3-0 s2-0) ) (set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w))) (backup-collide-with-as s3-0) diff --git a/goal_src/engine/geometry/vol-h.gc b/goal_src/engine/geometry/vol-h.gc index 28be9cb547..917d933796 100644 --- a/goal_src/engine/geometry/vol-h.gc +++ b/goal_src/engine/geometry/vol-h.gc @@ -8,22 +8,22 @@ ;; DECOMP BEGINS (deftype plane-volume (structure) - ((volume-type symbol :offset-assert 0) - (point-count int16 :offset-assert 4) - (normal-count int16 :offset-assert 6) - (first-point vector :offset-assert 8) - (first-normal vector :offset-assert 12) - (num-planes int32 :offset-assert 16) - (plane uint32 :offset-assert 20) + ((volume-type symbol :offset-assert 0) + (point-count int16 :offset-assert 4) + (normal-count int16 :offset-assert 6) + (first-point (pointer vector) :offset-assert 8) + (first-normal (pointer vector) :offset-assert 12) + (num-planes int32 :offset-assert 16) + (plane (inline-array plane) :offset-assert 20) ) :pack-me :method-count-assert 12 :size-assert #x18 :flag-assert #xc00000018 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) + (dummy-9 (_type_ symbol vector-array vector-array) symbol 9) + (debug-draw (_type_) none 10) + (dummy-11 (_type_ vector float) symbol 11) ) ) @@ -35,134 +35,76 @@ (pos-vol plane-volume 32 :inline :offset-assert 16) (neg-vol-count int32 :offset-assert 784) (neg-vol plane-volume 32 :inline :offset-assert 788) - (debug-point basic :offset-assert 1556) - (debug-normal basic :offset-assert 1560) + (debug-point vector-array :offset-assert 1556) + (debug-normal vector-array :offset-assert 1560) ) :method-count-assert 12 :size-assert #x61c :flag-assert #xc0000061c (:methods (new (symbol type process-drawable) _type_ 0) - (dummy-9 (_type_) none 9) - (dummy-10 (_type_ vector) none 10) + (dummy-9 (_type_) symbol 9) + (dummy-10 (_type_ vector) symbol 10) (TODO-RENAME-11 (_type_) symbol 11) ) ) -(defmethod - new - vol-control - ((allocation symbol) (type-to-make type) (arg0 process-drawable)) - (let - ((gp-0 - (the-as - object - (object-new allocation type-to-make (the-as int (-> type-to-make size))) +(defmethod new vol-control ((allocation symbol) (type-to-make type) (arg0 process-drawable)) + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as vol-control gp-0)) + (go process-drawable-art-error "memory") + (set! gp-0 0) + (goto cfg-13) ) - ) - ) - (when (zero? (the-as vol-control gp-0)) - (go process-drawable-art-error "memory") - (set! gp-0 0) - (goto cfg-13) - ) - (set! (-> (the-as vol-control gp-0) process) arg0) - (let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-0 - (-> - ((method-of-type res-lump lookup-tag-idx) - (the-as entity s5-1) - 'vol - 'exact - 0.0 - ) - lo + (set! (-> (the-as vol-control gp-0) process) arg0) + (let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) + (s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-1) 'vol 'exact 0.0) lo)) + ) + (when (>= (the-as int s4-0) 0) + (let ((s3-0 (the-as uint s4-0)) + (s2-0 (-> s5-1 tag s4-0)) + ) + 0 + (while (= (-> s2-0 name) (-> s5-1 tag s4-0 name)) + (let ((v1-12 (make-property-data s5-1 0.0 (the-as res-tag-pair s3-0) (the-as pointer #f))) + (a0-8 (-> (the-as vol-control gp-0) pos-vol (-> (the-as vol-control gp-0) pos-vol-count))) + ) + (set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count))) + (set! (-> a0-8 plane) (the-as (inline-array plane) v1-12)) + ) + (+! (-> (the-as vol-control gp-0) pos-vol-count) 1) + (+! s3-0 1) + (set! s2-0 (-> s5-1 tag s3-0)) ) - ) ) - (when (>= (the-as int s4-0) 0) - (let ((s3-0 (the-as uint s4-0)) - (s2-0 (-> s5-1 tag s4-0)) - ) - 0 - (while (= (-> s2-0 name) (-> s5-1 tag s4-0 name)) - (let - ((v1-12 - (make-property-data - s5-1 - 0.0 - (the-as res-tag-pair s3-0) - (the-as pointer #f) - ) - ) - (a0-8 - (-> - (the-as vol-control gp-0) - pos-vol - (-> (the-as vol-control gp-0) pos-vol-count) - ) - ) - ) - (set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count))) - (set! (-> a0-8 plane) (the-as uint v1-12)) ) - (+! (-> (the-as vol-control gp-0) pos-vol-count) 1) - (+! s3-0 1) - (set! s2-0 (-> s5-1 tag s3-0)) - ) ) - ) - ) - (let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-1 - (-> - ((method-of-type res-lump lookup-tag-idx) - (the-as entity s5-2) - 'cutoutvol - 'exact - 0.0 - ) - lo + (let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) + (s4-1 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo)) + ) + (when (>= (the-as int s4-1) 0) + (let ((s3-1 (the-as uint s4-1)) + (s2-1 (-> s5-2 tag s4-1)) + ) + 0 + (while (= (-> s2-1 name) (-> s5-2 tag s4-1 name)) + (let ((v1-31 (make-property-data s5-2 0.0 (the-as res-tag-pair s3-1) (the-as pointer #f))) + (a0-19 (-> (the-as vol-control gp-0) neg-vol (-> (the-as vol-control gp-0) neg-vol-count))) + ) + (set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count))) + (set! (-> a0-19 plane) (the-as (inline-array plane) v1-31)) + ) + (+! (-> (the-as vol-control gp-0) neg-vol-count) 1) + (+! s3-1 1) + (set! s2-1 (-> s5-2 tag s3-1)) ) - ) ) - (when (>= (the-as int s4-1) 0) - (let ((s3-1 (the-as uint s4-1)) - (s2-1 (-> s5-2 tag s4-1)) - ) - 0 - (while (= (-> s2-1 name) (-> s5-2 tag s4-1 name)) - (let - ((v1-31 - (make-property-data - s5-2 - 0.0 - (the-as res-tag-pair s3-1) - (the-as pointer #f) - ) - ) - (a0-19 - (-> - (the-as vol-control gp-0) - neg-vol - (-> (the-as vol-control gp-0) neg-vol-count) - ) - ) - ) - (set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count))) - (set! (-> a0-19 plane) (the-as uint v1-31)) ) - (+! (-> (the-as vol-control gp-0) neg-vol-count) 1) - (+! s3-1 1) - (set! s2-1 (-> s5-2 tag s3-1)) - ) ) - ) + (label cfg-13) + (the-as vol-control gp-0) ) - (label cfg-13) - (the-as vol-control gp-0) - ) ) (defmethod TODO-RENAME-11 vol-control ((obj vol-control)) diff --git a/goal_src/engine/geometry/vol.gc b/goal_src/engine/geometry/vol.gc index cb54a14eb7..24971afaba 100644 --- a/goal_src/engine/geometry/vol.gc +++ b/goal_src/engine/geometry/vol.gc @@ -5,3 +5,272 @@ ;; name in dgo: vol ;; dgos: GAME, ENGINE +;; DECOMP BEGINS + +(defun plane-volume-intersect-dist ((arg0 vector) (arg1 vector) (arg2 vector)) + (let ((f0-1 (vector-dot arg1 arg0)) + (f1-1 (vector-dot arg2 arg0)) + ) + (if (< 0.00001 (fabs f1-1)) + (/ (- (-> arg0 w) f0-1) f1-1) + 409600000.0 + ) + ) + ) + +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +(defmethod dummy-9 plane-volume ((obj plane-volume) (arg0 symbol) (arg1 vector-array) (arg2 vector-array)) + (local-vars + (sv-144 vector) + (sv-148 float) + (sv-152 int) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + (sv-208 vector) + (sv-224 vector) + (sv-240 int) + (sv-256 int) + ) + (set! (-> obj volume-type) arg0) + (set! (-> obj point-count) 0) + (set! (-> obj first-point) (the-as (pointer vector) (-> arg1 data (-> arg1 length)))) + (set! (-> obj normal-count) 0) + (set! (-> obj first-normal) (the-as (pointer vector) (-> arg2 data (-> arg2 length)))) + (dotimes (s3-0 (-> obj num-planes)) + (set! sv-176 (new 'stack-no-clear 'vector)) + (set! (-> sv-176 quad) (the-as uint128 0)) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! (-> sv-192 quad) (the-as uint128 0)) + (set! sv-208 (new 'stack-no-clear 'vector)) + (set! (-> sv-208 quad) (the-as uint128 0)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (set! (-> sv-224 quad) (the-as uint128 0)) + 0.0 + 0.0 + 0.0 + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s1-0 (new-stack-vector0)) + (s0-0 0) + (s2-0 (-> obj plane)) + ) + (set! sv-240 0) + (while (< sv-240 (-> obj num-planes)) + (when (!= s3-0 sv-240) + (vector-float*! sv-176 (the-as vector (-> s2-0 sv-240)) (-> s2-0 sv-240 w)) + (vector-cross! sv-192 (the-as vector (-> s2-0 sv-240)) (the-as vector (-> s2-0 s3-0))) + (vector-normalize! sv-192 1.0) + (vector-cross! sv-208 sv-192 (the-as vector (-> s2-0 sv-240))) + (vector-normalize! sv-208 1.0) + (let ((f0-4 (plane-volume-intersect-dist (-> s2-0 s3-0) sv-176 sv-208))) + (when (!= f0-4 409600000.0) + (vector+float*! sv-224 sv-176 sv-208 f0-4) + (set! sv-144 (new-stack-vector0)) + (set! sv-148 0.0) + (set! sv-152 0) + (set! sv-160 (new-stack-vector0)) + (set! (-> sv-144 quad) (-> sv-224 quad)) + (set! sv-256 0) + (while (< sv-256 (-> obj num-planes)) + (when (and (!= sv-256 s3-0) (!= sv-256 sv-240)) + (let ((f30-0 (plane-volume-intersect-dist (-> s2-0 sv-256) sv-144 sv-192))) + (cond + ((= f30-0 409600000.0) + ) + ((zero? sv-152) + (vector+float*! sv-144 sv-144 sv-192 f30-0) + (set! (-> sv-160 quad) (-> s2-0 sv-256 quad)) + (set! sv-148 8192000.0) + (set! sv-152 1) + ) + ((begin (vector-float*! sv-224 sv-192 f30-0) (>= (vector-dot sv-224 sv-160) 0.0)) + ) + ((>= (vector-dot sv-224 (the-as vector (-> s2-0 sv-256))) 0.0) + (when (< (fabs f30-0) (fabs sv-148)) + (set! sv-148 f30-0) + (set! sv-152 (+ sv-152 1)) + ) + ) + (else + (vector+float*! sv-144 sv-144 sv-192 f30-0) + (set! (-> sv-160 quad) (-> s2-0 sv-256 quad)) + (set! sv-152 (+ sv-152 1)) + (if (< (fabs f30-0) (fabs sv-148)) + (set! sv-148 (- sv-148 f30-0)) + (set! sv-148 0.0) + ) + ) + ) + ) + ) + (set! sv-256 (+ sv-256 1)) + ) + (cond + ((zero? sv-152) + ) + ((= sv-148 0.0) + ) + (else + (dotimes (v1-70 (-> obj num-planes)) + (when (and (!= v1-70 s3-0) (!= v1-70 sv-240)) + (if (< 4096.0 (- (vector-dot sv-144 (the-as vector (-> s2-0 v1-70))) (the-as float (-> s2-0 v1-70 w)))) + (goto cfg-42) + ) + ) + ) + (vector+float*! sv-224 sv-144 sv-192 sv-148) + (cond + ((< (-> arg1 allocated-length) (+ (-> arg1 length) 2)) + (format 0 "ERROR : vol-control #x~X out of volume points~%" obj) + ) + (else + (set! (-> arg1 data (-> arg1 length) quad) (-> sv-144 quad)) + (set! (-> arg1 data (+ (-> arg1 length) 1) quad) (-> sv-224 quad)) + (+! (-> arg1 length) 2) + (+! (-> obj point-count) 2) + ) + ) + (vector+! s1-0 s1-0 sv-144) + (vector+! s1-0 s1-0 sv-224) + (+! s0-0 2) + ) + ) + ) + ) + ) + (label cfg-42) + (set! sv-240 (+ sv-240 1)) + ) + (when (nonzero? s0-0) + (vector-float*! s1-0 s1-0 (/ 1.0 (the float s0-0))) + (cond + ((< (-> arg2 allocated-length) (+ (-> arg2 length) 2)) + (format 0 "ERROR : vol-control #x~X out of volume normals~%" obj) + ) + (else + (set! (-> arg2 data (-> arg2 length) quad) (-> s1-0 quad)) + (set! (-> arg2 data (+ (-> arg2 length) 1) quad) (-> s2-0 s3-0 quad)) + (+! (-> arg2 length) 2) + (let ((v1-112 (+ (-> obj normal-count) 2))) + (set! (-> obj normal-count) v1-112) + v1-112 + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod debug-draw plane-volume ((obj plane-volume)) + (let* ((v1-0 (-> obj volume-type)) + (s5-0 (cond + ((= v1-0 'vol) + (the-as uint #x8000c000) + ) + ((= v1-0 'pvol) + (the-as uint #x80808080) + ) + (else + (the-as uint #x800000c0) + ) + ) + ) + (s4-0 (-> obj first-point)) + ) + (dotimes (s3-0 (/ (-> obj point-count) 2)) + (add-debug-line + #t + (bucket-id debug-draw1) + (the-as vector s4-0) + (the-as vector (&-> s4-0 4)) + (the-as rgba s5-0) + #f + (the-as rgba -1) + ) + (set! s4-0 (&-> s4-0 8)) + ) + ) + 0 + (none) + ) + +(defmethod dummy-11 plane-volume ((obj plane-volume) (arg0 vector) (arg1 float)) + (dotimes (v1-0 (-> obj num-planes)) + (if (< arg1 (- (vector-dot arg0 (the-as vector (-> obj plane v1-0))) (the-as float (-> obj plane v1-0 w)))) + (return #f) + ) + ) + #t + ) + +(defmethod dummy-9 vol-control ((obj vol-control)) + (with-pp + (let ((a0-1 obj)) + (when (and (and *display-vol-marks* (logtest? (-> a0-1 flags) 1)) (logtest? (-> obj flags) 2)) + (when (zero? (-> obj debug-point)) + (let ((s5-0 pp)) + (let ((s6-1 (-> obj process))) + ) + (let ((s4-0 0)) + (dotimes (v1-8 (-> obj pos-vol-count)) + (+! s4-0 (-> obj pos-vol v1-8 num-planes)) + ) + (dotimes (v1-11 (-> obj neg-vol-count)) + (+! s4-0 (-> obj neg-vol v1-11 num-planes)) + ) + (set! (-> obj debug-point) (new 'debug 'vector-array (* 10 s4-0))) + (set! (-> obj debug-normal) (new 'debug 'vector-array (* 10 s4-0))) + ) + (let ((s6-2 s5-0)) + ) + ) + (set! (-> obj debug-point length) 0) + (set! (-> obj debug-normal length) 0) + (dotimes (s5-1 (-> obj pos-vol-count)) + (dummy-9 (-> obj pos-vol s5-1) 'vol (-> obj debug-point) (-> obj debug-normal)) + ) + (dotimes (s5-2 (-> obj neg-vol-count)) + (dummy-9 (-> obj neg-vol s5-2) 'vol (-> obj debug-point) (-> obj debug-normal)) + ) + ) + (dotimes (s5-3 (-> obj pos-vol-count)) + (debug-draw (-> obj pos-vol s5-3)) + ) + (dotimes (s5-4 (-> obj neg-vol-count)) + (debug-draw (-> obj neg-vol s5-4)) + ) + ) + ) + (the-as symbol 0) + ) + ) + +(defmethod dummy-10 vol-control ((obj vol-control) (arg0 vector)) + (dotimes (s4-0 (-> obj neg-vol-count)) + (if (dummy-11 (-> obj neg-vol s4-0) arg0 0.0) + (return #f) + ) + ) + (dotimes (s4-1 (-> obj pos-vol-count)) + (if (dummy-11 (-> obj pos-vol s4-1) arg0 0.0) + (return #t) + ) + ) + #f + ) + + + + diff --git a/goal_src/engine/ui/text-h.gc b/goal_src/engine/ui/text-h.gc index a6b9ebbfa1..d384525728 100644 --- a/goal_src/engine/ui/text-h.gc +++ b/goal_src/engine/ui/text-h.gc @@ -278,11 +278,13 @@ (rolling-ring-hint-be-quick-to-next #x340) (rolling-ring-hint-be-quick-all #x341) + (sunken-helix-daxter-bad-feeling #x344) (sunken-blue-eco-charger-hint #x345) - (sunken-take-it-easy-hot-pipes #x34e) (sunken-double-lurker-hint #x347) + (sunken-helix-daxter-eco-rising #x348) (sunken-qbert-plat-hint #x34a) (sunken-bully-dive-hint #x34b) + (sunken-take-it-easy-hot-pipes #x34e) (sunken-blue-eco-charger-all-hint #x34d) diff --git a/goal_src/levels/sunken/helix-water.gc b/goal_src/levels/sunken/helix-water.gc index 20e845ddcf..3b3615f315 100644 --- a/goal_src/levels/sunken/helix-water.gc +++ b/goal_src/levels/sunken/helix-water.gc @@ -5,3 +5,782 @@ ;; name in dgo: helix-water ;; dgos: L1, SUN, SUNKEN +;; DECOMP BEGINS + +(deftype helix-slide-door (process-drawable) + ((root-override collide-shape :offset 112) + ) + :heap-base #x40 + :method-count-assert 20 + :size-assert #xb0 + :flag-assert #x14004000b0 + (:states + helix-slide-door-close + helix-slide-door-idle-closed + helix-slide-door-idle-open + ) + ) + +;; Manually added! +(define-extern *helix-slide-door* helix-slide-door) + +(defskelgroup *helix-slide-door-sg* helix-slide-door + 0 + 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 12 0 18) + :longest-edge (meters 0) + ) + +(deftype helix-button (process-drawable) + ((root-override collide-shape-moving :offset 112) + (my-water entity-actor :offset-assert 176) + (my-door entity-actor :offset-assert 180) + (fcell-handle handle :offset-assert 184) + (down-y float :offset-assert 192) + (spawn-trans vector :inline :offset-assert 208) + ) + :heap-base #x70 + :method-count-assert 20 + :size-assert #xe0 + :flag-assert #x14007000e0 + (:states + helix-button-activate + helix-button-idle-down + helix-button-idle-up + helix-button-quick-activate + helix-button-startup + ) + ) + +;; Manually added! +(define-extern *helix-button* helix-button) + +(defskelgroup *helix-button-sg* helix-button + 0 + 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 3.5 0 5.4) + :longest-edge (meters 0) + ) + +(deftype helix-dark-eco (dark-eco-pool) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + + +(deftype helix-water (process-drawable) + ((last-alt-actor-consumed int32 :offset-assert 176) + (alt-actors (array entity-actor) :offset-assert 180) + (transv-y float :offset-assert 184) + (start-y float :offset-assert 188) + (end-y float :offset-assert 192) + (dark-eco (pointer helix-dark-eco) :offset-assert 196) + ) + :heap-base #x60 + :method-count-assert 22 + :size-assert #xc8 + :flag-assert #x16006000c8 + (:methods + (dummy-20 (_type_) none 20) + (dummy-21 (_type_) object 21) + ) + (:states + helix-water-activated + helix-water-idle + ) + ) + +;; Manually added! +(define-extern *helix-water* helix-water) + +(defstate water-vol-idle (helix-dark-eco) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (let ((a0-1 (-> self sound))) + (set! (-> a0-1 spec pitch-mod) 2057) + (update-vol! a0-1 100) + ) + ) + (else + ((-> (method-of-type water-anim water-vol-idle) event) arg0 arg1 arg2 arg3) + ) + ) + ) + :enter + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-0 (-> self sound))) + (set! (-> a0-0 spec pitch-mod) 1524) + (update-vol! a0-0 58) + ) + (none) + ) + :trans + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (update! (-> self sound)) + (none) + ) + :post + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) post))) + (if t9-0 + ((the-as (function none :behavior helix-dark-eco) t9-0)) + ) + ) + (ja-post) + (none) + ) + ) + +(defstate helix-slide-door-idle-open (helix-slide-door) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 + (('trigger) + (go helix-slide-door-close) + ) + ) + ) + :code + (behavior () + (while #t + (suspend) + ) + (none) + ) + ) + +(defstate helix-slide-door-close (helix-slide-door) + :code + (behavior () + (let ((a0-0 (-> self skel root-channel 0))) + (set! (-> a0-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 2))) + (set! (-> a0-0 param 0) + (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 2)) data 0 length) -1)) + ) + (set! (-> a0-0 param 1) 1.0) + (set! (-> a0-0 frame-num) 0.0) + (joint-control-channel-group! a0-0 (the-as art-joint-anim (-> self draw art-group data 2)) num-func-seek!) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-1 (-> self skel root-channel 0))) + (set! (-> a0-1 param 0) (the float (+ (-> a0-1 frame-group data 0 length) -1))) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (transform-post) + (go helix-slide-door-idle-closed) + (none) + ) + :post + (the-as (function none :behavior helix-slide-door) transform-post) + ) + +(defstate helix-slide-door-idle-closed (helix-slide-door) + :code + (behavior () + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + ) + +(defmethod init-from-entity! helix-slide-door ((obj helix-slide-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 512)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 22528.0 0.0 53248.0) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (initialize-skeleton obj *helix-slide-door-sg* '()) + (logior! (-> obj skel status) 1) + (ja-channel-set! 1) + (let ((s5-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> obj draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (ja-post) + (dummy-47 (-> obj root-override)) + (set! *helix-slide-door* obj) + (go helix-slide-door-idle-open) + (none) + ) + +(defstate helix-button-startup (helix-button) + :code + (behavior () + (when (not (task-complete? *game-info* (game-task sunken-slide))) + (let ((a0-1 (new 'stack-no-clear 'vector))) + (set! (-> a0-1 quad) (-> self root-override trans quad)) + (set! (-> a0-1 y) (+ 30720.0 (-> a0-1 y))) + (let ((v1-7 (birth-pickup-at-point + a0-1 + (pickup-type fuel-cell) + (the float (-> self entity extra perm task)) + #f + self + (-> self fact) + ) + ) + ) + (set! (-> self fcell-handle) (ppointer->handle v1-7)) + (if v1-7 + (clear-collide-with-as (-> (the-as collectable (-> v1-7 0)) root-override)) + ) + ) + ) + ) + (go helix-button-idle-up) + (none) + ) + ) + +(defstate helix-button-idle-up (helix-button) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch) + (when *target* + (when (logtest? (-> *target* control status) 1) + (cond + ((and + (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))) + (not (handle->process (-> self fcell-handle))) + ) + (go helix-button-quick-activate) + ) + (else + (process-entity-status! self (entity-perm-status complete) #t) + (go helix-button-activate) + ) + ) + ) + ) + ) + ) + ) + :code + (behavior () + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + ) + +(defstate helix-button-activate (helix-button) + :trans + (the-as (function none :behavior helix-button) rider-trans) + :code + (behavior () + (local-vars (v1-7 symbol)) + (let ((a0-1 (handle->process (-> self fcell-handle)))) + (when a0-1 + (send-event a0-1 'pickup) + (until v1-7 + (suspend) + (set! v1-7 (or (not *target*) (zero? (logand (-> *target* state-flags) 256)))) + ) + ) + ) + (let* ((gp-0 (the-as sunkencam (get-process *default-dead-pool* sunkencam #x4000))) + (v1-11 + (when gp-0 + (let ((t9-2 (method-of-type sunkencam activate))) + (t9-2 gp-0 self 'sunkencam (the-as pointer #x70004000)) + ) + (run-now-in-process + gp-0 + pov-camera-init-by-other + (-> self spawn-trans) + *sunkencam-sg* + "qbert-show-door-open" + 0 + #f + '() + ) + (-> gp-0 ppointer-override) + ) + ) + ) + (set! (-> v1-11 0 seq) (the-as uint 2)) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) self) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'music) + (let ((t9-4 send-event-function) + (v1-15 (-> self my-water)) + ) + (t9-4 + (if v1-15 + (-> v1-15 extra process) + ) + a1-5 + ) + ) + ) + (set! (-> self state-time) (-> *display* base-frame-counter)) + (when *target* + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector-! gp-1 (-> self root-override trans) (target-pos 0)) + (when (< 12288.0 (vector-xz-length gp-1)) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 4096.0) + (TODO-RENAME-28 (-> *target* control) gp-1) + (dummy-45 (-> self root-override)) + (dummy-35 (-> self root-override)) + ) + ) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 450) + (suspend) + ) + (level-hint-spawn + (game-text-id sunken-helix-daxter-bad-feeling) + "sksp0124" + (the-as entity #f) + *entity-pool* + (game-task none) + ) + (send-event *target* 'play-anim 'shock-in) + (sound-play-by-name (static-sound-name "prec-button8") (new-sound-id) 1024 0 0 1 #t) + (set! (-> self root-override transv quad) (the-as uint128 0)) + (let ((gp-3 5)) + (until (<= gp-3 0) + (let ((f1-0 (-> self root-override transv y)) + (f0-2 (-> self root-override trans y)) + (a1-11 (new 'stack-no-clear 'vector)) + ) + (let* ((f1-1 (+ f1-0 (* -737280.0 (-> *display* seconds-per-frame)))) + (f0-3 (+ f0-2 (* f1-1 (-> *display* seconds-per-frame)))) + ) + (when (>= (-> self down-y) f0-3) + (set! f0-3 (-> self down-y)) + (set! f1-1 (* 0.65 (- f1-1))) + (+! gp-3 -1) + ) + (set! (-> self root-override transv y) f1-1) + (set! (-> a1-11 quad) (-> self root-override trans quad)) + (set! (-> a1-11 y) f0-3) + ) + (TODO-RENAME-30 (-> self root-override) a1-11) + ) + (suspend) + ) + ) + (set! (-> self state-time) (-> *display* base-frame-counter)) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 375) + (suspend) + ) + (sound-play-by-name (static-sound-name "maindoor") (new-sound-id) 1024 0 0 1 #t) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 570) + (suspend) + ) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) self) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'trigger) + (let ((t9-18 send-event-function) + (v1-66 (-> self my-door)) + ) + (t9-18 + (if v1-66 + (-> v1-66 extra process) + ) + a1-13 + ) + ) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 1050) + (suspend) + ) + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) self) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'trigger) + (let ((t9-19 send-event-function) + (v1-74 (-> self my-water)) + ) + (t9-19 + (if v1-74 + (-> v1-74 extra process) + ) + a1-14 + ) + ) + ) + (level-hint-spawn + (game-text-id sunken-helix-daxter-eco-rising) + "sksp0128" + (the-as entity #f) + *entity-pool* + (game-task none) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 600) + (suspend) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300) + (send-event *target* 'play-anim 'shock-out) + (send-event *target* 'neck 1.0 (-> self my-door extra trans)) + (suspend) + ) + (go helix-button-idle-down) + (none) + ) + :post + (the-as (function none :behavior helix-button) rider-post) + ) + +(defstate helix-button-quick-activate (helix-button) + :trans + (the-as (function none :behavior helix-button) rider-trans) + :code + (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) self) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'music) + (let ((t9-0 send-event-function) + (v1-1 (-> self my-water)) + ) + (t9-0 + (if v1-1 + (-> v1-1 extra process) + ) + a1-0 + ) + ) + ) + (sound-play-by-name (static-sound-name "prec-button8") (new-sound-id) 1024 0 0 1 #t) + (sound-play-by-name (static-sound-name "maindoor") (new-sound-id) 1024 0 0 1 #t) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) self) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'trigger) + (let ((t9-5 send-event-function) + (v1-7 (-> self my-door)) + ) + (t9-5 + (if v1-7 + (-> v1-7 extra process) + ) + a1-3 + ) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) self) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'trigger) + (let ((t9-6 send-event-function) + (v1-11 (-> self my-water)) + ) + (t9-6 + (if v1-11 + (-> v1-11 extra process) + ) + a1-4 + ) + ) + ) + (set! (-> self root-override transv quad) (the-as uint128 0)) + (let ((gp-2 5)) + (until (<= gp-2 0) + (let ((f1-0 (-> self root-override transv y)) + (f0-0 (-> self root-override trans y)) + (a1-5 (new 'stack-no-clear 'vector)) + ) + (let* ((f1-1 (+ f1-0 (* -737280.0 (-> *display* seconds-per-frame)))) + (f0-1 (+ f0-0 (* f1-1 (-> *display* seconds-per-frame)))) + ) + (when (>= (-> self down-y) f0-1) + (set! f0-1 (-> self down-y)) + (set! f1-1 (* 0.65 (- f1-1))) + (+! gp-2 -1) + ) + (set! (-> self root-override transv y) f1-1) + (set! (-> a1-5 quad) (-> self root-override trans quad)) + (set! (-> a1-5 y) f0-1) + ) + (TODO-RENAME-30 (-> self root-override) a1-5) + ) + (suspend) + ) + ) + (go helix-button-idle-down) + (none) + ) + :post + (the-as (function none :behavior helix-button) rider-post) + ) + +(defstate helix-button-idle-down (helix-button) + :code + (behavior () + (while #t + (suspend) + ) + (none) + ) + ) + +(defmethod init-from-entity! helix-button ((obj helix-button) (arg0 entity-actor)) + (set! (-> obj fcell-handle) (the-as handle #f)) + (set! (-> obj my-water) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> obj my-door) (entity-actor-lookup arg0 'alt-actor 1)) + (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) default-collision-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing) + ) + (dummy-29 s4-0 1) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 14336.0 0.0 22118.4) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (initialize-skeleton obj *helix-button-sg* '()) + (logior! (-> obj skel status) 1) + (ja-channel-set! 1) + (let ((s5-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> obj draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (set! (-> obj spawn-trans quad) (-> obj root-override trans quad)) + (set! (-> obj root-override trans y) (+ -26624.0 (-> obj root-override trans y))) + (set! (-> obj down-y) (+ -6553.6 (-> obj root-override trans y))) + (set! (-> obj fact) + (new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc)) + ) + (ja-post) + (dummy-47 (-> obj root-override)) + (set! *helix-button* obj) + (go helix-button-startup) + (none) + ) + +(defmethod dummy-21 helix-water ((obj helix-water)) + (let ((s5-0 (+ (-> obj last-alt-actor-consumed) 1))) + (when (< s5-0 (-> obj alt-actors length)) + (let* ((v1-5 (-> obj alt-actors s5-0)) + (s4-0 (if v1-5 + (-> v1-5 extra process) + ) + ) + (a0-3 (if (and (nonzero? s4-0) (type-type? (-> s4-0 type) process-drawable)) + s4-0 + ) + ) + ) + (+ -1638.4 (-> obj root trans y)) + (cond + (a0-3 + (when (< (-> (the-as process-drawable a0-3) root trans y) (-> obj root trans y)) + (set! (-> obj last-alt-actor-consumed) s5-0) + (case (-> a0-3 type) + ((babak) + (send-event a0-3 'instant-death) + ) + ((ecovent) + (send-event a0-3 'show-particles #f) + ) + ((launcher) + (send-event a0-3 'instant-death) + ) + ) + ) + ) + (else + (set! (-> obj last-alt-actor-consumed) s5-0) + s5-0 + ) + ) + ) + ) + ) + ) + +(defstate helix-water-idle (helix-water) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'trigger) + (go helix-water-activated) + ) + ((= v1-0 'music) + (set-setting! *setting-control* self 'music 'danger 0.0 0) + ) + ) + ) + ) + ) + :code + (behavior () + (set! (-> self root trans y) (-> self start-y)) + (set! (-> self last-alt-actor-consumed) -1) + (set! (-> self transv-y) 9216.0) + (suspend) + (send-event (ppointer->process (-> self dark-eco)) 'move-to (-> self root trans)) + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior helix-water) ja-post) + ) + +(defstate helix-water-activated (helix-water) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('notify) + (when (= (-> arg0 type) launcherdoor) + (clear-pending-settings-from-process *setting-control* self 'music) + (go helix-water-idle) + ) + ) + ) + ) + :trans + (behavior () + (set! (-> self root scale y) (seek (-> self root scale y) 0.8 (* 0.667 (-> *display* seconds-per-frame)))) + (when *target* + (let ((f0-4 (-> (target-pos 0) y))) + (when (zero? (logand (-> *target* state-flags) 256)) + (let* ((f0-5 (- f0-4 (-> self root trans y))) + (f0-6 (+ -40960.0 f0-5)) + (f0-7 (* 0.000024414063 f0-6)) + ) + (cond + ((< f0-7 0.0) + (set! f0-7 0.0) + ) + ((< 1.0 f0-7) + (set! f0-7 1.0) + ) + ) + (set! (-> self transv-y) (+ 3584.0 (* 12800.0 f0-7))) + ) + ) + ) + ) + (+! (-> self root trans y) (* (-> self transv-y) (-> *display* seconds-per-frame))) + (if (< (-> self end-y) (-> self root trans y)) + (set! (-> self root trans y) (-> self end-y)) + ) + (send-event (ppointer->process (-> self dark-eco)) 'move-to (-> self root trans)) + (dummy-21 self) + (none) + ) + :code + (behavior () + (send-event (ppointer->process (-> self dark-eco)) 'trigger) + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior helix-water) ja-post) + ) + +(defmethod relocate helix-water ((obj helix-water) (arg0 int)) + (if (nonzero? (-> obj alt-actors)) + (&+! (-> obj alt-actors) arg0) + ) + (the-as + helix-water + ((the-as (function process-drawable int process-drawable) (find-parent-method helix-water 7)) obj arg0) + ) + ) + +(defmethod init-from-entity! helix-water ((obj helix-water) (arg0 entity-actor)) + (set! (-> obj last-alt-actor-consumed) -1) + (set! (-> obj transv-y) 9216.0) + (set! (-> obj root) (new 'process 'trsqv)) + (process-drawable-from-entity! obj arg0) + (set! (-> obj start-y) (+ -49152.0 (-> obj root trans y))) + (set! (-> obj end-y) (+ 851968.0 (-> obj start-y))) + (set-vector! (-> obj root scale) 1.0 0.8 1.0 1.0) + (let ((s4-0 (entity-actor-count arg0 'alt-actor))) + (set! (-> obj alt-actors) (the-as (array entity-actor) (new 'process 'boxed-array entity-actor s4-0))) + (dotimes (s3-0 s4-0) + (set! (-> obj alt-actors s3-0) (entity-actor-lookup arg0 'alt-actor s3-0)) + ) + ) + (set! (-> obj root trans y) (-> obj start-y)) + (let ((s5-1 (get-process *default-dead-pool* helix-dark-eco #x4000))) + (set! (-> obj dark-eco) + (the-as + (pointer helix-dark-eco) + (when s5-1 + (let ((t9-6 (method-of-type helix-dark-eco activate))) + (t9-6 (the-as helix-dark-eco s5-1) obj 'helix-dark-eco (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 water-vol-init-by-other (-> obj entity)) + (-> s5-1 ppointer) + ) + ) + ) + ) + (set! *helix-water* obj) + (go helix-water-idle) + (none) + ) + + + + diff --git a/goal_src/levels/sunken/sunken-obs.gc b/goal_src/levels/sunken/sunken-obs.gc index 30d4791c15..fa8ee77a22 100644 --- a/goal_src/levels/sunken/sunken-obs.gc +++ b/goal_src/levels/sunken/sunken-obs.gc @@ -187,11 +187,12 @@ ) (deftype sunkencam (pov-camera) - ((seq uint64 :offset-assert 224) + ((ppointer-override (pointer sunkencam) :score 100 :offset 24) + (seq uint64 :offset-assert 224) ) - :heap-base #x80 :method-count-assert 30 :size-assert #xe8 + :heap-base #x80 :flag-assert #x1e008000e8 ) diff --git a/goal_src/levels/village3/minecart.gc b/goal_src/levels/village3/minecart.gc index 55a6aeb716..0e4927d2a3 100644 --- a/goal_src/levels/village3/minecart.gc +++ b/goal_src/levels/village3/minecart.gc @@ -5,3 +5,181 @@ ;; name in dgo: minecart ;; dgos: L1, VI3 +;; DECOMP BEGINS + +(defskelgroup *minecartsteel-sg* minecartsteel + 0 + 4 + ((1 (meters 20)) (2 (meters 40)) (3 (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :longest-edge (meters 0) + ) + +(deftype minecartsteel (process-drawable) + ((root-override collide-shape-moving :offset 112) + (index int32 :offset-assert 176) + (anim spool-anim :offset-assert 180) + (sync sync-info :inline :offset-assert 184) + ) + :heap-base #x50 + :method-count-assert 21 + :size-assert #xc0 + :flag-assert #x15005000c0 + (:methods + (idle () _type_ :state 20) + ) + ) + + +(defstate idle (minecartsteel) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (when (or (= v1-0 'touch) (= v1-0 'attack)) + (when (= (-> arg0 type) target) + (let ((a2-1 (new 'stack 'collide-overlap-result))) + (if (not (dummy-39 (-> self root-override) (-> *target* control) a2-1)) + (send-event arg0 'no-look-around 450) + ) + ) + ) + #f + ) + ) + ) + ) + :trans + (the-as (function none :behavior minecartsteel) rider-trans) + :code + (behavior () + (ja-channel-set! 1) + (let ((v1-2 (-> self skel root-channel 0))) + (set! (-> v1-2 frame-group) (the-as art-joint-anim (-> self anim))) + ) + (while #t + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 num-func) num-func-identity) + (set! (-> gp-0 frame-num) + (* (get-current-phase (-> self sync)) (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + ) + ) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)))) + (update-trans! (-> self sound) a1-1) + ) + (update! (-> self sound)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior minecartsteel) rider-post) + ) + +(defbehavior minecartsteel-initialize-by-other minecartsteel ((arg0 entity-actor) (arg1 float)) + (let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) default-collision-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing) + ) + (dummy-29 s4-0 1) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 4915.2 0.0 13107.2) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> self root-override) s4-0) + ) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (quaternion-identity! (-> self root-override quat)) + (initialize-skeleton self *minecartsteel-sg* '()) + (set! (-> self draw origin-joint-index) (the-as uint 3)) + (logior! (-> self skel status) 1) + (load-params! (-> self sync) self (the-as uint 9000) arg1 0.15 0.15) + (set! (-> self sound) (new + 'process + 'ambient-sound + (new 'static 'sound-spec + :mask #x80 + :num 1.0 + :group #x1 + :sound-name (static-sound-name "v3-cartride") + :volume #x400 + :fo-max 30 + ) + (-> self root-override trans) + ) + ) + (set! (-> self index) (res-lump-value arg0 'index int)) + (let ((v1-33 (-> self index))) + (set! (-> self anim) + (the-as + spool-anim + (cond + ((zero? v1-33) + (-> self draw art-group data 5) + ) + ((= v1-33 1) + (let ((a0-17 (-> self sync)) + (t9-12 (method-of-type sync-info setup-params!)) + (a1-11 9000) + (f0-7 (+ 0.8 arg1)) + ) + (t9-12 a0-17 (the-as uint a1-11) (- f0-7 (* (the float (the int (/ f0-7 1.0))) 1.0)) 0.15 0.15) + ) + (-> self draw art-group data 6) + ) + (else + (let ((a0-18 (-> self sync)) + (t9-13 (method-of-type sync-info setup-params!)) + (a1-12 9000) + (f0-10 (+ 0.13 arg1)) + ) + (t9-13 a0-18 (the-as uint a1-12) (- f0-10 (* (the float (the int (/ f0-10 1.0))) 1.0)) 0.15 0.15) + ) + (-> self draw art-group data 7) + ) + ) + ) + ) + ) + (go-virtual idle) + ) + +(defmethod init-from-entity! minecartsteel ((obj minecartsteel) (arg0 entity-actor)) + (dotimes (s4-0 4) + (let ((s3-0 (get-process *default-dead-pool* minecartsteel #x4000))) + (when s3-0 + (let ((t9-1 (method-of-type minecartsteel activate))) + (t9-1 (the-as minecartsteel s3-0) obj 'minecartsteel (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 minecartsteel-initialize-by-other arg0 (* 0.2 (the float (+ s4-0 1)))) + (-> s3-0 ppointer) + ) + ) + ) + (minecartsteel-initialize-by-other arg0 0.0) + (none) + ) + + + + diff --git a/scripts/update-goal-src.py b/scripts/update-goal-src.py index 376e12a972..68456c392b 100644 --- a/scripts/update-goal-src.py +++ b/scripts/update-goal-src.py @@ -33,7 +33,8 @@ files_with_modifications = [ "default-menu", "collide-shape", "cam-states", - "plant-boss" + "plant-boss", + "helix-water" ] for file in files: diff --git a/test/decompiler/reference/engine/camera/cam-layout_REF.gc b/test/decompiler/reference/engine/camera/cam-layout_REF.gc index 9bb5e79338..6044324eb9 100644 --- a/test/decompiler/reference/engine/camera/cam-layout_REF.gc +++ b/test/decompiler/reference/engine/camera/cam-layout_REF.gc @@ -333,9 +333,9 @@ (let ((s2-0 (-> *volume-descriptor* pos-vol *volume-descriptor-current*))) (set! (-> s2-0 volume-type) arg1) (set! (-> s2-0 point-count) 0) - (set! (-> s2-0 first-point) (-> *volume-point* data *volume-point-current*)) + (set! (-> s2-0 first-point) (the-as (pointer vector) (-> *volume-point* data *volume-point-current*))) (set! (-> s2-0 normal-count) 0) - (set! (-> s2-0 first-normal) (-> *volume-normal* data *volume-normal-current*)) + (set! (-> s2-0 first-normal) (the-as (pointer vector) (-> *volume-normal* data *volume-normal-current*))) (set! *volume-descriptor-current* (+ *volume-descriptor-current* 1)) (+! (-> self num-volumes) 1) (dotimes (s1-0 (the-as int (-> sv-16 elt-count))) diff --git a/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc b/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc index 198f0f1888..2b57a79ea2 100644 --- a/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc +++ b/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc @@ -391,9 +391,9 @@ :flag-assert #x38000000b8 (:methods (new (symbol type process-drawable collide-list-enum) _type_ 0) - (TODO-RENAME-28 (_type_ vector) none 28) + (TODO-RENAME-28 (_type_ vector) object 28) (dummy-29 (_type_ int) none 29) - (TODO-RENAME-30 (_type_ vector) none 30) + (TODO-RENAME-30 (_type_ vector) object 30) (dummy-31 (_type_) none 31) (dummy-32 (_type_ object uint) none 32) (dummy-33 (_type_ vector uint) none 33) diff --git a/test/decompiler/reference/engine/geometry/vol-h_REF.gc b/test/decompiler/reference/engine/geometry/vol-h_REF.gc index 960a90f1f7..f1431f4718 100644 --- a/test/decompiler/reference/engine/geometry/vol-h_REF.gc +++ b/test/decompiler/reference/engine/geometry/vol-h_REF.gc @@ -3,22 +3,22 @@ ;; definition of type plane-volume (deftype plane-volume (structure) - ((volume-type symbol :offset-assert 0) - (point-count int16 :offset-assert 4) - (normal-count int16 :offset-assert 6) - (first-point vector :offset-assert 8) - (first-normal vector :offset-assert 12) - (num-planes int32 :offset-assert 16) - (plane uint32 :offset-assert 20) + ((volume-type symbol :offset-assert 0) + (point-count int16 :offset-assert 4) + (normal-count int16 :offset-assert 6) + (first-point (pointer vector) :offset-assert 8) + (first-normal (pointer vector) :offset-assert 12) + (num-planes int32 :offset-assert 16) + (plane (inline-array plane) :offset-assert 20) ) :pack-me :method-count-assert 12 :size-assert #x18 :flag-assert #xc00000018 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) + (dummy-9 (_type_ symbol vector-array vector-array) symbol 9) + (debug-draw (_type_) none 10) + (dummy-11 (_type_ vector float) symbol 11) ) ) @@ -43,16 +43,16 @@ (pos-vol plane-volume 32 :inline :offset-assert 16) (neg-vol-count int32 :offset-assert 784) (neg-vol plane-volume 32 :inline :offset-assert 788) - (debug-point basic :offset-assert 1556) - (debug-normal basic :offset-assert 1560) + (debug-point vector-array :offset-assert 1556) + (debug-normal vector-array :offset-assert 1560) ) :method-count-assert 12 :size-assert #x61c :flag-assert #xc0000061c (:methods (new (symbol type process-drawable) _type_ 0) - (dummy-9 (_type_) none 9) - (dummy-10 (_type_ vector) none 10) + (dummy-9 (_type_) symbol 9) + (dummy-10 (_type_ vector) symbol 10) (TODO-RENAME-11 (_type_) symbol 11) ) ) @@ -95,7 +95,7 @@ (a0-8 (-> (the-as vol-control gp-0) pos-vol (-> (the-as vol-control gp-0) pos-vol-count))) ) (set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count))) - (set! (-> a0-8 plane) (the-as uint v1-12)) + (set! (-> a0-8 plane) (the-as (inline-array plane) v1-12)) ) (+! (-> (the-as vol-control gp-0) pos-vol-count) 1) (+! s3-0 1) @@ -117,7 +117,7 @@ (a0-19 (-> (the-as vol-control gp-0) neg-vol (-> (the-as vol-control gp-0) neg-vol-count))) ) (set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count))) - (set! (-> a0-19 plane) (the-as uint v1-31)) + (set! (-> a0-19 plane) (the-as (inline-array plane) v1-31)) ) (+! (-> (the-as vol-control gp-0) neg-vol-count) 1) (+! s3-1 1) diff --git a/test/decompiler/reference/engine/geometry/vol_REF.gc b/test/decompiler/reference/engine/geometry/vol_REF.gc new file mode 100644 index 0000000000..a88ca0541c --- /dev/null +++ b/test/decompiler/reference/engine/geometry/vol_REF.gc @@ -0,0 +1,279 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function plane-volume-intersect-dist +(defun plane-volume-intersect-dist ((arg0 vector) (arg1 vector) (arg2 vector)) + (let ((f0-1 (vector-dot arg1 arg0)) + (f1-1 (vector-dot arg2 arg0)) + ) + (if (< 0.00001 (fabs f1-1)) + (/ (- (-> arg0 w) f0-1) f1-1) + 409600000.0 + ) + ) + ) + +;; definition for method 9 of type plane-volume +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; Used lq/sq +(defmethod dummy-9 plane-volume ((obj plane-volume) (arg0 symbol) (arg1 vector-array) (arg2 vector-array)) + (local-vars + (sv-144 vector) + (sv-148 float) + (sv-152 int) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + (sv-208 vector) + (sv-224 vector) + (sv-240 int) + (sv-256 int) + ) + (set! (-> obj volume-type) arg0) + (set! (-> obj point-count) 0) + (set! (-> obj first-point) (the-as (pointer vector) (-> arg1 data (-> arg1 length)))) + (set! (-> obj normal-count) 0) + (set! (-> obj first-normal) (the-as (pointer vector) (-> arg2 data (-> arg2 length)))) + (dotimes (s3-0 (-> obj num-planes)) + (set! sv-176 (new 'stack-no-clear 'vector)) + (set! (-> sv-176 quad) (the-as uint128 0)) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! (-> sv-192 quad) (the-as uint128 0)) + (set! sv-208 (new 'stack-no-clear 'vector)) + (set! (-> sv-208 quad) (the-as uint128 0)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (set! (-> sv-224 quad) (the-as uint128 0)) + 0.0 + 0.0 + 0.0 + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s1-0 (new-stack-vector0)) + (s0-0 0) + (s2-0 (-> obj plane)) + ) + (set! sv-240 0) + (while (< sv-240 (-> obj num-planes)) + (when (!= s3-0 sv-240) + (vector-float*! sv-176 (the-as vector (-> s2-0 sv-240)) (-> s2-0 sv-240 w)) + (vector-cross! sv-192 (the-as vector (-> s2-0 sv-240)) (the-as vector (-> s2-0 s3-0))) + (vector-normalize! sv-192 1.0) + (vector-cross! sv-208 sv-192 (the-as vector (-> s2-0 sv-240))) + (vector-normalize! sv-208 1.0) + (let ((f0-4 (plane-volume-intersect-dist (-> s2-0 s3-0) sv-176 sv-208))) + (when (!= f0-4 409600000.0) + (vector+float*! sv-224 sv-176 sv-208 f0-4) + (set! sv-144 (new-stack-vector0)) + (set! sv-148 0.0) + (set! sv-152 0) + (set! sv-160 (new-stack-vector0)) + (set! (-> sv-144 quad) (-> sv-224 quad)) + (set! sv-256 0) + (while (< sv-256 (-> obj num-planes)) + (when (and (!= sv-256 s3-0) (!= sv-256 sv-240)) + (let ((f30-0 (plane-volume-intersect-dist (-> s2-0 sv-256) sv-144 sv-192))) + (cond + ((= f30-0 409600000.0) + ) + ((zero? sv-152) + (vector+float*! sv-144 sv-144 sv-192 f30-0) + (set! (-> sv-160 quad) (-> s2-0 sv-256 quad)) + (set! sv-148 8192000.0) + (set! sv-152 1) + ) + ((begin (vector-float*! sv-224 sv-192 f30-0) (>= (vector-dot sv-224 sv-160) 0.0)) + ) + ((>= (vector-dot sv-224 (the-as vector (-> s2-0 sv-256))) 0.0) + (when (< (fabs f30-0) (fabs sv-148)) + (set! sv-148 f30-0) + (set! sv-152 (+ sv-152 1)) + ) + ) + (else + (vector+float*! sv-144 sv-144 sv-192 f30-0) + (set! (-> sv-160 quad) (-> s2-0 sv-256 quad)) + (set! sv-152 (+ sv-152 1)) + (if (< (fabs f30-0) (fabs sv-148)) + (set! sv-148 (- sv-148 f30-0)) + (set! sv-148 0.0) + ) + ) + ) + ) + ) + (set! sv-256 (+ sv-256 1)) + ) + (cond + ((zero? sv-152) + ) + ((= sv-148 0.0) + ) + (else + (dotimes (v1-70 (-> obj num-planes)) + (when (and (!= v1-70 s3-0) (!= v1-70 sv-240)) + (if (< 4096.0 (- (vector-dot sv-144 (the-as vector (-> s2-0 v1-70))) (the-as float (-> s2-0 v1-70 w)))) + (goto cfg-42) + ) + ) + ) + (vector+float*! sv-224 sv-144 sv-192 sv-148) + (cond + ((< (-> arg1 allocated-length) (+ (-> arg1 length) 2)) + (format 0 "ERROR : vol-control #x~X out of volume points~%" obj) + ) + (else + (set! (-> arg1 data (-> arg1 length) quad) (-> sv-144 quad)) + (set! (-> arg1 data (+ (-> arg1 length) 1) quad) (-> sv-224 quad)) + (+! (-> arg1 length) 2) + (+! (-> obj point-count) 2) + ) + ) + (vector+! s1-0 s1-0 sv-144) + (vector+! s1-0 s1-0 sv-224) + (+! s0-0 2) + ) + ) + ) + ) + ) + (label cfg-42) + (set! sv-240 (+ sv-240 1)) + ) + (when (nonzero? s0-0) + (vector-float*! s1-0 s1-0 (/ 1.0 (the float s0-0))) + (cond + ((< (-> arg2 allocated-length) (+ (-> arg2 length) 2)) + (format 0 "ERROR : vol-control #x~X out of volume normals~%" obj) + ) + (else + (set! (-> arg2 data (-> arg2 length) quad) (-> s1-0 quad)) + (set! (-> arg2 data (+ (-> arg2 length) 1) quad) (-> s2-0 s3-0 quad)) + (+! (-> arg2 length) 2) + (let ((v1-112 (+ (-> obj normal-count) 2))) + (set! (-> obj normal-count) v1-112) + v1-112 + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 10 of type plane-volume +;; INFO: Return type mismatch int vs none. +(defmethod debug-draw plane-volume ((obj plane-volume)) + (let* ((v1-0 (-> obj volume-type)) + (s5-0 (cond + ((= v1-0 'vol) + (the-as uint #x8000c000) + ) + ((= v1-0 'pvol) + (the-as uint #x80808080) + ) + (else + (the-as uint #x800000c0) + ) + ) + ) + (s4-0 (-> obj first-point)) + ) + (dotimes (s3-0 (/ (-> obj point-count) 2)) + (add-debug-line + #t + (bucket-id debug-draw1) + (the-as vector s4-0) + (the-as vector (&-> s4-0 4)) + (the-as rgba s5-0) + #f + (the-as rgba -1) + ) + (set! s4-0 (&-> s4-0 8)) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type plane-volume +(defmethod dummy-11 plane-volume ((obj plane-volume) (arg0 vector) (arg1 float)) + (dotimes (v1-0 (-> obj num-planes)) + (if (< arg1 (- (vector-dot arg0 (the-as vector (-> obj plane v1-0))) (the-as float (-> obj plane v1-0 w)))) + (return #f) + ) + ) + #t + ) + +;; definition for method 9 of type vol-control +;; INFO: Return type mismatch int vs symbol. +(defmethod dummy-9 vol-control ((obj vol-control)) + (with-pp + (let ((a0-1 obj)) + (when (and (and *display-vol-marks* (logtest? (-> a0-1 flags) 1)) (logtest? (-> obj flags) 2)) + (when (zero? (-> obj debug-point)) + (let ((s5-0 pp)) + (let ((s6-1 (-> obj process))) + ) + (let ((s4-0 0)) + (dotimes (v1-8 (-> obj pos-vol-count)) + (+! s4-0 (-> obj pos-vol v1-8 num-planes)) + ) + (dotimes (v1-11 (-> obj neg-vol-count)) + (+! s4-0 (-> obj neg-vol v1-11 num-planes)) + ) + (set! (-> obj debug-point) (new 'debug 'vector-array (* 10 s4-0))) + (set! (-> obj debug-normal) (new 'debug 'vector-array (* 10 s4-0))) + ) + (let ((s6-2 s5-0)) + ) + ) + (set! (-> obj debug-point length) 0) + (set! (-> obj debug-normal length) 0) + (dotimes (s5-1 (-> obj pos-vol-count)) + (dummy-9 (-> obj pos-vol s5-1) 'vol (-> obj debug-point) (-> obj debug-normal)) + ) + (dotimes (s5-2 (-> obj neg-vol-count)) + (dummy-9 (-> obj neg-vol s5-2) 'vol (-> obj debug-point) (-> obj debug-normal)) + ) + ) + (dotimes (s5-3 (-> obj pos-vol-count)) + (debug-draw (-> obj pos-vol s5-3)) + ) + (dotimes (s5-4 (-> obj neg-vol-count)) + (debug-draw (-> obj neg-vol s5-4)) + ) + ) + ) + (the-as symbol 0) + ) + ) + +;; definition for method 10 of type vol-control +(defmethod dummy-10 vol-control ((obj vol-control) (arg0 vector)) + (dotimes (s4-0 (-> obj neg-vol-count)) + (if (dummy-11 (-> obj neg-vol s4-0) arg0 0.0) + (return #f) + ) + ) + (dotimes (s4-1 (-> obj pos-vol-count)) + (if (dummy-11 (-> obj pos-vol s4-1) arg0 0.0) + (return #t) + ) + ) + #f + ) + + + + diff --git a/test/decompiler/reference/levels/common/baseplat_REF.gc b/test/decompiler/reference/levels/common/baseplat_REF.gc index 1c1bae7836..3835777cbc 100644 --- a/test/decompiler/reference/levels/common/baseplat_REF.gc +++ b/test/decompiler/reference/levels/common/baseplat_REF.gc @@ -76,6 +76,7 @@ ) ;; definition for function plat-trans +;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defbehavior plat-trans baseplat () (rider-trans) diff --git a/test/decompiler/reference/levels/sunken/helix-water_REF.gc b/test/decompiler/reference/levels/sunken/helix-water_REF.gc new file mode 100644 index 0000000000..7b8ddb6d91 --- /dev/null +++ b/test/decompiler/reference/levels/sunken/helix-water_REF.gc @@ -0,0 +1,836 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type helix-slide-door +(deftype helix-slide-door (process-drawable) + ((root-override collide-shape :offset 112) + ) + :heap-base #x40 + :method-count-assert 20 + :size-assert #xb0 + :flag-assert #x14004000b0 + (:states + helix-slide-door-close + helix-slide-door-idle-closed + helix-slide-door-idle-open + ) + ) + +;; definition for method 3 of type helix-slide-door +(defmethod inspect helix-slide-door ((obj helix-slide-door)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + obj + ) + +;; failed to figure out what this is: +(defskelgroup *helix-slide-door-sg* helix-slide-door + 0 + 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 12 0 18) + :longest-edge (meters 0) + ) + +;; definition of type helix-button +(deftype helix-button (process-drawable) + ((root-override collide-shape-moving :offset 112) + (my-water entity-actor :offset-assert 176) + (my-door entity-actor :offset-assert 180) + (fcell-handle handle :offset-assert 184) + (down-y float :offset-assert 192) + (spawn-trans vector :inline :offset-assert 208) + ) + :heap-base #x70 + :method-count-assert 20 + :size-assert #xe0 + :flag-assert #x14007000e0 + (:states + helix-button-activate + helix-button-idle-down + helix-button-idle-up + helix-button-quick-activate + helix-button-startup + ) + ) + +;; definition for method 3 of type helix-button +(defmethod inspect helix-button ((obj helix-button)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~T~Tmy-water: ~A~%" (-> obj my-water)) + (format #t "~T~Tmy-door: ~A~%" (-> obj my-door)) + (format #t "~T~Tfcell-handle: ~D~%" (-> obj fcell-handle)) + (format #t "~T~Tdown-y: ~f~%" (-> obj down-y)) + (format #t "~T~Tspawn-trans: #~%" (-> obj spawn-trans)) + obj + ) + +;; failed to figure out what this is: +(defskelgroup *helix-button-sg* helix-button + 0 + 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 3.5 0 5.4) + :longest-edge (meters 0) + ) + +;; definition of type helix-dark-eco +(deftype helix-dark-eco (dark-eco-pool) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for method 3 of type helix-dark-eco +(defmethod inspect helix-dark-eco ((obj helix-dark-eco)) + (let ((t9-0 (method-of-type dark-eco-pool inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition of type helix-water +(deftype helix-water (process-drawable) + ((last-alt-actor-consumed int32 :offset-assert 176) + (alt-actors (array entity-actor) :offset-assert 180) + (transv-y float :offset-assert 184) + (start-y float :offset-assert 188) + (end-y float :offset-assert 192) + (dark-eco (pointer helix-dark-eco) :offset-assert 196) + ) + :heap-base #x60 + :method-count-assert 22 + :size-assert #xc8 + :flag-assert #x16006000c8 + (:methods + (dummy-20 (_type_) none 20) + (dummy-21 (_type_) object 21) + ) + (:states + helix-water-activated + helix-water-idle + ) + ) + +;; definition for method 3 of type helix-water +(defmethod inspect helix-water ((obj helix-water)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~T~Tlast-alt-actor-consumed: ~D~%" (-> obj last-alt-actor-consumed)) + (format #t "~T~Talt-actors: ~A~%" (-> obj alt-actors)) + (format #t "~T~Ttransv-y: ~f~%" (-> obj transv-y)) + (format #t "~T~Tstart-y: ~f~%" (-> obj start-y)) + (format #t "~T~Tend-y: ~f~%" (-> obj end-y)) + (format #t "~T~Tdark-eco: #x~X~%" (-> obj dark-eco)) + obj + ) + +;; failed to figure out what this is: +(defstate water-vol-idle (helix-dark-eco) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (let ((a0-1 (-> self sound))) + (set! (-> a0-1 spec pitch-mod) 2057) + (update-vol! a0-1 100) + ) + ) + (else + ((-> (method-of-type water-anim water-vol-idle) event) arg0 arg1 arg2 arg3) + ) + ) + ) + :enter + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-0 (-> self sound))) + (set! (-> a0-0 spec pitch-mod) 1524) + (update-vol! a0-0 58) + ) + (none) + ) + :trans + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (update! (-> self sound)) + (none) + ) + :post + (behavior () + (let ((t9-0 (-> (method-of-type dark-eco-pool water-vol-idle) post))) + (if t9-0 + ((the-as (function none :behavior helix-dark-eco) t9-0)) + ) + ) + (ja-post) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate helix-slide-door-idle-open (helix-slide-door) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 + (('trigger) + (go helix-slide-door-close) + ) + ) + ) + :code + (behavior () + (while #t + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate helix-slide-door-close (helix-slide-door) + :code + (behavior () + (let ((a0-0 (-> self skel root-channel 0))) + (set! (-> a0-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 2))) + (set! (-> a0-0 param 0) + (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 2)) data 0 length) -1)) + ) + (set! (-> a0-0 param 1) 1.0) + (set! (-> a0-0 frame-num) 0.0) + (joint-control-channel-group! a0-0 (the-as art-joint-anim (-> self draw art-group data 2)) num-func-seek!) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-1 (-> self skel root-channel 0))) + (set! (-> a0-1 param 0) (the float (+ (-> a0-1 frame-group data 0 length) -1))) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (transform-post) + (go helix-slide-door-idle-closed) + (none) + ) + :post + (the-as (function none :behavior helix-slide-door) transform-post) + ) + +;; failed to figure out what this is: +(defstate helix-slide-door-idle-closed (helix-slide-door) + :code + (behavior () + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + ) + +;; definition for method 11 of type helix-slide-door +;; INFO: Return type mismatch object vs none. +(defmethod init-from-entity! helix-slide-door ((obj helix-slide-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 512)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 22528.0 0.0 53248.0) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (initialize-skeleton obj *helix-slide-door-sg* '()) + (logior! (-> obj skel status) 1) + (ja-channel-set! 1) + (let ((s5-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> obj draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (ja-post) + (dummy-47 (-> obj root-override)) + (set! *helix-slide-door* obj) + (go helix-slide-door-idle-open) + (none) + ) + +;; failed to figure out what this is: +(defstate helix-button-startup (helix-button) + :code + (behavior () + (when (not (task-complete? *game-info* (game-task sunken-slide))) + (let ((a0-1 (new 'stack-no-clear 'vector))) + (set! (-> a0-1 quad) (-> self root-override trans quad)) + (set! (-> a0-1 y) (+ 30720.0 (-> a0-1 y))) + (let ((v1-7 (birth-pickup-at-point + a0-1 + (pickup-type fuel-cell) + (the float (-> self entity extra perm task)) + #f + self + (-> self fact) + ) + ) + ) + (set! (-> self fcell-handle) (ppointer->handle v1-7)) + (if v1-7 + (clear-collide-with-as (-> (the-as collectable (-> v1-7 0)) root-override)) + ) + ) + ) + ) + (go helix-button-idle-up) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate helix-button-idle-up (helix-button) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch) + (when *target* + (when (logtest? (-> *target* control status) 1) + (cond + ((and + (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))) + (not (handle->process (-> self fcell-handle))) + ) + (go helix-button-quick-activate) + ) + (else + (process-entity-status! self (entity-perm-status complete) #t) + (go helix-button-activate) + ) + ) + ) + ) + ) + ) + ) + :code + (behavior () + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate helix-button-activate (helix-button) + :trans + (the-as (function none :behavior helix-button) rider-trans) + :code + (behavior () + (local-vars (v1-7 symbol)) + (let ((a0-1 (handle->process (-> self fcell-handle)))) + (when a0-1 + (send-event a0-1 'pickup) + (until v1-7 + (suspend) + (set! v1-7 (or (not *target*) (zero? (logand (-> *target* state-flags) 256)))) + ) + ) + ) + (let* ((gp-0 (the-as sunkencam (get-process *default-dead-pool* sunkencam #x4000))) + (v1-11 + (when gp-0 + (let ((t9-2 (method-of-type sunkencam activate))) + (t9-2 gp-0 self 'sunkencam (the-as pointer #x70004000)) + ) + (run-now-in-process + gp-0 + pov-camera-init-by-other + (-> self spawn-trans) + *sunkencam-sg* + "qbert-show-door-open" + 0 + #f + '() + ) + (-> gp-0 ppointer-override) + ) + ) + ) + (set! (-> v1-11 0 seq) (the-as uint 2)) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) self) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'music) + (let ((t9-4 send-event-function) + (v1-15 (-> self my-water)) + ) + (t9-4 + (if v1-15 + (-> v1-15 extra process) + ) + a1-5 + ) + ) + ) + (set! (-> self state-time) (-> *display* base-frame-counter)) + (when *target* + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector-! gp-1 (-> self root-override trans) (target-pos 0)) + (when (< 12288.0 (vector-xz-length gp-1)) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 4096.0) + (TODO-RENAME-28 (-> *target* control) gp-1) + (dummy-45 (-> self root-override)) + (dummy-35 (-> self root-override)) + ) + ) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 450) + (suspend) + ) + (level-hint-spawn + (game-text-id sunken-helix-daxter-bad-feeling) + "sksp0124" + (the-as entity #f) + *entity-pool* + (game-task none) + ) + (send-event *target* 'play-anim 'shock-in) + (sound-play-by-name (static-sound-name "prec-button8") (new-sound-id) 1024 0 0 1 #t) + (set! (-> self root-override transv quad) (the-as uint128 0)) + (let ((gp-3 5)) + (until (<= gp-3 0) + (let ((f1-0 (-> self root-override transv y)) + (f0-2 (-> self root-override trans y)) + (a1-11 (new 'stack-no-clear 'vector)) + ) + (let* ((f1-1 (+ f1-0 (* -737280.0 (-> *display* seconds-per-frame)))) + (f0-3 (+ f0-2 (* f1-1 (-> *display* seconds-per-frame)))) + ) + (when (>= (-> self down-y) f0-3) + (set! f0-3 (-> self down-y)) + (set! f1-1 (* 0.65 (- f1-1))) + (+! gp-3 -1) + ) + (set! (-> self root-override transv y) f1-1) + (set! (-> a1-11 quad) (-> self root-override trans quad)) + (set! (-> a1-11 y) f0-3) + ) + (TODO-RENAME-30 (-> self root-override) a1-11) + ) + (suspend) + ) + ) + (set! (-> self state-time) (-> *display* base-frame-counter)) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 375) + (suspend) + ) + (sound-play-by-name (static-sound-name "maindoor") (new-sound-id) 1024 0 0 1 #t) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 570) + (suspend) + ) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) self) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'trigger) + (let ((t9-18 send-event-function) + (v1-66 (-> self my-door)) + ) + (t9-18 + (if v1-66 + (-> v1-66 extra process) + ) + a1-13 + ) + ) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 1050) + (suspend) + ) + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) self) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'trigger) + (let ((t9-19 send-event-function) + (v1-74 (-> self my-water)) + ) + (t9-19 + (if v1-74 + (-> v1-74 extra process) + ) + a1-14 + ) + ) + ) + (level-hint-spawn + (game-text-id sunken-helix-daxter-eco-rising) + "sksp0128" + (the-as entity #f) + *entity-pool* + (game-task none) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 600) + (suspend) + ) + (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300) + (send-event *target* 'play-anim 'shock-out) + (send-event *target* 'neck 1.0 (-> self my-door extra trans)) + (suspend) + ) + (go helix-button-idle-down) + (none) + ) + :post + (the-as (function none :behavior helix-button) rider-post) + ) + +;; failed to figure out what this is: +(defstate helix-button-quick-activate (helix-button) + :trans + (the-as (function none :behavior helix-button) rider-trans) + :code + (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) self) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'music) + (let ((t9-0 send-event-function) + (v1-1 (-> self my-water)) + ) + (t9-0 + (if v1-1 + (-> v1-1 extra process) + ) + a1-0 + ) + ) + ) + (sound-play-by-name (static-sound-name "prec-button8") (new-sound-id) 1024 0 0 1 #t) + (sound-play-by-name (static-sound-name "maindoor") (new-sound-id) 1024 0 0 1 #t) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) self) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'trigger) + (let ((t9-5 send-event-function) + (v1-7 (-> self my-door)) + ) + (t9-5 + (if v1-7 + (-> v1-7 extra process) + ) + a1-3 + ) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) self) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'trigger) + (let ((t9-6 send-event-function) + (v1-11 (-> self my-water)) + ) + (t9-6 + (if v1-11 + (-> v1-11 extra process) + ) + a1-4 + ) + ) + ) + (set! (-> self root-override transv quad) (the-as uint128 0)) + (let ((gp-2 5)) + (until (<= gp-2 0) + (let ((f1-0 (-> self root-override transv y)) + (f0-0 (-> self root-override trans y)) + (a1-5 (new 'stack-no-clear 'vector)) + ) + (let* ((f1-1 (+ f1-0 (* -737280.0 (-> *display* seconds-per-frame)))) + (f0-1 (+ f0-0 (* f1-1 (-> *display* seconds-per-frame)))) + ) + (when (>= (-> self down-y) f0-1) + (set! f0-1 (-> self down-y)) + (set! f1-1 (* 0.65 (- f1-1))) + (+! gp-2 -1) + ) + (set! (-> self root-override transv y) f1-1) + (set! (-> a1-5 quad) (-> self root-override trans quad)) + (set! (-> a1-5 y) f0-1) + ) + (TODO-RENAME-30 (-> self root-override) a1-5) + ) + (suspend) + ) + ) + (go helix-button-idle-down) + (none) + ) + :post + (the-as (function none :behavior helix-button) rider-post) + ) + +;; failed to figure out what this is: +(defstate helix-button-idle-down (helix-button) + :code + (behavior () + (while #t + (suspend) + ) + (none) + ) + ) + +;; definition for method 11 of type helix-button +;; INFO: Return type mismatch object vs none. +;; Used lq/sq +(defmethod init-from-entity! helix-button ((obj helix-button) (arg0 entity-actor)) + (set! (-> obj fcell-handle) (the-as handle #f)) + (set! (-> obj my-water) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> obj my-door) (entity-actor-lookup arg0 'alt-actor 1)) + (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) default-collision-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing) + ) + (dummy-29 s4-0 1) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 14336.0 0.0 22118.4) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (initialize-skeleton obj *helix-button-sg* '()) + (logior! (-> obj skel status) 1) + (ja-channel-set! 1) + (let ((s5-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> obj draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (set! (-> obj spawn-trans quad) (-> obj root-override trans quad)) + (set! (-> obj root-override trans y) (+ -26624.0 (-> obj root-override trans y))) + (set! (-> obj down-y) (+ -6553.6 (-> obj root-override trans y))) + (set! (-> obj fact) + (new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc)) + ) + (ja-post) + (dummy-47 (-> obj root-override)) + (set! *helix-button* obj) + (go helix-button-startup) + (none) + ) + +;; definition for method 21 of type helix-water +(defmethod dummy-21 helix-water ((obj helix-water)) + (let ((s5-0 (+ (-> obj last-alt-actor-consumed) 1))) + (when (< s5-0 (-> obj alt-actors length)) + (let* ((v1-5 (-> obj alt-actors s5-0)) + (s4-0 (if v1-5 + (-> v1-5 extra process) + ) + ) + (a0-3 (if (and (nonzero? s4-0) (type-type? (-> s4-0 type) process-drawable)) + s4-0 + ) + ) + ) + (+ -1638.4 (-> obj root trans y)) + (cond + (a0-3 + (when (< (-> (the-as process-drawable a0-3) root trans y) (-> obj root trans y)) + (set! (-> obj last-alt-actor-consumed) s5-0) + (case (-> a0-3 type) + ((babak) + (send-event a0-3 'instant-death) + ) + ((ecovent) + (send-event a0-3 'show-particles #f) + ) + ((launcher) + (send-event a0-3 'instant-death) + ) + ) + ) + ) + (else + (set! (-> obj last-alt-actor-consumed) s5-0) + s5-0 + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate helix-water-idle (helix-water) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'trigger) + (go helix-water-activated) + ) + ((= v1-0 'music) + (set-setting! *setting-control* self 'music 'danger 0.0 0) + ) + ) + ) + ) + ) + :code + (behavior () + (set! (-> self root trans y) (-> self start-y)) + (set! (-> self last-alt-actor-consumed) -1) + (set! (-> self transv-y) 9216.0) + (suspend) + (send-event (ppointer->process (-> self dark-eco)) 'move-to (-> self root trans)) + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior helix-water) ja-post) + ) + +;; failed to figure out what this is: +(defstate helix-water-activated (helix-water) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('notify) + (when (= (-> arg0 type) launcherdoor) + (clear-pending-settings-from-process *setting-control* self 'music) + (go helix-water-idle) + ) + ) + ) + ) + :trans + (behavior () + (set! (-> self root scale y) (seek (-> self root scale y) 0.8 (* 0.667 (-> *display* seconds-per-frame)))) + (when *target* + (let ((f0-4 (-> (target-pos 0) y))) + (when (zero? (logand (-> *target* state-flags) 256)) + (let* ((f0-5 (- f0-4 (-> self root trans y))) + (f0-6 (+ -40960.0 f0-5)) + (f0-7 (* 0.000024414063 f0-6)) + ) + (cond + ((< f0-7 0.0) + (set! f0-7 0.0) + ) + ((< 1.0 f0-7) + (set! f0-7 1.0) + ) + ) + (set! (-> self transv-y) (+ 3584.0 (* 12800.0 f0-7))) + ) + ) + ) + ) + (+! (-> self root trans y) (* (-> self transv-y) (-> *display* seconds-per-frame))) + (if (< (-> self end-y) (-> self root trans y)) + (set! (-> self root trans y) (-> self end-y)) + ) + (send-event (ppointer->process (-> self dark-eco)) 'move-to (-> self root trans)) + (dummy-21 self) + (none) + ) + :code + (behavior () + (send-event (ppointer->process (-> self dark-eco)) 'trigger) + (while #t + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior helix-water) ja-post) + ) + +;; definition for method 7 of type helix-water +;; INFO: Return type mismatch process-drawable vs helix-water. +(defmethod relocate helix-water ((obj helix-water) (arg0 int)) + (if (nonzero? (-> obj alt-actors)) + (&+! (-> obj alt-actors) arg0) + ) + (the-as + helix-water + ((the-as (function process-drawable int process-drawable) (find-parent-method helix-water 7)) obj arg0) + ) + ) + +;; definition for method 11 of type helix-water +;; INFO: Return type mismatch object vs none. +(defmethod init-from-entity! helix-water ((obj helix-water) (arg0 entity-actor)) + (set! (-> obj last-alt-actor-consumed) -1) + (set! (-> obj transv-y) 9216.0) + (set! (-> obj root) (new 'process 'trsqv)) + (process-drawable-from-entity! obj arg0) + (set! (-> obj start-y) (+ -49152.0 (-> obj root trans y))) + (set! (-> obj end-y) (+ 851968.0 (-> obj start-y))) + (set-vector! (-> obj root scale) 1.0 0.8 1.0 1.0) + (let ((s4-0 (entity-actor-count arg0 'alt-actor))) + (set! (-> obj alt-actors) (the-as (array entity-actor) (new 'process 'boxed-array entity-actor s4-0))) + (dotimes (s3-0 s4-0) + (set! (-> obj alt-actors s3-0) (entity-actor-lookup arg0 'alt-actor s3-0)) + ) + ) + (set! (-> obj root trans y) (-> obj start-y)) + (let ((s5-1 (get-process *default-dead-pool* helix-dark-eco #x4000))) + (set! (-> obj dark-eco) + (the-as + (pointer helix-dark-eco) + (when s5-1 + (let ((t9-6 (method-of-type helix-dark-eco activate))) + (t9-6 (the-as helix-dark-eco s5-1) obj 'helix-dark-eco (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 water-vol-init-by-other (-> obj entity)) + (-> s5-1 ppointer) + ) + ) + ) + ) + (set! *helix-water* obj) + (go helix-water-idle) + (none) + ) diff --git a/test/decompiler/reference/levels/sunken/sunken-obs_REF.gc b/test/decompiler/reference/levels/sunken/sunken-obs_REF.gc index 283dc28dd5..2245753331 100644 --- a/test/decompiler/reference/levels/sunken/sunken-obs_REF.gc +++ b/test/decompiler/reference/levels/sunken/sunken-obs_REF.gc @@ -198,7 +198,8 @@ ;; definition of type sunkencam (deftype sunkencam (pov-camera) - ((seq uint64 :offset-assert 224) + ((ppointer-override (pointer sunkencam) :offset 24) + (seq uint64 :offset-assert 224) ) :heap-base #x80 :method-count-assert 30 diff --git a/test/decompiler/reference/levels/village3/minecart_REF.gc b/test/decompiler/reference/levels/village3/minecart_REF.gc new file mode 100644 index 0000000000..6d4288e34f --- /dev/null +++ b/test/decompiler/reference/levels/village3/minecart_REF.gc @@ -0,0 +1,195 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup *minecartsteel-sg* minecartsteel + 0 + 4 + ((1 (meters 20)) (2 (meters 40)) (3 (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :longest-edge (meters 0) + ) + +;; definition of type minecartsteel +(deftype minecartsteel (process-drawable) + ((root-override collide-shape-moving :offset 112) + (index int32 :offset-assert 176) + (anim spool-anim :offset-assert 180) + (sync sync-info :inline :offset-assert 184) + ) + :heap-base #x50 + :method-count-assert 21 + :size-assert #xc0 + :flag-assert #x15005000c0 + (:methods + (idle () _type_ :state 20) + ) + ) + +;; definition for method 3 of type minecartsteel +(defmethod inspect minecartsteel ((obj minecartsteel)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~T~Tindex: ~D~%" (-> obj index)) + (format #t "~T~Tanim: ~A~%" (-> obj anim)) + (format #t "~T~Tsync: #~%" (-> obj sync)) + obj + ) + +;; failed to figure out what this is: +(defstate idle (minecartsteel) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (when (or (= v1-0 'touch) (= v1-0 'attack)) + (when (= (-> arg0 type) target) + (let ((a2-1 (new 'stack 'collide-overlap-result))) + (if (not (dummy-39 (-> self root-override) (-> *target* control) a2-1)) + (send-event arg0 'no-look-around 450) + ) + ) + ) + #f + ) + ) + ) + ) + :trans + (the-as (function none :behavior minecartsteel) rider-trans) + :code + (behavior () + (ja-channel-set! 1) + (let ((v1-2 (-> self skel root-channel 0))) + (set! (-> v1-2 frame-group) (the-as art-joint-anim (-> self anim))) + ) + (while #t + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 num-func) num-func-identity) + (set! (-> gp-0 frame-num) + (* (get-current-phase (-> self sync)) (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + ) + ) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)))) + (update-trans! (-> self sound) a1-1) + ) + (update! (-> self sound)) + (suspend) + ) + (none) + ) + :post + (the-as (function none :behavior minecartsteel) rider-post) + ) + +;; definition for function minecartsteel-initialize-by-other +(defbehavior minecartsteel-initialize-by-other minecartsteel ((arg0 entity-actor) (arg1 float)) + (let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) default-collision-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing) + ) + (dummy-29 s4-0 1) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 3)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 4915.2 0.0 13107.2) + (set-root-prim! s4-0 s3-0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (backup-collide-with-as s4-0) + (set! (-> self root-override) s4-0) + ) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (quaternion-identity! (-> self root-override quat)) + (initialize-skeleton self *minecartsteel-sg* '()) + (set! (-> self draw origin-joint-index) (the-as uint 3)) + (logior! (-> self skel status) 1) + (load-params! (-> self sync) self (the-as uint 9000) arg1 0.15 0.15) + (set! (-> self sound) (new + 'process + 'ambient-sound + (new 'static 'sound-spec + :mask #x80 + :num 1.0 + :group #x1 + :sound-name (static-sound-name "v3-cartride") + :volume #x400 + :fo-max 30 + ) + (-> self root-override trans) + ) + ) + (set! (-> self index) (res-lump-value arg0 'index int)) + (let ((v1-33 (-> self index))) + (set! (-> self anim) + (the-as + spool-anim + (cond + ((zero? v1-33) + (-> self draw art-group data 5) + ) + ((= v1-33 1) + (let ((a0-17 (-> self sync)) + (t9-12 (method-of-type sync-info setup-params!)) + (a1-11 9000) + (f0-7 (+ 0.8 arg1)) + ) + (t9-12 a0-17 (the-as uint a1-11) (- f0-7 (* (the float (the int (/ f0-7 1.0))) 1.0)) 0.15 0.15) + ) + (-> self draw art-group data 6) + ) + (else + (let ((a0-18 (-> self sync)) + (t9-13 (method-of-type sync-info setup-params!)) + (a1-12 9000) + (f0-10 (+ 0.13 arg1)) + ) + (t9-13 a0-18 (the-as uint a1-12) (- f0-10 (* (the float (the int (/ f0-10 1.0))) 1.0)) 0.15 0.15) + ) + (-> self draw art-group data 7) + ) + ) + ) + ) + ) + (go-virtual idle) + ) + +;; definition for method 11 of type minecartsteel +;; INFO: Return type mismatch object vs none. +(defmethod init-from-entity! minecartsteel ((obj minecartsteel) (arg0 entity-actor)) + (dotimes (s4-0 4) + (let ((s3-0 (get-process *default-dead-pool* minecartsteel #x4000))) + (when s3-0 + (let ((t9-1 (method-of-type minecartsteel activate))) + (t9-1 (the-as minecartsteel s3-0) obj 'minecartsteel (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 minecartsteel-initialize-by-other arg0 (* 0.2 (the float (+ s4-0 1)))) + (-> s3-0 ppointer) + ) + ) + ) + (minecartsteel-initialize-by-other arg0 0.0) + (none) + ) + + + +