From c12a5d777ce28c773dca147d0b61d3efef476edf Mon Sep 17 00:00:00 2001 From: Hat Kid <6624576+Hat-Kid@users.noreply.github.com> Date: Thu, 16 May 2024 16:21:44 +0200 Subject: [PATCH] decomp3: decompile remaining mission code (#3515) This should make all missions playable with the exception of the end of `precursor-destroy-ship` because `precurd` asserts on level extraction. - `trail` - `trail-graph` - `wastrail-graph` - `cty-protect` - `protect-gunship` - `protect-path` - `protect-script` - `assault-cams` - `assault-enemies` - `assault-path` - `assault-script` - `assault-shared` - `assault-task` - `hover-nav-precura` - `precura-mood` - `precura-obs` - `precura-obs2` - `precura-part` - `precurc-mood` - `precurc-obs` - `precurc-part` - `precurd-obs` - `precurd-part` - `precurd-scenes` --- decompiler/config/jak3/all-types.gc | 1585 +++---- .../ntsc_v1/anonymous_function_types.jsonc | 22 + decompiler/config/jak3/ntsc_v1/art_info.jsonc | 6 +- decompiler/config/jak3/ntsc_v1/hacks.jsonc | 4 +- decompiler/config/jak3/ntsc_v1/inputs.jsonc | 2 +- .../config/jak3/ntsc_v1/label_types.jsonc | 328 ++ .../jak3/ntsc_v1/stack_structures.jsonc | 71 +- .../config/jak3/ntsc_v1/type_casts.jsonc | 239 +- .../config/jak3/ntsc_v1/var_names.jsonc | 20 + decompiler/level_extractor/extract_level.cpp | 2 +- decompiler/util/data_decompile.cpp | 22 +- game/CMakeLists.txt | 1 - game/kernel/common/kmemcard.cpp | 15 +- game/mips2c/jak3_functions/prim.cpp | 479 -- game/mips2c/mips2c_table.cpp | 2 - goal_src/jak3/engine/common-obs/powerups.gc | 4 +- goal_src/jak3/engine/common-obs/prim-h.gc | 2 +- goal_src/jak3/engine/common-obs/prim.gc | 238 +- goal_src/jak3/engine/draw/drawable.gc | 15 +- goal_src/jak3/engine/entity/entity-table.gc | 2 +- goal_src/jak3/engine/game/main.gc | 19 +- .../gfx/sprite/particles/sparticle-h.gc | 47 +- .../sprite/particles/sparticle-launcher.gc | 208 +- goal_src/jak3/engine/load/loader.gc | 36 +- goal_src/jak3/engine/nav/nav-control-h.gc | 1 + .../jak3/engine/target/board/board-util.gc | 6 +- goal_src/jak3/engine/target/gun/gun-util.gc | 6 +- .../jak3/engine/target/indax/target-indax.gc | 2 +- goal_src/jak3/engine/target/logic-target.gc | 2 +- goal_src/jak3/engine/target/sidekick.gc | 2 +- goal_src/jak3/engine/target/target-darkjak.gc | 2 +- goal_src/jak3/engine/target/target-death.gc | 4 +- goal_src/jak3/engine/target/target-h.gc | 27 +- goal_src/jak3/engine/target/target-handler.gc | 10 +- .../jak3/engine/target/target-invisible.gc | 14 +- .../jak3/engine/target/target-lightjak.gc | 10 +- goal_src/jak3/engine/target/target-tube.gc | 2 +- goal_src/jak3/engine/target/target2.gc | 7 +- goal_src/jak3/engine/ui/minimap.gc | 22 +- goal_src/jak3/game.gp | 4 +- goal_src/jak3/kernel/gkernel.gc | 2 + goal_src/jak3/levels/city/bombbot/bombbot.gc | 2 - .../jak3/levels/city/common/trail-graph.gc | 2117 +++++++++ goal_src/jak3/levels/city/common/trail-h.gc | 59 +- goal_src/jak3/levels/city/common/trail.gc | 1142 +++++ .../jak3/levels/city/protect/assault-cams.gc | 48 + .../levels/city/protect/assault-enemies.gc | 2011 ++++++++ .../jak3/levels/city/protect/assault-path.gc | 142 + .../levels/city/protect/assault-script.gc | 1164 +++++ .../levels/city/protect/assault-shared.gc | 213 + .../jak3/levels/city/protect/assault-task.gc | 1670 +++++++ .../jak3/levels/city/protect/cty-protect.gc | 568 +++ .../levels/city/protect/protect-gunship.gc | 3783 +++++++++++++++ .../jak3/levels/city/protect/protect-path.gc | 34 + .../levels/city/protect/protect-script.gc | 164 + .../jak3/levels/city/slums/neon-baron-part.gc | 3480 ++++++++++++++ goal_src/jak3/levels/comb/combx-obs.gc | 185 + goal_src/jak3/levels/factory/lfaccity-mood.gc | 207 + .../levels/precursor/hover-nav-precura.gc | 634 +++ .../jak3/levels/precursor/precura-mood.gc | 253 + goal_src/jak3/levels/precursor/precura-obs.gc | 2601 ++++++++++ .../jak3/levels/precursor/precura-obs2.gc | 2628 +++++++++++ .../jak3/levels/precursor/precura-part.gc | 745 +++ .../jak3/levels/precursor/precurc-mood.gc | 77 + goal_src/jak3/levels/precursor/precurc-obs.gc | 420 ++ .../jak3/levels/precursor/precurc-part.gc | 134 + goal_src/jak3/levels/precursor/precurd-obs.gc | 2353 +++++++++ .../jak3/levels/precursor/precurd-part.gc | 181 + .../jak3/levels/precursor/precurd-scenes.gc | 2505 ++++++++++ goal_src/jak3/levels/precursor/prim-beam.gc | 208 + .../jak3/levels/wascity/wastrail-graph.gc | 4138 ++++++++++++++++ .../jak3/engine/common-obs/powerups_REF.gc | 8 +- .../jak3/engine/common-obs/prim-h_REF.gc | 2 +- .../jak3/engine/common-obs/prim_REF.gc | 241 +- .../gfx/sprite/particles/sparticle-h_REF.gc | 38 +- .../particles/sparticle-launcher_REF.gc | 16 +- .../engine/target/board/board-util_REF.gc | 6 +- .../jak3/engine/target/gun/gun-util_REF.gc | 6 +- .../engine/target/indax/target-indax_REF.gc | 2 +- .../jak3/engine/target/logic-target_REF.gc | 2 +- .../jak3/engine/target/sidekick_REF.gc | 2 +- .../jak3/engine/target/target-darkjak_REF.gc | 2 +- .../jak3/engine/target/target-death_REF.gc | 4 +- .../jak3/engine/target/target-h_REF.gc | 12 +- .../jak3/engine/target/target-handler_REF.gc | 8 +- .../engine/target/target-invisible_REF.gc | 8 +- .../jak3/engine/target/target-lightjak_REF.gc | 10 +- .../jak3/engine/target/target-tube_REF.gc | 2 +- .../jak3/engine/target/target2_REF.gc | 6 +- .../reference/jak3/engine/ui/minimap_REF.gc | 24 +- .../jak3/levels/city/bombbot/bombbot_REF.gc | 2 - .../levels/city/common/trail-graph_REF.gc | 2125 +++++++++ .../jak3/levels/city/common/trail-h_REF.gc | 54 +- .../jak3/levels/city/common/trail_REF.gc | 1200 +++++ .../levels/city/protect/assault-cams_REF.gc | 56 + .../city/protect/assault-enemies_REF.gc | 2364 ++++++++++ .../levels/city/protect/assault-path_REF.gc | 171 + .../levels/city/protect/assault-script_REF.gc | 1183 +++++ .../levels/city/protect/assault-shared_REF.gc | 295 ++ .../levels/city/protect/assault-task_REF.gc | 1796 +++++++ .../levels/city/protect/cty-protect_REF.gc | 632 +++ .../city/protect/protect-gunship_REF.gc | 4194 +++++++++++++++++ .../levels/city/protect/protect-path_REF.gc | 42 + .../levels/city/protect/protect-script_REF.gc | 175 + .../levels/city/slums/neon-baron-part_REF.gc | 3605 ++++++++++++++ .../jak3/levels/comb/combx-obs_REF.gc | 225 + .../jak3/levels/factory/lfaccity-mood_REF.gc | 288 ++ .../levels/precursor/hover-nav-precura_REF.gc | 642 +++ .../jak3/levels/precursor/precura-mood_REF.gc | 452 ++ .../jak3/levels/precursor/precura-obs2_REF.gc | 2915 ++++++++++++ .../jak3/levels/precursor/precura-obs_REF.gc | 2899 ++++++++++++ .../jak3/levels/precursor/precura-part_REF.gc | 799 ++++ .../jak3/levels/precursor/precurc-mood_REF.gc | 102 + .../jak3/levels/precursor/precurc-obs_REF.gc | 495 ++ .../jak3/levels/precursor/precurc-part_REF.gc | 152 + .../jak3/levels/precursor/precurd-obs_REF.gc | 2523 ++++++++++ .../jak3/levels/precursor/precurd-part_REF.gc | 201 + .../levels/precursor/precurd-scenes_REF.gc | 2611 ++++++++++ .../jak3/levels/precursor/prim-beam_REF.gc | 263 ++ .../jak3/levels/wascity/wastrail-graph_REF.gc | 4146 ++++++++++++++++ test/offline/config/jak3/config.jsonc | 11 +- 121 files changed, 72672 insertions(+), 1703 deletions(-) delete mode 100644 game/mips2c/jak3_functions/prim.cpp create mode 100644 test/decompiler/reference/jak3/levels/city/common/trail-graph_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/common/trail_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-cams_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-path_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-script_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-shared_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/cty-protect_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/protect-path_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/protect/protect-script_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/city/slums/neon-baron-part_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/hover-nav-precura_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precura-mood_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precura-part_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurc-mood_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurc-part_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurd-obs_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurd-part_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/precurd-scenes_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/precursor/prim-beam_REF.gc create mode 100644 test/decompiler/reference/jak3/levels/wascity/wastrail-graph_REF.gc diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index b7f6ce04db..f5c8a0e8d8 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -10113,6 +10113,7 @@ ;; trail-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +++trail-h:trail-node-flag (defenum trail-node-flag :type uint8 :bitfield #t @@ -10120,7 +10121,9 @@ (tnf1 1) (tnf2 2) ) +;; ---trail-h:trail-node-flag +;; +++trail-h:conn-flag (defenum conn-flag :type uint8 :bitfield #t @@ -10128,7 +10131,11 @@ (cf1 1) (cf2 2) (cf3 3) + (cf4 4) + (cf5 5) + (cf6 6) ) +;; ---trail-h:conn-flag (deftype trail-node (structure) ((next-id int16 :offset-assert 0) @@ -10149,7 +10156,7 @@ :flag-assert #xc00000014 (:methods (get-dist-score (_type_ vector) uint) ;; 9 - (debug-draw (_type_ int) none) ;; 10 + (debug-draw (_type_ int) symbol) ;; 10 (get-position (_type_ vector) vector) ;; 11 ) ) @@ -10243,7 +10250,7 @@ ) (deftype trail-cached-start-pov (structure) - ((last-updated uint64 :offset-assert 0) + ((last-updated time-frame :offset-assert 0) (pov-can-see-start uint64 :offset-assert 8) (next-node-id int32 :offset-assert 16) (start-pos vector :inline :offset-assert 32) @@ -10269,12 +10276,12 @@ (conn-mask uint8 :offset-assert 40) (node (inline-array trail-node) :offset-assert 44) ;; guessed by decompiler (conn (inline-array trail-conn) :offset-assert 48) ;; guessed by decompiler - (blocker uint32 :offset-assert 52) + (blocker (inline-array trail-blocker) :offset-assert 52) (conn-ids (pointer uint16) :offset-assert 56) ;; guessed by decompiler (visgroup (inline-array trail-conn-hash-cell) :offset-assert 60) ;; guessed by decompiler (visnode-ids (pointer uint16) :offset-assert 64) ;; guessed by decompiler (conn-hash trail-conn-hash :offset-assert 68) ;; guessed by decompiler - (cell-pov-bit-arrays uint32 :offset-assert 72) + (cell-pov-bit-arrays (pointer uint64) :offset-assert 72) (pov-can-see-goal uint64 :offset-assert 80) (cached-start-pov trail-cached-start-pov :inline :offset-assert 96) (orig-start-pos vector :inline :offset-assert 144) @@ -10290,31 +10297,31 @@ :size-assert #x190 :flag-assert #x2200000190 (:methods - (trail-graph-method-9 (_type_ int) none) ;; 9 ;; (trail-graph-method-9 (_type_ int) none) - (trail-graph-method-10 (_type_ int) none) ;; 10 ;; (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-9 (_type_ int) int) ;; 9 ;; (trail-graph-method-9 (_type_ int) none) + (trail-graph-method-10 (_type_ int) symbol) ;; 10 ;; (trail-graph-method-10 (_type_ int) none) (trail-graph-method-11 (_type_ int int) trail-node) ;; 11 ;; (trail-graph-method-11 (_type_ int int) trail-node) - (trail-graph-method-12 (_type_) none) ;; 12 - (trail-graph-method-13 (_type_ vector vector) none) ;; 13 ;; (debug-draw-cell (_type_ int) none) - (debug-draw (_type_) none) ;; 14 ;; (debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol) - (trail-graph-method-15 (_type_ int) none) ;; 15 ;; (do-path (_type_ vector vector) int) - (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) ;; 16 ;; (trail-graph-method-16 () none) - (trail-graph-method-17 (_type_) none) ;; 17 ;; (get-node-location-by-id (_type_ uint vector) vector) + (trail-graph-method-12 (_type_ trail-node vector) symbol) ;; 12 + (trail-graph-method-13 (_type_ vector vector) symbol) ;; 13 ;; (debug-draw-cell (_type_ int) none) + (debug-draw (_type_) symbol) ;; 14 ;; (debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol) + (trail-graph-method-15 (_type_ int) symbol) ;; 15 ;; (do-path (_type_ vector vector) int) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) symbol) ;; 16 ;; (trail-graph-method-16 () none) + (trail-graph-method-17 (_type_ vector vector) int) ;; 17 ;; (get-node-location-by-id (_type_ uint vector) vector) (trail-graph-method-18 (_type_ vector) int) ;; 18 ;; (get-path-to-root (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) (trail-graph-method-19 (_type_) none) ;; 19 ;; (trail-graph-method-19 (_type_ int int) symbol) - (trail-graph-method-20 (_type_ uint vector) none) ;; 20 ;; (try-initialize (_type_) symbol) - (trail-graph-method-21 (_type_) none) ;; 21 ;; (update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none) - (trail-graph-method-22 (_type_) none) ;; 22 ;; (trail-graph-method-22 (_type_ int) none) - (trail-graph-method-23 (_type_) none) ;; 23 ;; (reset-search-state (_type_) none) - (trail-graph-method-24 (_type_) none) ;; 24 ;; (get-next-to-explore (_type_) int) - (trail-graph-method-25 (_type_ int) none) ;; 25 ;; (trail-graph-method-25 (_type_ trail-conn-search int int) none) - (trail-graph-method-26 (_type_) none) ;; 26 ;; (do-search! (_type_ vector vector trail-cached-search-info) none) - (trail-graph-method-27 (_type_) none) ;; 27 ;; (do-some-work (_type_) int) - (trail-graph-method-28 (_type_) none) ;; 28 ;; (run-until-done-or-timeout (_type_ int) none) - (trail-graph-method-29 (_type_) none) ;; 29 - (trail-graph-method-30 (_type_) none) ;; 30 + (trail-graph-method-20 (_type_ uint vector) vector) ;; 20 ;; (try-initialize (_type_) symbol) + (trail-graph-method-21 (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) ;; 21 ;; (update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none) + (trail-graph-method-22 (_type_ int int) symbol) ;; 22 ;; (trail-graph-method-22 (_type_ int) none) + (trail-graph-method-23 (_type_) symbol) ;; 23 ;; (reset-search-state (_type_) none) + (trail-graph-method-24 (_type_ uint vector int int) symbol) ;; 24 ;; (get-next-to-explore (_type_) int) + (trail-graph-method-25 (_type_ int) int) ;; 25 ;; (trail-graph-method-25 (_type_ trail-conn-search int int) none) + (trail-graph-method-26 (_type_) int) ;; 26 ;; (do-search! (_type_ vector vector trail-cached-search-info) none) + (trail-graph-method-27 (_type_) int) ;; 27 ;; (do-some-work (_type_) int) + (trail-graph-method-28 (_type_ trail-conn-search int int) symbol) ;; 28 ;; (run-until-done-or-timeout (_type_ int) none) + (trail-graph-method-29 (_type_ vector vector trail-cached-search-info) int) ;; 29 + (trail-graph-method-30 (_type_) int) ;; 30 (trail-graph-method-31 (_type_ int) none) ;; 31 - (trail-graph-method-32 (_type_) none) ;; 32 - (trail-graph-method-33 (_type_) none) ;; 33 + (trail-graph-method-32 (_type_) uint) ;; 32 + (trail-graph-method-33 (_type_ int) symbol) ;; 33 ) ) @@ -16797,7 +16804,7 @@ (alpha gs-alpha :offset-assert 72) (bucket bucket-id :offset-assert 80) (sink uint32 :offset-assert 84) - (level basic :offset-assert 88) + (level level :offset-assert 88) (texture-index uint32 :offset-assert 92) (data prim-vertex :inline :dynamic :offset-assert 96) ) @@ -23337,6 +23344,20 @@ ) ;; ---target-h:target-anim +;; +++target-h:target-effect +(defenum target-effect + :type uint64 + :bitfield #t + (te0 0) + (te1 1) + (te2 2) + (te3 3) + (te4 4) + (te5 5) + (te6 6) + ) +;; ---target-h:target-effect + (declare-type sidekick process-drawable) (declare-type racer-info basic) (declare-type tube-info basic) @@ -23396,18 +23417,18 @@ (spool-anim spool-anim :offset-assert 2236) ;; guessed by decompiler (ambient-time time-frame :offset-assert 2240) ;; time-frame (fp-hud handle :offset-assert 2248) ;; handle - (no-load-wait uint64 :offset-assert 2256) - (no-look-around-wait uint64 :offset-assert 2264) + (no-load-wait time-frame :offset-assert 2256) + (no-look-around-wait time-frame :offset-assert 2264) (burn-proc handle :offset-assert 2272) ;; handle (pre-joint-hook (function none :behavior target) :offset-assert 2280) ;; guessed by decompiler (notify handle :offset-assert 2288) ;; handle (death-resetter resetter-spec :inline :offset-assert 2296) - (mode-cache basic :offset-assert 2312) + (mode-cache symbol :offset-assert 2312) (mode-param1 handle :offset-assert 2320) ;; handle (mode-param2 uint64 :offset-assert 2328) (mode-param3 uint64 :offset-assert 2336) (major-mode-exit-hook (function none :behavior target) :offset-assert 2344) - (major-mode-event-hook (function none :behavior target) :offset-assert 2348) + (major-mode-event-hook (function process int symbol event-message-block object :behavior target) :offset-assert 2348) (sub-mode-exit-hook (function none :behavior target) :offset-assert 2352) (ext-geo-control external-art-buffer :offset-assert 2356) (pending-ext-geo target-geo :offset-assert 2360) @@ -23418,8 +23439,8 @@ (tobot-state state :offset-assert 2380) ;; guessed by decompiler (tobot? symbol :offset-assert 2384) ;; guessed by decompiler (tobot-recorder basic :offset-assert 2388) - (target-effect uint64 :offset-assert 2392) - (color-effect basic :offset-assert 2400) + (target-effect target-effect :offset-assert 2392) + (color-effect symbol :offset-assert 2400) (color-effect-start-time time-frame :offset-assert 2408) ;; time-frame (color-effect-duration time-frame :offset-assert 2416) (racer racer-info :offset-assert 2424) ;; guessed by decompiler @@ -23619,7 +23640,7 @@ (target-pilot-clone-anim handle) target-pilot-daxter-perch ;; indax - (target-indax-start handle object) ;; associated process guessed by decompiler, old: (state handle target) + (target-indax-start handle object) target-indax-get-off target-indax-stance target-indax-walk @@ -26848,6 +26869,14 @@ ) ;; ---sparticle-h:sp-cpuinfo-flag +;; +++sparticle-h:sp-cpuinfo-flag-s32 +(defenum sp-cpuinfo-flag-s32 + :bitfield #t + :type int32 + :copy-entries sp-cpuinfo-flag + ) +;; ---sparticle-h:sp-cpuinfo-flag-s32 + (deftype sparticle-cpuinfo (structure) "The per-particle information. This stays on the CPU, and isn't uploaded to the VU." ((sprite sprite-vec-data-2d :offset-assert 0) @@ -26866,7 +26895,7 @@ (friction float :offset-assert 96) (timer int32 :offset-assert 100) (flags sp-cpuinfo-flag :offset-assert 104) ;; guessed by decompiler - (flags-s32 int32 :offset 104) ;; added + (flags-s32 sp-cpuinfo-flag-s32 :offset 104) ;; added (user-int32 int32 :offset-assert 108) (user-uint32 uint32 :offset 108) (user-float float :offset 108 :score 1) @@ -28855,6 +28884,7 @@ (momentum-ignore-heading 6) ;; 64 (output-sphere-hash 7) ;; 128 (kernel-run 8) ;; 256 + (ncf9 9) ) (deftype check-vector-collision-with-nav-spheres-info (structure) @@ -44758,32 +44788,41 @@ ;; neon-baron-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++neon-baron-part:neon-baron-flag +(defenum neon-baron-flag + :type uint64 + :bitfield #t + (nb0) + (nb1) + (nb2) + (nb3) + ) +;; ---neon-baron-part:neon-baron-flag + (deftype neon-baron (process) - ((flags uint64 :offset-assert 128) ;; int64 + ((flags neon-baron-flag :offset-assert 128) ;; int64 (master-enable uint64 :offset-assert 136) ;; int64 (mode uint64 :offset-assert 144) ;; int64 (sign (array object) :offset-assert 152) ;; guessed by decompiler (parts sparticle-launch-control 1 :offset-assert 156) ;; guessed by decompiler - (state-time uint64 :offset-assert 160) ;; time-frame + (state-time time-frame :offset-assert 160) ;; time-frame (mat matrix :inline :offset-assert 176) ) :method-count-assert 17 :size-assert #xf0 :flag-assert #x11007000f0 - (:methods - (neon-baron-method-15 () none) ;; 15 ;; (spawn-parts (_type_) none) - (neon-baron-method-16 () none) ;; 16 ;; (update-mode (_type_) none) - ) (:state-methods - idle ;; 14, old: (idle () _type_ :state) + idle ;; 14 + ) + (:methods + (spawn-parts (_type_) symbol) ;; 15 + (update-mode (_type_) none) ;; 16 ) ) -|# -;; (define-extern *baron-neon-skull* array) ;; (array object) -;; (define-extern *city-baron-group-ids* array) ;; (array int32) -;; (define-extern *neon-baron-flashing-acc* object) ;; (pointer uint32) +(define-extern *baron-neon-skull* (array object)) +(define-extern *city-baron-group-ids* (array int32)) +(define-extern *neon-baron-flashing-acc* (pointer uint32)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; chain-physics ;; @@ -46837,7 +46876,7 @@ (define-extern bombbot-gun-swivel-callback (function cspace transformq none)) (define-extern bombbot-gun-callback (function cspace transformq none)) (define-extern *bombbot-spring-setup* (array spring-setup)) -(define-extern bombbot-init-by-other (function bombbot-spawn-params none :behavior bombbot)) +(define-extern bombbot-init-by-other (function bombbot-spawn-params object :behavior bombbot)) (define-extern bombbot-player-init-by-other (function bombbot-spawn-params object :behavior bombbot-player)) (define-extern *blow-barricade-kg-squad-member-settings* (inline-array kg-squad-member-settings)) @@ -51729,33 +51768,26 @@ ;; combx-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype combx-elevator (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 - (:methods - (combx-elevator-method-21 () none) ;; 21 - (combx-elevator-method-22 () none) ;; 22 - ) (:state-methods idle ;; 20 ) + (:methods + (init-collision! (_type_) none) ;; 21 + (setup-skel-and-draw-masks (_type_) none) ;; 22 + ) ) -|# -#| -(deftype combx-states (UNKNOWN) +(deftype combx-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern init-mood-combx function) -;; (define-extern update-mood-combx function) +(define-extern init-mood-combx (function mood-context float)) +(define-extern update-mood-combx (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; combx-scenes ;; @@ -61561,7 +61593,6 @@ ;; precurd-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype pre-tformer (process-drawable) () :method-count-assert 21 @@ -61571,9 +61602,7 @@ idle ;; 20 ) ) -|# -#| (deftype wall-window-big (process-drawable) () :method-count-assert 21 @@ -61583,95 +61612,89 @@ idle ;; 20 ) ) -|# -#| (deftype precurd-door-a (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype precur-bridge-path-break (process-drawable) - ((triggered? basic :offset-assert 196) - (idx uint8 :offset-assert 200) - (l-origin matrix :inline :offset-assert 204) - (actor-group uint32 :offset-assert 268) - (actor-group-count int32 :offset-assert 272) - (anim-1-time uint64 :offset-assert 276) - (delay-time uint64 :offset-assert 284) - (debris-handle uint64 :offset-assert 292) + ((root collide-shape :override) + (triggered? symbol :offset-assert 200) + (idx uint8 :offset-assert 204) + (l-origin matrix :inline :offset-assert 208) + (actor-group (pointer actor-group) :offset-assert 272) + (actor-group-count int32 :offset-assert 276) + (anim-1-time time-frame :offset-assert 280) + (delay-time time-frame :offset-assert 288) + (debris-handle handle :offset-assert 296) ) :method-count-assert 28 :size-assert #x130 :flag-assert #x1c00b00130 - (:methods - (precur-bridge-path-break-method-21 () none) ;; 21 - (precur-bridge-path-break-method-22 () none) ;; 22 - (precur-bridge-path-break-method-23 () none) ;; 23 - (precur-bridge-path-break-method-24 () none) ;; 24 - (precur-bridge-path-break-method-25 () none) ;; 25 - (precur-bridge-path-break-method-26 () none) ;; 26 - (precur-bridge-path-break-method-27 () none) ;; 27 - ) (:state-methods idle ;; 20 ) + (:methods + (precur-bridge-path-break-method-21 (_type_) none) ;; 21 + (init-collision! (_type_) none) ;; 22 + (get-skel (_type_) art-group) ;; 23 + (set-idx-by-name (_type_) none) ;; 24 + (precur-bridge-path-break-method-25 (_type_ vector) none) ;; 25 + (precur-bridge-path-break-method-26 (_type_) none) ;; 26 + (precur-bridge-path-break-method-27 (_type_) none) ;; 27 + ) ) -|# -#| (deftype precur-bridge-blocks-break (process-drawable) - ((triggered? basic :offset-assert 200) + ((root collide-shape :override) + (triggered? symbol :offset-assert 200) (idx uint8 :offset-assert 204) - (snds UNKNOWN 5 :offset-assert 208) - (toe-up? UNKNOWN 5 :offset-assert 228) + (snds sound-id 5 :offset-assert 208) + (toe-up? symbol 5 :offset-assert 228) ) :method-count-assert 26 :size-assert #xf8 :flag-assert #x1a008000f8 - (:methods - (precur-bridge-blocks-break-method-21 () none) ;; 21 - (precur-bridge-blocks-break-method-22 () none) ;; 22 - (precur-bridge-blocks-break-method-23 () none) ;; 23 - (precur-bridge-blocks-break-method-24 () none) ;; 24 - (precur-bridge-blocks-break-method-25 () none) ;; 25 - ) (:state-methods idle ;; 20 ) + (:methods + (precur-bridge-blocks-break-method-21 (_type_) none) ;; 21 + (init-collision! (_type_) none) ;; 22 + (init-collision2! (_type_) none) ;; 23 + (get-skel (_type_) art-group) ;; 24 + (set-idx-by-name (_type_) none) ;; 25 + ) ) -|# -;; (define-extern pre-tformer-spawn-leg-a function) -;; (define-extern pre-tformer-spawn-leg-b function) -;; (define-extern pre-tformer-spawn-leg-c function) -;; (define-extern pre-tformer-spawn-spike function) -;; (define-extern *precurd-obs-shake-time* object) -;; (define-extern wall-window-big-init-by-other function) -;; (define-extern *precur-blocks-trigger-points* array) -;; (define-extern *precur-path-trigger-points* array) -;; (define-extern *precur-path-2nd-trigger-points* array) -;; (define-extern *precur-trigger-idx* object) -;; (define-extern precur-bridge-reset function) -;; (define-extern precur-bridge-path-trigger function) -;; (define-extern precur-bridge-path-2nd-trigger function) -;; (define-extern precur-bridge-blocks-trigger function) -;; (define-extern precur-trigger-update function) -;; (define-extern *precur-path-delay-time* array) -;; (define-extern *precurd-blow-snd-id* object) -;; (define-extern precur-play-blow-sound function) -;; (define-extern precur-stop-blow-sound function) -;; (define-extern *precurd-panel-tear-off-time* object) +(define-extern pre-tformer-spawn-leg-a (function none :behavior process-drawable)) +(define-extern pre-tformer-spawn-leg-b (function none :behavior process-drawable)) +(define-extern pre-tformer-spawn-leg-c (function none :behavior process-drawable)) +(define-extern pre-tformer-spawn-spike (function none :behavior process-drawable)) +(define-extern *precurd-obs-shake-time* time-frame) +(define-extern wall-window-big-init-by-other (function vector entity-actor object :behavior wall-window-big)) +(define-extern *precur-blocks-trigger-points* (array float)) +(define-extern *precur-path-trigger-points* (array float)) +(define-extern *precur-path-2nd-trigger-points* (array float)) +(define-extern *precur-trigger-idx* int) +(define-extern precur-bridge-reset (function symbol)) +(define-extern precur-bridge-path-trigger (function int symbol)) +(define-extern precur-bridge-path-2nd-trigger (function int symbol)) +(define-extern precur-bridge-blocks-trigger (function int symbol)) +(define-extern precur-trigger-update (function none)) +(define-extern *precur-path-delay-time* (array float)) +(define-extern *precurd-blow-snd-id* sound-id) +(define-extern precur-play-blow-sound (function none)) +(define-extern precur-stop-blow-sound (function none)) +(define-extern *precurd-panel-tear-off-time* time-frame) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precurd-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype precurd-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -61679,26 +61702,25 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern *beam-appearance-1* object) -;; (define-extern *beam-appearance-2* object) -;; (define-extern *beam-appearance-3* object) -;; (define-extern *beam-appearance-4* object) -;; (define-extern *beam-appearance-5* object) -;; (define-extern *beam-appearance-6* object) -;; (define-extern init-mood-precurd function) -;; (define-extern update-mood-precurd function) -;; (define-extern precurd-lightjak-do-effect function) -;; (define-extern precurd-lightjak-stop-effect function) -;; (define-extern *range-precursor-explo-color* curve-color-fast) -;; (define-extern *range-precursor-explo-alpha* curve2d-fast) -;; (define-extern *range-precursor-explo-scale-x* curve2d-fast) -;; (define-extern *range-precursor-explo-scale-y* curve2d-fast) -;; (define-extern *curve-precursor-explo-alpha* curve2d-fast) -;; (define-extern *curve-precursor-explo-scale-x* curve2d-fast) -;; (define-extern *curve-precursor-explo-scale-y* curve2d-fast) -;; (define-extern *part-precursor-ship-explosion-texture-curve-settings* object) +(define-extern *beam-appearance-1* prim-beam-settings) +(define-extern *beam-appearance-2* prim-beam-settings) +(define-extern *beam-appearance-3* prim-beam-settings) +(define-extern *beam-appearance-4* prim-beam-settings) +(define-extern *beam-appearance-5* prim-beam-settings) +(define-extern *beam-appearance-6* prim-beam-settings) +(define-extern init-mood-precurd (function mood-context float)) +(define-extern update-mood-precurd (function mood-context float int none :behavior time-of-day-proc)) +(define-extern precurd-lightjak-do-effect (function none :behavior process-drawable)) +(define-extern precurd-lightjak-stop-effect (function none :behavior process-drawable)) +(define-extern *range-precursor-explo-color* curve-color-fast) +(define-extern *range-precursor-explo-alpha* curve2d-fast) +(define-extern *range-precursor-explo-scale-x* curve2d-fast) +(define-extern *range-precursor-explo-scale-y* curve2d-fast) +(define-extern *curve-precursor-explo-alpha* curve2d-fast) +(define-extern *curve-precursor-explo-scale-x* curve2d-fast) +(define-extern *curve-precursor-explo-scale-y* curve2d-fast) +(define-extern *part-precursor-ship-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precurd-part ;; @@ -61709,19 +61731,18 @@ ;; hover-nav-precura ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *precura-adjacency* object) +(define-extern *precura-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precura-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype precura-states (structure) ((pulse pulse-state :inline :offset-assert 0) (generator pulse-state :inline :offset-assert 16) (main float :offset-assert 32) - (target-laser UNKNOWN 2 :offset-assert 36) - (current-laser UNKNOWN 2 :offset-assert 44) + (target-laser float 2 :offset-assert 36) + (current-laser float 2 :offset-assert 44) (speed-laser float :offset-assert 52) (target-bomb float :offset-assert 56) (current-bomb float :offset-assert 60) @@ -61731,9 +61752,7 @@ :size-assert #x44 :flag-assert #x900000044 ) -|# -#| (deftype precurb-states (structure) ((pulse pulse-state :inline :offset-assert 0) (main float :offset-assert 16) @@ -61742,145 +61761,104 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype lprecurc-loader (process) - ((name basic :offset-assert 0) - (mask process-mask :offset-assert 4) - (clock basic :offset-assert 8) - (parent uint32 :offset-assert 12) - (brother uint32 :offset-assert 16) - (child uint32 :offset-assert 20) - (ppointer uint32 :offset-assert 24) - (self basic :offset-assert 28) - (pool basic :offset-assert 32) - (status basic :offset-assert 36) - (pid int32 :offset-assert 40) - (main-thread basic :offset-assert 44) - (top-thread basic :offset-assert 48) - (entity basic :offset-assert 52) - (level basic :offset-assert 56) - (state basic :offset-assert 60) - (prev-state basic :offset-assert 64) - (next-state basic :offset-assert 68) - (state-stack basic :offset-assert 72) - (trans-hook basic :offset-assert 76) - (post-hook basic :offset-assert 80) - (event-hook basic :offset-assert 84) - (allocated-length int32 :offset-assert 88) - (heap-base uint32 :offset-assert 92) - (heap-top uint32 :offset-assert 96) - (heap-cur uint32 :offset-assert 100) - (stack-frame-top basic :offset-assert 104) - (heap kheap :inline :offset-assert 92) - (connection-list connectable :inline :offset-assert 108) - (stack UNKNOWN :dynamic :offset-assert 124) - ) + () :method-count-assert 16 :size-assert #x80 :flag-assert #x1000000080 (:state-methods - die ;; 15 idle ;; 14 + die ;; 15 ) ) -|# -;; (define-extern init-mood-precura function) -;; (define-extern update-precura-lights function) -;; (define-extern update-mood-precura function) -;; (define-extern set-precura-generator-light! function) -;; (define-extern set-precura-laser-light! function) -;; (define-extern set-precura-bomb-light! function) -;; (define-extern init-mood-precurb function) -;; (define-extern update-mood-precurb function) -;; (define-extern lprecurc-loader-init-by-other function) -;; (define-extern precura-login function) -;; (define-extern precura-activate function) -;; (define-extern precura-deactivate function) -;; (define-extern precura-logout function) +(define-extern init-mood-precura (function mood-context float)) +(define-extern update-precura-lights (function mood-context none)) +(define-extern update-mood-precura (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-precura-generator-light! (function float none)) +(define-extern set-precura-laser-light! (function float float int none)) +(define-extern set-precura-bomb-light! (function float float none)) +(define-extern init-mood-precurb (function mood-context float)) +(define-extern update-mood-precurb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern lprecurc-loader-init-by-other (function level object :behavior lprecurc-loader)) +(define-extern precura-login (function level none)) +(define-extern precura-activate (function level none)) +(define-extern precura-deactivate (function level none)) +(define-extern precura-logout (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precura-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sparticle-track-joint-xz function) +(define-extern sparticle-track-joint-xz (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precura-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype precur-switch (process-drawable) - ((alt-actor basic :offset-assert 200) + ((alt-actor entity-actor :offset-assert 200) ) :method-count-assert 24 :size-assert #xcc :flag-assert #x18005000cc (:state-methods - idle-down ;; 23 - going-up ;; 22 - going-down ;; 21 idle ;; 20 + going-down ;; 21 + going-up ;; 22 + idle-down ;; 23 ) ) -|# -#| (deftype precur-jump-plate (process-drawable) ((start-quat quaternion :inline :offset-assert 208) - (turn-start uint64 :offset-assert 224) + (turn-start time-frame :offset-assert 224) (angle float :offset-assert 232) - (first? basic :offset-assert 236) + (first? symbol :offset-assert 236) (idx uint8 :offset-assert 240) - (sound-id uint32 :offset-assert 244) + (sound-id sound-id :offset-assert 244) ) :method-count-assert 22 :size-assert #xf8 :flag-assert #x16008000f8 (:state-methods - turn ;; 21 idle ;; 20 + turn ;; 21 ) ) -|# -#| (deftype precur-generator (process-drawable) - ((attack-id uint32 :offset-assert 200) + ((root collide-shape :override) + (attack-id uint32 :offset-assert 200) (shove-id uint32 :offset-assert 204) - (sound-id uint32 :offset-assert 208) + (sound-id sound-id :offset-assert 208) (next-lightning-time uint32 :offset-assert 212) (shock-distance float :offset-assert 216) ) :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc - (:methods - (precur-generator-method-22 () none) ;; 22 - ) (:state-methods - explode ;; 21 idle ;; 20 + explode ;; 21 + ) + (:methods + (init-fields (_type_) none) ;; 22 ) ) -|# -#| (deftype precur-generator-a (precur-generator) () :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc (:state-methods - explode ;; 21 idle ;; 20 + explode ;; 21 ) ) -|# -#| (deftype precur-generator-b (precur-generator) () :method-count-assert 23 @@ -61891,177 +61869,173 @@ idle ;; 20 ) ) -|# -#| (deftype precur-generator-c (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (next-lightning-time uint32 :offset-assert 204) - (sound-id uint32 :offset-assert 208) + ((root collide-shape :override) + (actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (next-lightning-time uint32 :offset-assert 208) + (sound-id sound-id :offset-assert 212) ) :method-count-assert 22 :size-assert #xd8 :flag-assert #x16006000d8 (:state-methods - explode ;; 21 idle ;; 20 + explode ;; 21 ) ) -|# -#| (deftype precur-generator-d-gem (process-drawable) - ((ang-vel float :offset-assert 200) + ((root collide-shape :override) + (ang-vel float :offset-assert 200) (offset-vec vector :inline :offset-assert 208) (init-pos vector :inline :offset-assert 224) - (sound-id uint32 :offset-assert 240) + (sound-id sound-id :offset-assert 240) ) :method-count-assert 24 :size-assert #xf4 :flag-assert #x18008000f4 (:state-methods - explode ;; 23 - smoking ;; 22 - orbit-gen ;; 21 idle ;; 20 + orbit-gen ;; 21 + smoking ;; 22 + explode ;; 23 ) ) -|# -#| (deftype precur-generator-d (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (next-lightning-time uint32 :offset-assert 204) - (proc-handle UNKNOWN 3 :offset-assert 212) - (animation-speed float :offset-assert 236) - (sound-id uint32 :offset-assert 240) + ((root collide-shape :override) + (actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (next-lightning-time uint32 :offset-assert 208) + (proc-handle handle 3 :offset-assert 216) + (animation-speed float :offset-assert 240) + (sound-id sound-id :offset-assert 244) ) :method-count-assert 24 :size-assert #xf8 :flag-assert #x18008000f8 - (:methods - (precur-generator-d-method-23 () none) ;; 23 - ) (:state-methods - explosions ;; 22 - explode ;; 21 idle ;; 20 + explode ;; 21 + explosions ;; 22 + ) + (:methods + (spawn-gems (_type_) none) ;; 23 ) ) -|# -#| (deftype precur-platform-round (process-drawable) - ((start-quat quaternion :inline :offset-assert 208) + ((root collide-shape :override) + (start-quat quaternion :inline :offset-assert 208) (start-height float :offset-assert 224) - (sound-id uint32 :offset-assert 228) + (sound-id sound-id :offset-assert 228) (start-dip-time float :offset-assert 232) (last-ridden-time float :offset-assert 236) ) :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 + (:state-methods + idle ;; 20 + hidden-state ;; 21 + rotate-plat ;; 22 + fade-in ;; 23 + ) (:methods (precur-platform-round-method-24 () none) ;; 24 ) - (:state-methods - rotate-plat ;; 22 - fade-in ;; 23 - hidden-state ;; 21 - idle ;; 20 - ) ) -|# -#| (deftype precur-door-d (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -#| (deftype precur-door-c (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 - (:methods - (precur-door-c-method-22 () none) ;; 22 - (precur-door-c-method-23 () none) ;; 23 - ) (:state-methods idle ;; 20 explode ;; 21 ) + (:methods + (init-collision! (_type_) none) ;; 22 + (spawn-exploder (_type_) (pointer joint-exploder)) ;; 23 + ) ) -|# -#| +;; +++precura-obs:precur-hint-type +(defenum precur-hint-type + :type uint8 + (pickup-hint) + (place-hint) + (normal) + ) +;; ---precura-obs:precur-hint-type + (deftype task-manager-precur-tour (task-manager) - ((hint-type uint8 :offset-assert 240) + ((hint-type precur-hint-type :offset-assert 240) ) :method-count-assert 32 :size-assert #xf1 :flag-assert #x20008000f1 ) -|# -#| (deftype precura-door-a (process-drawable) - ((open-test basic :offset-assert 200) - (open-started uint64 :offset-assert 208) - (do-camera? basic :offset-assert 216) + ((open-test pair :offset-assert 200) + (open-started time-frame :offset-assert 208) + (do-camera? symbol :offset-assert 216) (open-frame float :offset-assert 220) - (precur-tour? basic :offset-assert 224) + (precur-tour? symbol :offset-assert 224) ) :method-count-assert 23 :size-assert #xe4 :flag-assert #x17007000e4 ;; field open-test uses ~A with a signed load. - (:methods - (precura-door-a-method-22 () none) ;; 22 - ) (:state-methods open ;; 20 close ;; 21 ) + (:methods + (precura-door-a-method-22 () none) ;; 22 + ) ) -|# -;; (define-extern spawn-mech-shock-effect function) -;; (define-extern *precur-generator-a-exploder-params* joint-exploder-static-params) -;; (define-extern *precur-generator-b-exploder-params* joint-exploder-static-params) -;; (define-extern *precur-generator-c-exploder-params* joint-exploder-static-params) -;; (define-extern precur-generator-d-gem-init-by-other function) -;; (define-extern *precur-generator-d-exploder-params* joint-exploder-static-params) -;; (define-extern rotate-platform-behavior function) -;; (define-extern *precur-door-d-exploder-params* joint-exploder-static-params) -;; (define-extern precur-door-d-init-by-other function) -;; (define-extern *precur-door-c-exploder-params* joint-exploder-static-params) -;; (define-extern precur-door-c-handler function) -;; (define-extern hint-type->string function) -;; (define-extern precura-do-blur-if-more-than-dist-away function) +(define-extern spawn-mech-shock-effect (function none)) +(define-extern *precur-generator-a-exploder-params* joint-exploder-static-params) +(define-extern *precur-generator-b-exploder-params* joint-exploder-static-params) +(define-extern *precur-generator-c-exploder-params* joint-exploder-static-params) +(define-extern precur-generator-d-gem-init-by-other (function vector float vector object :behavior precur-generator-d-gem)) +(define-extern *precur-generator-d-exploder-params* joint-exploder-static-params) +(define-extern rotate-platform-behavior (function none :behavior precur-platform-round)) +(define-extern *precur-door-d-exploder-params* joint-exploder-static-params) +(define-extern precur-door-d-init-by-other (function object entity-actor object :behavior precur-door-d)) +(define-extern *precur-door-c-exploder-params* joint-exploder-static-params) +(def-event-handler precur-door-c-handler precur-door-c) +(define-extern hint-type->string (function precur-hint-type string)) +(define-extern precura-do-blur-if-more-than-dist-away (function vector float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precura-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mechblock (process-focusable) - ((origin vector :inline :offset-assert 208) - (drop-point vector :inline :offset-assert 256) + ((root collide-shape-moving :override) + (origin vector :inline :offset-assert 208) + (drop-point vector :inline :offset 256) (allow-drag? symbol :offset-assert 272) ;; guessed by decompiler (reset-on-land? symbol :offset-assert 276) ;; guessed by decompiler - (nav-mesh basic :offset-assert 280) + (nav-mesh nav-mesh :offset-assert 280) (hit-something? symbol :offset-assert 284) ;; guessed by decompiler (attack-id uint32 :offset-assert 288) (next-entity entity :offset-assert 292) ;; guessed by decompiler @@ -62069,52 +62043,47 @@ :method-count-assert 34 :size-assert #x128 :flag-assert #x2200b00128 - (:methods - (mechblock-method-33 () none) ;; 33 - ) (:state-methods - fall ;; 31 - drag-object ;; 30 - carry ;; 29 - wait ;; 32 idle ;; 28 + carry ;; 29 + drag-object ;; 30 + fall ;; 31 + wait ;; 32 + ) + (:methods + (can-drop? (_type_ vector) symbol) ;; 33 ) ) -|# -#| (deftype precur-bomb (mechblock) - ((bomb-timer uint32 :offset-assert 296) + ( + (bomb-timer uint32 :offset-assert 296) (blink-timer uint32 :offset-assert 300) (blink-rate float :offset-assert 304) - (blink basic :offset-assert 308) + (blink symbol :offset-assert 308) (collide-timer uint32 :offset-assert 312) (spin-quat quaternion :inline :offset-assert 320) (default-emissive-color vector :inline :offset-assert 336) - (hint? basic :offset-assert 352) - (sound-id uint32 :offset-assert 356) + (hint? symbol :offset-assert 352) + (sound-id sound-id :offset-assert 356) ) :method-count-assert 39 :size-assert #x168 :flag-assert #x2700f00168 - (:methods - (precur-bomb-method-38 () none) ;; 38 - ) (:state-methods - explode ;; 35 fall ;; 31 - carry ;; 29 + ready ;; 34 + explode ;; 35 spawn-up ;; 36 pre-spawn-up ;; 37 - idle ;; 28 - ready ;; 34 + ) + (:methods + (update-blink (_type_) object) ;; 38 ) ) -|# -#| (deftype precur-box (mechblock) - ((taskman uint64 :offset-assert 296) + ((taskman handle :offset-assert 296) ) :method-count-assert 34 :size-assert #x130 @@ -62123,76 +62092,76 @@ idle ;; 28 ) ) -|# -#| +;; +++precura-obs2:precur-hint-mode +(defenum precur-hint-mode + :type uint8 + (teach-bomb) + (normal) + ) +;; ---precura-obs2:precur-hint-mode + (deftype precur-bomb-spawner (process-drawable) - ((proc-handle uint64 :offset-assert 200) - (hint-mode uint8 :offset-assert 208) + ((proc-handle handle :offset-assert 200) + (hint-mode precur-hint-mode :offset-assert 208) ) :method-count-assert 22 :size-assert #xd1 :flag-assert #x16006000d1 - (:methods - (precur-bomb-spawner-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (spawn-bomb (_type_) handle) ;; 21 + ) ) -|# -#| (deftype precur-laser-beam (process-drawable) - ((laser-dir vector :inline :offset-assert 204) - (attack-id uint32 :offset-assert 220) - (org-laser-quat quaternion :inline :offset-assert 236) - (on-duration float :offset-assert 252) - (off-duration float :offset-assert 256) - (current-angle int8 :offset-assert 260) - (last-attack-time uint32 :offset-assert 264) - (counter uint8 :offset-assert 268) - (sound-id uint32 :offset-assert 272) - (actor-group uint32 :offset-assert 276) - (actor-group-count int32 :offset-assert 280) + ((laser-dir vector :inline :offset-assert 208) + (attack-id uint32 :offset-assert 224) + (org-laser-quat quaternion :inline :offset-assert 240) + (on-duration float :offset-assert 256) + (off-duration float :offset-assert 260) + (current-angle int8 :offset-assert 264) + (last-attack-time uint32 :offset-assert 268) + (counter uint8 :offset-assert 272) + (sound-id sound-id :offset-assert 276) + (actor-group (pointer actor-group) :offset-assert 280) + (actor-group-count int32 :offset-assert 284) ) :method-count-assert 26 :size-assert #x120 :flag-assert #x1a00a00120 - (:methods - (precur-laser-beam-method-24 () none) ;; 24 - (precur-laser-beam-method-25 () none) ;; 25 - ) (:state-methods - hide ;; 22 active ;; 20 - dormant ;; 23 telegraph ;; 21 + hide ;; 22 + dormant ;; 23 + ) + (:methods + (fire-beam (_type_ vector vector) none) ;; 24 + (fire-beam0 "Unused." (_type_ vector vector) none) ;; 25 ) ) -|# -#| (deftype task-manager-precura (task-manager) - ((part-doom basic :offset-assert 240) - (doom-time uint64 :offset-assert 248) - (extra-time uint64 :offset-assert 256) + ((part-doom sparticle-launch-control :offset-assert 240) + (doom-time time-frame :offset-assert 248) + (extra-time time-frame :offset-assert 256) (doom-counter uint8 :offset-assert 264) (faded uint8 :offset-assert 265) - (movie-played? basic :offset-assert 268) + (movie-played? symbol :offset-assert 268) ) :method-count-assert 32 :size-assert #x110 :flag-assert #x2000900110 ) -|# -#| (deftype precur-spot-shadow-effect (process-drawable) ((focal-length float :offset-assert 200) (near-clip float :offset-assert 204) (far-clip float :offset-assert 208) - (color uint32 :offset-assert 212) + (color rgba :offset-assert 212) (pre-flicker-pos vector :inline :offset-assert 224) (jmod-outer joint-mod-add-local :inline :offset-assert 240) (jmod-inner joint-mod-add-local :inline :offset-assert 304) @@ -62200,68 +62169,58 @@ :method-count-assert 24 :size-assert #x170 :flag-assert #x1800f00170 - (:methods - (precur-spot-shadow-effect-method-22 () none) ;; 22 - (precur-spot-shadow-effect-method-23 () none) ;; 23 - ) (:state-methods - inactive ;; 21 idle ;; 20 + inactive ;; 21 + ) + (:methods + (set-inner-jmod-scale (_type_ vector) none) ;; 22 + (set-outer-jmod-scale (_type_ vector) none) ;; 23 ) ) -|# -#| (deftype precur-path (process-drawable) - ((pathb basic :offset-assert 200) + ((pathb path-control :offset-assert 200) (last-attack-time uint32 :offset-assert 204) (attack-id uint32 :offset-assert 208) - (bolt basic :offset-assert 212) + (bolt lightning-bolt :offset-assert 212) (shock-part-time uint32 :offset-assert 216) - (shock-shadow-handle uint64 :offset-assert 224) + (shock-shadow-handle handle :offset-assert 224) ) :method-count-assert 24 :size-assert #xe8 :flag-assert #x18007000e8 - (:methods - (precur-path-method-22 () none) ;; 22 - (precur-path-method-23 () none) ;; 23 - ) (:state-methods - dormant ;; 21 idle ;; 20 + dormant ;; 21 + ) + (:methods + (probe-for-player-collision (_type_ vector vector) none) ;; 22 + (draw-lightning (_type_ vector vector) none) ;; 23 ) ) -|# -#| (deftype precur-door-b (com-airlock) - ((open-test basic :offset-assert 204) - ) + ((pad uint8 4)) :method-count-assert 30 :size-assert #x1b4 :flag-assert #x1e014001b4 - ;; field open-test uses ~A with a signed load. - (:state-methods - open ;; 20 - ) ) -|# -;; (define-extern precur-bomb-bounce-reaction function) -;; (define-extern precur-bomb-handler function) -;; (define-extern precur-bomb-init-by-other function) -;; (define-extern hint-mode->string function) -;; (define-extern *laser-angles-array* array) -;; (define-extern elec-mech function) -;; (define-extern *precura-continue-sphere* object) -;; (define-extern *precura-continue2-sphere* object) -;; (define-extern *pca-sph1* object) -;; (define-extern *pca-sph2* object) -;; (define-extern process-drawable-shock-wave-effect function) -;; (define-extern precur-spot-shadow-effect-init-by-other function) -;; (define-extern precur-spot-shadow-effect-handler function) -;; (define-extern *precur-tour-lightning* object) +(define-extern precur-bomb-bounce-reaction (function control-info collide-query vector vector collide-status)) +(def-event-handler precur-bomb-handler precur-bomb) +(define-extern precur-bomb-init-by-other (function vector symbol object :behavior precur-bomb)) +(define-extern hint-mode->string (function precur-hint-mode string)) +(define-extern *laser-angles-array* (array float)) +(define-extern elec-mech (function vector uint none)) +(define-extern *precura-continue-sphere* sphere) +(define-extern *precura-continue2-sphere* sphere) +(define-extern *pca-sph1* sphere) +(define-extern *pca-sph2* sphere) +(define-extern process-drawable-shock-wave-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher vector int float object)) +(define-extern precur-spot-shadow-effect-init-by-other (function vector vector object :behavior precur-spot-shadow-effect)) +(def-event-handler precur-spot-shadow-effect-handler precur-spot-shadow-effect) +(define-extern *precur-tour-lightning* lightning-appearance) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wascitya-obs ;; @@ -64454,7 +64413,6 @@ ;; lfaccity-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype lfaccity-states (structure) ((light light-state :inline :offset-assert 0) (roty float :offset-assert 8) @@ -64468,50 +64426,43 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype faccity-pparticle-info (structure) ((original-pos vector :inline :offset-assert 0) - (inited? basic :offset-assert 16) + (inited? symbol :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype faccity-pparticle-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data faccity-pparticle-info :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype lfaccity-pparticle-mover (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (particles basic :offset-assert 204) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (particles faccity-pparticle-array :offset-assert 208) ) :method-count-assert 22 :size-assert #xd4 :flag-assert #x16006000d4 - (:methods - (lfaccity-pparticle-mover-method-21 () none) ;; 21 - ) (:state-methods active ;; 20 ) + (:methods + (mood-update (_type_) symbol) ;; 21 + ) ) -|# -;; (define-extern *faccity-part-updater* object) -;; (define-extern update-mood-lfaccity function) -;; (define-extern lfaccity-pparticle-mover-init-by-other function) +(define-extern *faccity-part-updater* lfaccity-pparticle-mover) +(define-extern update-mood-lfaccity (function mood-context float int none :behavior time-of-day-proc)) +(define-extern lfaccity-pparticle-mover-init-by-other (function entity-actor object :behavior lfaccity-pparticle-mover)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cty-sniper-battery ;; @@ -68226,7 +68177,6 @@ ;; precurc-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype precurc-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -68234,57 +68184,52 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern init-mood-precurc function) -;; (define-extern update-precurc-lights function) -;; (define-extern update-mood-precurc function) -;; (define-extern precurc-activate function) -;; (define-extern precur-deactivate function) +(define-extern init-mood-precurc (function mood-context float)) +(define-extern update-precurc-lights (function mood-context none)) +(define-extern update-mood-precurc (function mood-context float int none :behavior time-of-day-proc)) +(define-extern precurc-activate (function level none)) +(define-extern precur-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precurc-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype precur-elevator (elevator) () :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ) -|# -#| (deftype precur-door-a (process-drawable) - ((open-test basic :offset-assert 200) - (open-started uint64 :offset-assert 208) - (do-camera? basic :offset-assert 216) + ((open-test pair :offset-assert 200) + (open-started time-frame :offset-assert 208) + (do-camera? symbol :offset-assert 216) (open-frame float :offset-assert 220) ) :method-count-assert 23 :size-assert #xe0 :flag-assert #x17006000e0 ;; field open-test uses ~A with a signed load. - (:methods - (precur-door-a-method-22 () none) ;; 22 - ) (:state-methods open ;; 20 close ;; 21 ) + (:methods + (precur-door-a-method-22 () none) ;; 22 + ) ) -|# -#| (deftype precur-swingpole-pop (swingpole) - ((moving? basic :offset-assert 284) - (player-grabbed? basic :offset-assert 288) - (halfway? basic :offset-assert 292) - (stopped-time uint64 :offset-assert 296) + ((root collide-shape :override) + (moving? symbol :offset-assert 284) + (player-grabbed? symbol :offset-assert 288) + (halfway? symbol :offset-assert 292) + (stopped-time time-frame :offset-assert 296) (movedist float :offset-assert 304) (tt float :offset-assert 308) - (paused-time uint64 :offset-assert 312) + (paused-time time-frame :offset-assert 312) (direction uint8 :offset-assert 320) ) :method-count-assert 25 @@ -68294,8 +68239,6 @@ idle ;; 20 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; external-player-control ;; @@ -70475,7 +70418,6 @@ ;; assault-shared ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype assault-cam-info (structure) ((pos vector :inline :offset-assert 0) (mat matrix :inline :offset-assert 16) @@ -70484,9 +70426,7 @@ :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype triangle-dists (structure) ((dist0 float :offset-assert 0) (dist1 float :offset-assert 4) @@ -70495,9 +70435,7 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype assault-room-collision (structure) ((cam-matrix matrix :inline :offset-assert 0) (cam-pos vector :inline :offset-assert 64) @@ -70508,62 +70446,64 @@ :size-assert #x5c :flag-assert #x90000005c ) -|# -#| (deftype assault-room (structure) ((center-pos vector :inline :offset-assert 0) (cam-info assault-cam-info :offset-assert 16) (collision assault-room-collision :offset-assert 20) - (node-positions basic :offset-assert 24) + (node-positions (array vector) :offset-assert 24) ) :method-count-assert 9 :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype assault-speech-instance (speech-instance) () :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern *assault-speech-list* object) +(define-extern *assault-speech-list* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-cams ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *assault-cams* array) +(define-extern *assault-cams* (array assault-cam-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *assault-rooms* array) +(define-extern *assault-rooms* (array assault-room)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-enemies ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++assault-enemies:assault-target-type +(defenum assault-target-type + :copy-entries city-target-type + (assault-citizen-norm 1) + (assault-grunt 6) + (assault-metalhead-predator 8) + (other 11) + (assault-bombbot 13) + ) +;; ---assault-enemies:assault-target-type + (deftype assault-object-spawn-params (traffic-object-spawn-params) - ((nav-branch nav-branch :offset-assert 24) - (lev basic :offset-assert 116) + ((lev symbol :offset-assert 116) (suck-level int32 :offset-assert 120) - (flee-time uint64 :offset-assert 128) + (flee-time time-frame :offset-assert 128) ) :method-count-assert 9 :size-assert #x88 :flag-assert #x900000088 ) -|# -#| (deftype assault-metalhead-grunt (metalhead-grunt) () :method-count-assert 232 @@ -70573,79 +70513,50 @@ exit-transport ;; 231 ) ) -|# -#| (deftype assault-metalhead-flitter (metalhead-flitter) () :method-count-assert 230 :size-assert #x494 :flag-assert #xe604200494 (:state-methods - die-fast ;; 42 - in-ditch ;; 192 exit-transport ;; 229 ) ) -|# -#| (deftype assault-metalhead-predator (metalhead-predator) () :method-count-assert 228 :size-assert #x550 :flag-assert #xe404d00550 - (:state-methods - die-fast ;; 42 - in-ditch ;; 192 - ) ) -|# -#| (deftype assault-roboguard (roboguard-city) - ((shoot-wait-time uint64 :offset-assert 1600) + ((shoot-wait-time time-frame :offset-assert 1600) ) :method-count-assert 242 :size-assert #x648 :flag-assert #xf205d00648 (:state-methods - in-ditch ;; 192 roll-initial ;; 241 - die-fast ;; 42 - shoot-attack ;; 224 - hostile-stand ;; 222 ) + (:methods (go-from-behavior (_type_ assault-object-spawn-params) object :replace)) ) -|# -#| (deftype assault-spydroid (spydroid) () :method-count-assert 238 :size-assert #x50c :flag-assert #xee0490050c - (:state-methods - die-fast ;; 42 - in-ditch ;; 192 - ) ) -|# -#| (deftype assault-flying-turret (flying-turret) () :method-count-assert 231 :size-assert #x568 :flag-assert #xe704f00568 - (:state-methods - die-fast ;; 42 - in-ditch ;; 192 - ) ) -|# -#| (deftype assault-crimson-guard (crimson-guard) ((center-pos vector :inline :offset-assert 1616) ) @@ -70654,34 +70565,27 @@ :flag-assert #x12405e00660 (:state-methods wait-for-enemies ;; 291 - active ;; 34 - die-fast ;; 42 - in-ditch ;; 192 ) + (:methods (go-from-behavior (_type_ assault-object-spawn-params) object :replace)) ) -|# -#| (deftype assault-citizen-norm (citizen-norm) ((center-pos vector :inline :offset-assert 1136) - (min-flee-time uint64 :offset-assert 1152) + (min-flee-time time-frame :offset-assert 1152) ) :method-count-assert 237 :size-assert #x488 :flag-assert #xed04100488 (:state-methods - cower-ground ;; 222 flee-madly ;; 235 flee-to-center ;; 236 - knocked-recover ;; 32 ) + (:methods (go-from-behavior (_type_ assault-object-spawn-params) object :replace)) ) -|# -#| (deftype assault-cleanup (process) - ((offscreen-time uint64 :offset-assert 128) - (parent-hand uint64 :offset-assert 136) + ((offscreen-time time-frame :offset-assert 128) + (parent-hand handle :offset-assert 136) ) :method-count-assert 15 :size-assert #x90 @@ -70690,267 +70594,317 @@ tracking ;; 14 ) ) -|# -#| (deftype special-health (health) () :method-count-assert 36 :size-assert #x194 :flag-assert #x2401200194 ) -|# -#| (deftype ammo-special-pickup (process-focusable) - ((ammo-type int32 :offset-assert 208) - (gun-type int32 :offset-assert 212) - (collect-effect basic :offset-assert 216) - (ammo-effect basic :offset-assert 220) + ((ammo-type pickup-type :offset-assert 208) + (gun-type pickup-type :offset-assert 212) + (collect-effect sparticle-launch-group :offset-assert 216) + (ammo-effect sparticle-launch-group :offset-assert 220) (anim-index int32 :offset-assert 224) ) :method-count-assert 31 :size-assert #xe4 :flag-assert #x1f007000e4 - (:methods - (ammo-special-pickup-method-30 () none) ;; 30 - ) (:state-methods - pickup ;; 29 wait ;; 28 + pickup ;; 29 + ) + (:methods + (init-pickup (_type_ vector pickup-type pickup-type) object) ;; 30 ) ) -|# -#| (deftype assault-bombbot (bombbot) ((next-node int32 :offset-assert 1512) - (new-point-choose-time uint64 :offset-assert 1520) - (max-hp float :offset-assert 1532) - (is-final? basic :offset-assert 1536) + (new-point-choose-time time-frame :offset-assert 1520) + (max-hp float :offset 1532) + (is-final? symbol :offset-assert 1536) (last-charge-player-count uint32 :offset-assert 1540) (suck-level int32 :offset-assert 1544) ) :method-count-assert 210 :size-assert #x60c :flag-assert #xd20590060c - (:methods - (assault-bombbot-method-209 () none) ;; 209 - ) (:state-methods hostile ;; 38 - drop-bombs ;; 193 explode ;; 190 + drop-bombs ;; 193 + ) + (:methods + (assault-bombbot-method-209 (_type_) int) ;; 209 ) ) -|# -#| (deftype assault-bombbot-spawn-params (bombbot-spawn-params) - ((is-final? basic :offset-assert 48) + ((is-final? symbol :offset-assert 48) (suck-level int32 :offset-assert 52) ) :method-count-assert 9 :size-assert #x38 :flag-assert #x900000038 ) -|# -#| (deftype assault-bombbot-shot (bombbot-shot) () :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -;; (define-extern assault-enemy-init-by-other function) -;; (define-extern assault-type->type function) -;; (define-extern assault-cleanup-init-by-other function) -;; (define-extern *assault-levels* array) -;; (define-extern spawn-assault-enemy function) -;; (define-extern special-health-init-by-other function) -;; (define-extern ammo-special-pickup-init-by-other function) -;; (define-extern assault-bombbot-init-by-other function) -;; (define-extern *curve-assault-bombbot-shot-color-blue* curve-color-fast) -;; (define-extern *curve-assault-bombbot-shot-width* curve2d-fast) -;; (define-extern *assault-bombbot-trail* object) -;; (define-extern *assault-bombbot-trail-2* object) -;; (define-extern *bombbot-bomb-hp-thresholds* array) -;; (define-extern *look-time* object) +(define-extern assault-enemy-init-by-other (function assault-object-spawn-params object :behavior citizen)) +(define-extern assault-type->type (function assault-target-type type)) +(define-extern assault-cleanup-init-by-other (function handle object :behavior assault-cleanup)) +(define-extern *assault-levels* (array symbol)) +(define-extern spawn-assault-enemy (function assault-target-type process handle)) +(define-extern special-health-init-by-other (function vector object :behavior special-health)) +(define-extern ammo-special-pickup-init-by-other (function pickup-type pickup-type object :behavior ammo-special-pickup)) +(define-extern assault-bombbot-init-by-other (function assault-bombbot-spawn-params object :behavior assault-bombbot)) +(define-extern *curve-assault-bombbot-shot-color-blue* curve-color-fast) +(define-extern *curve-assault-bombbot-shot-width* curve2d-fast) +(define-extern *assault-bombbot-trail* light-trail-composition) +(define-extern *assault-bombbot-trail-2* light-trail-composition) +(define-extern *bombbot-bomb-hp-thresholds* (array float)) +(define-extern *look-time* time-frame) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-script ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++assault-script:assault-cmd +(defenum assault-cmd + :type uint8 + (spawn) + (wait) + (advance) + (pickup) + (torn) + (final-bombbot) + (load-continue) + (save-continue) + (speech) + (queue) + (other) + ) +;; ---assault-script:assault-cmd + +;; +++assault-script:assault-cmd-spawn-type +(defenum assault-cmd-spawn-type + :type uint16 + (cmd0) + (cmd1) + (cmd2) + (cmd3) + (cmd4) + (cmd5) + (cmd6) + (cmd7) + (cmd8) + (cmd9) + (cmd10) + (cmd11) + (cmd12) + ) +;; ---assault-script:assault-cmd-spawn-type + +;; +++assault-script:assault-cmd-wait-type +(defenum assault-cmd-wait-type + :type uint8 + (spawn-delay) + (cmd1) + (cmd2) + ) +;; ---assault-script:assault-cmd-wait-type + +;; +++assault-script:assault-cmd-faction-type +(defenum assault-cmd-faction-type + :type uint8 + (none) + (mh) + (ff) + (kg) + ) +;; ---assault-script:assault-cmd-faction-type + +;; +++assault-script:assault-cmd-speech-type +(defenum assault-cmd-speech-type + :type uint64 + (instructions) + (jak-hit) + (room-complete) + (room-start) + (encouragement) + (type5) + (torn-watch-out) + (protect-civilians) + (grab-pickup) + (torn-give-help) + (torn-finish) + (guard-hello) + (guard-bombbot) + ) +;; ---assault-script:assault-cmd-speech-type + (deftype assault-spawn-cmd (structure) - ((spawn-delay uint64 :offset-assert 0) - (command uint8 :offset-assert 8) - (spawn-type uint16 :offset-assert 10) + ((spawn-delay time-frame :offset-assert 0) + (command assault-cmd :offset-assert 8) + (spawn-type assault-cmd-spawn-type :offset-assert 10) (count int8 :offset-assert 12) (spawner-index int8 :offset-assert 13) - (wait-type uint8 :offset-assert 10) - (faction-type uint8 :offset-assert 13) - (wait-time uint64 :offset-assert 0) - (msg basic :offset-assert 16) + (wait-type assault-cmd-wait-type :offset 10) + (faction-type assault-cmd-faction-type :offset 13) + (wait-time time-frame :offset 0) + (msg symbol :offset-assert 16) (path-id int32 :offset-assert 20) (event0 int32 :offset-assert 24) (event1 int32 :offset-assert 28) (event2 int32 :offset-assert 32) - (speech-type uint64 :offset-assert 40) + (speech-type assault-cmd-speech-type :offset-assert 40) (gun-pickup-type int32 :offset-assert 48) ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 ) -|# -#| (deftype room-powerup-percentage (structure) ((avg-spawn-rate uint64 :offset-assert 0) - (percentages UNKNOWN 51 :offset-assert 8) - (red2 float :offset-assert 116) - (red3 float :offset-assert 120) - (yellow2 float :offset-assert 128) - (yellow3 float :offset-assert 132) - (blue1 float :offset-assert 136) - (blue2 float :offset-assert 140) - (blue3 float :offset-assert 144) - (darkjak float :offset-assert 36) - (lightjak float :offset-assert 64) - (health float :offset-assert 88) + (percentages float 51 :offset-assert 8) + (red2 float :offset 116) + (red3 float :offset 120) + (yellow2 float :offset 128) + (yellow3 float :offset 132) + (blue1 float :offset 136) + (blue2 float :offset 140) + (blue3 float :offset 144) + (darkjak float :offset 36) + (lightjak float :offset 64) + (health float :offset 88) ) :method-count-assert 9 :size-assert #xd4 :flag-assert #x9000000d4 ) -|# -#| (deftype assault-cmd-context (structure) - ((start-time uint64 :offset-assert 0) - (state-time uint64 :offset-assert 8) + ((start-time time-frame :offset-assert 0) + (state-time time-frame :offset-assert 8) (current-command assault-spawn-cmd :inline :offset-assert 16) - (script basic :offset-assert 68) + (script pair :offset-assert 68) ) :method-count-assert 9 :size-assert #x48 :flag-assert #x900000048 ) -|# -;; (define-extern *port-assault-speech* array) -;; (define-extern *assault-object-count* array) -;; (define-extern *assault-fade-dist* array) -;; (define-extern *assault-graph-classification* array) -;; (define-extern *assault-faction-lookup* array) -;; (define-extern *assault-guard-count* array) -;; (define-extern *assault-citizen-count* array) -;; (define-extern symbol->assault-target-type function) -;; (define-extern symbol->speech-type function) -;; (define-extern symbol->faction-type function) -;; (define-extern symbol->gun-pickup-type function) -;; (define-extern parse-assault-command function) -;; (define-extern *assault-bombbot-paths* array) -;; (define-extern *assault-scripts* array) -;; (define-extern *room-goal* array) -;; (define-extern *room-powerups* array) -;; (define-extern *room0-script* object) -;; (define-extern *room1-script* object) -;; (define-extern *room2-script* object) -;; (define-extern *room3-script* object) -;; (define-extern *room4-script* object) +(define-extern *port-assault-speech* (array speech-info)) +(define-extern *assault-object-count* (array int32)) +(define-extern *assault-fade-dist* (array float)) +(define-extern *assault-graph-classification* (array int32)) +(define-extern *assault-faction-lookup* (array uint8)) +(define-extern *assault-guard-count* (array int32)) +(define-extern *assault-citizen-count* (array int32)) +(define-extern symbol->assault-target-type (function symbol assault-target-type)) +(define-extern symbol->speech-type (function symbol assault-cmd-speech-type)) +(define-extern symbol->faction-type (function symbol assault-cmd-faction-type)) +(define-extern symbol->gun-pickup-type (function symbol pickup-type)) +(define-extern parse-assault-command (function pair assault-spawn-cmd object)) +(define-extern *assault-bombbot-paths* (array bombbot-path)) +(define-extern *assault-scripts* (array pair)) +(define-extern *room-goal* (array uint8)) +(define-extern *room-powerups* (array room-powerup-percentage)) +(define-extern *room0-script* pair) +(define-extern *room1-script* pair) +(define-extern *room2-script* pair) +(define-extern *room3-script* pair) +(define-extern *room4-script* pair) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-task ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ammo-special-info (structure) ((ammo-type int32 :offset-assert 0) (gun-type int32 :offset-assert 4) - (end-lock-time uint64 :offset-assert 8) + (end-lock-time time-frame :offset-assert 8) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype task-manager-city-port-assault (task-manager) ((script-command assault-cmd-context :inline :offset-assert 240) - (door-handle uint64 :offset-assert 312) + (door-handle handle :offset-assert 312) (current-room assault-room :offset-assert 320) (current-room-index int8 :offset-assert 324) - (h-player-controller uint64 :offset-assert 328) - (spawners UNKNOWN 12 :offset-assert 336) - (original-cam-point vector :inline :offset-assert 1296) + (h-player-controller handle :offset-assert 328) + (spawners assault-cmd-context 12 :inline :offset-assert 336) + (original-cam-point vector :inline :offset 1296) (original-cam-quat quaternion :inline :offset-assert 1312) (ammo-special ammo-special-info :inline :offset-assert 1328) - (torn-h uint64 :offset-assert 1344) - (next-powerup-spawn-time uint64 :offset-assert 1352) - (final-bombbot? basic :offset-assert 1360) + (torn-h handle :offset-assert 1344) + (next-powerup-spawn-time time-frame :offset-assert 1352) + (final-bombbot? symbol :offset-assert 1360) (room-override-index int8 :offset-assert 1364) - (bombbot-dead? basic :offset-assert 1368) - (cam-pan-sound uint32 :offset-assert 1372) + (bombbot-dead? symbol :offset-assert 1368) + (cam-pan-sound sound-id :offset-assert 1372) ) :method-count-assert 53 :size-assert #x560 :flag-assert #x3504e00560 - (:methods - (task-manager-city-port-assault-method-36 () none) ;; 36 - (task-manager-city-port-assault-method-37 () none) ;; 37 - (task-manager-city-port-assault-method-38 () none) ;; 38 - (task-manager-city-port-assault-method-39 () none) ;; 39 - (task-manager-city-port-assault-method-40 () none) ;; 40 - (task-manager-city-port-assault-method-41 () none) ;; 41 - (task-manager-city-port-assault-method-42 () none) ;; 42 - (task-manager-city-port-assault-method-43 () none) ;; 43 - (task-manager-city-port-assault-method-44 () none) ;; 44 - (task-manager-city-port-assault-method-45 () none) ;; 45 - (task-manager-city-port-assault-method-46 () none) ;; 46 - (task-manager-city-port-assault-method-47 () none) ;; 47 - (task-manager-city-port-assault-method-48 () none) ;; 48 - (task-manager-city-port-assault-method-49 () none) ;; 49 - (task-manager-city-port-assault-method-50 () none) ;; 50 - (task-manager-city-port-assault-method-51 () none) ;; 51 - (task-manager-city-port-assault-method-52 () none) ;; 52 - ) (:state-methods wait ;; 14 active ;; 15 + transition ;; 32 combat ;; 33 player-entrance ;; 34 player-quickstart ;; 35 - transition ;; 32 + ) + (:methods + (parse-cmd (_type_) none) ;; 36 + (eval-cmd (_type_) symbol) ;; 37 + (cmd-can-run? (_type_) symbol) ;; 38 + (advance-script (_type_) none) ;; 39 + (room-advance (_type_) none) ;; 40 + (task-manager-city-port-assault-method-41 (_type_ assault-spawn-cmd assault-cmd-context) symbol) ;; 41 + (spawn-special-pickup (_type_ pickup-type) none) ;; 42 + (task-manager-city-port-assault-method-43 (_type_ int) int) ;; 43 + (task-manager-city-port-assault-method-44 (_type_) object) ;; 44 + (check-for-pickup-spawn (_type_) int) ;; 45 + (set-next-powerup-spawn-time (_type_) none) ;; 46 + (spawn-guards (_type_ int) symbol) ;; 47 + (spawn-citizens (_type_ int) none) ;; 48 + (task-manager-city-port-assault-method-49 (_type_ int) int) ;; 49 + (pickup-spawn-chance (_type_ room-powerup-percentage int) float) ;; 50 + (get-suck-level (_type_) int) ;; 51 + (task-manager-city-port-assault-method-52 (_type_) none) ;; 52 ) ) -|# -#| (deftype assault-player-controller (player-controller) ((collision assault-room-collision :offset-assert 272) ) :method-count-assert 37 :size-assert #x114 :flag-assert #x2500a00114 - (:methods - (assault-player-controller-method-36 () none) ;; 36 - ) (:state-methods clip-to-nav-mesh ;; 30 ) + (:methods + (assault-player-controller-method-36 (_type_) none) ;; 36 + ) ) -|# -#| (deftype assault-squad-control (basic) ((door-index int16 :offset-assert 4) - (spawn-records basic :offset-assert 8) + (spawn-records (array proc-focusable-spawner) :offset-assert 8) (next-spawn-index int16 :offset-assert 12) (door-pos vector :inline :offset-assert 16) ) @@ -70958,20 +70912,20 @@ :size-assert #x20 :flag-assert #xe00000020 (:methods - (assault-squad-control-method-9 () none) ;; 9 - (assault-squad-control-method-10 () none) ;; 10 - (assault-squad-control-method-11 () none) ;; 11 - (assault-squad-control-method-12 () none) ;; 12 - (assault-squad-control-method-13 () none) ;; 13 + (init (_type_) none) ;; 9 + (assault-squad-control-method-10 (_type_ int) int) ;; 10 + (spawn-enemies (_type_ process) int) ;; 11 + (init-spawn-records (_type_) symbol) ;; 12 + (reset-enemies (_type_) none) ;; 13 ) ) -|# -;; (define-extern *port-assault-blur-curve* object) -;; (define-extern compute-player-ammo function) -;; (define-extern lctypalt-login function) -;; (define-extern lctypalt-logout function) -;; (define-extern skip-to-room function) +(define-extern *assault-squad* assault-squad-control) +(define-extern *port-assault-blur-curve* curve2d-piecewise) +(define-extern compute-player-ammo (function pickup-type float)) +(define-extern lctypalt-login (function level none)) +(define-extern lctypalt-logout (function level none)) +(define-extern skip-to-room (function uint none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-centipede-part ;; @@ -73975,56 +73929,80 @@ ;; protect-script ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++protect-script:gunship-command +(defenum gunship-command + :type uint8 + (spawn) + (wait) + (missiles) + (script-set-jump) + (script-jump) + (no-op) + (other) + ) +;; ---protect-script:gunship-command + +;; +++protect-script:gunship-cmd-spawn-type +(defenum gunship-cmd-spawn-type + :type uint16 + :copy-entries city-target-type + ) +;; ---protect-script:gunship-cmd-spawn-type + +;; +++protect-script:gunship-cmd-wait-type +(defenum gunship-cmd-wait-type + :type uint8 + (time) + (total) + ) +;; ---protect-script:gunship-cmd-wait-type + (deftype gunship-cmd (structure) - ((command uint8 :offset-assert 0) - (spawn-type uint16 :offset-assert 2) + ((command gunship-command :offset-assert 0) + (spawn-type gunship-cmd-spawn-type :offset-assert 2) (count int8 :offset-assert 4) - (wait-type uint8 :offset-assert 2) + (wait-type gunship-cmd-wait-type :offset 2) (difficulty float :offset-assert 8) - (wait-time uint64 :offset-assert 16) - (timeout-period uint64 :offset-assert 24) + (wait-time time-frame :offset-assert 16) + (timeout-period time-frame :offset-assert 24) ) + :pack-me :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype gunship-cmd-context (structure) - ((start-time uint64 :offset-assert 0) + ((start-time time-frame :offset-assert 0) (current-command gunship-cmd :inline :offset-assert 8) - (script basic :offset-assert 40) + (script pair :offset-assert 40) (script-jump-point basic :offset-assert 44) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -;; (define-extern parse-protect-command function) -;; (define-extern *gunship-0-script* object) +(define-extern parse-protect-command (function gunship-cmd-context object)) +(define-extern *gunship-0-script* pair) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; protect-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *protect-path* array) +(define-extern *protect-path* (array vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; protect-gunship ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fire-missile-state (structure) - ((missile-dest-positions UNKNOWN 16 :offset-assert 0) - (missile-handles UNKNOWN 16 :offset-assert 256) - (beacon-handles UNKNOWN 16 :offset-assert 384) - (last-fire-missile-time uint64 :offset-assert 512) - (last-probe-missile-time uint64 :offset-assert 520) - (launcher-rotate-time uint64 :offset-assert 528) + ((missile-dest-positions vector 16 :inline :offset-assert 0) + (missile-handles handle 16 :offset-assert 256) + (beacon-handles handle 16 :offset-assert 384) + (last-fire-missile-time time-frame :offset-assert 512) + (last-probe-missile-time time-frame :offset-assert 520) + (launcher-rotate-time time-frame :offset-assert 528) (num-missiles int8 :offset-assert 536) (missile-launch-index int8 :offset-assert 537) (missile-probe-index int8 :offset-assert 538) @@ -74037,56 +74015,49 @@ :size-assert #x228 :flag-assert #xa00000228 (:methods - (fire-missile-state-method-9 () none) ;; 9 + (init (_type_) none) ;; 9 ) ) -|# -#| (deftype gunship-info (structure) - ((proc uint64 :offset-assert 0) + ((proc handle :offset-assert 0) (want-target uint8 :offset-assert 8) - (cur-state basic :offset-assert 12) + (cur-state symbol :offset-assert 12) (difficulty float :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype gunship-movement-state (structure) - ((state-time uint64 :offset-assert 0) - (next-update-time uint64 :offset-assert 8) + ((state-time time-frame :offset-assert 0) + (next-update-time time-frame :offset-assert 8) (cur-mode uint8 :offset-assert 16) (dest-mode uint8 :offset-assert 17) (dest-pos vector :inline :offset-assert 32) - (completed? basic :offset-assert 48) + (completed? symbol :offset-assert 48) ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 ) -|# -#| (deftype gunship-spawn-info (structure) - ((counts UNKNOWN 17 :offset-assert 0) - (next-spawn-time uint64 :offset-assert 24) + ((counts int8 17 :offset-assert 0) + (next-spawn-time time-frame :offset-assert 24) ) + :pack-me :method-count-assert 10 :size-assert #x20 :flag-assert #xa00000020 (:methods - (gunship-spawn-info-method-9 () none) ;; 9 + (init (_type_) none) ;; 9 ) ) -|# -#| (deftype protect-gunship (process-focusable) - ((task-man uint64 :offset-assert 208) + ((task-man handle :offset-assert 208) (missile-info fire-missile-state :inline :offset-assert 224) (stage-index int8 :offset-assert 776) (num-stages int8 :offset-assert 777) @@ -74096,18 +74067,18 @@ (ground-pt vector :inline :offset-assert 800) (basetrans vector :inline :offset-assert 816) (move-state gunship-movement-state :inline :offset-assert 832) - (reaction-time uint64 :offset-assert 888) - (choose-new-point-time uint64 :offset-assert 896) + (reaction-time time-frame :offset-assert 888) + (choose-new-point-time time-frame :offset-assert 896) (chosen-point vector :inline :offset-assert 912) (last-repo-pos vector :inline :offset-assert 928) - (suppress-times UNKNOWN 8 :offset-assert 944) + (suppress-times time-frame 8 :offset-assert 944) (want uint8 :offset-assert 1008) (target uint8 :offset-assert 1009) (spawn-info gunship-spawn-info :inline :offset-assert 1016) - (next-fire-missile-time uint64 :offset-assert 1048) - (next-spin-laser-time uint64 :offset-assert 1056) - (next-spawn-time uint64 :offset-assert 1064) - (last-land-time uint64 :offset-assert 1072) + (next-fire-missile-time time-frame :offset-assert 1048) + (next-spin-laser-time time-frame :offset-assert 1056) + (next-spawn-time time-frame :offset-assert 1064) + (last-land-time time-frame :offset-assert 1072) (last-thrust-vec vector :inline :offset-assert 1088) (roll-quat quaternion :inline :offset-assert 1104) (difficulty float :offset-assert 1120) @@ -74115,18 +74086,18 @@ (land-start-hp float :offset-assert 1128) (jmod-turret-twist joint-mod-rotate-local :inline :offset-assert 1136) (jmod-turret-pitch joint-mod-rotate-local :inline :offset-assert 1168) - (jmod-doors UNKNOWN 4 :offset-assert 1200) + (jmod-doors joint-mod-rotate-local 4 :inline :offset-assert 1200) (open-doors uint8 :offset-assert 1328) (num-open-doors uint8 :offset-assert 1329) (last-door-index uint8 :offset-assert 1330) - (engines UNKNOWN 4 :offset-assert 1336) - (rotate-start-time uint64 :offset-assert 1368) - (rotate-total-time uint64 :offset-assert 1376) + (engines handle 4 :offset-assert 1336) + (rotate-start-time time-frame :offset-assert 1368) + (rotate-total-time time-frame :offset-assert 1376) (rotate-rate float :offset-assert 1384) (laser-rotate-speed float :offset-assert 1388) (current-laser-rotate-speed float :offset-assert 1392) (base-laser-dir vector :inline :offset-assert 1408) - (next-new-laser-rot-time uint64 :offset-assert 1424) + (next-new-laser-rot-time time-frame :offset-assert 1424) (laser-y float :offset-assert 1432) (jmod-laser-descend joint-mod-add-local :inline :offset-assert 1440) (num-hp-per-stage float :offset-assert 1504) @@ -74134,84 +74105,80 @@ (other-ship-index int8 :offset-assert 1509) (attacker-info city-attacker-info :offset-assert 1512) (difficulty-scalar float :offset-assert 1516) - (sound-engine-loop uint32 :offset-assert 1520) - (sound-lock-on uint32 :offset-assert 1524) - (sound-lock-on-hi uint32 :offset-assert 1528) + (sound-engine-loop sound-id :offset-assert 1520) + (sound-lock-on sound-id :offset-assert 1524) + (sound-lock-on-hi sound-id :offset-assert 1528) (alive-engines uint8 :offset-assert 1532) - (last-engine? basic :offset-assert 1536) + (last-engine? symbol :offset-assert 1536) (desired-thruster-length float :offset-assert 1540) (last-thrust vector :inline :offset-assert 1552) - (smoke-parts UNKNOWN 4 :offset-assert 1568) + (smoke-parts sparticle-launch-control 4 :offset-assert 1568) ) :method-count-assert 58 :size-assert #x630 :flag-assert #x3a05b00630 - (:methods - (protect-gunship-method-36 () none) ;; 36 - (protect-gunship-method-37 () none) ;; 37 - (protect-gunship-method-38 () none) ;; 38 - (protect-gunship-method-39 () none) ;; 39 - (protect-gunship-method-40 () none) ;; 40 - (protect-gunship-method-41 () none) ;; 41 - (protect-gunship-method-42 () none) ;; 42 - (protect-gunship-method-43 () none) ;; 43 - (protect-gunship-method-44 () none) ;; 44 - (protect-gunship-method-45 () none) ;; 45 - (protect-gunship-method-46 () none) ;; 46 - (protect-gunship-method-47 () none) ;; 47 - (protect-gunship-method-48 () none) ;; 48 - (protect-gunship-method-49 () none) ;; 49 - (protect-gunship-method-50 () none) ;; 50 - (protect-gunship-method-51 () none) ;; 51 - (protect-gunship-method-52 () none) ;; 52 - (protect-gunship-method-53 () none) ;; 53 - (protect-gunship-method-54 () none) ;; 54 - (protect-gunship-method-55 () none) ;; 55 - (protect-gunship-method-56 () none) ;; 56 - (protect-gunship-method-57 () none) ;; 57 - ) (:state-methods - lowering ;; 32 - raising ;; 31 - landed ;; 30 - hover ;; 29 - spinning-laser ;; 34 - enemy-spawning ;; 33 protect-gunship-base-state ;; 28 + hover ;; 29 + landed ;; 30 + raising ;; 31 + lowering ;; 32 + enemy-spawning ;; 33 + spinning-laser ;; 34 die ;; 35 ) + (:methods + (spawn-missile (_type_ vector vector vector float int) handle) ;; 36 + (protect-gunship-method-37 (_type_) int) ;; 37 + (protect-gunship-method-38 (_type_ int float) none) ;; 38 + (spawn-enemy (_type_ gunship-cmd-spawn-type) symbol) ;; 39 + (update-nav-mesh (_type_) none) ;; 40 + (gunship-post (_type_) none) ;; 41 + (probe-ground (_type_) none) ;; 42 + (protect-gunship-method-43 (_type_) none) ;; 43 + (gunship-init (_type_) object) ;; 44 + (gunship-handler (_type_ process int symbol event-message-block) object) ;; 45 + (protect-gunship-method-46 (_type_) symbol) ;; 46 + (protect-gunship-method-47 (_type_) none) ;; 47 + (protect-gunship-method-48 (_type_ vector) symbol) ;; 48 + (protect-gunship-method-49 (_type_) none) ;; 49 + (protect-gunship-method-50 (_type_) object) ;; 50 + (protect-gunship-method-51 (_type_) none) ;; 51 + (protect-gunship-method-52 (_type_) quaternion) ;; 52 + (open-doors (_type_) int) ;; 53 + (protect-gunship-method-54 (_type_) float) ;; 54 + (fire-laser (_type_ vector vector) object) ;; 55 + (protect-gunship-method-56 (_type_ float) float) ;; 56 + (protect-gunship-method-57 (_type_ int vector) vector) ;; 57 + ) ) -|# -#| (deftype gunship-engine (process-focusable) ((hit-points float :offset-assert 208) (child-index int16 :offset-assert 212) (last-attack-id uint32 :offset-assert 216) (attacker-info city-attacker-info :offset-assert 220) - (bolt basic :offset-assert 224) - (hit-recently? basic :offset-assert 228) - (last-hit-time uint64 :offset-assert 232) + (bolt lightning-bolt :offset-assert 224) + (hit-recently? symbol :offset-assert 228) + (last-hit-time time-frame :offset-assert 232) ) :method-count-assert 31 :size-assert #xf0 :flag-assert #x1f007000f0 - (:methods - (gunship-engine-method-30 () none) ;; 30 - ) (:state-methods idle ;; 28 explode ;; 29 ) + (:methods + (gunship-engine-method-30 (_type_) none) ;; 30 + ) ) -|# -#| (deftype protect-gunship-init-params (structure) ((pos vector :inline :offset-assert 0) (quat quaternion :inline :offset-assert 16) - (task-man uint64 :offset-assert 32) - (script basic :offset-assert 40) + (task-man handle :offset-assert 32) + (script pair :offset-assert 40) (num-stages int8 :offset-assert 44) (self-index int8 :offset-assert 45) (difficulty float :offset-assert 48) @@ -74221,22 +74188,18 @@ :size-assert #x38 :flag-assert #x900000038 ) -|# -#| (deftype protect-gunship-enemy-spawn-params (structure) ((pos vector :inline :offset-assert 0) (quat quaternion :inline :offset-assert 16) - (spawn-type uint16 :offset-assert 32) - (parent uint64 :offset-assert 40) + (spawn-type gunship-cmd-spawn-type :offset-assert 32) + (parent handle :offset-assert 40) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype gunship-exploder (process-drawable) () :method-count-assert 21 @@ -74246,35 +74209,31 @@ explode ;; 20 ) ) -|# -#| (deftype gunship-missile (process-focusable) ((dest-pos vector :inline :offset-assert 208) (launch-dir vector :inline :offset-assert 224) - (particle-trail basic :offset-assert 240) + (particle-trail sparticle-subsampler :offset-assert 240) (travel-speed float :offset-assert 244) (attack-time float :offset-assert 248) (attack-id uint32 :offset-assert 252) (index int16 :offset-assert 256) - (swoosh-sound uint32 :offset-assert 260) + (swoosh-sound sound-id :offset-assert 260) ) :method-count-assert 33 :size-assert #x108 :flag-assert #x2100900108 - (:methods - (gunship-missile-method-31 () none) ;; 31 - (gunship-missile-method-32 () none) ;; 32 - ) (:state-methods - explode ;; 30 - attack-targ ;; 29 launch ;; 28 + attack-targ ;; 29 + explode ;; 30 + ) + (:methods + (gunship-missile-method-31 (_type_) none) ;; 31 + (gunship-missile-method-32 (_type_) sound-id) ;; 32 ) ) -|# -#| (deftype gunship-missile-init-params (structure) ((pos vector :inline :offset-assert 0) (dest-pos vector :inline :offset-assert 16) @@ -74286,95 +74245,87 @@ :size-assert #x36 :flag-assert #x900000036 ) -|# -;; (define-extern *gunship-nav-mesh* object) -;; (define-extern *range-ffexplo-dust-color* curve-color-fast) -;; (define-extern *range-ffexplo-dust-alpha* curve2d-fast) -;; (define-extern *range-ffexplo-dust-scale-x* curve2d-fast) -;; (define-extern *range-ffexplo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-ffexplo-dust-alpha* curve2d-fast) -;; (define-extern *curve-ffexplo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-ffexplo-dust-scale-y* curve2d-fast) -;; (define-extern *part-grp-gunship-explosion-dust-in-curve-settings* object) -;; (define-extern *range-gunship-explo-color* curve-color-fast) -;; (define-extern *range-gunship-explo-alpha* curve2d-fast) -;; (define-extern *range-gunship-explo-scale-x* curve2d-fast) -;; (define-extern *range-gunship-explo-scale-y* curve2d-fast) -;; (define-extern *curve-gunship-explo-alpha* curve2d-fast) -;; (define-extern *curve-gunship-explo-scale-x* curve2d-fast) -;; (define-extern *curve-gunship-explo-scale-y* curve2d-fast) -;; (define-extern *part-grp-gunship-explosion-texture-curve-settings* object) -;; (define-extern *active-gunships* object) -;; (define-extern *gunship-door-joints* array) -;; (define-extern *gunship-engine-segs-undamaged* array) -;; (define-extern *gunship-engine-segs-damaged* array) -;; (define-extern *gunship-engine-lightning* object) -;; (define-extern gunship-engine-init-by-other function) -;; (define-extern find-nearest-nav-mesh-protect function) -;; (define-extern gunship-event-handler function) -;; (define-extern *gunship-shadow-control* shadow-control) -;; (define-extern protect-gunship-init-by-other function) -;; (define-extern gunship-exploder-init-by-other function) -;; (define-extern gunship-missile-init-by-other function) -;; (define-extern *rand-missile-sound-list* array) -;; (define-extern *missile-launch-locations* array) -;; (define-extern find-reposition-pt function) +(define-extern *gunship-nav-mesh* actor-id) +(define-extern *range-ffexplo-dust-color* curve-color-fast) +(define-extern *range-ffexplo-dust-alpha* curve2d-fast) +(define-extern *range-ffexplo-dust-scale-x* curve2d-fast) +(define-extern *range-ffexplo-dust-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-dust-alpha* curve2d-fast) +(define-extern *curve-ffexplo-dust-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-dust-scale-y* curve2d-fast) +(define-extern *part-grp-gunship-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-gunship-explo-color* curve-color-fast) +(define-extern *range-gunship-explo-alpha* curve2d-fast) +(define-extern *range-gunship-explo-scale-x* curve2d-fast) +(define-extern *range-gunship-explo-scale-y* curve2d-fast) +(define-extern *curve-gunship-explo-alpha* curve2d-fast) +(define-extern *curve-gunship-explo-scale-x* curve2d-fast) +(define-extern *curve-gunship-explo-scale-y* curve2d-fast) +(define-extern *part-grp-gunship-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *active-gunships* (inline-array gunship-info)) +(define-extern *gunship-door-joints* (array int32)) +(define-extern *gunship-engine-segs-undamaged* (array uint64)) +(define-extern *gunship-engine-segs-damaged* (array uint64)) +(define-extern *gunship-engine-lightning* lightning-appearance) +(define-extern gunship-engine-init-by-other (function int float object :behavior gunship-engine)) +(define-extern find-nearest-nav-mesh-protect (function vector float nav-mesh)) +(def-event-handler gunship-event-handler protect-gunship) +(define-extern *gunship-shadow-control* shadow-control) +(define-extern protect-gunship-init-by-other (function protect-gunship-init-params object :behavior protect-gunship)) +(define-extern gunship-exploder-init-by-other (function vector quaternion object :behavior gunship-exploder)) +(define-extern gunship-missile-init-by-other (function gunship-missile-init-params object :behavior gunship-missile)) +(define-extern *rand-missile-sound-list* (array string)) +(define-extern *missile-launch-locations* (array int16)) +(define-extern find-reposition-pt (function vector vector vector int int float float vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cty-protect ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-protect-hq (task-manager) - ((gunships UNKNOWN 2 :offset-assert 240) - (spawn-records basic :offset-assert 256) + ((gunships handle 2 :offset-assert 240) + (spawn-records (array proc-focusable-spawner) :offset-assert 256) (spawn-index int8 :offset-assert 260) (death-count int8 :offset-assert 261) ) :method-count-assert 38 :size-assert #x106 :flag-assert #x2600900106 - (:methods - (task-manager-protect-hq-method-35 () none) ;; 35 - (task-manager-protect-hq-method-36 () none) ;; 36 - (task-manager-protect-hq-method-37 () none) ;; 37 - ) (:state-methods - fail ;; 18 + fight-gunship ;; 32 fight-gunship-2 ;; 33 wait-finish ;; 34 - fight-gunship ;; 32 - active ;; 15 - wait ;; 14 + ) + (:methods + (gunship-spawn (_type_ protect-gunship-enemy-spawn-params) object) ;; 35 + (spawn-gunship (_type_ vector int float) handle) ;; 36 + (get-spawn-pos-for-ship (_type_ vector vector symbol) vector) ;; 37 ) ) -|# -#| (deftype prot-crate (process-drawable) - ((h-crate uint64 :offset-assert 208) - (dummy-ent basic :offset-assert 216) + ((h-crate handle :offset 208) + (dummy-ent entity-actor :offset-assert 216) ) :method-count-assert 22 :size-assert #xdc :flag-assert #x16006000dc - (:methods - (prot-crate-method-21 () none) ;; 21 - ) (:state-methods active ;; 20 ) + (:methods + (spawn-crate (_type_) handle) ;; 21 + ) ) -|# -;; (define-extern *protect-object-count* array) -;; (define-extern protect-type->type function) -;; (define-extern *protect-levels* array) -;; (define-extern spawn-protect-enemy function) -;; (define-extern *gunship-start-positions* array) -;; (define-extern *fountain-center-pos* object) -;; (define-extern get-protect-suck-t function) +(define-extern *protect-object-count* (array int32)) +(define-extern protect-type->type (function gunship-cmd-spawn-type type)) +(define-extern *protect-levels* (array symbol)) +(define-extern spawn-protect-enemy (function int process handle)) +(define-extern *gunship-start-positions* (array vector)) +(define-extern *fountain-center-pos* vector) +(define-extern get-protect-suck-t (function float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-hover ;; diff --git a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc index c6f29d9617..c6ad452490 100644 --- a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc @@ -978,5 +978,27 @@ [27, "(function process symbol)"], [46, "(function collide-shape-prim none)"], [69, "(function process object)"] + ], + "assault-enemies": [ + [36, "(function assault-crimson-guard city-attacker-info int)"] + ], + "assault-task": [[11, "(function symbol :behavior process)"]], + "precura-obs": [[98, "(function symbol :behavior process)"]], + "precurd-scenes": [ + [0, "(function none :behavior scene-player)"], + [1, "(function none :behavior scene-player)"], + [2, "(function none :behavior scene-player)"], + [3, "(function none :behavior scene-player)"], + [4, "(function none :behavior scene-player)"], + [5, "(function none :behavior scene-player)"], + [6, "(function none :behavior scene-player)"], + [7, "(function none :behavior scene-player)"], + [8, "(function none :behavior scene-player)"], + [9, "(function none :behavior scene-player)"], + [10, "(function none :behavior scene-player)"], + [11, "(function none :behavior scene-player)"], + [12, "(function none :behavior scene-player)"], + [13, "(function none :behavior scene-player)"], + [14, "(function none :behavior scene-player)"] ] } diff --git a/decompiler/config/jak3/ntsc_v1/art_info.jsonc b/decompiler/config/jak3/ntsc_v1/art_info.jsonc index c173350b4a..2df7443278 100644 --- a/decompiler/config/jak3/ntsc_v1/art_info.jsonc +++ b/decompiler/config/jak3/ntsc_v1/art_info.jsonc @@ -35,7 +35,11 @@ "power-game-chaser": "flitter-ag", "power-game-zapper": "grunt-head-ag", "gungame-door": "fort-entry-gate-ag", - "bt-mh-flyer": "bt-wasp-ag" + "bt-mh-flyer": "bt-wasp-ag", + "gunship-exploder": "kg-robot-transport-break", + "gunship-engine": "kg-robot-transport-bomb", + "protect-gunship": "kg-robot-transport", + "gunship-missile": "cty-homing-missile" }, // remap names for types in an entire file (higher priority) diff --git a/decompiler/config/jak3/ntsc_v1/hacks.jsonc b/decompiler/config/jak3/ntsc_v1/hacks.jsonc index 4dd6543a16..1a37dbec94 100644 --- a/decompiler/config/jak3/ntsc_v1/hacks.jsonc +++ b/decompiler/config/jak3/ntsc_v1/hacks.jsonc @@ -581,7 +581,8 @@ [346, 0], [378, 0], [413, 0] - ] + ], + "(trans carry precur-bomb)": [[60, 0]] }, "mips2c_functions_by_name": [ @@ -711,7 +712,6 @@ "(method 21 cloth-system)", "debug-line-clip?", "(method 9 font-work)", - "(method 9 prim-strip)", "live-func-curve", "birth-func-curve", "sparticle-motion-blur-dirt", diff --git a/decompiler/config/jak3/ntsc_v1/inputs.jsonc b/decompiler/config/jak3/ntsc_v1/inputs.jsonc index c790c82ff3..724ca576be 100644 --- a/decompiler/config/jak3/ntsc_v1/inputs.jsonc +++ b/decompiler/config/jak3/ntsc_v1/inputs.jsonc @@ -182,7 +182,7 @@ "DGO/RAILE.DGO", "DGO/RAILF.DGO", "DGO/RAILX.DGO", - // // precursor + // precursor "DGO/PRECA.DGO", "DGO/PRECB.DGO", "DGO/PRECC.DGO", diff --git a/decompiler/config/jak3/ntsc_v1/label_types.jsonc b/decompiler/config/jak3/ntsc_v1/label_types.jsonc index 61f4e35f0c..db383fcf1b 100644 --- a/decompiler/config/jak3/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/label_types.jsonc @@ -2132,5 +2132,333 @@ ["L1047", "uint64", true], ["L1056", "uint64", true], ["L1044", "uint64", true] + ], + "protect-gunship": [ + ["L786", "uint64", true], + ["L783", "uint64", true], + ["L780", "uint64", true], + ["L784", "uint64", true], + ["L779", "uint64", true], + ["L778", "uint64", true], + ["L785", "uint64", true], + ["L782", "uint64", true], + ["L776", "uint64", true], + ["L781", "uint64", true], + ["L777", "uint64", true], + ["L604", "uint64", true], + ["L599", "uint64", true], + ["L510", "(inline-array gunship-info)", 2], + ["L608", "uint64", true], + ["L603", "uint64", true], + ["L614", "uint64", true], + ["L464", "attack-info"], + ["L463", "attack-info"], + ["L612", "uint64", true], + ["L615", "uint64", true], + ["L601", "uint64", true], + ["L598", "uint64", true], + ["L602", "uint64", true], + ["L610", "uint64", true], + ["L606", "uint64", true], + ["L611", "uint64", true], + ["L600", "uint64", true], + ["L609", "uint64", true], + ["L607", "uint64", true], + ["L613", "uint64", true], + ["L605", "uint64", true], + ["L456", "attack-info"] + ], + "cty-protect": [["L142", "attack-info"]], + "assault-shared": [["L1", "(inline-array talker-speech-class)", 22]], + "assault-path": [ + ["L34", "assault-room"], + ["L33", "assault-room-collision"], + ["L29", "assault-room"], + ["L28", "assault-room-collision"], + ["L23", "assault-room"], + ["L22", "assault-room-collision"], + ["L17", "assault-room"], + ["L16", "assault-room-collision"], + ["L11", "assault-room"], + ["L10", "assault-room-collision"] + ], + "assault-enemies": [ + ["L333", "attack-info"], + ["L332", "attack-info"] + ], + "precurd-obs": [ + ["L610", "uint64", true], + ["L612", "uint64", true], + ["L613", "uint64", true], + ["L611", "uint64", true], + ["L544", "uint64", true], + ["L543", "uint64", true], + ["L547", "uint64", true], + ["L542", "uint64", true], + ["L541", "uint64", true], + ["L548", "uint64", true], + ["L356", "attack-info"], + ["L549", "uint64", true], + ["L550", "uint64", true], + ["L545", "uint64", true], + ["L546", "uint64", true] + ], + "precura-obs": [ + ["L734", "uint64", true], + ["L728", "uint64", true], + ["L729", "uint64", true], + ["L732", "uint64", true], + ["L731", "uint64", true], + ["L730", "uint64", true], + ["L725", "uint64", true], + ["L735", "uint64", true], + ["L726", "uint64", true], + ["L727", "uint64", true], + ["L733", "uint64", true], + ["L608", "uint64", true], + ["L620", "uint64", true], + ["L618", "uint64", true], + ["L617", "uint64", true], + ["L623", "uint64", true], + ["L610", "uint64", true], + ["L605", "uint64", true], + ["L611", "uint64", true], + ["L621", "uint64", true], + ["L614", "uint64", true], + ["L613", "uint64", true], + ["L606", "uint64", true], + ["L619", "uint64", true], + ["L607", "uint64", true], + ["L577", "attack-info"], + ["L576", "attack-info"], + ["L622", "uint64", true], + ["L432", "vector"], + ["L431", "vector"], + ["L430", "vector"], + ["L609", "uint64", true], + ["L612", "uint64", true], + ["L615", "uint64", true], + ["L616", "uint64", true] + ], + "precura-obs2": [ + ["L499", "uint64", true], + ["L489", "uint64", true], + ["L603", "uint64", true], + ["L602", "uint64", true], + ["L597", "uint64", true], + ["L596", "uint64", true], + ["L598", "uint64", true], + ["L601", "uint64", true], + ["L595", "uint64", true], + ["L600", "uint64", true], + ["L599", "uint64", true], + ["L484", "uint64", true], + ["L488", "uint64", true], + ["L491", "uint64", true], + ["L496", "uint64", true], + ["L494", "uint64", true], + ["L498", "uint64", true], + ["L394", "attack-info"], + ["L495", "uint64", true], + ["L493", "uint64", true], + ["L492", "uint64", true], + ["L486", "uint64", true], + ["L497", "uint64", true], + ["L487", "uint64", true], + ["L485", "uint64", true], + ["L490", "uint64", true], + ["L446", "vector"], + ["L416", "attack-info"], + ["L415", "attack-info"] + ], + "neon-baron-part": [ + ["L592", "uint64", true], + ["L579", "(pointer uint64)", 1], + ["L83", "(pointer uint32)", 40], + ["L384", "vector4w"], + ["L385", "vector4w"], + ["L386", "vector4w"], + ["L387", "vector4w"], + ["L388", "vector4w"], + ["L389", "vector4w"], + ["L390", "vector4w"], + ["L391", "vector4w"], + ["L392", "vector4w"], + ["L393", "vector4w"], + ["L394", "vector4w"], + ["L395", "vector4w"], + ["L396", "vector4w"], + ["L397", "vector4w"], + ["L398", "vector4w"], + ["L399", "vector4w"], + ["L400", "vector4w"], + ["L401", "vector4w"], + ["L402", "vector4w"], + ["L403", "vector4w"], + ["L404", "vector4w"], + ["L405", "vector4w"], + ["L406", "vector4w"], + ["L407", "vector4w"], + ["L408", "vector4w"], + ["L409", "vector4w"], + ["L410", "vector4w"], + ["L411", "vector4w"], + ["L412", "vector4w"], + ["L413", "vector4w"], + ["L414", "vector4w"], + ["L415", "vector4w"], + ["L416", "vector4w"], + ["L417", "vector4w"], + ["L418", "vector4w"], + ["L419", "vector4w"], + ["L420", "vector4w"], + ["L421", "vector4w"], + ["L422", "vector4w"], + ["L423", "vector4w"], + ["L424", "vector4w"], + ["L425", "vector4w"], + ["L426", "vector4w"], + ["L427", "vector4w"], + ["L428", "vector4w"], + ["L429", "vector4w"], + ["L430", "vector4w"], + ["L431", "vector4w"], + ["L432", "vector4w"], + ["L433", "vector4w"], + ["L434", "vector4w"], + ["L435", "vector4w"], + ["L436", "vector4w"], + ["L437", "vector4w"], + ["L438", "vector4w"], + ["L439", "vector4w"], + ["L440", "vector4w"], + ["L441", "vector4w"], + ["L442", "vector4w"], + ["L443", "vector4w"], + ["L444", "vector4w"], + ["L445", "vector4w"], + ["L446", "vector4w"], + ["L447", "vector4w"], + ["L448", "vector4w"], + ["L449", "vector4w"], + ["L450", "vector4w"], + ["L451", "vector4w"], + ["L452", "vector4w"], + ["L453", "vector4w"], + ["L454", "vector4w"], + ["L455", "vector4w"], + ["L456", "vector4w"], + ["L457", "vector4w"], + ["L458", "vector4w"], + ["L459", "vector4w"], + ["L460", "vector4w"], + ["L461", "vector4w"], + ["L462", "vector4w"], + ["L463", "vector4w"], + ["L464", "vector4w"], + ["L465", "vector4w"], + ["L466", "vector4w"], + ["L467", "vector4w"], + ["L468", "vector4w"], + ["L469", "vector4w"], + ["L470", "vector4w"], + ["L471", "vector4w"], + ["L472", "vector4w"], + ["L473", "vector4w"], + ["L474", "vector4w"], + ["L475", "vector4w"], + ["L476", "vector4w"], + ["L477", "vector4w"], + ["L478", "vector4w"], + ["L479", "vector4w"], + ["L480", "vector4w"], + ["L481", "vector4w"], + ["L482", "vector4w"], + ["L483", "vector4w"], + ["L484", "vector4w"], + ["L485", "vector4w"], + ["L486", "vector4w"], + ["L487", "vector4w"], + ["L488", "vector4w"], + ["L489", "vector4w"], + ["L490", "vector4w"], + ["L491", "vector4w"], + ["L492", "vector4w"], + ["L493", "vector4w"], + ["L494", "vector4w"], + ["L495", "vector4w"], + ["L496", "vector4w"], + ["L497", "vector4w"], + ["L498", "vector4w"], + ["L499", "vector4w"], + ["L500", "vector4w"], + ["L501", "vector4w"], + ["L502", "vector4w"], + ["L503", "vector4w"], + ["L505", "vector4w"], + ["L507", "vector4w"], + ["L509", "vector4w"], + ["L511", "vector4w"], + ["L513", "vector4w"], + ["L514", "vector4w"], + ["L515", "vector4w"], + ["L516", "vector4w"], + ["L517", "vector4w"], + ["L518", "vector4w"], + ["L519", "vector4w"], + ["L520", "vector4w"], + ["L521", "vector4w"], + ["L522", "vector4w"], + ["L523", "vector4w"], + ["L524", "vector4w"], + ["L526", "vector4w"], + ["L527", "vector4w"], + ["L528", "vector4w"], + ["L529", "vector4w"], + ["L530", "vector4w"], + ["L531", "vector4w"], + ["L532", "vector4w"], + ["L533", "vector4w"], + ["L534", "vector4w"], + ["L535", "vector4w"], + ["L536", "vector4w"], + ["L537", "vector4w"], + ["L538", "vector4w"], + ["L539", "vector4w"], + ["L540", "vector4w"], + ["L541", "vector4w"], + ["L542", "vector4w"], + ["L543", "vector4w"], + ["L544", "vector4w"], + ["L545", "vector4w"], + ["L546", "vector4w"], + ["L547", "vector4w"], + ["L548", "vector4w"], + ["L549", "vector4w"], + ["L550", "vector4w"], + ["L551", "vector4w"], + ["L552", "vector4w"], + ["L554", "vector4w"], + ["L556", "vector4w"], + ["L558", "vector4w"], + ["L559", "vector4w"], + ["L560", "vector4w"], + ["L561", "vector4w"], + ["L562", "vector4w"], + ["L563", "vector4w"], + ["L564", "vector4w"], + ["L565", "vector4w"], + ["L566", "vector4w"], + ["L567", "vector4w"], + ["L568", "vector4w"], + ["L569", "vector4w"], + ["L570", "vector4w"], + ["L571", "vector4w"], + ["L572", "vector4w"], + ["L573", "vector4w"], + ["L574", "vector4w"], + ["L575", "vector4w"], + ["L576", "vector4w"], + ["L577", "vector4w"] ] } diff --git a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc index 6a8fa9d473..87c44469e2 100644 --- a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc @@ -2438,5 +2438,74 @@ [320, "collide-query"], [160, "vector"] ], - "draw-path-blow-curve": [[16, "matrix"]] + "draw-path-blow-curve": [[16, "matrix"]], + "(method 22 trail-graph)": [[16, "trail-vis-work"]], + "(method 13 trail-graph)": [[16, ["inline-array", "vector", 3]]], + "(method 16 trail-graph)": [[16, ["inline-array", "vector", 2]]], + "(method 17 trail-graph)": [[16, "trail-conn-search"]], + "(trans explode gunship-missile)": [[32, ["array", "collide-shape", 384]]], + "(trans spinning-laser protect-gunship)": [ + [32, "vector"], + [64, "vector"] + ], + "find-reposition-pt": [ + [16, "vector"], + [96, "vector"], + [112, "vector"] + ], + "(method 50 protect-gunship)": [[16, "vector"]], + "find-nearest-nav-mesh-protect": [[16, "nav-poly"]], + "(method 37 protect-gunship)": [[752, "vector"]], + "(method 36 protect-gunship)": [[16, "gunship-missile-init-params"]], + "(method 39 protect-gunship)": [[16, "protect-gunship-enemy-spawn-params"]], + "(method 55 protect-gunship)": [[16, "collide-query"]], + "(method 21 prot-crate)": [[16, "vector"]], + "(method 36 task-manager-protect-hq)": [[16, "protect-gunship-init-params"]], + "spawn-protect-enemy": [[16, "traffic-object-spawn-params"]], + "(method 35 task-manager-protect-hq)": [[16, "traffic-object-spawn-params"]], + "(trans hostile assault-bombbot)": [[32, "vector"]], + "(enter explode assault-bombbot)": [[112, ["array", "collide-shape", 384]]], + "(code roll-initial assault-roboguard)": [[16, "vector"]], + "(method 31 assault-bombbot-shot)": [ + [16, "light-trail-tracker-spawn-params"] + ], + "(code active task-manager-city-port-assault)": [ + [16, "player-controller-init-params"] + ], + "(method 40 task-manager-city-port-assault)": [[16, ["array", "symbol", 10]]], + "(enter combat task-manager-city-port-assault)": [ + [16, "player-controller-init-params"] + ], + "(code player-entrance task-manager-city-port-assault)": [ + [16, "player-controller-init-params"] + ], + "(enter transition task-manager-city-port-assault)": [ + [16, "player-controller-init-params"] + ], + "(method 47 task-manager-city-port-assault)": [[64, "vector"]], + "(method 48 task-manager-city-port-assault)": [[64, "vector"]], + "(method 41 task-manager-city-port-assault)": [[48, "vector"]], + "(trans idle precur-generator)": [[112, "vector"]], + "(method 23 precur-generator-d)": [[16, "vector"]], + "(event idle precur-door-d)": [[16, "attack-info"]], + "(method 23 precur-door-c)": [[112, "vector"]], + "(method 11 precur-path)": [[16, "vector"]], + "precur-bomb-handler": [[16, "attack-info"]], + "(event idle precur-bomb-spawner)": [[16, "attack-info"]], + "(method 21 precur-bomb-spawner)": [[16, "vector"]], + "precur-bomb-init-by-other": [[16, "vector"]], + "(method 25 precur-laser-beam)": [[16, "collide-query"]], + "(method 24 precur-laser-beam)": [[16, "collide-query"]], + "process-drawable-shock-wave-effect": [ + [16, "matrix"], + [80, "collide-query"] + ], + "(method 22 precur-path)": [[16, "collide-query"]], + "precur-bridge-path-2nd-trigger": [[16, "vector"]], + "precur-bridge-blocks-trigger": [[16, "vector"]], + "precur-bridge-path-trigger": [[16, "vector"]], + "(post idle precur-bridge-blocks-break)": [ + [16, "vector"], + [32, "vector"] + ] } diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index d50a5dccf5..d7d583a6e5 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -2671,7 +2671,12 @@ [224, "t0", "int"], [226, "t1", "int"], [226, "a3", "int"], - [[190, 231], "a1", "(inline-array prim-vertex)"] + [[190, 231], "a1", "(inline-array prim-vertex)"], + [[148, 164], "a1", "(inline-array prim-vertex)"], + [[192, 230], "a2", "(inline-array prim-vertex)"], + [147, "a1", "(pointer uint128)"], + [[278, 281], "v1", "dma-packet"], + [230, "a2", "(pointer uint128)"] ], "prim-engine-execute": [ [[15, 21], "v1", "connection"], @@ -10846,7 +10851,6 @@ ["_stack_", 76, "float"], ["_stack_", 100, "float"] ], - "real-wang-texture-anim-func": [[[3, 31], "v1", "mood-context"]], "(method 24 sky-work)": [ [256, "s4", "(pointer int32)"], [261, "s4", "(pointer int32)"] @@ -10869,5 +10873,234 @@ [65, "v1", "(pointer uint128)"], [[70, 77], "a0", "vector4w"], [[78, 84], "v1", "vector4w"] - ] + ], + "(method 10 trail-graph)": [[16, "v1", "trail-conn-hash-cell"]], + "(method 24 trail-graph)": [[19, "a1", "trail-conn-hash-cell"]], + "(method 28 trail-graph)": [[36, "a1", "int"]], + "(method 30 trail-graph)": [[67, "a2", "int"]], + "(event idle gunship-engine)": [[[4, 19], "v1", "attack-info"]], + "(post hover protect-gunship)": [[5, "t9", "(function none)"]], + "(enter landed protect-gunship)": [[10, "t9", "(function none)"]], + "(enter raising protect-gunship)": [[29, "t9", "(function none)"]], + "(enter lowering protect-gunship)": [[23, "t9", "(function none)"]], + "(post lowering protect-gunship)": [[10, "t9", "(function none)"]], + "(enter enemy-spawning protect-gunship)": [[5, "t9", "(function none)"]], + "(code explode gunship-exploder)": [[10, "v1", "art-joint-anim"]], + "(post enemy-spawning protect-gunship)": [[5, "t9", "(function none)"]], + "(event launch gunship-missile)": [[5, "a0", "vector"]], + "(trans explode gunship-missile)": [ + [75, "s3", "process-focusable"], + [79, "s3", "process-focusable"], + [85, "s3", "process-focusable"] + ], + "(method 44 protect-gunship)": [ + [[228, 239], "s3", "particle-local-space-info"] + ], + "(enter hover protect-gunship)": [[6, "t9", "(function none)"]], + "(post spinning-laser protect-gunship)": [[5, "t9", "(function none)"]], + "(trans spinning-laser protect-gunship)": [[113, "v1", "float"]], + "(enter spinning-laser protect-gunship)": [[8, "t9", "(function none)"]], + "find-reposition-pt": [ + [[35, 40], "v1", "protect-gunship"], + [[113, 119], "v1", "protect-gunship"], + ["_stack_", 44, "float"], + ["_stack_", 56, "float"], + ["_stack_", 76, "float"], + ["_stack_", 80, "float"] + ], + "(method 53 protect-gunship)": [ + [52, "v1", "float"], + [67, "v1", "float"], + [83, "v1", "float"], + [34, "v0", "int"] + ], + "(method 50 protect-gunship)": [[126, "v1", "float"]], + "(method 49 protect-gunship)": [[19, "v1", "float"]], + "(method 52 protect-gunship)": [[[104, 111], "a0", "protect-gunship"]], + "(method 41 protect-gunship)": [ + [[395, 398], "v1", "gunship-engine"], + [467, "v1", "float"] + ], + "(method 37 protect-gunship)": [ + [358, "v1", "float"], + [378, "v1", "float"] + ], + "(method 38 protect-gunship)": [[20, "v1", "float"]], + "gunship-missile-init-by-other": [[136, "v1", "float"]], + "(method 55 protect-gunship)": [[127, "v1", "collide-shape-prim-sphere"]], + "(method 21 prot-crate)": [ + [72, "v1", "float"], + [97, "v1", "float"] + ], + "(method 45 protect-gunship)": [[7, "a1", "int"]], + "(enter fail task-manager-protect-hq)": [ + [26, "v0", "(state resetter-params task-manager-protect-hq)"] + ], + "(trans hostile assault-bombbot)": [[[76, 125], "v1", "process-focusable"]], + "(method 209 assault-bombbot)": [[48, "v1", "process-focusable"]], + "(code wait-for-enemies assault-crimson-guard)": [ + [22, "v1", "art-joint-anim"] + ], + "(trans wait-for-enemies assault-crimson-guard)": [ + [[15, 23], "a0", "process-focusable"] + ], + "(trans active assault-crimson-guard)": [ + [[27, 35], "a0", "process-focusable"] + ], + "(anon-function 36 assault-enemies)": [[[17, 26], "s4", "process-focusable"]], + "(method 212 assault-crimson-guard)": [[4, "a0", "vector"]], + "(code tracking assault-cleanup)": [[[28, 43], "v1", "process-focusable"]], + "(code cower-ground assault-citizen-norm)": [ + [22, "v1", "art-joint-anim"], + [161, "v1", "art-joint-anim"], + [180, "v1", "float"], + [225, "v1", "float"] + ], + "(trans flee-madly assault-citizen-norm)": [ + [41, "v1", "float"], + [68, "v1", "float"] + ], + "(code exit-transport assault-metalhead-flitter)": [ + [14, "v1", "art-joint-anim"] + ], + "(code exit-transport assault-metalhead-grunt)": [ + [14, "v1", "art-joint-anim"] + ], + "(method 212 assault-citizen-norm)": [[28, "a0", "vector"]], + "(method 212 assault-roboguard)": [[16, "a1", "vector"]], + "(method 46 task-manager-city-port-assault)": [[17, "v1", "float"]], + "(method 45 task-manager-city-port-assault)": [[15, "v1", "float"]], + "(enter combat task-manager-city-port-assault)": [ + [[33, 39], "a0", "assault-player-controller"] + ], + "(method 47 task-manager-city-port-assault)": [[31, "v1", "float"]], + "(method 48 task-manager-city-port-assault)": [ + [32, "v1", "float"], + [191, "v1", "float"] + ], + "(method 40 task-manager-city-port-assault)": [ + [[168, 174], "v1", "assault-player-controller"] + ], + "(method 42 task-manager-city-port-assault)": [ + [33, "v1", "float"], + [83, "v1", "float"] + ], + "(method 43 task-manager-city-port-assault)": [ + [[17, 69], "s4", "assault-spawn-cmd"] + ], + "(method 24 prim-beam-tracker)": [ + [[10, 19], "v1", "process-drawable"], + [[31, 40], "v1", "process-drawable"] + ], + "(method 24 prim-beam)": [ + [100, "v1", "prim-vertex"], + [[112, 114], "v1", "prim-vertex"], + [99, "v1", "prim-vertex"] + ], + "(code going-down precur-switch)": [[10, "v1", "art-joint-anim"]], + "(event idle precur-generator-d-gem)": [ + [6, "a0", "vector"], + [10, "v1", "vector"] + ], + "(code idle precur-generator-d)": [[10, "v1", "art-joint-anim"]], + "(trans idle precur-generator)": [[181, "v1", "float"]], + "(method 23 precur-generator-d)": [ + [61, "a3", "float"], + [28, "a3", "float"], + [94, "a3", "float"] + ], + "(method 11 precur-platform-round)": [ + [[169, 180], "s3", "particle-local-space-info"] + ], + "(event idle precur-door-d)": [ + [[5, 34], "s4", "attack-info"], + [[19, 38], "s3", "attack-info"] + ], + "precur-door-c-handler": [[[3, 5], "v1", "attack-info"]], + "set-precura-generator-light!": [[10, "v1", "precura-states"]], + "update-mood-precura": [[[74, 113], "gp", "precura-states"]], + "set-precura-laser-light!": [ + [[13, 17], "v1", "precura-states"], + [23, "v1", "precura-states"], + [22, "v1", "precura-states"] + ], + "set-precura-bomb-light!": [[[11, 14], "v1", "precura-states"]], + "(post carry precur-bomb)": [[4, "t9", "(function none)"]], + "(post fall precur-bomb)": [[4, "t9", "(function none)"]], + "(enter explode precur-bomb)": [[51, "a0", "process"]], + "(code idle precur-bomb-spawner)": [ + [53, "v1", "art-joint-anim"], + [111, "v1", "art-joint-anim"] + ], + "(method 11 precur-path)": [ + [[141, 145], "a0", "precur-spot-shadow-effect"], + [[130, 141], "v1", "(pointer precur-spot-shadow-effect)"] + ], + "precur-bomb-handler": [ + [[5, 34], "s4", "attack-info"], + [[19, 38], "s3", "attack-info"] + ], + "(enter fall mechblock)": [ + [42, "v0", "carry-info"], + [[43, 47], "a0", "carry-info"] + ], + "(event drag-object mechblock)": [ + [48, "v0", "carry-info"], + [[49, 53], "a0", "carry-info"], + [57, "a0", "vector"], + [79, "a0", "vector"] + ], + "(event carry mechblock)": [[23, "a0", "vector"]], + "(event idle mechblock)": [ + [[20, 27], "a0", "carry-info"], + [[34, 39], "a0", "carry-info"] + ], + "(event idle precur-bomb-spawner)": [ + [[10, 39], "s4", "attack-info"], + [[24, 43], "s3", "attack-info"] + ], + "(enter idle precur-bomb-spawner)": [[15, "v1", "art-joint-anim"]], + "(method 25 precur-laser-beam)": [[5, "v1", "float"]], + "(method 24 precur-laser-beam)": [[6, "v1", "float"]], + "process-drawable-shock-wave-effect": [ + ["_stack_", 624, "(pointer lightning-tracker)"] + ], + "(method 23 precur-path)": [[[35, 58], "a0", "precur-spot-shadow-effect"]], + "init-mood-precurc": [[[3, 10], "v1", "precurc-states"]], + "(post idle precur-bridge-blocks-break)": [ + [53, "gp", "collide-shape-prim-group"], + [61, "gp", "collide-shape-prim-group"] + ], + "(code dormant precur-laser-beam)": [["_stack_", 16, "res-tag"]], + "(method 11 precur-generator-c)": [["_stack_", 16, "res-tag"]], + "(method 11 precur-generator-d)": [["_stack_", 16, "res-tag"]], + "(method 11 precur-bridge-path-break)": [["_stack_", 16, "res-tag"]], + "(method 11 precura-door-a)": [ + [141, "v0", "pair"], + [129, "v0", "pair"] + ], + "(trans idle precur-generator-d)": [ + [33, "v1", "object"], + [[33, 66], "v1", "object"] + ], + "(method 21 lfaccity-pparticle-mover)": [ + [[32, 39], "a1", "process-drawable"] + ], + "update-mood-lfaccity": [[[32, 200], "gp", "lfaccity-states"]], + "(method 11 lfaccity-pparticle-mover)": [["_stack_", 16, "res-tag"]], + "(code idle neon-baron)": [ + [248, "a0", "(array object)"], + [250, "a0", "(array object)"], + [282, "a0", "(array object)"], + [284, "a0", "(array object)"], + [316, "a0", "(array object)"], + [318, "a0", "(array object)"], + [350, "a0", "(array object)"], + [352, "a0", "(array object)"], + [384, "a0", "(array object)"], + [386, "a0", "(array object)"] + ], + "(method 10 neon-baron)": [[11, "s5", "uint"]], + "(method 15 neon-baron)": [[29, "s5", "int"]], + "(method 16 neon-baron)": [[5, "a1", "int"]] } diff --git a/decompiler/config/jak3/ntsc_v1/var_names.jsonc b/decompiler/config/jak3/ntsc_v1/var_names.jsonc index b2ef77423b..8c6dd5250e 100644 --- a/decompiler/config/jak3/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak3/ntsc_v1/var_names.jsonc @@ -2115,5 +2115,25 @@ "f0-0": "total-time", "v1-0": "curr-frame" } + }, + "symbol->gun-pickup-type": { + "vars": { + "v0-0": ["type", "pickup-type"] + } + }, + "symbol->faction-type": { + "vars": { + "v0-0": ["type", "assault-cmd-faction-type"] + } + }, + "symbol->speech-type": { + "vars": { + "v0-0": ["type", "assault-cmd-speech-type"] + } + }, + "symbol->assault-target-type": { + "vars": { + "v0-0": ["type", "assault-target-type"] + } } } diff --git a/decompiler/level_extractor/extract_level.cpp b/decompiler/level_extractor/extract_level.cpp index 1201538f19..38564ec68d 100644 --- a/decompiler/level_extractor/extract_level.cpp +++ b/decompiler/level_extractor/extract_level.cpp @@ -201,7 +201,7 @@ level_tools::BspHeader extract_bsp_from_level(const ObjectFileDB& db, expected_missing_textures = it->second; } bool atest_disable_flag = false; - if (db.version() == GameVersion::Jak2) { + if (db.version() >= GameVersion::Jak2) { if (bsp_header.texture_flags[0] & 1) { atest_disable_flag = true; } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index 537e6ee1d7..45c9d58e5d 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -1044,9 +1044,29 @@ const std::unordered_map< {"anim2", ArrayFieldDecompMeta(TypeSpec("tpath-control-frame"), 16)}, {"anim3", ArrayFieldDecompMeta(TypeSpec("tpath-control-frame"), 16)}}}, {"blow-tower-path", - // TODO - should be able to just decompile the `anims` field {{"pts", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}, {"node-info", ArrayFieldDecompMeta(TypeSpec("blow-tower-node-info"), 32)}}}, + {"trail-conn-hash", + {{"cell", ArrayFieldDecompMeta(TypeSpec("trail-conn-hash-cell"), 6)}, + {"conn-ids", ArrayFieldDecompMeta(TypeSpec("uint16"), + 2, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}}, + {"trail-graph", + {{"node", ArrayFieldDecompMeta(TypeSpec("trail-node"), 20)}, + {"conn", ArrayFieldDecompMeta(TypeSpec("trail-conn"), 8)}, + {"conn-ids", ArrayFieldDecompMeta(TypeSpec("uint16"), + 2, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}, + {"visgroup", ArrayFieldDecompMeta(TypeSpec("trail-conn-hash-cell"), 6)}, + {"blocker", ArrayFieldDecompMeta(TypeSpec("trail-blocker"), 32)}, + {"visnode-ids", + ArrayFieldDecompMeta(TypeSpec("uint16"), + 2, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}, + {"cell-pov-bit-arrays", + ArrayFieldDecompMeta(TypeSpec("uint64"), + 8, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}}, }}}; goos::Object decompile_structure(const TypeSpec& type, diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index 0cc9554bff..6e1308a8a9 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -197,7 +197,6 @@ set(RUNTIME_SOURCE mips2c/jak3_functions/generic_effect.cpp mips2c/jak3_functions/joint.cpp mips2c/jak3_functions/lights.cpp - mips2c/jak3_functions/prim.cpp mips2c/jak3_functions/sky.cpp mips2c/jak3_functions/texture.cpp mips2c/jak3_functions/particle_curves.cpp diff --git a/game/kernel/common/kmemcard.cpp b/game/kernel/common/kmemcard.cpp index 99a7d04e23..63dd55be36 100644 --- a/game/kernel/common/kmemcard.cpp +++ b/game/kernel/common/kmemcard.cpp @@ -83,6 +83,14 @@ const char* filename_jak2[12] = { "BASCUS-97265AYBABTU!/bank4.bin", "BASCUS-97265AYBABTU!/bank5.bin", "BASCUS-97265AYBABTU!/bank6.bin", "BASCUS-97265AYBABTU!/bank7.bin"}; +const char* filename_jak3[12] = { + "BASCUS-97330AYBABTU!", "BASCUS-97330AYBABTU!/icon.sys", + "BASCUS-97330AYBABTU!/icon.ico", "BASCUS-97330AYBABTU!/BASCUS-97330AYBABTU!", + "BASCUS-97330AYBABTU!/bank0.bin", "BASCUS-97330AYBABTU!/bank1.bin", + "BASCUS-97330AYBABTU!/bank2.bin", "BASCUS-97330AYBABTU!/bank3.bin", + "BASCUS-97330AYBABTU!/bank4.bin", "BASCUS-97330AYBABTU!/bank5.bin", + "BASCUS-97330AYBABTU!/bank6.bin", "BASCUS-97330AYBABTU!/bank7.bin"}; + const char* mc_get_filename_no_dir(GameVersion version, int ndx) { const char** filenames = nullptr; switch (version) { @@ -92,6 +100,9 @@ const char* mc_get_filename_no_dir(GameVersion version, int ndx) { case GameVersion::Jak2: filenames = filename_jak2; break; + case GameVersion::Jak3: + filenames = filename_jak3; + break; } return filenames[ndx]; } @@ -173,10 +184,6 @@ bool file_is_present(int id, int bank = 0) { */ void pc_update_card() { // int highest_save_count = 0; - // TODO handle jak 3 - if (g_game_version == GameVersion::Jak3) { - return; - } mc_last_file = -1; for (s32 file = 0; file < 4; file++) { auto bankname = mc_get_filename(g_game_version, 4 + file * 2); diff --git a/game/mips2c/jak3_functions/prim.cpp b/game/mips2c/jak3_functions/prim.cpp deleted file mode 100644 index 75de3d877f..0000000000 --- a/game/mips2c/jak3_functions/prim.cpp +++ /dev/null @@ -1,479 +0,0 @@ -//--------------------------MIPS2C--------------------- -// clang-format off -#include "game/mips2c/mips2c_private.h" -#include "game/kernel/jak3/kscheme.h" -using ::jak3::intern_from_c; -namespace Mips2C::jak3 { -namespace method_9_prim_strip { -struct Cache { - void* display; // *display* - void* prim_work; // *prim-work* - void* stdcon; // *stdcon* - void* adgif_shader_texture_simple; // adgif-shader<-texture-simple! - void* dma_bucket_insert_tag; // dma-bucket-insert-tag - void* format; // format - void* lookup_texture_by_id; // lookup-texture-by-id - void* paused; // paused? -} cache; - -u64 execute(void* ctxt) { - auto* c = (ExecutionContext*)ctxt; - bool bc = false; - u32 call_addr = 0; - c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 - c->sd(ra, 0, sp); // sd ra, 0(sp) - c->sd(fp, 8, sp); // sd fp, 8(sp) - c->mov64(fp, t9); // or fp, t9, r0 - c->sq(s1, 16, sp); // sq s1, 16(sp) - c->sq(s2, 32, sp); // sq s2, 32(sp) - c->sq(s3, 48, sp); // sq s3, 48(sp) - c->sq(s4, 64, sp); // sq s4, 64(sp) - c->sq(s5, 80, sp); // sq s5, 80(sp) - c->sq(gp, 96, sp); // sq gp, 96(sp) - c->mov64(gp, a0); // or gp, a0, r0 - c->mov64(s1, a1); // or s1, a1, r0 - c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) - c->lw(v1, 0, v1); // lw v1, 0(v1) - c->dsll(v1, v1, 2); // dsll v1, v1, 2 - c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) - c->daddu(v1, v1, a0); // daddu v1, v1, a0 - c->lwu(v1, 8, v1); // lwu v1, 8(v1) - c->lwu(v1, 36, v1); // lwu v1, 36(v1) - c->lhu(a0, 8, gp); // lhu a0, 8(gp) - c->daddiu(a0, a0, 79); // daddiu a0, a0, 79 - c->addiu(a1, r0, 80); // addiu a1, r0, 80 - // Unknown instr: divu a0, a1 - // Unknown instr: mflo a0 - c->gprs[a0].du64[0] = c->gprs[a0].du32[0] / c->gprs[a1].du32[0]; - c->addiu(a1, r0, 144); // addiu a1, r0, 144 - c->lhu(a2, 8, gp); // lhu a2, 8(gp) - c->multu3(a1, a1, a2); // multu3 a1, a1, a2 - c->dsll(a0, a0, 7); // dsll a0, a0, 7 - c->daddu(a0, a1, a0); // daddu a0, a1, a0 - c->lwu(a1, 8, v1); // lwu a1, 8(v1) - c->lwu(v1, 4, v1); // lwu v1, 4(v1) - c->dsubu(v1, a1, v1); // dsubu v1, a1, v1 - c->sltu(v1, a0, v1); // sltu v1, a0, v1 - bc = c->sgpr64(v1) == 0; // beq v1, r0, L23 - // nop // sll r0, r0, 0 - if (bc) {goto block_28;} // branch non-likely - - c->load_symbol2(t9, cache.lookup_texture_by_id); // lw t9, lookup-texture-by-id(s7) - c->lwu(a0, 12, gp); // lwu a0, 12(gp) - call_addr = c->gprs[t9].du32[0]; // function call: - c->sll(v0, ra, 0); // sll v0, ra, 0 - c->jalr(call_addr); // jalr ra, t9 - c->mov64(a1, v0); // or a1, v0, r0 - c->load_symbol2(s3, cache.prim_work); // lw s3, *prim-work*(s7) - c->lwu(v1, 80, gp); // lwu v1, 80(gp) - c->dsll(v1, v1, 4); // dsll v1, v1, 4 - c->daddiu(v1, v1, 236); // daddiu v1, v1, 236 - c->daddu(s2, v1, s3); // daddu s2, v1, s3 - c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) - c->lw(v1, 0, v1); // lw v1, 0(v1) - c->dsll(v1, v1, 2); // dsll v1, v1, 2 - c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) - c->daddu(v1, v1, a0); // daddu v1, v1, a0 - c->lwu(v1, 8, v1); // lwu v1, 8(v1) - c->lwu(s4, 36, v1); // lwu s4, 36(v1) - c->lwu(s5, 4, s4); // lwu s5, 4(s4) - c->lhu(v1, 8, gp); // lhu v1, 8(gp) - c->sw(v1, 224, s3); // sw v1, 224(s3) - c->daddiu(v1, gp, 92); // daddiu v1, gp, 92 - c->sw(v1, 232, s3); // sw v1, 232(s3) - c->lwu(v1, 0, gp); // lwu v1, 0(gp) - c->andi(v1, v1, 1); // andi v1, v1, 1 - bc = c->sgpr64(v1) == 0; // beq v1, r0, L8 - // nop // sll r0, r0, 0 - if (bc) {goto block_3;} // branch non-likely - - c->addiu(v1, r0, 1); // addiu v1, r0, 1 - //beq r0, r0, L9 // beq r0, r0, L9 - // nop // sll r0, r0, 0 - goto block_4; // branch always - - -block_3: - c->addiu(v1, r0, 0); // addiu v1, r0, 0 - -block_4: - c->lwu(a0, 0, gp); // lwu a0, 0(gp) - c->andi(a0, a0, 2); // andi a0, a0, 2 - bc = c->sgpr64(a0) == 0; // beq a0, r0, L10 - // nop // sll r0, r0, 0 - if (bc) {goto block_6;} // branch non-likely - - c->addiu(a0, r0, 1); // addiu a0, r0, 1 - //beq r0, r0, L11 // beq r0, r0, L11 - // nop // sll r0, r0, 0 - goto block_7; // branch always - - -block_6: - c->addiu(a0, r0, 0); // addiu a0, r0, 0 - -block_7: - c->lwu(a2, 0, gp); // lwu a2, 0(gp) - c->andi(a2, a2, 4); // andi a2, a2, 4 - bc = c->sgpr64(a2) == 0; // beq a2, r0, L12 - // nop // sll r0, r0, 0 - if (bc) {goto block_9;} // branch non-likely - - c->addiu(a2, r0, 1); // addiu a2, r0, 1 - //beq r0, r0, L13 // beq r0, r0, L13 - // nop // sll r0, r0, 0 - goto block_10; // branch always - - -block_9: - c->addiu(a2, r0, 0); // addiu a2, r0, 0 - -block_10: - c->lui(a3, 12288); // lui a3, 12288 - c->ori(a3, a3, 16384); // ori a3, a3, 16384 - c->dsll32(t0, a2, 31); // dsll32 t0, a2, 31 - c->dsrl32(t0, t0, 26); // dsrl32 t0, t0, 26 - c->ori(t0, t0, 13); // ori t0, t0, 13 - c->dsll32(t1, a0, 31); // dsll32 t1, a0, 31 - c->dsrl32(t1, t1, 27); // dsrl32 t1, t1, 27 - c->or_(t0, t0, t1); // or t0, t0, t1 - c->dsll32(t1, v1, 31); // dsll32 t1, v1, 31 - c->dsrl32(t1, t1, 25); // dsrl32 t1, t1, 25 - c->or_(t0, t0, t1); // or t0, t0, t1 - c->dsll32(t0, t0, 21); // dsll32 t0, t0, 21 - c->dsrl32(t0, t0, 6); // dsrl32 t0, t0, 6 - c->or_(a3, a3, t0); // or a3, a3, t0 - c->sw(a3, 80, s3); // sw a3, 80(s3) - c->lui(a3, 12288); // lui a3, 12288 - c->ori(a3, a3, 16384); // ori a3, a3, 16384 - c->dsll32(a2, a2, 31); // dsll32 a2, a2, 31 - c->dsrl32(a2, a2, 26); // dsrl32 a2, a2, 26 - c->ori(a2, a2, 12); // ori a2, a2, 12 - c->dsll32(a0, a0, 31); // dsll32 a0, a0, 31 - c->dsrl32(a0, a0, 27); // dsrl32 a0, a0, 27 - c->or_(a0, a2, a0); // or a0, a2, a0 - c->dsll32(v1, v1, 31); // dsll32 v1, v1, 31 - c->dsrl32(v1, v1, 25); // dsrl32 v1, v1, 25 - c->or_(v1, a0, v1); // or v1, a0, v1 - c->dsll32(v1, v1, 21); // dsll32 v1, v1, 21 - c->dsrl32(v1, v1, 6); // dsrl32 v1, v1, 6 - c->or_(v1, a3, v1); // or v1, a3, v1 - c->sw(v1, 84, s3); // sw v1, 84(s3) - bc = c->sgpr64(s7) == c->sgpr64(a1); // beq s7, a1, L19 - c->mov64(v1, s7); // or v1, s7, r0 - if (bc) {goto block_20;} // branch non-likely - - c->lwu(v1, 84, gp); // lwu v1, 84(gp) - c->lwu(a0, 88, gp); // lwu a0, 88(gp) - c->lwu(a0, 88, gp); // lwu a0, 88(gp) - c->daddiu(a0, a0, 12); // daddiu a0, a0, 12 - c->addiu(a2, r0, 0); // addiu a2, r0, 0 - //beq r0, r0, L15 // beq r0, r0, L15 - // nop // sll r0, r0, 0 - goto block_13; // branch always - - -block_12: - c->dsll(a3, a0, 4); // dsll a3, a0, 4 - c->daddu(a3, v1, a3); // daddu a3, v1, a3 - c->lq(a3, 4828, a3); // lq a3, 4828(a3) - c->dsll(t0, a2, 4); // dsll t0, a2, 4 - c->daddu(t0, a1, t0); // daddu t0, a1, t0 - c->lq(t0, 60, t0); // lq t0, 60(t0) - c->por(a3, a3, t0); // por a3, a3, t0 - c->dsll(t0, a0, 4); // dsll t0, a0, 4 - c->daddu(t0, v1, t0); // daddu t0, v1, t0 - c->sq(a3, 4828, t0); // sq a3, 4828(t0) - c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 - -block_13: - c->slti(a3, a2, 3); // slti a3, a2, 3 - bc = c->sgpr64(a3) != 0; // bne a3, r0, L14 - // nop // sll r0, r0, 0 - if (bc) {goto block_12;} // branch non-likely - - c->mov64(v1, s7); // or v1, s7, r0 - c->mov64(v1, s7); // or v1, s7, r0 - c->load_symbol2(t9, cache.adgif_shader_texture_simple);// lw t9, adgif-shader<-texture-simple!(s7) - c->daddiu(a0, s3, 128); // daddiu a0, s3, 128 - call_addr = c->gprs[t9].du32[0]; // function call: - c->sll(v0, ra, 0); // sll v0, ra, 0 - c->jalr(call_addr); // jalr ra, t9 - c->ld(v1, 60, gp); // ld v1, 60(gp) - c->sd(v1, 176, s3); // sd v1, 176(s3) - c->addiu(v1, r0, 8); // addiu v1, r0, 8 - c->sd(v1, 184, s3); // sd v1, 184(s3) - c->ld(v1, 68, gp); // ld v1, 68(gp) - c->sd(v1, 192, s3); // sd v1, 192(s3) - c->addiu(v1, r0, 66); // addiu v1, r0, 66 - c->sb(v1, 200, s3); // sb v1, 200(s3) - c->lqc2(vf1, 0, s1); // lqc2 vf1, 0(s1) - c->lqc2(vf2, 16, s1); // lqc2 vf2, 16(s1) - c->lqc2(vf3, 32, s1); // lqc2 vf3, 32(s1) - c->lqc2(vf4, 48, s1); // lqc2 vf4, 48(s1) - c->lqc2(vf5, 128, s3); // lqc2 vf5, 128(s3) - c->lqc2(vf6, 144, s3); // lqc2 vf6, 144(s3) - c->lqc2(vf7, 160, s3); // lqc2 vf7, 160(s3) - c->lqc2(vf8, 176, s3); // lqc2 vf8, 176(s3) - c->lqc2(vf9, 192, s3); // lqc2 vf9, 192(s3) - c->lqc2(vf10, 80, s3); // lqc2 vf10, 80(s3) - c->lqc2(vf11, 28, gp); // lqc2 vf11, 28(gp) - c->lqc2(vf12, 44, gp); // lqc2 vf12, 44(gp) - //beq r0, r0, L18 // beq r0, r0, L18 - // nop // sll r0, r0, 0 - goto block_18; // branch always - - -block_15: - c->addiu(v1, r0, 80); // addiu v1, r0, 80 - c->lw(a0, 224, s3); // lw a0, 224(s3) - c->slt(a1, v1, a0); // slt a1, v1, a0 - c->movz(v1, a0, a1); // movz v1, a0, a1 - c->sw(v1, 228, s3); // sw v1, 228(s3) - c->lbu(v1, 1, s2); // lbu v1, 1(s2) - c->andi(v1, v1, 1); // andi v1, v1, 1 - c->dsll(v1, v1, 4); // dsll v1, v1, 4 - c->daddiu(v1, v1, 48); // daddiu v1, v1, 48 - c->daddu(a0, v1, s3); // daddu a0, v1, s3 - c->lw(v1, 4, s4); // lw v1, 4(s4) - c->lq(a0, 0, a0); // lq a0, 0(a0) - c->daddiu(a1, v1, 16); // daddiu a1, v1, 16 - c->lw(v1, 228, s3); // lw v1, 228(s3) - c->sq(a0, -16, a1); // sq a0, -16(a1) - c->sqc2(vf1, 0, a1); // sqc2 vf1, 0(a1) - c->sqc2(vf2, 16, a1); // sqc2 vf2, 16(a1) - c->sqc2(vf3, 32, a1); // sqc2 vf3, 32(a1) - c->sqc2(vf4, 48, a1); // sqc2 vf4, 48(a1) - c->sqc2(vf10, 64, a1); // sqc2 vf10, 64(a1) - c->sqc2(vf11, 80, a1); // sqc2 vf11, 80(a1) - c->sqc2(vf12, 96, a1); // sqc2 vf12, 96(a1) - c->sw(v1, 92, a1); // sw v1, 92(a1) - c->sqc2(vf5, 112, a1); // sqc2 vf5, 112(a1) - c->sqc2(vf6, 128, a1); // sqc2 vf6, 128(a1) - c->sqc2(vf7, 144, a1); // sqc2 vf7, 144(a1) - c->sqc2(vf8, 160, a1); // sqc2 vf8, 160(a1) - c->sqc2(vf9, 176, a1); // sqc2 vf9, 176(a1) - c->ori(a0, v1, 32768); // ori a0, v1, 32768 - c->sw(a0, 140, a1); // sw a0, 140(a1) - c->daddiu(a0, a1, 192); // daddiu a0, a1, 192 - c->sw(a0, 4, s4); // sw a0, 4(s4) - c->lbu(a0, 0, s2); // lbu a0, 0(s2) - c->addiu(a1, r0, 3); // addiu a1, r0, 3 - // Unknown instr: divu a0, a1 - // Unknown instr: mfhi a0 - c->gprs[a0].du64[0] = c->gprs[a0].du32[0] % c->gprs[a1].du32[0]; - c->dsll(a0, a0, 4); // dsll a0, a0, 4 - c->daddu(a0, r0, a0); // daddu a0, r0, a0 - c->daddu(a0, a0, s3); // daddu a0, a0, s3 - c->addiu(a1, r0, 3); // addiu a1, r0, 3 - c->mult3(a1, a1, v1); // mult3 a1, a1, v1 - c->ld(a2, 0, a0); // ld a2, 0(a0) - c->lui(a3, -1); // lui a3, -1 - c->and_(a2, a2, a3); // and a2, a2, a3 - c->dsll32(a3, a1, 16); // dsll32 a3, a1, 16 - c->dsrl32(a3, a3, 16); // dsrl32 a3, a3, 16 - c->or_(a2, a2, a3); // or a2, a2, a3 - c->sd(a2, 0, a0); // sd a2, 0(a0) - c->lwu(a2, 12, a0); // lwu a2, 12(a0) - c->lui(a3, -256); // lui a3, -256 - c->ori(a3, a3, 65535); // ori a3, a3, 65535 - c->and_(a2, a2, a3); // and a2, a2, a3 - c->dsll32(a1, a1, 24); // dsll32 a1, a1, 24 - c->dsrl32(a1, a1, 8); // dsrl32 a1, a1, 8 - c->or_(a1, a2, a1); // or a1, a2, a1 - c->sw(a1, 12, a0); // sw a1, 12(a0) - c->lw(a2, 4, s4); // lw a2, 4(s4) - c->lq(a3, 0, a0); // lq a3, 0(a0) - c->lq(a0, 208, s3); // lq a0, 208(s3) - c->lw(a1, 232, s3); // lw a1, 232(s3) - // nop // sll r0, r0, 0 - c->sq(a3, 0, a2); // sq a3, 0(a2) - c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 - c->sw(a2, 4, s4); // sw a2, 4(s4) - // nop // sll r0, r0, 0 - -block_16: - // nop // sll r0, r0, 0 - c->lw(t0, 12, a1); // lw t0, 12(a1) - // nop // sll r0, r0, 0 - c->lw(a3, 44, a1); // lw a3, 44(a1) - c->pextlb(t0, r0, t0); // pextlb t0, r0, t0 - c->lqc2(vf15, 0, a1); // lqc2 vf15, 0(a1) - c->pextlh(t0, r0, t0); // pextlh t0, r0, t0 - c->lqc2(vf16, 32, a1); // lqc2 vf16, 32(a1) - c->pextlb(a3, r0, a3); // pextlb a3, r0, a3 - c->lqc2(vf13, 16, a1); // lqc2 vf13, 16(a1) - c->pextlh(a3, r0, a3); // pextlh a3, r0, a3 - c->lqc2(vf14, 48, a1); // lqc2 vf14, 48(a1) - c->vftoi12(DEST::xyzw, vf15, vf15); // vftoi12.xyzw vf15, vf15 - c->sq(t0, 16, a2); // sq t0, 16(a2) - c->vftoi12(DEST::xyzw, vf16, vf16); // vftoi12.xyzw vf16, vf16 - c->sq(a3, 64, a2); // sq a3, 64(a2) - // nop // sll r0, r0, 0 - c->lw(t0, 8, a1); // lw t0, 8(a1) - // nop // sll r0, r0, 0 - c->lw(a3, 40, a1); // lw a3, 40(a1) - c->daddiu(a1, a1, 64); // daddiu a1, a1, 64 - c->mov128_gpr_vf(t2, vf15); // qmfc2.i t2, vf15 - c->daddiu(v1, v1, -2); // daddiu v1, v1, -2 - c->mov128_gpr_vf(t1, vf16); // qmfc2.i t1, vf16 - c->pand(t2, t2, a0); // pand t2, t2, a0 - c->sqc2(vf13, 32, a2); // sqc2 vf13, 32(a2) - c->pand(t1, t1, a0); // pand t1, t1, a0 - c->sqc2(vf14, 80, a2); // sqc2 vf14, 80(a2) - c->or_(t0, t2, t0); // or t0, t2, t0 - // nop // sll r0, r0, 0 - c->or_(a3, t1, a3); // or a3, t1, a3 - // nop // sll r0, r0, 0 - c->sq(t0, 0, a2); // sq t0, 0(a2) - c->daddiu(a2, a2, 96); // daddiu a2, a2, 96 - bc = ((s64)c->sgpr64(v1)) > 0; // bgtz v1, L17 - c->sq(a3, -48, a2); // sq a3, -48(a2) - if (bc) {goto block_16;} // branch non-likely - - c->lwu(v1, 4, s4); // lwu v1, 4(s4) - c->addiu(a0, r0, 48); // addiu a0, r0, 48 - c->lw(a1, 228, s3); // lw a1, 228(s3) - c->mult3(a0, a0, a1); // mult3 a0, a0, a1 - c->daddu(v1, v1, a0); // daddu v1, v1, a0 - c->sw(v1, 4, s4); // sw v1, 4(s4) - c->lwu(v1, 4, s4); // lwu v1, 4(s4) - c->lq(a0, 96, s3); // lq a0, 96(s3) - c->sq(a0, 0, v1); // sq a0, 0(v1) - c->lwu(v1, 4, s4); // lwu v1, 4(s4) - c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 - c->sw(v1, 4, s4); // sw v1, 4(s4) - c->lw(v1, 224, s3); // lw v1, 224(s3) - c->daddiu(v1, v1, -78); // daddiu v1, v1, -78 - c->sw(v1, 224, s3); // sw v1, 224(s3) - c->lwu(v1, 232, s3); // lwu v1, 232(s3) - c->daddiu(v1, v1, 2496); // daddiu v1, v1, 2496 - c->sw(v1, 232, s3); // sw v1, 232(s3) - c->lbu(v1, 0, s2); // lbu v1, 0(s2) - c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 - c->sb(v1, 0, s2); // sb v1, 0(s2) - c->lbu(v1, 1, s2); // lbu v1, 1(s2) - c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 - c->sb(v1, 1, s2); // sb v1, 1(s2) - -block_18: - c->addiu(v1, r0, 2); // addiu v1, r0, 2 - c->lw(a0, 224, s3); // lw a0, 224(s3) - c->slt(v1, v1, a0); // slt v1, v1, a0 - bc = c->sgpr64(v1) != 0; // bne v1, r0, L16 - // nop // sll r0, r0, 0 - if (bc) {goto block_15;} // branch non-likely - - c->mov64(v1, s7); // or v1, s7, r0 - -block_20: - c->load_symbol2(t9, cache.paused); // lw t9, paused?(s7) - call_addr = c->gprs[t9].du32[0]; // function call: - c->sll(v0, ra, 0); // sll v0, ra, 0 - c->jalr(call_addr); // jalr ra, t9 - bc = c->sgpr64(s7) != c->sgpr64(v0); // bne s7, v0, L21 - c->mov64(v1, s7); // or v1, s7, r0 - if (bc) {goto block_25;} // branch non-likely - - c->lwu(v1, 0, gp); // lwu v1, 0(gp) - c->andi(v1, v1, 8); // andi v1, v1, 8 - bc = c->sgpr64(v1) == 0; // beq v1, r0, L21 - c->mov64(v1, s7); // or v1, s7, r0 - if (bc) {goto block_25;} // branch non-likely - - c->lwu(v1, 0, gp); // lwu v1, 0(gp) - c->andi(v1, v1, 16); // andi v1, v1, 16 - bc = c->sgpr64(v1) != 0; // bne v1, r0, L20 - c->mov64(v1, s7); // or v1, s7, r0 - if (bc) {goto block_24;} // branch non-likely - - c->sh(r0, 8, gp); // sh r0, 8(gp) - c->gprs[v1].du64[0] = 0; // or v1, r0, r0 - -block_24: - c->addiu(v1, r0, -17); // addiu v1, r0, -17 - c->lwu(a0, 0, gp); // lwu a0, 0(gp) - c->and_(v1, v1, a0); // and v1, v1, a0 - c->sw(v1, 0, gp); // sw v1, 0(gp) - -block_25: - c->lwu(a3, 4, s4); // lwu a3, 4(s4) - bc = c->sgpr64(s5) == c->sgpr64(a3); // beq s5, a3, L22 - c->mov64(v1, s7); // or v1, s7, r0 - if (bc) {goto block_27;} // branch non-likely - - c->lwu(v1, 4, s4); // lwu v1, 4(s4) - c->lui(a0, 8192); // lui a0, 8192 - c->sd(a0, 0, v1); // sd a0, 0(v1) - c->sw(r0, 8, v1); // sw r0, 8(v1) - c->sw(r0, 12, v1); // sw r0, 12(v1) - c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 - c->sw(v1, 4, s4); // sw v1, 4(s4) - c->load_symbol2(t9, cache.dma_bucket_insert_tag); // lw t9, dma-bucket-insert-tag(s7) - c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) - c->lw(v1, 0, v1); // lw v1, 0(v1) - c->dsll(v1, v1, 2); // dsll v1, v1, 2 - c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) - c->daddu(v1, v1, a0); // daddu v1, v1, a0 - c->lwu(v1, 8, v1); // lwu v1, 8(v1) - c->lwu(a0, 40, v1); // lwu a0, 40(v1) - c->lw(a1, 76, gp); // lw a1, 76(gp) - c->mov64(a2, s5); // or a2, s5, r0 - call_addr = c->gprs[t9].du32[0]; // function call: - c->sll(v0, ra, 0); // sll v0, ra, 0 - c->jalr(call_addr); // jalr ra, t9 - c->mov64(v1, v0); // or v1, v0, r0 - -block_27: - //beq r0, r0, L24 // beq r0, r0, L24 - // nop // sll r0, r0, 0 - goto block_29; // branch always - - -block_28: - c->load_symbol2(t9, cache.format); // lw t9, format(s7) - c->load_symbol2(a0, cache.stdcon); // lw a0, *stdcon*(s7) - // daddiu a1, fp, L29 // daddiu a1, fp, L29 - ASSERT_NOT_REACHED(); // ran out of memory error print. - call_addr = c->gprs[t9].du32[0]; // function call: - c->sll(v0, ra, 0); // sll v0, ra, 0 - c->jalr(call_addr); // jalr ra, t9 - c->mov64(v1, v0); // or v1, v0, r0 - -block_29: - c->gprs[v0].du64[0] = 0; // or v0, r0, r0 - c->ld(ra, 0, sp); // ld ra, 0(sp) - c->ld(fp, 8, sp); // ld fp, 8(sp) - c->lq(gp, 96, sp); // lq gp, 96(sp) - c->lq(s5, 80, sp); // lq s5, 80(sp) - c->lq(s4, 64, sp); // lq s4, 64(sp) - c->lq(s3, 48, sp); // lq s3, 48(sp) - c->lq(s2, 32, sp); // lq s2, 32(sp) - c->lq(s1, 16, sp); // lq s1, 16(sp) - //jr ra // jr ra - c->daddiu(sp, sp, 112); // daddiu sp, sp, 112 - goto end_of_function; // return - - // nop // sll r0, r0, 0 - // nop // sll r0, r0, 0 - // nop // sll r0, r0, 0 -end_of_function: - return c->gprs[v0].du64[0]; -} - -void link() { - cache.display = intern_from_c(-1, 0, "*display*").c(); - cache.prim_work = intern_from_c(-1, 0, "*prim-work*").c(); - cache.stdcon = intern_from_c(-1, 0, "*stdcon*").c(); - cache.adgif_shader_texture_simple = intern_from_c(-1, 0, "adgif-shader<-texture-simple!").c(); - cache.dma_bucket_insert_tag = intern_from_c(-1, 0, "dma-bucket-insert-tag").c(); - cache.format = intern_from_c(-1, 0, "format").c(); - cache.lookup_texture_by_id = intern_from_c(-1, 0, "lookup-texture-by-id").c(); - cache.paused = intern_from_c(-1, 0, "paused?").c(); - gLinkedFunctionTable.reg("(method 9 prim-strip)", execute, 256); -} - -} // namespace method_9_prim_strip -} // namespace Mips2C -// add method_9_prim_strip::link to the link callback table for the object file. -// FWD DEC: diff --git a/game/mips2c/mips2c_table.cpp b/game/mips2c/mips2c_table.cpp index 2bcb183eab..9aa350c9ee 100644 --- a/game/mips2c/mips2c_table.cpp +++ b/game/mips2c/mips2c_table.cpp @@ -281,7 +281,6 @@ namespace generic_no_light_proc { extern void link(); } namespace method_9_font_work { extern void link(); } namespace draw_string_asm { extern void link(); } namespace get_string_length { extern void link(); } -namespace method_9_prim_strip { extern void link(); } namespace adgif_shader_texture_with_update { extern void link(); } namespace moving_sphere_triangle_intersect { extern void link(); } namespace collide_do_primitives { extern void link(); } @@ -566,7 +565,6 @@ PerGameVersion>> gMips2C {"texture", {jak3::adgif_shader_texture_with_update::link}}, {"collide-func", {jak3::moving_sphere_triangle_intersect::link, jak3::collide_do_primitives::link}}, - {"prim", {jak3::method_9_prim_strip::link}}, {"joint", {jak3::cspace_parented_transformq_joint::link}}, {"foreground", {jak3::foreground_check_longest_edge_asm::link, jak3::foreground_generic_merc::link, diff --git a/goal_src/jak3/engine/common-obs/powerups.gc b/goal_src/jak3/engine/common-obs/powerups.gc index 5a2b9b7191..9ce4666697 100644 --- a/goal_src/jak3/engine/common-obs/powerups.gc +++ b/goal_src/jak3/engine/common-obs/powerups.gc @@ -1171,11 +1171,11 @@ ) (target-eco-process) (target-color-effect-process) - (if (logtest? (-> self target-effect) 7) + (if (logtest? (-> self target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> self target-effect) 56) + (if (logtest? (-> self target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) diff --git a/goal_src/jak3/engine/common-obs/prim-h.gc b/goal_src/jak3/engine/common-obs/prim-h.gc index 625ec88562..e4461eda6a 100644 --- a/goal_src/jak3/engine/common-obs/prim-h.gc +++ b/goal_src/jak3/engine/common-obs/prim-h.gc @@ -58,7 +58,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (alpha gs-alpha) (bucket bucket-id) (sink uint32) - (level basic) + (level level) (texture-index uint32) (data prim-vertex :inline :dynamic) ) diff --git a/goal_src/jak3/engine/common-obs/prim.gc b/goal_src/jak3/engine/common-obs/prim.gc index 4cd1d02a76..d57e4df38f 100644 --- a/goal_src/jak3/engine/common-obs/prim.gc +++ b/goal_src/jak3/engine/common-obs/prim.gc @@ -77,7 +77,243 @@ (none) ) -(defmethod-mips2c "(method 9 prim-strip)" 9 prim-strip) +(defmethod generate-dma! ((this prim-strip) (arg0 matrix)) + "Generate DMA for prim rendering." + (local-vars + (a3-6 uint128) + (a3-13 uint128) + (a3-14 uint128) + (t0-13 uint128) + (t0-14 uint128) + (t1-4 uint128) + (t1-5 uint128) + (t2-0 uint128) + (t2-1 uint128) + ) + (rlet ((vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (let ((v1-5 (-> *display* frames (-> *display* on-screen) global-buf)) + (a0-4 (/ (+ (-> this num-verts) 79) (the-as uint 80))) + ) + (cond + ((< (the-as uint (+ (* (the-as uint 144) (-> this num-verts)) (* a0-4 128))) + (the-as uint (&- (-> v1-5 end) (the-as uint (-> v1-5 base)))) + ) + (let* ((a1-5 (lookup-texture-by-id (-> this tex-id))) + (s3-0 *prim-work*) + (s2-0 (-> s3-0 sinks (-> this sink))) + (s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-0 (-> s4-0 base)) + ) + (set! (-> s3-0 in-verts) (the-as int (-> this num-verts))) + (set! (-> s3-0 vert-ptr) (-> this data)) + (let ((v1-20 (if (logtest? (-> this flags) (prim-flags alpha-blend-enable)) + 1 + 0 + ) + ) + (a0-11 (if (logtest? (-> this flags) (prim-flags texture-enable)) + 1 + 0 + ) + ) + (a2-3 (if (logtest? (-> this flags) (prim-flags fog-enable)) + 1 + 0 + ) + ) + ) + (set! (-> s3-0 giftag fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe v1-20 :tme a0-11 :fge a2-3) + ) + ) + (set! (-> s3-0 giftag str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :abe v1-20 :tme a0-11 :fge a2-3) + ) + ) + ) + (when a1-5 + (let ((v1-28 (-> this level))) + (-> this texture-index) + (let ((a0-17 (+ (-> this texture-index) 12))) + (dotimes (a2-7 3) + (let ((a3-5 (-> v1-28 texture-mask a0-17 mask quad)) + (t0-9 (-> a1-5 masks data a2-7 mask quad)) + ) + (.por a3-6 a3-5 t0-9) + ) + (set! (-> v1-28 texture-mask a0-17 mask quad) a3-6) + ) + ) + ) + (adgif-shader<-texture-simple! (-> s3-0 shader) a1-5) + (set! (-> s3-0 shader clamp) (-> this clamp)) + (set! (-> s3-0 shader clamp-reg) (gs-reg64 clamp-1)) + (set! (-> s3-0 shader alpha) (the-as gs-miptbp (-> this alpha))) + (set! (-> s3-0 shader reg-4) (gs-reg alpha-1)) + (.lvf vf1 (&-> arg0 rvec quad)) + (.lvf vf2 (&-> arg0 uvec quad)) + (.lvf vf3 (&-> arg0 fvec quad)) + (.lvf vf4 (&-> arg0 trans quad)) + (.lvf vf5 (&-> s3-0 shader quad 0 quad)) + (.lvf vf6 (&-> s3-0 shader quad 1 quad)) + (.lvf vf7 (&-> s3-0 shader quad 2 quad)) + (.lvf vf8 (&-> s3-0 shader quad 3 quad)) + (.lvf vf9 (&-> s3-0 shader quad 4 quad)) + (.lvf vf10 (&-> s3-0 giftag qword quad)) + (.lvf vf11 (&-> this adnops 0 quad)) + (.lvf vf12 (&-> this adnops 1 quad)) + (while (< 2 (-> s3-0 in-verts)) + (set! (-> s3-0 num-verts) (min 80 (-> s3-0 in-verts))) + (let* ((a0-20 (-> s3-0 control-tmpl (logand (-> s2-0 control-count) 1))) + (v1-41 (-> s4-0 base)) + (a0-21 (-> a0-20 quad)) + (a1-6 (the-as object (&+ v1-41 16))) + (v1-42 (-> s3-0 num-verts)) + ) + (set! (-> (the-as (pointer uint128) a1-6) -1) a0-21) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 0 stq quad) vf1) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 0 pos quad) vf2) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 1 stq quad) vf3) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 1 pos quad) vf4) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 2 stq quad) vf10) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 2 pos quad) vf11) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 3 stq quad) vf12) + (set! (-> (the-as (inline-array prim-vertex) a1-6) 2 pos w) (the-as float v1-42)) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 3 pos quad) vf5) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 4 stq quad) vf6) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 4 pos quad) vf7) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 5 stq quad) vf8) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 5 pos quad) vf9) + (set! (-> (the-as (inline-array prim-vertex) a1-6) 4 col) (the-as rgba (logior v1-42 #x8000))) + (set! (-> s4-0 base) (the-as pointer (-> (the-as (inline-array prim-vertex) a1-6) 6))) + (let ((a0-28 (-> s3-0 vertex-tmpl (mod (-> s2-0 vertex-count) (the-as uint 3))))) + (let ((a1-9 (* 3 v1-42))) + (set! (-> a0-28 dma qwc) a1-9) + (set! (-> a0-28 vif1 num) a1-9) + ) + (let ((a2-13 (the-as object (-> s4-0 base))) + (a3-11 (-> a0-28 quad)) + (a0-29 (-> s3-0 mask quad)) + (a1-13 (-> s3-0 vert-ptr)) + ) + (nop!) + (set! (-> (the-as (inline-array prim-vertex) a2-13) 0 stq quad) a3-11) + (let ((a2-14 (the-as (object object) (-> (the-as (inline-array prim-vertex) a2-13) 0 pos)))) + (set! (-> s4-0 base) (the-as pointer a2-14)) + (nop!) + (label cfg-16) + (nop!) + (let ((t0-12 (the-as uint128 (-> a1-13 0 stq w)))) + (nop!) + (let ((a3-12 (the-as uint128 (-> a1-13 1 stq w)))) + (.pextlb t0-13 0 t0-12) + (.lvf vf15 (&-> a1-13 0 stq quad)) + (.pextlh t0-14 0 t0-13) + (.lvf vf16 (&-> a1-13 1 stq quad)) + (.pextlb a3-13 0 a3-12) + ) + ) + (.lvf vf13 (&-> a1-13 0 pos quad)) + (.pextlh a3-14 0 a3-13) + (.lvf vf14 (&-> a1-13 1 pos quad)) + (vftoi12.xyzw vf15 vf15) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 0 pos quad) t0-14) + (vftoi12.xyzw vf16 vf16) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 2 stq quad) a3-14) + (nop!) + (let ((t0-15 (the-as number (-> a1-13 0 stq z)))) + (nop!) + (let ((a3-15 (the-as number (-> a1-13 1 stq z)))) + (set! a1-13 (the-as (inline-array prim-vertex) (-> a1-13 2))) + (.mov t2-0 vf15) + (+! v1-42 -2) + (.mov t1-4 vf16) + (.pand t2-1 t2-0 a0-29) + (.svf (&-> (the-as (inline-array prim-vertex) a2-14) 1 stq quad) vf13) + (.pand t1-5 t1-4 a0-29) + (.svf (&-> (the-as (inline-array prim-vertex) a2-14) 2 pos quad) vf14) + (let ((t0-16 (logior (the-as int t2-1) (the-as int t0-15)))) + (nop!) + (let ((a3-16 (logior (the-as int t1-5) (the-as int a3-15)))) + (nop!) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 0 stq quad) (the-as uint128 t0-16)) + (set! a2-14 (the-as (object object) (-> (the-as (inline-array prim-vertex) a2-14) 3))) + (b! (> v1-42 0) cfg-16 :delay (set! (-> (the-as (pointer uint128) a2-14) -3) (the-as uint128 a3-16))) + ) + ) + ) + ) + ) + ) + ) + ) + (&+! (-> s4-0 base) (* 48 (-> s3-0 num-verts))) + (set! (-> (the-as (pointer uint128) (-> s4-0 base))) (-> s3-0 call-scissor quad)) + (&+! (-> s4-0 base) 16) + (+! (-> s3-0 in-verts) -78) + (set! (-> s3-0 vert-ptr) (the-as (inline-array prim-vertex) (-> s3-0 vert-ptr 78))) + (+! (-> s2-0 vertex-count) 1) + (+! (-> s2-0 control-count) 1) + ) + ) + (when (not (paused?)) + (when (logtest? (-> this flags) (prim-flags pf3)) + (when (not (logtest? (-> this flags) (prim-flags pf4))) + (set! (-> this num-verts) (the-as uint 0)) + 0 + ) + (logclear! (-> this flags) (prim-flags pf4)) + ) + ) + (let ((a3-17 (-> s4-0 base))) + (when (!= s5-0 a3-17) + (let ((v1-69 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-69) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-69) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-69) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-69) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> this bucket) + s5-0 + (the-as (pointer dma-tag) a3-17) + ) + ) + ) + ) + ) + (else + (format *stdcon* "Out of DMA buffer for prim rendering~%") + ) + ) + ) + 0 + (none) + ) + ) (defmethod setup-dma-and-tex ((this prim-strip) (arg0 draw-control)) "Set up the bucket, prim sink, and texture." diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index 158359c83a..bb77f8e2e6 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -1593,13 +1593,14 @@ (debug-draw-actors *level* *display-actor-marks*) (collide-shape-draw-debug-marks) ) - ; (when *display-trail-graph* - ; (let ((a0-67 *trail-graph*)) - ; (if a0-67 - ; (debug-draw a0-67) - ; ) - ; ) - ; ) + + (when *display-trail-graph* + (let ((a0-67 *trail-graph*)) + (if a0-67 + (debug-draw a0-67) + ) + ) + ) ;; dispatch collision events (send-events-for-touching-shapes *touching-list*) diff --git a/goal_src/jak3/engine/entity/entity-table.gc b/goal_src/jak3/engine/entity/entity-table.gc index d734090b4f..9cdeb3277a 100644 --- a/goal_src/jak3/engine/entity/entity-table.gc +++ b/goal_src/jak3/engine/entity/entity-table.gc @@ -270,7 +270,7 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref neon-baron :method-count 0) + :ptype (type-ref neon-baron :method-count 17) :pool '*16k-dead-pool* :heap-size #x4000 ) diff --git a/goal_src/jak3/engine/game/main.gc b/goal_src/jak3/engine/game/main.gc index 839d39bde7..398e8a77e5 100644 --- a/goal_src/jak3/engine/game/main.gc +++ b/goal_src/jak3/engine/game/main.gc @@ -1436,16 +1436,16 @@ ) ; ;; modify vertices for merc face animation. I believe this is somewhat racing DMA of merc data to VU1. - ; (with-profiler 'merc *profile-merc-color* - ; (blerc-execute) - ; (blerc-init) - ; ) + (with-profiler 'merc *profile-merc-color* + (blerc-execute) + (blerc-init) + ) ; ;; modify merc vertices for texture scrolling effect. Again, racing DMA. - ; (texscroll-execute) + (texscroll-execute) ; ;; modify merc vertices for water ripple effect. Again, racing DMA. - ; (ripple-execute) + (ripple-execute) ; ;; detect player/camera entering/exiting regions, and run callbacks for those. (region-execute) @@ -1542,6 +1542,9 @@ ) ) + ;; send alp to C++ for blackout + (put-display-env (-> *display* pmode alp)) + ;; update blackout settings (when (-> *setting-control* user-current render) (if (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) @@ -1620,10 +1623,10 @@ (level-update *level*) ;; update memory card - ; (mc-run) + (mc-run) ;; check for memory card errors. - ; (auto-save-check) + (auto-save-check) 0 (none) ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc index 02b8e6cda3..4e736414ba 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc @@ -52,6 +52,15 @@ (define-extern remap-all-particles (function none)) (define-extern process-particles (function none)) +;; +++sp-cpuinfo-flag-s32 +(defenum sp-cpuinfo-flag-s32 + :bitfield #t + :type int32 + :copy-entries sp-cpuinfo-flag + ) +;; ---sp-cpuinfo-flag-s32 + + ;; DECOMP BEGINS (define *sp-60-hz* #t) @@ -62,25 +71,25 @@ (adgif adgif-shader) (radius float) (omega float) - (vel-sxvel vector :inline) - (rot-syvel vector :inline) - (fade rgbaf :inline) - (acc vector :inline) - (rotvel3d quaternion :inline) - (vel vector3s :inline :overlay-at (-> vel-sxvel data 0)) - (accel vector3s :inline :overlay-at (-> acc data 0)) - (scalevelx float :overlay-at (-> vel-sxvel data 3)) - (scalevely float :overlay-at (-> rot-syvel data 3)) + (vel-sxvel vector :inline) + (rot-syvel vector :inline) + (fade rgbaf :inline) + (acc vector :inline) + (rotvel3d quaternion :inline) + (vel vector3s :inline :overlay-at (-> vel-sxvel data 0)) + (accel vector3s :inline :overlay-at (-> acc data 0)) + (scalevelx float :overlay-at (-> vel-sxvel data 3)) + (scalevely float :overlay-at (-> rot-syvel data 3)) (friction float) (timer int32) (flags sp-cpuinfo-flag) - (flags-s32 int32 :overlay-at flags) + (flags-s32 sp-cpuinfo-flag-s32 :overlay-at flags) (user-int32 int32) - (user-uint32 uint32 :overlay-at user-int32) - (user-float float :overlay-at user-int32) - (user-pntr uint32 :overlay-at user-int32) - (user-object basic :overlay-at user-int32) - (user-sprite sprite-vec-data-2d :overlay-at user-int32) + (user-uint32 uint32 :overlay-at user-int32) + (user-float float :overlay-at user-int32) + (user-pntr uint32 :overlay-at user-int32) + (user-object basic :overlay-at user-int32) + (user-sprite sprite-vec-data-2d :overlay-at user-int32) (sp-func (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none)) (next-time uint32) (next-launcher basic) @@ -90,10 +99,10 @@ (user1-int16 uint16) (key sparticle-launch-control) (binding sparticle-launch-state) - (data uint32 1 :overlay-at omega) - (datab int8 4 :overlay-at omega) - (dataf float 1 :overlay-at omega) - (datac uint8 1 :overlay-at omega) + (data uint32 1 :overlay-at omega) + (datab int8 4 :overlay-at omega) + (dataf float 1 :overlay-at omega) + (datac uint8 1 :overlay-at omega) ) ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc index 5f9eecba3d..7179dd62de 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc @@ -697,9 +697,8 @@ (sp-relaunch-setup-fields arg0 arg1 arg2 arg3) (let* ((a1-1 (-> arg2 flags-s32)) (v1-1 -2) - ;; og:preserve-this (a0-1 (the-as uint (-> arg3 r-g-b-a x))) - (a1-2 (logand a1-1 #x4000)) + (a1-2 (logand a1-1 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14))) ) 1 (let ((a1-3 (sar a1-2 14))) @@ -1196,16 +1195,11 @@ (let* ((f30-0 (vector-vector-distance arg0 (math-camera-pos))) (v1-38 1) (a0-12 *time-of-day*) - ;; og:preserve-this added check - (s3-1 (if (nonzero? *time-of-day*) - (ash v1-38 - (if a0-12 - (-> a0-12 0 hours) - 0 + (s3-1 (ash v1-38 (if a0-12 + (-> a0-12 0 hours) + 0 + ) ) - ) - 0 - ) ) ) (if (nonzero? (-> this matrix)) @@ -1415,16 +1409,11 @@ (let* ((s5-1 (camera-pos)) (v1-12 1) (a0-14 *time-of-day*) - ;; og:preserve-this added check - (s4-1 (if (nonzero? *time-of-day*) - (ash v1-12 - (if a0-14 - (-> a0-14 0 hours) - 0 - ) + (s4-1 (ash v1-12 (if a0-14 + (-> a0-14 0 hours) + 0 + ) ) - 0 - ) ) ) (dotimes (s3-1 (-> *level* length)) @@ -1892,124 +1881,87 @@ ;; ERROR: Bad vector register dependency: vf1 ;; ERROR: Bad vector register dependency: vf2 (defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) - (local-vars - (v1-9 uint128) - (v1-10 uint128) - (v1-13 uint128) - (v1-14 uint128) - (v1-23 uint128) - (v1-24 uint128) - (v1-27 uint128) - (v1-28 uint128) - (v1-33 float) - (a0-5 float) - (a0-11 float) - (t7-0 int) ;; og:preserve-this float -> int - (t7-3 int) ;; og:preserve-this float -> int - (s3-0 float) - (s4-0 float) - ) - (rlet ((vf1 :class vf) - (vf2 :class vf) - ) - (let ((s2-0 (the-as (array int32) (-> arg1 user-float)))) - (when (nonzero? s2-0) - (let* ((v1-1 *time-of-day*) - (s1-0 (if v1-1 - (-> v1-1 0 hours) - 0 - ) - ) - (f0-0 (rand-vu)) - ) - (.mov s4-0 vf1) - (.mov s3-0 vf2) - (cond - ((or (< s1-0 6) (< 18 s1-0)) - (let ((a1-1 (-> s2-0 7))) - (when (nonzero? a1-1) - (let ((v1-6 f0-0)) - (.mov vf2 v1-6) - ) - (let ((v1-8 (the-as uint128 (make-u128 0 (-> s2-0 9))))) - (.pextlb v1-9 0 v1-8) - ) - (.pextlb v1-10 0 v1-9) - (.mov vf1 v1-10) - (.itof.vf vf1 vf1) - (.mul.x.vf vf1 vf1 vf2) - (let ((v1-12 (the-as uint128 (make-u128 0 (-> s2-0 8))))) - (.pextlb v1-13 0 v1-12) - ) - (.pextlb v1-14 0 v1-13) - (.mov vf2 v1-14) - (.itof.vf vf2 vf2) - (.add.vf vf1 vf1 vf2) - (let ((v1-15 (-> arg1 flags-s32))) - (when (nonzero? (-> s2-0 10)) - (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) - (.mul.vf vf1 vf1 vf2) - (.mov a0-5 vf1) - ) - (let ((v1-16 (logand v1-15 #x4000))) - (.mov t7-0 vf1) - (let ((v1-17 (sar v1-16 14))) - ;; og:preserve-this - (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand (the-as uint t7-0) (the-as uint -2)) v1-17))) - ) - ) - ) - (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) - ) - ) - ) - (else - (let ((a1-2 (-> s2-0 3))) - (when (nonzero? a1-2) - (let ((v1-20 f0-0)) - (.mov vf2 v1-20) - ) - (let ((v1-22 (the-as uint128 (make-u128 0 (-> s2-0 5))))) - (.pextlb v1-23 0 v1-22) - ) - (.pextlb v1-24 0 v1-23) - (.mov vf1 v1-24) - (.itof.vf vf1 vf1) - (.mul.x.vf vf1 vf1 vf2) - (let ((v1-26 (the-as uint128 (make-u128 0 (-> s2-0 4))))) - (.pextlb v1-27 0 v1-26) - ) - (.pextlb v1-28 0 v1-27) - (.mov vf2 v1-28) - (.itof.vf vf2 vf2) - (.add.vf vf1 vf1 vf2) - (let ((v1-29 (-> arg1 flags-s32))) - (when (nonzero? (-> s2-0 6)) - (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) - (.mul.vf vf1 vf1 vf2) - (.mov a0-11 vf1) - ) - (let ((v1-30 (logand v1-29 #x4000))) - (.mov t7-3 vf1) - (let ((v1-31 (sar v1-30 14))) - ;; og:preserve-this - (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand (the-as uint t7-3) (the-as uint -2)) v1-31))) + ;; og:preserve-this this was rewritten from assembly! + (let ((s2-0 (the-as (array int32) (-> arg1 user-object)))) + (when (nonzero? s2-0) + (let* ((v1-1 *time-of-day*) + (s1-0 (if v1-1 + (-> v1-1 0 hours) + 0 ) - ) ) - (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-2)) + (f0-0 (rand-vu)) + ) + (cond + ((or (< s1-0 6) (< 18 s1-0)) + (let ((night-tex (the texture-id (-> s2-0 7)))) + (when (nonzero? night-tex) + ;; they use two consecutive pextlb with zeros to expand each 8-bit value in the rgba + ;; to a 32-bit value with no sign extension (i believe) and then itof it. very fast! + ;; 8 -> 32 expand to vf1 + ;; multiply by f0-0 (in vf2) + ;; 8 -> 32 expand to vf2 + ;; to float + ;; vf1 += vf2 + (let ((rgba-rand (the rgba (-> s2-0 9))) + (rgba-base (the rgba (-> s2-0 8)))) + (set-vector! (-> arg2 r-g-b-a) + (* f0-0 (-> rgba-rand r)) + (* f0-0 (-> rgba-rand g)) + (* f0-0 (-> rgba-rand b)) + (* f0-0 (-> rgba-rand a))) + (+! (-> arg2 r-g-b-a x) (-> rgba-base r)) + (+! (-> arg2 r-g-b-a y) (-> rgba-base g)) + (+! (-> arg2 r-g-b-a z) (-> rgba-base b)) + (+! (-> arg2 r-g-b-a w) (-> rgba-base a)) ) + (when (nonzero? (-> s2-0 10)) + (*! (-> arg2 r-g-b-a x) (-> *time-of-day-context* current-prt-color x)) + (*! (-> arg2 r-g-b-a y) (-> *time-of-day-context* current-prt-color y)) + (*! (-> arg2 r-g-b-a z) (-> *time-of-day-context* current-prt-color z)) + (*! (-> arg2 r-g-b-a w) (-> *time-of-day-context* current-prt-color w)) + ) + ;; sneak in a flag here for... some reason + (if (logtest? (-> arg1 flags) (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)) + (set! (-> arg2 r-g-b-a x) (the-as float (logior 1 (the-as int (-> arg2 r-g-b-a x))))) + (set! (-> arg2 r-g-b-a x) (the-as float (logand (lognot 1) (the-as int (-> arg2 r-g-b-a x)))))) + (particle-adgif-callback (-> arg1 adgif) night-tex) + ) + ) + ) + (else + (let ((day-tex (the texture-id (-> s2-0 3)))) + (when (nonzero? day-tex) + (let ((rgba-rand (the rgba (-> s2-0 5))) + (rgba-base (the rgba (-> s2-0 4)))) + (set-vector! (-> arg2 r-g-b-a) + (* f0-0 (-> rgba-rand r)) + (* f0-0 (-> rgba-rand g)) + (* f0-0 (-> rgba-rand b)) + (* f0-0 (-> rgba-rand a))) + (+! (-> arg2 r-g-b-a x) (-> rgba-base r)) + (+! (-> arg2 r-g-b-a y) (-> rgba-base g)) + (+! (-> arg2 r-g-b-a z) (-> rgba-base b)) + (+! (-> arg2 r-g-b-a w) (-> rgba-base a)) + ) + (when (nonzero? (-> s2-0 6)) + (*! (-> arg2 r-g-b-a x) (-> *time-of-day-context* current-prt-color x)) + (*! (-> arg2 r-g-b-a y) (-> *time-of-day-context* current-prt-color y)) + (*! (-> arg2 r-g-b-a z) (-> *time-of-day-context* current-prt-color z)) + (*! (-> arg2 r-g-b-a w) (-> *time-of-day-context* current-prt-color w)) + ) + (if (logtest? (-> arg1 flags) (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)) + (set! (-> arg2 r-g-b-a x) (the-as float (logior 1 (the-as int (-> arg2 r-g-b-a x))))) + (set! (-> arg2 r-g-b-a x) (the-as float (logand (lognot 1) (the-as int (-> arg2 r-g-b-a x)))))) + (particle-adgif-callback (-> arg1 adgif) day-tex) ) ) ) ) - (.mov vf1 s4-0) - (.mov vf2 s3-0) - (.mov v1-33 vf2) ) ) - (none) ) + (none) ) (defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) diff --git a/goal_src/jak3/engine/load/loader.gc b/goal_src/jak3/engine/load/loader.gc index b250d89e94..5bbcb083cf 100644 --- a/goal_src/jak3/engine/load/loader.gc +++ b/goal_src/jak3/engine/load/loader.gc @@ -105,13 +105,14 @@ ) (defun drawable-load ((arg0 drawable) (arg1 kheap)) - (local-vars (sp-0 pointer)) + ;; og:preserve-this + ; (local-vars (sp-0 pointer)) (cond ((type? arg0 string) - (the-as none sp-0) - (if (< (the-as uint sp-0) (the-as uint *stack-top*)) - (set! sp-0 (&+ *kernel-sp* -1024)) - ) + ; (the-as none sp-0) + ; (if (< (the-as uint sp-0) (the-as uint *stack-top*)) + ; (set! sp-0 (&+ *kernel-sp* -1024)) + ; ) (let ((s5-1 (the-as drawable (loado (the-as string arg0) arg1)))) (if (and s5-1 (type? s5-1 drawable)) (login s5-1) @@ -125,11 +126,12 @@ ) (defun art-load ((arg0 string) (arg1 kheap)) - (local-vars (sp-0 pointer)) - (the-as none sp-0) - (if (< (the-as uint sp-0) (the-as uint *stack-top*)) - (set! sp-0 (&+ *kernel-sp* -1024)) - ) + ;; og:preserve-this + ; (local-vars (sp-0 pointer)) + ; (the-as none sp-0) + ; (if (< (the-as uint sp-0) (the-as uint *stack-top*)) + ; (set! sp-0 (&+ *kernel-sp* -1024)) + ; ) (let ((s5-0 (the-as art (loado arg0 arg1)))) (if (type? s5-0 art) (login s5-0) @@ -139,12 +141,13 @@ ) (defun art-group-load-check ((arg0 string) (arg1 kheap) (arg2 int)) - (local-vars (sp-0 pointer)) + ;; og:preserve-this + ; (local-vars (sp-0 pointer)) (when *debug-segment* - (the-as none sp-0) - (if (< (the-as uint sp-0) (the-as uint *stack-top*)) - (set! sp-0 (&+ *kernel-sp* -1024)) - ) + ; (the-as none sp-0) + ; (if (< (the-as uint sp-0) (the-as uint *stack-top*)) + ; (set! sp-0 (&+ *kernel-sp* -1024)) + ; ) (let ((s3-1 (the-as art-group (loado (make-file-name (file-kind art-group) arg0 arg2 #f) arg1)))) (cond ((not s3-1) @@ -1861,7 +1864,8 @@ ) (else (set! (-> (the-as gui-connection s1-0) action) sv-16) - (if (and (= sv-16 'play) + ;; og:preserve-this fixed naughty dog bug here. was 'play instead of (gui-action play) + (if (and (= sv-16 (gui-action play)) (handle-command-list this (-> (the-as gui-connection s1-0) channel) (the-as gui-connection s1-0)) ) (channel-id-set! this (the-as gui-connection s1-0) (-> (the-as gui-connection s1-0) id)) diff --git a/goal_src/jak3/engine/nav/nav-control-h.gc b/goal_src/jak3/engine/nav/nav-control-h.gc index e4a6f742f6..831e0b86e8 100644 --- a/goal_src/jak3/engine/nav/nav-control-h.gc +++ b/goal_src/jak3/engine/nav/nav-control-h.gc @@ -38,6 +38,7 @@ (momentum-ignore-heading 6) ;; 64 (output-sphere-hash 7) ;; 128 (kernel-run 8) ;; 256 + (ncf9 9) ) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/target/board/board-util.gc b/goal_src/jak3/engine/target/board/board-util.gc index cb9b5ed9d0..d175d608ac 100644 --- a/goal_src/jak3/engine/target/board/board-util.gc +++ b/goal_src/jak3/engine/target/board/board-util.gc @@ -54,7 +54,7 @@ ) ) (if (or (logtest? (-> v1-0 draw status) (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2)) - (or (logtest? (-> v1-0 target-effect) 1) (zero? (-> v1-0 skel active-channels))) + (or (logtest? (-> v1-0 target-effect) (target-effect te0)) (zero? (-> v1-0 skel active-channels))) ) (logior! (-> self draw status) (draw-control-status no-draw)) (logclear! (-> self draw status) (draw-control-status no-draw)) @@ -63,11 +63,11 @@ (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> v1-0 target-effect) 7) + (if (logtest? (-> v1-0 target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> v1-0 target-effect) 56) + (if (logtest? (-> v1-0 target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) diff --git a/goal_src/jak3/engine/target/gun/gun-util.gc b/goal_src/jak3/engine/target/gun/gun-util.gc index 94eaac71e9..c4f397b350 100644 --- a/goal_src/jak3/engine/target/gun/gun-util.gc +++ b/goal_src/jak3/engine/target/gun/gun-util.gc @@ -325,7 +325,7 @@ (if (or (logtest? (-> (the-as target gp-0) draw status) (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) ) - (or (logtest? (-> (the-as target gp-0) target-effect) 1) + (or (logtest? (-> (the-as target gp-0) target-effect) (target-effect te0)) (zero? (-> (the-as target gp-0) skel active-channels)) ) ) @@ -336,11 +336,11 @@ (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> (the-as target gp-0) target-effect) 7) + (if (logtest? (-> (the-as target gp-0) target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> (the-as target gp-0) target-effect) 56) + (if (logtest? (-> (the-as target gp-0) target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) diff --git a/goal_src/jak3/engine/target/indax/target-indax.gc b/goal_src/jak3/engine/target/indax/target-indax.gc index f6aad4499c..770b4edf59 100644 --- a/goal_src/jak3/engine/target/indax/target-indax.gc +++ b/goal_src/jak3/engine/target/indax/target-indax.gc @@ -402,7 +402,7 @@ (target-indax-reset) (cloth-post) (set! (-> self major-mode-exit-hook) target-indax-exit) - (set! (-> self major-mode-event-hook) (the-as (function none :behavior target) target-indax-handler)) + (set! (-> self major-mode-event-hook) target-indax-handler) (set! (-> self major-mode-exit-hook) target-indax-reset) (set! (-> self indax pad) (add-setting! 'mode-sound-bank 'modeidax 0.0 0)) (remove-exit) diff --git a/goal_src/jak3/engine/target/logic-target.gc b/goal_src/jak3/engine/target/logic-target.gc index b30a04684e..6d1d6de354 100644 --- a/goal_src/jak3/engine/target/logic-target.gc +++ b/goal_src/jak3/engine/target/logic-target.gc @@ -1785,7 +1785,7 @@ (logtest? (-> self control mod-surface flags) (surface-flag look-around)) (not (focus-test? self edge-grab pole flut tube light board pilot dark)) (-> *setting-control* user-current allow-look-around) - (time-elapsed? (the-as int (-> self no-look-around-wait)) (seconds 0.05)) + (time-elapsed? (-> self no-look-around-wait) (seconds 0.05)) (not (and (= (-> self control ground-pat material) (pat-material ice)) (< 4096.0 (-> self control ctrl-xz-vel))) ) ) diff --git a/goal_src/jak3/engine/target/sidekick.gc b/goal_src/jak3/engine/target/sidekick.gc index 7db7ed2d7c..dd67781e1d 100644 --- a/goal_src/jak3/engine/target/sidekick.gc +++ b/goal_src/jak3/engine/target/sidekick.gc @@ -272,7 +272,7 @@ (set! (-> self anim-seed) (-> self parent 0 anim-seed)) (set! (-> self draw status) (-> self parent 0 draw status)) (cond - ((logtest? (-> self parent 0 target-effect) 1) + ((logtest? (-> self parent 0 target-effect) (target-effect te0)) (logior! (-> self draw status) (draw-control-status no-draw)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) diff --git a/goal_src/jak3/engine/target/target-darkjak.gc b/goal_src/jak3/engine/target/target-darkjak.gc index be8b937363..6902ea0aaa 100644 --- a/goal_src/jak3/engine/target/target-darkjak.gc +++ b/goal_src/jak3/engine/target/target-darkjak.gc @@ -900,7 +900,7 @@ ) ) ) - (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) 64) + (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) (target-effect te6)) 1.0 f30-0 ) diff --git a/goal_src/jak3/engine/target/target-death.gc b/goal_src/jak3/engine/target/target-death.gc index 7cfefe0a8b..5363e12f4e 100644 --- a/goal_src/jak3/engine/target/target-death.gc +++ b/goal_src/jak3/engine/target/target-death.gc @@ -188,7 +188,7 @@ ) ) ((and (logtest? (continue-flags race) (-> arg0 flags)) (!= (-> arg0 vehicle-type) 27)) - (set! (-> self mode-cache) (the-as basic 'pilot)) + (set! (-> self mode-cache) 'pilot) (set! (-> self mode-param1) (the-as handle #f)) (set! (-> self mode-param2) (-> arg0 vehicle-type)) (when (= (-> arg0 vehicle-type) 28) @@ -483,7 +483,7 @@ #f ) (else - (set! (-> self mode-cache) (the-as basic (-> block param 0))) + (set! (-> self mode-cache) (the-as symbol (-> block param 0))) (set! (-> self mode-param1) (if (>= argc 2) (process->handle (the-as process (-> block param 1))) (the-as handle #f) diff --git a/goal_src/jak3/engine/target/target-h.gc b/goal_src/jak3/engine/target/target-h.gc index c2ea152f22..1a264e4f86 100644 --- a/goal_src/jak3/engine/target/target-h.gc +++ b/goal_src/jak3/engine/target/target-h.gc @@ -258,6 +258,21 @@ ;; ---target-anim +;; +++target-effect +(defenum target-effect + :type uint64 + :bitfield #t + (te0 0) + (te1 1) + (te2 2) + (te3 3) + (te4 4) + (te5 5) + (te6 6) + ) +;; ---target-effect + + ;; DECOMP BEGINS (deftype target (process-focusable) @@ -304,18 +319,18 @@ (spool-anim spool-anim) (ambient-time time-frame) (fp-hud handle) - (no-load-wait uint64) - (no-look-around-wait uint64) + (no-load-wait time-frame) + (no-look-around-wait time-frame) (burn-proc handle) (pre-joint-hook (function none :behavior target)) (notify handle) (death-resetter resetter-spec :inline) - (mode-cache basic) + (mode-cache symbol) (mode-param1 handle) (mode-param2 uint64) (mode-param3 uint64) (major-mode-exit-hook (function none :behavior target)) - (major-mode-event-hook (function none :behavior target)) + (major-mode-event-hook (function process int symbol event-message-block object :behavior target)) (sub-mode-exit-hook (function none :behavior target)) (ext-geo-control external-art-buffer) (pending-ext-geo target-geo) @@ -326,8 +341,8 @@ (tobot-state state) (tobot? symbol) (tobot-recorder basic) - (target-effect uint64) - (color-effect basic) + (target-effect target-effect) + (color-effect symbol) (color-effect-start-time time-frame) (color-effect-duration time-frame) (racer racer-info) diff --git a/goal_src/jak3/engine/target/target-handler.gc b/goal_src/jak3/engine/target/target-handler.gc index 8b3102abb4..d6faa0a954 100644 --- a/goal_src/jak3/engine/target/target-handler.gc +++ b/goal_src/jak3/engine/target/target-handler.gc @@ -404,7 +404,7 @@ ;; og:preserve-this process cast (set! arg0 (the process (and (and (focus-test? self dark) (nonzero? (-> self darkjak)) - (logtest? (-> self darkjak stage) (darkjak-stage bomb0)) + (logtest? (-> self darkjak stage) (darkjak-stage active)) ) arg0 ) @@ -879,7 +879,7 @@ (target-powerup-effect (the-as symbol (-> arg3 param 0))) ) (('color-effect) - (set! (-> self color-effect) (the-as basic (-> arg3 param 0))) + (set! (-> self color-effect) (the-as symbol (-> arg3 param 0))) (set-time! (-> self color-effect-start-time)) (set! v0-0 (-> arg3 param 1)) (set! (-> self color-effect-duration) (the-as time-frame v0-0)) @@ -1098,11 +1098,11 @@ ) (('no-load-wait) (set! v0-0 (+ (current-time) (the-as time-frame (-> arg3 param 0)))) - (set! (-> self no-load-wait) (the-as uint v0-0)) + (set! (-> self no-load-wait) (the-as time-frame v0-0)) v0-0 ) (('no-look-around) - (set! (-> self no-look-around-wait) (the-as uint (+ (current-time) (the-as time-frame (-> arg3 param 0))))) + (set! (-> self no-look-around-wait) (+ (current-time) (the-as time-frame (-> arg3 param 0)))) (if (and (-> self next-state) (= (-> self next-state name) 'target-look-around)) (send-event self 'end-mode 'in-head) ) @@ -1250,7 +1250,7 @@ ) (or (logtest? (-> self target-flags) (target-flags tf1)) (focus-test? self dead dangerous hit grabbed in-head edge-grab pole flut tube board pilot mech) - (>= (the-as time-frame (-> self no-load-wait)) (current-time)) + (>= (-> self no-load-wait) (current-time)) ) ) ) diff --git a/goal_src/jak3/engine/target/target-invisible.gc b/goal_src/jak3/engine/target/target-invisible.gc index 718ac0d9d5..cfcbbbe32b 100644 --- a/goal_src/jak3/engine/target/target-invisible.gc +++ b/goal_src/jak3/engine/target/target-invisible.gc @@ -195,18 +195,18 @@ (-> self invisible-interp) ) (set! (-> self draw shadow-ctrl settings shadow-dir w) (-> self invisible-shadow-dir-backup w)) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) (if (= (-> self invisible-interp) 1.0) - (logior! (-> self target-effect) 1) + (logior! (-> self target-effect) (target-effect te0)) ) (if (and (time-elapsed? (-> self invisible-start-time) (+ (-> self invisible-duration) (seconds -2))) (< (mod (- (current-time) (-> self invisible-start-time)) 60) 30) ) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) ) ) ((!= (-> self invisible-interp) 0.0) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) (seek! (-> self invisible-interp) 0.0 (* 0.5 (seconds-per-frame))) ) ) @@ -523,9 +523,9 @@ (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-maker-idol" (the-as (pointer level) #f))) (the-as pair 0) ) - ;; (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) - ;; (set! (-> this part) (create-launch-control (-> *part-group-id-table* 82) this)) - ;; ) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 82) this)) + ) (set! (-> this humming-sound) (new 'process 'ambient-sound "dark-maker-amb" (-> this root trans) 0.0)) (set-falloff-far! (-> this humming-sound) 122880.0) (update-vol! (-> this humming-sound) 0.8) diff --git a/goal_src/jak3/engine/target/target-lightjak.gc b/goal_src/jak3/engine/target/target-lightjak.gc index f69f4051e8..2e5ac14176 100644 --- a/goal_src/jak3/engine/target/target-lightjak.gc +++ b/goal_src/jak3/engine/target/target-lightjak.gc @@ -1123,8 +1123,8 @@ (let ((f30-0 (-> self lightjak-interp))) (cond ((< 0.0 f30-0) - (logior! (-> self target-effect) 2) - (logior! (-> self target-effect) 16) + (logior! (-> self target-effect) (target-effect te1)) + (logior! (-> self target-effect) (target-effect te4)) (sound-play-by-name (static-sound-name "ltjak-chill") (the-as sound-id (-> self lightjak tone)) @@ -1136,7 +1136,7 @@ ) ) (else - (when (logtest? (-> self target-effect) 2) + (when (logtest? (-> self target-effect) (target-effect te1)) (let ((v1-14 (get-status *gui-control* (the-as sound-id (-> self lightjak on-off))))) (cond ((= v1-14 (gui-status ready)) @@ -1205,8 +1205,8 @@ (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 176) :target self :mat-joint 6) ) ) - (logand! (-> self target-effect) -3) - (logand! (-> self target-effect) -17) + (logclear! (-> self target-effect) (target-effect te1)) + (logclear! (-> self target-effect) (target-effect te4)) ) ) (when (and (< 0.0 f30-0) (and (not (focus-test? self in-head)) diff --git a/goal_src/jak3/engine/target/target-tube.gc b/goal_src/jak3/engine/target/target-tube.gc index a17016f57a..552df4a435 100644 --- a/goal_src/jak3/engine/target/target-tube.gc +++ b/goal_src/jak3/engine/target/target-tube.gc @@ -461,7 +461,7 @@ ) ) ((-> self major-mode-event-hook) - ((-> self major-mode-event-hook)) + ((-> self major-mode-event-hook) proc argc message block) ) (else (target-generic-event-handler proc argc message block) diff --git a/goal_src/jak3/engine/target/target2.gc b/goal_src/jak3/engine/target/target2.gc index 6e0e60c54e..b28bd5505b 100644 --- a/goal_src/jak3/engine/target/target2.gc +++ b/goal_src/jak3/engine/target/target2.gc @@ -379,7 +379,6 @@ (go target-demo) ) (('title) - enter-state (go target-title #f) ) (('grab) @@ -1219,7 +1218,7 @@ (defstate target-eco-powerup (target) :event target-standard-event-handler :exit (behavior () - (logand! (-> self target-effect) -101) + (logclear! (-> self target-effect) (target-effect te2 te5 te6)) (target-exit) ) :trans (behavior () @@ -1228,10 +1227,10 @@ :code (behavior ((arg0 int) (arg1 float)) (case arg0 ((8) - (logior! (-> self target-effect) 36) + (logior! (-> self target-effect) (target-effect te2 te5)) ) ((7) - (logior! (-> self target-effect) 64) + (logior! (-> self target-effect) (target-effect te6)) ) ) (set! (-> self neck flex-blend) 0.0) diff --git a/goal_src/jak3/engine/ui/minimap.gc b/goal_src/jak3/engine/ui/minimap.gc index 8c097f24d2..0c90ea1bec 100644 --- a/goal_src/jak3/engine/ui/minimap.gc +++ b/goal_src/jak3/engine/ui/minimap.gc @@ -1710,13 +1710,7 @@ ) ) (when s3-0 - (let* ((s2-2 s5-0) - (s1-0 (method-of-object s2-2 trail-graph-method-29)) - ) - (target-pos 0) - (-> s4-0 cached-info) - (s1-0 s2-2) - ) + (trail-graph-method-29 s5-0 (target-pos 0) s3-0 (-> s4-0 cached-info)) (set! (-> s4-0 search-id) (-> s5-0 search-id)) ) ) @@ -1726,15 +1720,9 @@ (countdown (v1-33 6) (let ((s4-1 (-> this trail v1-33))) (when (and (= (-> s4-1 search-id) (-> s5-0 search-id)) (-> s4-1 used-by)) - (let* ((a0-29 s5-0) - (t9-5 (method-of-object a0-29 trail-graph-method-21)) - ) - (-> s4-1 node-id) - 64 - (&-> s4-1 goal-node-id) - (&-> s4-1 node-path-dist) - (set! (-> s4-1 node-count) (the-as int (t9-5 a0-29))) - ) + (set! (-> s4-1 node-count) + (trail-graph-method-21 s5-0 (-> s4-1 node-id) 64 (&-> s4-1 goal-node-id) (&-> s4-1 node-path-dist)) + ) (set! (-> s4-1 last-updated) (the-as uint (current-time))) (goto cfg-64) ) @@ -1745,6 +1733,8 @@ ) ) ) + ;; og:preserve-this added in PC port: they timed stuff, we just allow it to run a fixed number of iterations. + (+! v1-1 100) (.mfc0 v1-1 Count) ) ) diff --git a/goal_src/jak3/game.gp b/goal_src/jak3/game.gp index 49edf8f5c1..479e382bc3 100644 --- a/goal_src/jak3/game.gp +++ b/goal_src/jak3/game.gp @@ -268,10 +268,11 @@ (cgo-file "railf.gd" common-dep) (cgo-file "railx.gd" common-dep) ; ;; precursor +(cgo-file "lmech.gd" common-dep) (cgo-file "preca.gd" common-dep) (cgo-file "precb.gd" common-dep) (cgo-file "precc.gd" common-dep) -;; (cgo-file "precd.gd" common-dep) +(cgo-file "precd.gd" common-dep) ; ;; title/intro (cgo-file "win.gd" common-dep) ;; wasintro (cgo-file "title.gd" common-dep) @@ -357,7 +358,6 @@ (cgo-file "ljndklev.gd" common-dep) (cgo-file "lkeira.gd" common-dep) (cgo-file "lkleever.gd" common-dep) -(cgo-file "lmech.gd" common-dep) (cgo-file "lmhca.gd" common-dep) (cgo-file "lmhcb.gd" common-dep) (cgo-file "lnstcst.gd" common-dep) diff --git a/goal_src/jak3/kernel/gkernel.gc b/goal_src/jak3/kernel/gkernel.gc index 9bae25688b..1b1c6791f6 100644 --- a/goal_src/jak3/kernel/gkernel.gc +++ b/goal_src/jak3/kernel/gkernel.gc @@ -2245,6 +2245,8 @@ (the (state process) (new 'static 'state :name 'dead-state :next #f + ;; og:preserve-this added parent + :parent #f :exit #f :code #f :trans #f diff --git a/goal_src/jak3/levels/city/bombbot/bombbot.gc b/goal_src/jak3/levels/city/bombbot/bombbot.gc index e5c6198b30..e1d32f8e41 100644 --- a/goal_src/jak3/levels/city/bombbot/bombbot.gc +++ b/goal_src/jak3/levels/city/bombbot/bombbot.gc @@ -3722,7 +3722,6 @@ ) -;; WARN: Return type mismatch object vs none. (defbehavior bombbot-init-by-other bombbot ((arg0 bombbot-spawn-params)) (stack-size-set! (-> self main-thread) 512) (set! (-> self city-path) (-> arg0 path)) @@ -3744,7 +3743,6 @@ (set! (-> self shoot-duration) 1.0) (set! (-> self draw light-index) (the-as uint 10)) (go-virtual hostile) - (none) ) (defmethod send-attack-on-jump-or-knocked ((this bombbot) (arg0 process) (arg1 event-message-block)) diff --git a/goal_src/jak3/levels/city/common/trail-graph.gc b/goal_src/jak3/levels/city/common/trail-graph.gc index 72c39388a6..3ad63d2c4f 100644 --- a/goal_src/jak3/levels/city/common/trail-graph.gc +++ b/goal_src/jak3/levels/city/common/trail-graph.gc @@ -7,3 +7,2120 @@ ;; DECOMP BEGINS +(define *trail-graph* + (new 'static 'trail-graph + :over-under-thresh -204800000.0 + :over-under-above-too-low -409600000.0 + :over-under-below-too-high 409600000.0 + :node-count #x100 + :conn-count #x12e + :node (new 'static 'inline-array trail-node 256 + (new 'static 'trail-node :x #x41d :y 18 :z #x7f :conn-count #x4) + (new 'static 'trail-node :x #x404 :y 18 :z #x8e :first-conn #x4 :conn-count #x4) + (new 'static 'trail-node :x #x405 :y 18 :z #xbc :first-conn #x8 :conn-count #x4) + (new 'static 'trail-node :x #x413 :y 18 :z #xbc :first-conn #xc :conn-count #x5) + (new 'static 'trail-node :x #x443 :y 18 :z #xb2 :first-conn #x11 :conn-count #x4) + (new 'static 'trail-node :x #x445 :y 18 :z #x8b :first-conn #x15 :conn-count #x2) + (new 'static 'trail-node :x #x42d :y 18 :z #xbc :first-conn #x17 :conn-count #x4) + (new 'static 'trail-node :x #x44f :y 18 :z #xc0 :first-conn #x1b :conn-count #x5) + (new 'static 'trail-node :x #x472 :y 18 :z #xeb :first-conn #x20 :conn-count #x3) + (new 'static 'trail-node :x #x472 :y 18 :z #xb7 :first-conn #x23 :conn-count #x3) + (new 'static 'trail-node :x #x473 :y 18 :z #x96 :first-conn #x26 :conn-count #x1) + (new 'static 'trail-node :x #x473 :y 18 :z #x114 :first-conn #x27 :conn-count #x2) + (new 'static 'trail-node :x #x46e :y 18 :z #x126 :first-conn #x29 :conn-count #x3) + (new 'static 'trail-node :x #x444 :y 18 :z #x167 :first-conn #x2c :conn-count #x3) + (new 'static 'trail-node :x #x422 :y 17 :z #x149 :first-conn #x2f :conn-count #x3) + (new 'static 'trail-node :x #x3ec :y 18 :z #x15d :first-conn #x32 :conn-count #x2) + (new 'static 'trail-node :x #x391 :y 18 :z #x15d :first-conn #x34 :conn-count #x3) + (new 'static 'trail-node :x #x37f :y 18 :z #x148 :first-conn #x37 :conn-count #x3) + (new 'static 'trail-node :x #x38a :y 18 :z #x12c :first-conn #x3a :conn-count #x2) + (new 'static 'trail-node :x #x3d5 :y 18 :z #x127 :first-conn #x3c :conn-count #x2) + (new 'static 'trail-node :x #x3e3 :y 18 :z #x119 :first-conn #x3e :conn-count #x3) + (new 'static 'trail-node :x #x3df :y 18 :z #xf8 :first-conn #x41 :conn-count #x4) + (new 'static 'trail-node :x #x416 :y 18 :z #xee :first-conn #x45 :conn-count #x3) + (new 'static 'trail-node :x #x424 :y 18 :z #xe0 :first-conn #x48 :conn-count #x5) + (new 'static 'trail-node :x #x374 :y 17 :z #x162 :first-conn #x4d :conn-count #x3) + (new 'static 'trail-node :x #x359 :y 18 :z #x15e :first-conn #x50 :conn-count #x3) + (new 'static 'trail-node :x #x344 :y 18 :z #x140 :first-conn #x53 :conn-count #x3) + (new 'static 'trail-node :x #x34d :y 18 :z #x11f :first-conn #x56 :conn-count #x3) + (new 'static 'trail-node :x #x384 :y 18 :z #xe8 :first-conn #x59 :conn-count #x3) + (new 'static 'trail-node :x #x3a9 :y 18 :z #xee :first-conn #x5c :conn-count #x2) + (new 'static 'trail-node :x #x3cd :y 18 :z #xf4 :first-conn #x5e :conn-count #x3) + (new 'static 'trail-node :x #x3d9 :y 18 :z #xd8 :first-conn #x61 :conn-count #x5) + (new 'static 'trail-node :x #x3e5 :y 18 :z #xc1 :first-conn #x66 :conn-count #x4) + (new 'static 'trail-node :x #x32c :y 17 :z #x15b :first-conn #x6a :conn-count #x3) + (new 'static 'trail-node :x #x314 :y 18 :z #x15a :first-conn #x6d :conn-count #x2) + (new 'static 'trail-node :x #x331 :y 18 :z #xc2 :first-conn #x6f :conn-count #x2) + (new 'static 'trail-node :x #x355 :y 18 :z #xd4 :first-conn #x71 :conn-count #x3) + (new 'static 'trail-node :x #x316 :y 18 :z #xca :first-conn #x74 :conn-count #x2) + (new 'static 'trail-node :x #x3d2 :y 18 :z #x95 :first-conn #x76 :conn-count #x4) + (new 'static 'trail-node :x #x3a7 :y 18 :z #x9b :first-conn #x7a :conn-count #x4) + (new 'static 'trail-node :x #x368 :y 18 :z #x75 :first-conn #x7e :conn-count #x2) + (new 'static 'trail-node :x #x326 :y 18 :z 12 :first-conn #x80 :conn-count #x2) + (new 'static 'trail-node :x #x335 :y 18 :z 58 :first-conn #x82 :conn-count #x2) + (new 'static 'trail-node :x #x31a :y 18 :z -25 :first-conn #x84 :conn-count #x2) + (new 'static 'trail-node :x #x2e7 :y 18 :z -74 :first-conn #x86 :conn-count #x2) + (new 'static 'trail-node :x #x41c :y 18 :z #x1b2 :first-conn #x88 :conn-count #x2) + (new 'static 'trail-node :x #x448 :y 18 :z #x1af :first-conn #x8a :conn-count #x3) + (new 'static 'trail-node :x #x3e1 :y 18 :z #x1bb :first-conn #x8d :conn-count #x4) + (new 'static 'trail-node :x #x3c7 :y 18 :z #x1d9 :first-conn #x91 :conn-count #x3) + (new 'static 'trail-node :x #x38f :y 18 :z #x1e2 :first-conn #x94 :conn-count #x4) + (new 'static 'trail-node :x #x387 :y 18 :z #x1a2 :first-conn #x98 :conn-count #x2) + (new 'static 'trail-node :x #x38f :y 18 :z #x223 :first-conn #x9a :conn-count #x2) + (new 'static 'trail-node :x #x39b :y 18 :z #x234 :first-conn #x9c :conn-count #x2) + (new 'static 'trail-node :x #x3b6 :y 18 :z #x239 :first-conn #x9e :conn-count #x4) + (new 'static 'trail-node :x #x3d0 :y 18 :z #x1f7 :first-conn #xa2 :conn-count #x4) + (new 'static 'trail-node :x #x410 :y 18 :z #x200 :first-conn #xa6 :conn-count #x3) + (new 'static 'trail-node :x #x425 :y 18 :z #x23a :first-conn #xa9 :conn-count #x4) + (new 'static 'trail-node :x #x453 :y 18 :z #x23e :first-conn #xad :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x24f :first-conn #xaf :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x290 :first-conn #xb1 :conn-count #x2) + (new 'static 'trail-node :x #x463 :y 18 :z #x2be :first-conn #xb3 :conn-count #x2) + (new 'static 'trail-node :x #x435 :y 17 :z #x2be :first-conn #xb5 :conn-count #x2) + (new 'static 'trail-node :x #x449 :y 18 :z #x29d :first-conn #xb7 :conn-count #x2) + (new 'static 'trail-node :x #x42e :y 18 :z #x28c :first-conn #xb9 :conn-count #x2) + (new 'static 'trail-node :x #x41a :y 17 :z #x279 :first-conn #xbb :conn-count #x2) + (new 'static 'trail-node :x #x363 :y 17 :z #x27e :first-conn #xbd :conn-count #x3) + (new 'static 'trail-node :x #x35b :y 18 :z #x2dd :first-conn #xc0 :conn-count #x3) + (new 'static 'trail-node :x #x312 :y 18 :z #x2d5 :first-conn #xc3 :conn-count #x2) + (new 'static 'trail-node :x #x312 :y 18 :z #x27d :first-conn #xc5 :conn-count #x2) + (new 'static 'trail-node :x #x39c :y 18 :z #x351 :first-conn #xc7 :conn-count #x2) + (new 'static 'trail-node :x #x365 :y 18 :z #x34c :first-conn #xc9 :conn-count #x2) + (new 'static 'trail-node :x #x360 :y 18 :z #x328 :first-conn #xcb :conn-count #x2) + (new 'static 'trail-node :x #x3bc :y 18 :z #x369 :first-conn #xcd :conn-count #x3) + (new 'static 'trail-node :x #x3db :y 18 :z #x384 :first-conn #xd0 :conn-count #x3) + (new 'static 'trail-node :x #x3be :y 18 :z #x3a7 :first-conn #xd3 :conn-count #x3) + (new 'static 'trail-node :x #x1a3 :y 18 :z -700 :first-conn #xd6 :conn-count #x2) + (new 'static 'trail-node :x #x3bd :y 18 :z #x41a :first-conn #xd8 :conn-count #x3) + (new 'static 'trail-node :x #x3be :y 17 :z #x3dd :first-conn #xdb :conn-count #x2) + (new 'static 'trail-node :x #x1b3 :y 18 :z -613 :first-conn #xdd :conn-count #x2) + (new 'static 'trail-node :x #x1a3 :y 18 :z -630 :first-conn #xdf :conn-count #x2) + (new 'static 'trail-node :x #x332 :y 18 :z #x488 :first-conn #xe1 :conn-count #x2) + (new 'static 'trail-node :x #x3f8 :y 18 :z #x384 :first-conn #xe3 :conn-count #x2) + (new 'static 'trail-node :x #x410 :y 18 :z #x39b :first-conn #xe5 :conn-count #x2) + (new 'static 'trail-node :x #x417 :y 18 :z #x3fd :first-conn #xe7 :conn-count #x2) + (new 'static 'trail-node :x #x456 :y 18 :z #x3fd :first-conn #xe9 :conn-count #x3) + (new 'static 'trail-node :x #x417 :y 18 :z #x469 :first-conn #xec :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x425 :first-conn #xee :conn-count #x2) + (new 'static 'trail-node :x #x469 :y 18 :z #x414 :first-conn #xf0 :conn-count #x2) + (new 'static 'trail-node :x #x2f1 :y 18 :z #x4cd :first-conn #xf2 :conn-count #x2) + (new 'static 'trail-node :x #x2eb :y 18 :z #x537 :first-conn #xf4 :conn-count #x2) + (new 'static 'trail-node :x #x2d4 :y 17 :z #x56a :first-conn #xf6 :conn-count #x2) + (new 'static 'trail-node :x #x25a :y 18 :z #x5b8 :first-conn #xf8 :conn-count #x3) + (new 'static 'trail-node :x #x257 :y 18 :z #x5e6 :first-conn #xfb :conn-count #x3) + (new 'static 'trail-node :x #x26c :y 18 :z #x796 :first-conn #xfe :conn-count #x1) + (new 'static 'trail-node :x #x231 :y 18 :z #x5b3 :first-conn #xff :conn-count #x5) + (new 'static 'trail-node :x #xda :y 18 :z #x556 :first-conn #x104 :conn-count #x4) + (new 'static 'trail-node :x #xc0 :y 18 :z #x53c :first-conn #x108 :conn-count #x3) + (new 'static 'trail-node :x #xa8 :y 18 :z #x555 :first-conn #x10b :conn-count #x4) + (new 'static 'trail-node :x -62 :y 17 :z #x53e :first-conn #x10f :conn-count #x2) + (new 'static 'trail-node :x -169 :y 18 :z #x5ad :first-conn #x111 :conn-count #x5) + (new 'static 'trail-node :x -224 :y 18 :z #x5b9 :first-conn #x116 :conn-count #x3) + (new 'static 'trail-node :x -212 :y 18 :z #x5ec :first-conn #x119 :conn-count #x3) + (new 'static 'trail-node :x -230 :y 18 :z #x794 :first-conn #x11c :conn-count #x1) + (new 'static 'trail-node :x -340 :y 18 :z #x56b :first-conn #x11d :conn-count #x2) + (new 'static 'trail-node :x -364 :y 17 :z #x546 :first-conn #x11f :conn-count #x2) + (new 'static 'trail-node :x -368 :y 18 :z #x4e4 :first-conn #x121 :conn-count #x2) + (new 'static 'trail-node :x #x200 :y 18 :z -606 :first-conn #x123 :conn-count #x4) + (new 'static 'trail-node :x #x266 :y 18 :z -607 :first-conn #x127 :conn-count #x4) + (new 'static 'trail-node :x #x1b1 :y 18 :z -501 :first-conn #x12b :conn-count #x1) + (new 'static 'trail-node :x #x193 :y 18 :z -461 :first-conn #x12c :conn-count #x2) + (new 'static 'trail-node :x #x198 :y 18 :z -341 :first-conn #x12e :conn-count #x2) + (new 'static 'trail-node :x #x1b0 :y 18 :z -318 :first-conn #x130 :conn-count #x1) + (new 'static 'trail-node :x #x2af :y 18 :z -638 :first-conn #x131 :conn-count #x3) + (new 'static 'trail-node :x #x294 :y 18 :z -613 :first-conn #x134 :conn-count #x3) + (new 'static 'trail-node :x #x2bd :y 18 :z -615 :first-conn #x137 :conn-count #x3) + (new 'static 'trail-node :x #x2d0 :y 18 :z -589 :first-conn #x13a :conn-count #x2) + (new 'static 'trail-node :x #x2cf :y 18 :z -471 :first-conn #x13c :conn-count #x2) + (new 'static 'trail-node :x #x2bb :y 18 :z -448 :first-conn #x13e :conn-count #x2) + (new 'static 'trail-node :x #x18c :y 18 :z -47 :first-conn #x140 :conn-count #x3) + (new 'static 'trail-node :x #x27d :y 18 :z -450 :first-conn #x143 :conn-count #x2) + (new 'static 'trail-node :x #x262 :y 18 :z -490 :first-conn #x145 :conn-count #x4) + (new 'static 'trail-node :x #x200 :y 18 :z -496 :first-conn #x149 :conn-count #x4) + (new 'static 'trail-node :x #x1d3 :y 18 :z -496 :first-conn #x14d :conn-count #x2) + (new 'static 'trail-node :x #x1b5 :y 18 :z -173 :first-conn #x14f :conn-count #x2) + (new 'static 'trail-node :x #x1a8 :y 18 :z -163 :first-conn #x151 :conn-count #x2) + (new 'static 'trail-node :x #x1bc :y 18 :z -47 :first-conn #x153 :conn-count #x3) + (new 'static 'trail-node :x #x1a7 :y 18 :z -69 :first-conn #x156 :conn-count #x3) + (new 'static 'trail-node :x #x1ea :y 18 :z -46 :first-conn #x159 :conn-count #x2) + (new 'static 'trail-node :x #x1af :y 18 :z -458 :first-conn #x15b :conn-count #x2) + (new 'static 'trail-node :x #x1b4 :y 18 :z -360 :first-conn #x15d :conn-count #x2) + (new 'static 'trail-node :x #x20a :y 18 :z -74 :first-conn #x15f :conn-count #x2) + (new 'static 'trail-node :x #x20c :y 18 :z -168 :first-conn #x161 :conn-count #x3) + (new 'static 'trail-node :x #x1c9 :y 18 :z -175 :first-conn #x164 :conn-count #x3) + (new 'static 'trail-node :x #x161 :y 18 :z -119 :first-conn #x167 :conn-count #x2) + (new 'static 'trail-node :x #x11c :y 18 :z -123 :first-conn #x169 :conn-count #x2) + (new 'static 'trail-node :x #x10e :y 18 :z -112 :first-conn #x16b :conn-count #x2) + (new 'static 'trail-node :x #x100 :y 18 :z -90 :first-conn #x16d :conn-count #x2) + (new 'static 'trail-node :x #xe4 :y 18 :z -71 :first-conn #x16f :conn-count #x2) + (new 'static 'trail-node :x #x414 :y 18 :z #x1b2 :first-conn #x171 :conn-count #x2) + (new 'static 'trail-node :x #x2d1 :y 18 :z #x4f9 :first-conn #x173 :conn-count #x1) + (new 'static 'trail-node :x #x2ff :y 18 :z #x4f8 :first-conn #x174 :conn-count #x1) + (new 'static 'trail-node :x #x2fe :y 18 :z #x507 :first-conn #x175 :conn-count #x1) + (new 'static 'trail-node :x #x2d1 :y 18 :z #x507 :first-conn #x176 :conn-count #x1) + (new 'static 'trail-node :x #x2ef :y 18 :z #x4f8 :first-conn #x177 :conn-count #x2) + (new 'static 'trail-node :x #x2ef :y 18 :z #x506 :first-conn #x179 :conn-count #x2) + (new 'static 'trail-node :x #x17e :y 18 :z -24 :first-conn #x17b :conn-count #x1) + (new 'static 'trail-node :x #x18c :y 18 :z -65 :first-conn #x17c :conn-count #x1) + (new 'static 'trail-node :x #x17e :y 18 :z -66 :first-conn #x17d :conn-count #x1) + (new 'static 'trail-node :x #x190 :y 18 :z -618 :first-conn #x17e :conn-count #x1) + (new 'static 'trail-node :x #x190 :y 18 :z -601 :first-conn #x17f :conn-count #x2) + (new 'static 'trail-node :x #x1a4 :y 18 :z -601 :first-conn #x181 :conn-count #x1) + (new 'static 'trail-node :x #x2ac :y 18 :z -701 :first-conn #x182 :conn-count #x2) + (new 'static 'trail-node :x #x299 :y 18 :z -718 :first-conn #x184 :conn-count #x2) + (new 'static 'trail-node :x #x1b2 :y 18 :z -718 :first-conn #x186 :conn-count #x2) + (new 'static 'trail-node :x #x43a :y 18 :z #x3d2 :first-conn #x188 :conn-count #x1) + (new 'static 'trail-node :x #x47b :y 18 :z #x3d3 :first-conn #x189 :conn-count #x2) + (new 'static 'trail-node :x #xbe :y 18 :z #x4bd :first-conn #x18b :conn-count #x1) + (new 'static 'trail-node :x #x21a :y 18 :z -210 :first-conn #x18c :conn-count #x3) + (new 'static 'trail-node :x #x414 :y 17 :z #x3c1 :first-conn #x18f :conn-count #x3) + (new 'static 'trail-node :x #x477 :y 18 :z #x3f8 :first-conn #x192 :conn-count #x1) + (new 'static 'trail-node :x #x1a7 :y 18 :z #x52c :first-conn #x193 :conn-count #x2) + (new 'static 'trail-node :x #x380 :y 18 :z #x368 :first-conn #x195 :conn-count #x1) + (new 'static 'trail-node :x #x37f :y 18 :z #x32f :first-conn #x196 :conn-count #x1) + (new 'static 'trail-node :x #x378 :y 18 :z #x368 :first-conn #x197 :conn-count #x1) + (new 'static 'trail-node :x #x376 :y 18 :z #x32f :first-conn #x198 :conn-count #x1) + (new 'static 'trail-node :x #x380 :y 18 :z #x34f :first-conn #x199 :conn-count #x2) + (new 'static 'trail-node :x #x377 :y 18 :z #x34f :first-conn #x19b :conn-count #x2) + (new 'static 'trail-node :x #x413 :y 18 :z #x191 :first-conn #x19d :conn-count #x1) + (new 'static 'trail-node :x #x414 :y 18 :z #x1ce :first-conn #x19e :conn-count #x1) + (new 'static 'trail-node :x #x41c :y 18 :z #x191 :first-conn #x19f :conn-count #x1) + (new 'static 'trail-node :x #x18b :y 18 :z -24 :first-conn #x1a0 :conn-count #x1) + (new 'static 'trail-node :x #x165 :y 18 :z -453 :first-conn #x1a1 :conn-count #x1) + (new 'static 'trail-node :x #x16d :y 18 :z -399 :first-conn #x1a2 :conn-count #x2) + (new 'static 'trail-node :x #x17e :y 18 :z -47 :first-conn #x1a4 :conn-count #x2) + (new 'static 'trail-node :x #x41d :y 18 :z #x1ce :first-conn #x1a6 :conn-count #x1) + (new 'static 'trail-node :x #x1cc :y 18 :z -338 :first-conn #x1a7 :conn-count #x2) + (new 'static 'trail-node :x #x233 :y 18 :z -304 :first-conn #x1a9 :conn-count #x1) + (new 'static 'trail-node :x #x21a :y 18 :z -336 :first-conn #x1aa :conn-count #x3) + (new 'static 'trail-node :x #x234 :y 18 :z -349 :first-conn #x1ad :conn-count #x3) + (new 'static 'trail-node :x #x24b :y 18 :z -373 :first-conn #x1b0 :conn-count #x2) + (new 'static 'trail-node :x #x2bf :y 18 :z -375 :first-conn #x1b2 :conn-count #x2) + (new 'static 'trail-node :x #x2d0 :y 18 :z -355 :first-conn #x1b4 :conn-count #x3) + (new 'static 'trail-node :x #x2f6 :y 18 :z -290 :first-conn #x1b7 :conn-count #x2) + (new 'static 'trail-node :x #x249 :y 18 :z -260 :first-conn #x1b9 :conn-count #x3) + (new 'static 'trail-node :x #x2c5 :y 18 :z -263 :first-conn #x1bc :conn-count #x4) + (new 'static 'trail-node :x #x232 :y 18 :z -304 :first-conn #x1c0 :conn-count #x3) + (new 'static 'trail-node :x #x22c :y 18 :z -219 :first-conn #x1c3 :conn-count #x3) + (new 'static 'trail-node :x #x262 :y 18 :z -221 :first-conn #x1c6 :conn-count #x4) + (new 'static 'trail-node :x #x2a6 :y 18 :z -234 :first-conn #x1ca :conn-count #x3) + (new 'static 'trail-node :x #x282 :y 18 :z -195 :first-conn #x1cd :conn-count #x3) + (new 'static 'trail-node :x #x287 :y 18 :z -42 :first-conn #x1d0 :conn-count #x2) + (new 'static 'trail-node :x #x295 :y 18 :z -22 :first-conn #x1d2 :conn-count #x2) + (new 'static 'trail-node :x #x2c0 :y 18 :z -22 :first-conn #x1d4 :conn-count #x2) + (new 'static 'trail-node :x #x2cd :y 18 :z -34 :first-conn #x1d6 :conn-count #x2) + (new 'static 'trail-node :x #x2d2 :y 18 :z -74 :first-conn #x1d8 :conn-count #x2) + (new 'static 'trail-node :x #x432 :y 18 :z #x7b :first-conn #x1da :conn-count #x2) + (new 'static 'trail-node :x #x307 :y 18 :z #x14b :first-conn #x1dc :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x2a0 :first-conn #x1de :conn-count #x1) + (new 'static 'trail-node :x #x42f :y 18 :z #x2a2 :first-conn #x1df :conn-count #x1) + (new 'static 'trail-node :x #x46e :y 18 :z #x1f4 :first-conn #x1e0 :conn-count #x1) + (new 'static 'trail-node :x #x467 :y 18 :z #x1bd :first-conn #x1e1 :conn-count #x2) + (new 'static 'trail-node :x #x322 :y 18 :z #x459 :first-conn #x1e3 :conn-count #x1) + (new 'static 'trail-node :x -337 :y 18 :z 82 :first-conn #x1e4 :conn-count #x1) + (new 'static 'trail-node :x -337 :y 18 :z 71 :first-conn #x1e5 :conn-count #x2) + (new 'static 'trail-node :x -347 :y 18 :z 72 :first-conn #x1e7 :conn-count #x1) + (new 'static 'trail-node :x -338 :y 18 :z 82 :first-conn #x1e8 :conn-count #x1) + (new 'static 'trail-node :x -349 :y 18 :z 89 :first-conn #x1e9 :conn-count #x2) + (new 'static 'trail-node :x -337 :y 18 :z 90 :first-conn #x1eb :conn-count #x1) + (new 'static 'trail-node :x #x38f :y 18 :z #x437 :first-conn #x1ec :conn-count #x1) + (new 'static 'trail-node :x #x30d :y 18 :z #x437 :first-conn #x1ed :conn-count #x2) + (new 'static 'trail-node :x #x30d :y 18 :z #x458 :first-conn #x1ef :conn-count #x2) + (new 'static 'trail-node :x #x32a :y 18 :z #x45d :first-conn #x1f1 :conn-count #x2) + (new 'static 'trail-node :x #x3f2 :y 17 :z #x468 :first-conn #x1f3 :conn-count #x3) + (new 'static 'trail-node :x #x3d1 :y 18 :z #x450 :first-conn #x1f6 :conn-count #x2) + (new 'static 'trail-node :x #x3a0 :y 18 :z #x437 :first-conn #x1f8 :conn-count #x2) + (new 'static 'trail-node :x #x33d :y 18 :z #x45d :first-conn #x1fa :conn-count #x4) + (new 'static 'trail-node :x #x334 :y 18 :z #x471 :first-conn #x1fe :conn-count #x3) + (new 'static 'trail-node :x #x3f9 :y 18 :z #x1b3 :first-conn #x201 :conn-count #x2) + (new 'static 'trail-node :x #x178 :y 18 :z -329 :first-conn #x203 :conn-count #x2) + (new 'static 'trail-node :x #x164 :y 18 :z -356 :first-conn #x205 :conn-count #x3) + (new 'static 'trail-node :x #x156 :y 18 :z -281 :first-conn #x208 :conn-count #x3) + (new 'static 'trail-node :x #xbe :y 18 :z -300 :first-conn #x20b :conn-count #x3) + (new 'static 'trail-node :x #x84 :y 18 :z -160 :first-conn #x20e :conn-count #x3) + (new 'static 'trail-node :x #x13c :y 18 :z -255 :first-conn #x211 :conn-count #x2) + (new 'static 'trail-node :x #xfd :y 18 :z -247 :first-conn #x213 :conn-count #x3) + (new 'static 'trail-node :x #x8c :y 18 :z -209 :first-conn #x216 :conn-count #x3) + (new 'static 'trail-node :x #xbf :y 18 :z -230 :first-conn #x219 :conn-count #x4) + (new 'static 'trail-node :x #x79 :y 18 :z -98 :first-conn #x21d :conn-count #x3) + (new 'static 'trail-node :x #xb8 :y 18 :z -154 :first-conn #x220 :conn-count #x3) + (new 'static 'trail-node :x #xb4 :y 17 :z -102 :first-conn #x223 :conn-count #x3) + (new 'static 'trail-node :x #xc4 :y 18 :z -73 :first-conn #x226 :conn-count #x3) + (new 'static 'trail-node :x -373 :y 18 :z #x466 :first-conn #x229 :conn-count #x2) + (new 'static 'trail-node :x -322 :y 18 :z #x42e :first-conn #x22b :conn-count #x3) + (new 'static 'trail-node :x -261 :y 18 :z #x3f6 :first-conn #x22e :conn-count #x3) + (new 'static 'trail-node :x -246 :y 18 :z #x3d6 :first-conn #x231 :conn-count #x2) + (new 'static 'trail-node :x -261 :y 18 :z #x3b0 :first-conn #x233 :conn-count #x2) + (new 'static 'trail-node :x -342 :y 18 :z #x399 :first-conn #x235 :conn-count #x2) + (new 'static 'trail-node :x -465 :y 18 :z #x3a5 :first-conn #x237 :conn-count #x1) + (new 'static 'trail-node :x -249 :y 18 :z #x454 :first-conn #x238 :conn-count #x3) + (new 'static 'trail-node :x -179 :y 18 :z #x484 :first-conn #x23b :conn-count #x2) + (new 'static 'trail-node :x -43 :y 18 :z #x447 :first-conn #x23d :conn-count #x2) + (new 'static 'trail-node :x 3 :y 18 :z #x3e9 :first-conn #x23f :conn-count #x2) + (new 'static 'trail-node :x -3 :y 18 :z #x3a8 :first-conn #x241 :conn-count #x2) + (new 'static 'trail-node :x -55 :y 18 :z #x390 :first-conn #x243 :conn-count #x2) + (new 'static 'trail-node :x -126 :y 18 :z #x3a2 :first-conn #x245 :conn-count #x2) + (new 'static 'trail-node :x -177 :y 18 :z #x38f :first-conn #x247 :conn-count #x2) + (new 'static 'trail-node :x -187 :y 18 :z #x35c :first-conn #x249 :conn-count #x2) + (new 'static 'trail-node :x -98 :y 18 :z #x2f8 :first-conn #x24b :conn-count #x2) + (new 'static 'trail-node :x -95 :y 18 :z #x2bb :first-conn #x24d :conn-count #x2) + (new 'static 'trail-node :x -132 :y 18 :z #x29a :first-conn #x24f :conn-count #x2) + (new 'static 'trail-node :x -178 :y 18 :z #x2a0 :first-conn #x251 :conn-count #x2) + (new 'static 'trail-node :x -268 :y 18 :z #x30a :first-conn #x253 :conn-count #x2) + (new 'static 'trail-node :x -304 :y 18 :z #x31e :first-conn #x255 :conn-count #x2) + (new 'static 'trail-node :x -348 :y 18 :z #x30f :first-conn #x257 :conn-count #x2) + (new 'static 'trail-node :x -359 :y 18 :z #x2d9 :first-conn #x259 :conn-count #x2) + (new 'static 'trail-node :x -313 :y 18 :z #x25a :first-conn #x25b :conn-count #x1) + ) + :conn (new 'static 'inline-array trail-conn 302 + (new 'static 'trail-conn :tail-id #x1 :visgroup-id #x1 :cost #xea) + (new 'static 'trail-conn :tail-id #x2 :visgroup-id #x1 :cost #x20d) + (new 'static 'trail-conn :tail-id #x3 :visgroup-id #x1 :cost #x1ef) + (new 'static 'trail-conn :head-id #x1 :tail-id #x2 :visgroup-id #x1 :cost #x171) + (new 'static 'trail-conn :head-id #x1 :tail-id #x3 :visgroup-id #x1 :cost #x184) + (new 'static 'trail-conn :head-id #x1 :tail-id #x26 :cost #x194) + (new 'static 'trail-conn :head-id #x2 :tail-id #x3 :visgroup-id #x1 :cost #x71) + (new 'static 'trail-conn :head-id #x3 :tail-id #x6 :cost #xd1) + (new 'static 'trail-conn :head-id #x4 :tail-id #x5 :cost #x139) + (new 'static 'trail-conn :head-id #x4 :tail-id #x7 :visgroup-id #x2 :cost #x94) + (new 'static 'trail-conn :head-id #x4 :tail-id #x6 :visgroup-id #x2 :cost #xc2) + (new 'static 'trail-conn :head-id #x6 :tail-id #x7 :visgroup-id #x2 :cost #x112) + (new 'static 'trail-conn :head-id #x7 :tail-id #x8 :visgroup-id #x3 :cost #x1bc) + (new 'static 'trail-conn :head-id #x8 :tail-id #xb :cost #x149) + (new 'static 'trail-conn :head-id #x8 :tail-id #x9 :visgroup-id #x3 :cost #x1a1) + (new 'static 'trail-conn :head-id #x7 :tail-id #x9 :visgroup-id #x3 :cost #x122) + (new 'static 'trail-conn :head-id #x9 :tail-id #xa :cost #x109) + (new 'static 'trail-conn :head-id #xb :tail-id #xc :cost #x96) + (new 'static 'trail-conn :head-id #xc :tail-id #xd :visgroup-id #x4 :cost #x26c) + (new 'static 'trail-conn :head-id #xc :tail-id #xe :visgroup-id #x4 :cost #x29e) + (new 'static 'trail-conn :head-id #xd :tail-id #xe :visgroup-id #x4 :cost #x16b) + (new 'static 'trail-conn :head-id #xd :tail-id #x2e :cost #x241) + (new 'static 'trail-conn :head-id #xe :tail-id #xf :cost #x1cd) + (new 'static 'trail-conn :head-id #xf :tail-id #x10 :cost #x2d9) + (new 'static 'trail-conn :head-id #x10 :tail-id #x11 :cost #xde) + (new 'static 'trail-conn :head-id #x10 :tail-id #x18 :cost #xec) + (new 'static 'trail-conn :head-id #x11 :tail-id #x12 :cost #xf1) + (new 'static 'trail-conn :head-id #x11 :tail-id #x18 :cost #xe2) + (new 'static 'trail-conn :head-id #x12 :tail-id #x13 :cost #x25a) + (new 'static 'trail-conn :head-id #x13 :tail-id #x14 :cost #x9f) + (new 'static 'trail-conn :head-id #x14 :tail-id #x15 :visgroup-id #x5 :cost #x10a) + (new 'static 'trail-conn :head-id #x15 :tail-id #x16 :visgroup-id #x5 :cost #x1c0) + (new 'static 'trail-conn :head-id #x15 :tail-id #x1e :cost #x94) + (new 'static 'trail-conn :head-id #x15 :tail-id #x1f :cost #x105) + (new 'static 'trail-conn :head-id #x16 :tail-id #x17 :cost #x9f) + (new 'static 'trail-conn :head-id #x14 :tail-id #x16 :visgroup-id #x5 :cost #x216) + (new 'static 'trail-conn :head-id #x3 :tail-id #x17 :cost #x13f) + (new 'static 'trail-conn :head-id #x4 :tail-id #x17 :visgroup-id #x2 :cost #x1bc) + (new 'static 'trail-conn :head-id #x6 :tail-id #x17 :visgroup-id #x6 :cost #x129) + (new 'static 'trail-conn :head-id #x7 :tail-id #x17 :visgroup-id #x2 :cost #x1ad) + (new 'static 'trail-conn :head-id #x18 :tail-id #x19 :cost #xdb) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1a :cost #x125) + (new 'static 'trail-conn :head-id #x19 :tail-id #x21 :cost #x169) + (new 'static 'trail-conn :head-id #x1a :tail-id #x1b :cost #x112) + (new 'static 'trail-conn :head-id #x1a :tail-id #x21 :cost #x121) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1c :visgroup-id #x7 :cost #x26f) + (new 'static 'trail-conn :head-id #x1c :tail-id #x1d :cost #x12c) + (new 'static 'trail-conn :head-id #x1d :tail-id #x1e :cost #x124) + (new 'static 'trail-conn :head-id #x1f :tail-id #x20 :visgroup-id #x8 :cost #xd0) + (new 'static 'trail-conn :head-id #x1f :tail-id #x26 :visgroup-id #x8 :cost #x21b) + (new 'static 'trail-conn :head-id #x1f :tail-id #x27 :visgroup-id #x8 :cost #x277) + (new 'static 'trail-conn :head-id #x1e :tail-id #x1f :cost #xf4) + (new 'static 'trail-conn :head-id #x2 :tail-id #x20 :cost #x104) + (new 'static 'trail-conn :head-id #x20 :tail-id #x26 :visgroup-id #x8 :cost #x180) + (new 'static 'trail-conn :head-id #x20 :tail-id #x27 :visgroup-id #x8 :cost #x246) + (new 'static 'trail-conn :head-id #x21 :tail-id #x22 :cost #xc1) + (new 'static 'trail-conn :head-id #x22 :tail-id #xc4 :cost #x9f) + (new 'static 'trail-conn :head-id #x23 :tail-id #x24 :cost #x142) + (new 'static 'trail-conn :head-id #x1b :tail-id #x24 :visgroup-id #x7 :cost #x25c) + (new 'static 'trail-conn :head-id #x1c :tail-id #x24 :visgroup-id #x7 :cost #x199) + (new 'static 'trail-conn :head-id #x23 :tail-id #x25 :cost #xe2) + (new 'static 'trail-conn :head-id #x26 :tail-id #x27 :visgroup-id #x8 :cost #x15c) + (new 'static 'trail-conn :head-id #x27 :tail-id #x28 :cost #x24d) + (new 'static 'trail-conn :head-id #x28 :tail-id #x2a :cost #x270) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2a :cost #x184) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2b :cost #x138) + (new 'static 'trail-conn :head-id #x2b :tail-id #x2c :cost #x236) + (new 'static 'trail-conn :head-id #x2c :tail-id #xc2 :cost #xa9) + (new 'static 'trail-conn :head-id #x2d :tail-id #x8a :flags (conn-flag cf4) :cost #x41) + (new 'static 'trail-conn :head-id #x2d :tail-id #x2e :cost #x161) + (new 'static 'trail-conn :head-id #x2f :tail-id #x30 :visgroup-id #x9 :cost #x13e) + (new 'static 'trail-conn :head-id #x30 :tail-id #x31 :visgroup-id #x9 :cost #x1c6) + (new 'static 'trail-conn :head-id #x30 :tail-id #x36 :cost #xfb) + (new 'static 'trail-conn :head-id #x2f :tail-id #x31 :visgroup-id #x9 :cost #x2d7) + (new 'static 'trail-conn :head-id #x31 :tail-id #x33 :cost #x209) + (new 'static 'trail-conn :head-id #x2f :tail-id #x32 :visgroup-id #x9 :cost #x2ec) + (new 'static 'trail-conn :head-id #x31 :tail-id #x32 :visgroup-id #x9 :cost #x204) + (new 'static 'trail-conn :head-id #x33 :tail-id #x34 :visgroup-id #xa :cost #xa7) + (new 'static 'trail-conn :head-id #x34 :tail-id #x35 :cost #xdc) + (new 'static 'trail-conn :head-id #x35 :tail-id #x36 :visgroup-id #xb :cost #x238) + (new 'static 'trail-conn :head-id #x35 :tail-id #x37 :visgroup-id #xb :cost #x355) + (new 'static 'trail-conn :head-id #x35 :tail-id #x38 :visgroup-id #xb :cost #x379) + (new 'static 'trail-conn :head-id #x36 :tail-id #x37 :visgroup-id #xb :cost #x206) + (new 'static 'trail-conn :head-id #x36 :tail-id #x38 :visgroup-id #xb :cost #x362) + (new 'static 'trail-conn :head-id #x37 :tail-id #x38 :visgroup-id #xb :cost #x1ee) + (new 'static 'trail-conn :head-id #x38 :tail-id #x39 :cost #x172) + (new 'static 'trail-conn :head-id #x39 :tail-id #x3a :cost #xd9) + (new 'static 'trail-conn :head-id #x3a :tail-id #x3b :cost #x209) + (new 'static 'trail-conn :head-id #x3b :tail-id #x3e :cost #x10d) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3d :visgroup-id #xc :cost #x171) + (new 'static 'trail-conn :head-id #x3c :tail-id #xc5 :visgroup-id #xd :cost #xf4) + (new 'static 'trail-conn :head-id #x3d :tail-id #xc6 :visgroup-id #xe :cost #xe6) + (new 'static 'trail-conn :head-id #x3e :tail-id #x3f :cost #x100) + (new 'static 'trail-conn :head-id #x3f :tail-id #x40 :cost #xdd) + (new 'static 'trail-conn :head-id #x41 :tail-id #x42 :visgroup-id #xf :cost #x2fb) + (new 'static 'trail-conn :head-id #x40 :tail-id #x41 :cost #x5b9) + (new 'static 'trail-conn :head-id #x42 :tail-id #x43 :visgroup-id #xf :cost #x24c) + (new 'static 'trail-conn :head-id #x43 :tail-id #x44 :visgroup-id #xf :cost #x2c1) + (new 'static 'trail-conn :head-id #x41 :tail-id #x44 :visgroup-id #xf :cost #x289) + (new 'static 'trail-conn :head-id #x45 :tail-id #x48 :cost #x141) + (new 'static 'trail-conn :head-id #x46 :tail-id #xa6 :visgroup-id #x10 :cost #x92) + (new 'static 'trail-conn :head-id #x46 :tail-id #x47 :visgroup-id #x10 :cost #x123) + (new 'static 'trail-conn :head-id #x42 :tail-id #x47 :visgroup-id #x11 :cost #x25a) + (new 'static 'trail-conn :head-id #x48 :tail-id #x49 :visgroup-id #x12 :cost #x149) + (new 'static 'trail-conn :head-id #x48 :tail-id #x4a :visgroup-id #x12 :cost #x1f1) + (new 'static 'trail-conn :head-id #x49 :tail-id #x4a :visgroup-id #x12 :cost #x16c) + (new 'static 'trail-conn :head-id #x49 :tail-id #x51 :cost #xe9) + (new 'static 'trail-conn :head-id #x4b :tail-id #x99 :cost #xbc) + (new 'static 'trail-conn :head-id #x4c :tail-id #x4d :cost #x1e9) + (new 'static 'trail-conn :head-id #x4a :tail-id #x4d :cost #x1b1) + (new 'static 'trail-conn :head-id #x4e :tail-id #x4f :cost #xbb) + (new 'static 'trail-conn :head-id #x4b :tail-id #x4f :cost #x231) + (new 'static 'trail-conn :head-id #x50 :tail-id #xd8 :cost #xb9) + (new 'static 'trail-conn :head-id #x51 :tail-id #x52 :visgroup-id #x13 :cost #x10a) + (new 'static 'trail-conn :head-id #x52 :tail-id #x9e :cost #x132) + (new 'static 'trail-conn :head-id #x53 :tail-id #x54 :visgroup-id #x14 :cost #x1f9) + (new 'static 'trail-conn :head-id #x55 :tail-id #xd4 :cost #x129) + (new 'static 'trail-conn :head-id #x55 :tail-id #x56 :cost #x34f) + (new 'static 'trail-conn :head-id #x56 :tail-id #x57 :cost #x89) + (new 'static 'trail-conn :head-id #x54 :tail-id #x57 :visgroup-id #x15 :cost #xef) + (new 'static 'trail-conn :head-id #x50 :tail-id #x58 :cost #x2f7) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5a :cost #x1c0) + (new 'static 'trail-conn :head-id #x5a :tail-id #x5b :cost #x487) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5c :visgroup-id #x16 :cost #x171) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5e :visgroup-id #x16 :cost #x14b) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5e :visgroup-id #x17 :cost #x1fd) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5d :visgroup-id #x17 :cost #xd85) + (new 'static 'trail-conn :head-id #x5e :tail-id #xa0 :visgroup-id #x17 :cost #x609) + (new 'static 'trail-conn :head-id #x5f :tail-id #x61 :visgroup-id #x17 :cost #x191) + (new 'static 'trail-conn :head-id #x5f :tail-id #x60 :visgroup-id #x18 :cost #x127) + (new 'static 'trail-conn :head-id #x5e :tail-id #x5f :visgroup-id #x17 :cost #xb1c) + (new 'static 'trail-conn :head-id #x60 :tail-id #x61 :visgroup-id #x18 :cost #x116) + (new 'static 'trail-conn :head-id #x61 :tail-id #x62 :visgroup-id #x17 :cost #x73a) + (new 'static 'trail-conn :head-id #x5e :tail-id #x63 :visgroup-id #x17 :cost #x16d1) + (new 'static 'trail-conn :head-id #x63 :tail-id #x64 :visgroup-id #x19 :cost #x1c3) + (new 'static 'trail-conn :head-id #x61 :tail-id #x63 :visgroup-id #x17 :cost #xae3) + (new 'static 'trail-conn :head-id #x62 :tail-id #x63 :visgroup-id #x17 :cost #x4d2) + (new 'static 'trail-conn :head-id #x64 :tail-id #x65 :visgroup-id #x19 :cost #x1a4) + (new 'static 'trail-conn :head-id #x63 :tail-id #x65 :visgroup-id #x17 :cost #x263) + (new 'static 'trail-conn :head-id #x65 :tail-id #x66 :visgroup-id #x17 :cost #xd44) + (new 'static 'trail-conn :head-id #x64 :tail-id #x67 :cost #x45f) + (new 'static 'trail-conn :head-id #x67 :tail-id #x68 :cost #x161) + (new 'static 'trail-conn :head-id #x68 :tail-id #x69 :cost #x311) + (new 'static 'trail-conn :head-id #x69 :tail-id #xe7 :cost #x3f1) + (new 'static 'trail-conn :head-id #x4e :tail-id #x6a :cost #x26b) + (new 'static 'trail-conn :head-id #x6a :tail-id #x78 :visgroup-id #x1a :cost #x4bf) + (new 'static 'trail-conn :head-id #x6a :tail-id #x79 :visgroup-id #x1a :cost #x371) + (new 'static 'trail-conn :head-id #x6b :tail-id #x71 :cost #x174) + (new 'static 'trail-conn :head-id #x6a :tail-id #x6b :visgroup-id #x1a :cost #x331) + (new 'static 'trail-conn :head-id #x6c :tail-id #x6d :visgroup-id #x1b :cost #x191) + (new 'static 'trail-conn :head-id #x6d :tail-id #x6e :visgroup-id #x1c :cost #x3c1) + (new 'static 'trail-conn :head-id #x6e :tail-id #x6f :visgroup-id #x1d :cost #x10a) + (new 'static 'trail-conn :head-id #x70 :tail-id #x72 :visgroup-id #x1e :cost #xd8) + (new 'static 'trail-conn :head-id #x70 :tail-id #x71 :visgroup-id #x1e :cost #x127) + (new 'static 'trail-conn :head-id #x71 :tail-id #x72 :visgroup-id #x1e :cost #x149) + (new 'static 'trail-conn :head-id #x72 :tail-id #x73 :cost #x102) + (new 'static 'trail-conn :head-id #x73 :tail-id #x74 :cost #x3b1) + (new 'static 'trail-conn :head-id #x74 :tail-id #x75 :cost #xf4) + (new 'static 'trail-conn :head-id #x76 :tail-id #x7d :visgroup-id #x1f :cost #x181) + (new 'static 'trail-conn :head-id #x76 :tail-id #xad :flags (conn-flag cf5) :cost #x71) + (new 'static 'trail-conn :head-id #x75 :tail-id #x77 :cost #x1f1) + (new 'static 'trail-conn :head-id #x78 :tail-id #x79 :visgroup-id #x1a :cost #x312) + (new 'static 'trail-conn :head-id #x6b :tail-id #x78 :visgroup-id #x1a :cost #x3a9) + (new 'static 'trail-conn :head-id #x77 :tail-id #x78 :cost #x183) + (new 'static 'trail-conn :head-id #x6b :tail-id #x79 :visgroup-id #x1a :cost #x4b6) + (new 'static 'trail-conn :head-id #x79 :tail-id #x7a :cost #x169) + (new 'static 'trail-conn :head-id #x7b :tail-id #x84 :cost #xa1) + (new 'static 'trail-conn :head-id #x7b :tail-id #x7c :cost #x84) + (new 'static 'trail-conn :head-id #x7d :tail-id #x7e :visgroup-id #x1f :cost #xf4) + (new 'static 'trail-conn :head-id #x7d :tail-id #x7f :cost #x171) + (new 'static 'trail-conn :head-id #x7c :tail-id #x7e :cost #x2f1) + (new 'static 'trail-conn :head-id #x76 :tail-id #x7e :visgroup-id #x1f :cost #x117) + (new 'static 'trail-conn :head-id #x7a :tail-id #x80 :cost #x1a3) + (new 'static 'trail-conn :head-id #x80 :tail-id #x81 :cost #x312) + (new 'static 'trail-conn :head-id #x7f :tail-id #x82 :cost #x155) + (new 'static 'trail-conn :head-id #x82 :tail-id #x83 :cost #x2f1) + (new 'static 'trail-conn :head-id #x83 :tail-id #x84 :visgroup-id #x20 :cost #x21b) + (new 'static 'trail-conn :head-id #x83 :tail-id #x9d :visgroup-id #x20 :cost #x163) + (new 'static 'trail-conn :head-id #x84 :tail-id #x9d :visgroup-id #x20 :cost #x2c2) + (new 'static 'trail-conn :head-id #x85 :tail-id #xad :cost #x26d) + (new 'static 'trail-conn :head-id #x85 :tail-id #x86 :cost #x229) + (new 'static 'trail-conn :head-id #x86 :tail-id #x87 :cost #x8f) + (new 'static 'trail-conn :head-id #x87 :tail-id #x88 :cost #xd1) + (new 'static 'trail-conn :head-id #x88 :tail-id #x89 :cost #x10f) + (new 'static 'trail-conn :head-id #x89 :tail-id #xe6 :cost #x101) + (new 'static 'trail-conn :head-id #x8a :tail-id #xd9 :cost #xd9) + (new 'static 'trail-conn :head-id #x8b :tail-id #x8c :visgroup-id #x21 :cost #x171) + (new 'static 'trail-conn :head-id #x8d :tail-id #x8e :visgroup-id #x22 :cost #x169) + (new 'static 'trail-conn :head-id #x58 :tail-id #x8f :cost #x159) + (new 'static 'trail-conn :head-id #x59 :tail-id #x90 :cost #x18a) + (new 'static 'trail-conn :head-id #x8f :tail-id #x90 :flags (conn-flag cf2) :cost #x71) + (new 'static 'trail-conn :head-id #x91 :tail-id #x93 :visgroup-id #x23 :cost #x151) + (new 'static 'trail-conn :head-id #x94 :tail-id #x95 :visgroup-id #x24 :cost #x89) + (new 'static 'trail-conn :head-id #x95 :tail-id #x96 :visgroup-id #x24 :cost #xa1) + (new 'static 'trail-conn :head-id #x70 :tail-id #x97 :cost #x1f9) + (new 'static 'trail-conn :head-id #x97 :tail-id #x98 :cost #xcc) + (new 'static 'trail-conn :head-id #x98 :tail-id #x99 :cost #x739) + (new 'static 'trail-conn :head-id #x9a :tail-id #x9b :visgroup-id #x14 :cost #x209) + (new 'static 'trail-conn :head-id #x60 :tail-id #x9c :cost #x3f9) + (new 'static 'trail-conn :head-id #x9d :tail-id #xba :cost #xa1) + (new 'static 'trail-conn :head-id #x54 :tail-id #x9e :visgroup-id #x14 :cost #x2ca) + (new 'static 'trail-conn :head-id #x53 :tail-id #x9e :visgroup-id #x14 :cost #x1e1) + (new 'static 'trail-conn :head-id #x9b :tail-id #x9f :visgroup-id #x14 :cost #x12a) + (new 'static 'trail-conn :head-id #x5f :tail-id #xa0 :visgroup-id #x17 :cost #x68b) + (new 'static 'trail-conn :head-id #xa1 :tail-id #xa2 :visgroup-id #x25 :cost #x1c9) + (new 'static 'trail-conn :head-id #xa3 :tail-id #xa4 :visgroup-id #x10 :cost #x1c9) + (new 'static 'trail-conn :head-id #x45 :tail-id #xa5 :cost #xe1) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xa6 :flags (conn-flag cf3) :cost #x49) + (new 'static 'trail-conn :head-id #xa7 :tail-id #xa8 :visgroup-id #x26 :cost #x1e9) + (new 'static 'trail-conn :head-id #x92 :tail-id #xaa :visgroup-id #x1f :cost #x149) + (new 'static 'trail-conn :head-id #xab :tail-id #xac :cost #x1b5) + (new 'static 'trail-conn :head-id #xa9 :tail-id #xae :visgroup-id #x27 :cost #x1e9) + (new 'static 'trail-conn :head-id #x81 :tail-id #xaf :cost #x105) + (new 'static 'trail-conn :head-id #xb0 :tail-id #xb1 :visgroup-id #x28 :cost #x145) + (new 'static 'trail-conn :head-id #xaf :tail-id #xb1 :cost #x271) + (new 'static 'trail-conn :head-id #xb1 :tail-id #xb2 :visgroup-id #x28 :cost #xe9) + (new 'static 'trail-conn :head-id #xb2 :tail-id #xb9 :visgroup-id #x28 :cost #x169) + (new 'static 'trail-conn :head-id #xb2 :tail-id #xb3 :cost #x10a) + (new 'static 'trail-conn :head-id #xb3 :tail-id #xb4 :cost #x3a1) + (new 'static 'trail-conn :head-id #xb4 :tail-id #xb5 :cost #xd2) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb6 :visgroup-id #x29 :cost #x25b) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xbb :visgroup-id #x2a :cost #x173) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb9 :visgroup-id #x2b :cost #x18e) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb8 :visgroup-id #x29 :cost #x2e6) + (new 'static 'trail-conn :head-id #xb6 :tail-id #xb8 :visgroup-id #x29 :cost #x1c0) + (new 'static 'trail-conn :head-id #xb8 :tail-id #xbc :visgroup-id #x2c :cost #x154) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb8 :visgroup-id #x2c :cost #x3e1) + (new 'static 'trail-conn :head-id #xb9 :tail-id #xba :visgroup-id #x2b :cost #x2aa) + (new 'static 'trail-conn :head-id #xba :tail-id #xbb :visgroup-id #x2b :cost #x1b1) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbd :visgroup-id #x2d :cost #x14a) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbc :visgroup-id #x2c :cost #x22a) + (new 'static 'trail-conn :head-id #xbc :tail-id #xbd :visgroup-id #x2c :cost #x1a9) + (new 'static 'trail-conn :head-id #xbd :tail-id #xbe :cost #x4c9) + (new 'static 'trail-conn :head-id #xbe :tail-id #xbf :cost #xc4) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc0 :cost #x159) + (new 'static 'trail-conn :head-id #xc0 :tail-id #xc1 :cost #x8e) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc2 :cost #x143) + (new 'static 'trail-conn :head-id #x5 :tail-id #xc3 :cost #xc7) + (new 'static 'trail-conn :tail-id #xc3 :cost #xac) + (new 'static 'trail-conn :head-id #x25 :tail-id #xc4 :cost #x40f) + (new 'static 'trail-conn :head-id #xc7 :tail-id #xc8 :cost #x1bc) + (new 'static 'trail-conn :head-id #x2e :tail-id #xc8 :cost #x111) + (new 'static 'trail-conn :head-id #xca :tail-id #xcb :cost #x59) + (new 'static 'trail-conn :head-id #xcb :tail-id #xcc :cost #x51) + (new 'static 'trail-conn :head-id #xcd :tail-id #xce :cost #x69) + (new 'static 'trail-conn :head-id #xce :tail-id #xcf :cost #x61) + (new 'static 'trail-conn :head-id #xd0 :tail-id #xd1 :visgroup-id #x2e :cost #x411) + (new 'static 'trail-conn :head-id #xc9 :tail-id #xd2 :visgroup-id #x2e :cost #xa9) + (new 'static 'trail-conn :head-id #xd1 :tail-id #xd2 :visgroup-id #x2e :cost #x109) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd8 :visgroup-id #x2f :cost #xb3) + (new 'static 'trail-conn :head-id #xd4 :tail-id #xd7 :visgroup-id #x2e :cost #x5ab) + (new 'static 'trail-conn :head-id #xd4 :tail-id #xd5 :visgroup-id #x2e :cost #x147) + (new 'static 'trail-conn :head-id #x4c :tail-id #xd5 :visgroup-id #x2e :cost #x1cd) + (new 'static 'trail-conn :head-id #x4c :tail-id #xd6 :visgroup-id #x2e :cost #x149) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd7 :visgroup-id #x30 :cost #x99) + (new 'static 'trail-conn :head-id #xd6 :tail-id #xd7 :visgroup-id #x2e :cost #x351) + (new 'static 'trail-conn :head-id #xd7 :tail-id #xd8 :visgroup-id #x2f :cost #xb0) + (new 'static 'trail-conn :head-id #x2f :tail-id #xd9 :cost #xcb) + (new 'static 'trail-conn :head-id #xda :tail-id #xdb :visgroup-id #x31 :cost #x10d) + (new 'static 'trail-conn :head-id #xac :tail-id #xdb :cost #x160) + (new 'static 'trail-conn :head-id #xda :tail-id #xdc :visgroup-id #x31 :cost #x1d7) + (new 'static 'trail-conn :head-id #xdb :tail-id #xdc :visgroup-id #x31 :cost #x263) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe2 :visgroup-id #x32 :cost #x231) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe1 :visgroup-id #x32 :cost #x33f) + (new 'static 'trail-conn :head-id #xde :tail-id #xe4 :cost #x1a3) + (new 'static 'trail-conn :head-id #xde :tail-id #xe3 :cost #x1f8) + (new 'static 'trail-conn :head-id #xdc :tail-id #xdf :cost #x127) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe0 :visgroup-id #x32 :cost #x293) + (new 'static 'trail-conn :head-id #xdf :tail-id #xe0 :cost #x1fd) + (new 'static 'trail-conn :head-id #xde :tail-id #xe1 :cost #x18e) + (new 'static 'trail-conn :head-id #xe0 :tail-id #xe2 :visgroup-id #x32 :cost #x203) + (new 'static 'trail-conn :head-id #xe1 :tail-id #xe2 :visgroup-id #x32 :cost #x1ba) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe5 :visgroup-id #x33 :cost #x1da) + (new 'static 'trail-conn :head-id #xe2 :tail-id #xe4 :cost #x263) + (new 'static 'trail-conn :head-id #xe4 :tail-id #xe5 :cost #x1a2) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe6 :visgroup-id #x33 :cost #x279) + (new 'static 'trail-conn :head-id #xe5 :tail-id #xe6 :visgroup-id #x33 :cost #x109) + (new 'static 'trail-conn :head-id #xe7 :tail-id #xe8 :cost #x25e) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xe9 :cost #x297) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xee :cost #x293) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xea :cost #x11b) + (new 'static 'trail-conn :head-id #xea :tail-id #xeb :cost #x147) + (new 'static 'trail-conn :head-id #xeb :tail-id #xec :cost #x2a2) + (new 'static 'trail-conn :head-id #xec :tail-id #xed :cost #x3dd) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xee :cost #x2f7) + (new 'static 'trail-conn :head-id #xee :tail-id #xef :cost #x2a8) + (new 'static 'trail-conn :head-id #xef :tail-id #xf0 :cost #x4a9) + (new 'static 'trail-conn :head-id #xf0 :tail-id #xf1 :cost #x346) + (new 'static 'trail-conn :head-id #xf1 :tail-id #xf2 :cost #x20b) + (new 'static 'trail-conn :head-id #xf2 :tail-id #xf3 :cost #x1cb) + (new 'static 'trail-conn :head-id #xf3 :tail-id #xf4 :cost #x24a) + (new 'static 'trail-conn :head-id #xf4 :tail-id #xf5 :cost #x1b4) + (new 'static 'trail-conn :head-id #xf5 :tail-id #xf6 :cost #x1a0) + (new 'static 'trail-conn :head-id #xf6 :tail-id #xf7 :cost #x42f) + (new 'static 'trail-conn :head-id #xf7 :tail-id #xf8 :cost #x1e9) + (new 'static 'trail-conn :head-id #xf8 :tail-id #xf9 :cost #x18d) + (new 'static 'trail-conn :head-id #xf9 :tail-id #xfa :cost #x174) + (new 'static 'trail-conn :head-id #xfa :tail-id #xfb :cost #x459) + (new 'static 'trail-conn :head-id #xfb :tail-id #xfc :cost #x14a) + (new 'static 'trail-conn :head-id #xfc :tail-id #xfd :cost #x174) + (new 'static 'trail-conn :head-id #xfd :tail-id #xfe :cost #x1b9) + (new 'static 'trail-conn :head-id #xfe :tail-id #xff :cost #x439) + ) + :blocker #f + :conn-ids (new 'static 'array uint16 608 + #x0 + #x1 + #x2 + #xee + #x0 + #x3 + #x4 + #x5 + #x1 + #x3 + #x6 + #x34 + #x2 + #x4 + #x6 + #x7 + #x24 + #x8 + #x9 + #xa + #x25 + #x8 + #xed + #x7 + #xa + #xb + #x26 + #x9 + #xb + #xc + #xf + #x27 + #xc + #xd + #xe + #xe + #xf + #x10 + #x10 + #xd + #x11 + #x11 + #x12 + #x13 + #x12 + #x14 + #x15 + #x13 + #x14 + #x16 + #x16 + #x17 + #x17 + #x18 + #x19 + #x18 + #x1a + #x1b + #x1a + #x1c + #x1c + #x1d + #x1d + #x1e + #x23 + #x1e + #x1f + #x20 + #x21 + #x1f + #x22 + #x23 + #x22 + #x24 + #x25 + #x26 + #x27 + #x19 + #x1b + #x28 + #x28 + #x29 + #x2a + #x29 + #x2b + #x2c + #x2b + #x2d + #x3a + #x2d + #x2e + #x3b + #x2e + #x2f + #x20 + #x2f + #x33 + #x21 + #x30 + #x31 + #x32 + #x33 + #x30 + #x34 + #x35 + #x36 + #x2a + #x2c + #x37 + #x37 + #x38 + #x39 + #x3c + #x39 + #x3a + #x3b + #x3c + #xef + #x5 + #x31 + #x35 + #x3d + #x32 + #x36 + #x3d + #x3e + #x3e + #x3f + #x40 + #x41 + #x3f + #x40 + #x41 + #x42 + #x42 + #x43 + #x44 + #x45 + #x15 + #x45 + #xf1 + #x46 + #x49 + #x4b + #x101 + #x46 + #x47 + #x48 + #x47 + #x49 + #x4a + #x4c + #x4b + #x4c + #x4a + #x4d + #x4d + #x4e + #x4e + #x4f + #x50 + #x51 + #x48 + #x4f + #x52 + #x53 + #x50 + #x52 + #x54 + #x51 + #x53 + #x54 + #x55 + #x55 + #x56 + #x56 + #x57 + #x57 + #x58 + #x59 + #x5a + #x59 + #x5b + #x58 + #x5c + #x5c + #x5d + #x5d + #x5f + #x5e + #x5f + #x62 + #x5e + #x60 + #x66 + #x60 + #x61 + #x61 + #x62 + #x63 + #xce + #x64 + #x65 + #x65 + #x66 + #x63 + #x67 + #x68 + #x67 + #x69 + #x6a + #x68 + #x69 + #x6d + #x6b + #x6f + #x6c + #xfc + #xfd + #x6c + #x6d + #x6e + #x90 + #x6e + #x6f + #x70 + #x78 + #x6a + #x71 + #x71 + #x72 + #x73 + #xc9 + #x73 + #x77 + #xc8 + #x74 + #x75 + #x75 + #x76 + #x76 + #x77 + #x78 + #xbc + #x79 + #xbd + #x79 + #x7a + #x7a + #x7b + #x7c + #x7b + #x7d + #x7e + #x7e + #x7c + #x7d + #x7f + #x82 + #x85 + #x80 + #x81 + #x82 + #xcb + #x81 + #x83 + #xc6 + #x80 + #x83 + #x84 + #x87 + #x84 + #x88 + #x85 + #x86 + #x87 + #x88 + #x8a + #x86 + #x89 + #x8c + #x89 + #x8a + #x8b + #x8b + #x8c + #x8d + #x8d + #x8e + #x8e + #x8f + #x90 + #x91 + #x92 + #x94 + #x93 + #x94 + #xa2 + #xa4 + #x95 + #x95 + #x96 + #x96 + #x97 + #x97 + #x98 + #x99 + #xc2 + #x93 + #x99 + #x9a + #x98 + #x9a + #x9b + #x9b + #x9c + #x9c + #x9d + #x9d + #xa0 + #x9e + #x9f + #xab + #xa0 + #xa3 + #x91 + #xa1 + #xa2 + #xa3 + #x92 + #xa1 + #xa4 + #xa5 + #xa5 + #xac + #xa6 + #xa7 + #xa7 + #xaa + #x9e + #xa8 + #xa9 + #xa8 + #xaa + #xab + #xa9 + #xae + #xac + #xad + #xad + #xd4 + #xae + #xaf + #xaf + #xb0 + #xb1 + #xa6 + #xb0 + #xb2 + #xb3 + #xb4 + #xb4 + #xb5 + #xb5 + #xb6 + #xb6 + #xb7 + #xb7 + #xb8 + #x44 + #xb9 + #xba + #xba + #xbb + #xbb + #xbc + #xbe + #xbd + #xbe + #xbf + #xd1 + #xbf + #xc0 + #xc0 + #xc1 + #xc1 + #xc2 + #xc3 + #xc3 + #xc4 + #x6b + #xc4 + #xc5 + #xc5 + #xca + #xc6 + #xb1 + #xb2 + #xc7 + #x72 + #xc8 + #xc9 + #xca + #x7f + #xcb + #xcc + #xcc + #xcd + #xcd + #xce + #xcf + #x64 + #xcf + #xd0 + #xd0 + #xd3 + #xd1 + #xd2 + #xd2 + #x103 + #x9f + #xb3 + #xd3 + #xd4 + #xd6 + #xd5 + #xd5 + #xd6 + #xd7 + #xd7 + #xd8 + #xd9 + #xd9 + #xda + #xda + #xdb + #xdb + #xdc + #xdf + #xdc + #xe0 + #xdd + #xde + #xe2 + #xdf + #xe0 + #xe1 + #xe2 + #xd8 + #xde + #xe3 + #xc7 + #xe3 + #xe4 + #xdd + #xe4 + #xe5 + #xe6 + #xe1 + #xe6 + #xe7 + #xe5 + #xe7 + #xe8 + #xe8 + #xe9 + #xe9 + #xea + #xea + #xeb + #xeb + #xec + #x43 + #xec + #xed + #xee + #x38 + #xef + #x5a + #x5b + #xf0 + #xf0 + #xf1 + #xf7 + #xf2 + #xf2 + #xf3 + #xf3 + #xf4 + #xf4 + #xf5 + #xf5 + #xf6 + #xf6 + #xf8 + #xf7 + #xf8 + #xf9 + #xfe + #x74 + #xfa + #xfb + #xfb + #xfc + #xfd + #xff + #xfa + #xfe + #xff + #x100 + #x70 + #xf9 + #x100 + #xb9 + #x101 + #x102 + #x104 + #x102 + #x103 + #x105 + #x104 + #x105 + #x10a + #x106 + #x107 + #x10b + #x108 + #x109 + #x10d + #x10a + #x10c + #x10b + #x10c + #x10e + #x107 + #x10d + #x10f + #x106 + #x10e + #x10f + #x111 + #x109 + #x110 + #x113 + #x108 + #x111 + #x112 + #x110 + #x112 + #x114 + #xb8 + #x113 + #x114 + #x8f + #x115 + #x115 + #x116 + #x117 + #x116 + #x118 + #x11c + #x118 + #x119 + #x119 + #x11a + #x11a + #x11b + #x11b + #x117 + #x11c + #x11d + #x11d + #x11e + #x11e + #x11f + #x11f + #x120 + #x120 + #x121 + #x121 + #x122 + #x122 + #x123 + #x123 + #x124 + #x124 + #x125 + #x125 + #x126 + #x126 + #x127 + #x127 + #x128 + #x128 + #x129 + #x129 + #x12a + #x12a + #x12b + #x12b + #x12c + #x12c + #x12d + #x12d + #x0 + #x0 + #x0 + #x0 + ) + :visgroup (new 'static 'inline-array trail-conn-hash-cell 34 + (new 'static 'trail-conn-hash-cell :conn-count #x4 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x8 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #xb :conn-count #x3 :first-pov #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x11 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x16 :conn-count #x3 :first-pov #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x1d :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x21 :conn-count #x2 :first-pov #x23) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x27 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x2a :conn-count #x2 :first-pov #x2c) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x2e :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x32 :conn-count #x3 :first-pov #x35) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x37 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x3a :conn-count #x2 :first-pov #x3c) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x3f :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x41 :conn-count #x5 :first-pov #x46) + (new 'static 'trail-conn-hash-cell :first-conn #xd :conn-count #x53 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x58 :conn-count #x5 :first-pov #x5d) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x61 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x63 :conn-count #x2 :first-pov #x65) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x67 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x6a :conn-count #x3 :first-pov #x6d) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x70 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x72 :conn-count #x2 :first-pov #x74) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x76 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x78 :conn-count #x2 :first-pov #x7a) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x7c :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x7e :conn-count #x3 :first-pov #x81) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x84 :first-pov #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x8b :conn-count #x4 :first-pov #x8f) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x94 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x98 :conn-count #x6 :first-pov #x9e) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #xa1 :first-pov #x7) + (new 'static 'trail-conn-hash-cell :first-conn #xa8 :conn-count #x3 :first-pov #xab) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #xaf :first-pov #x3) + ) + :visnode-ids (new 'static 'array uint16 184 + #x0 + #x1 + #x2 + #x3 + #x4 + #x6 + #x7 + #x17 + #x7 + #x8 + #x9 + #xc + #xd + #xe + #x14 + #x15 + #x16 + #x3 + #x4 + #x6 + #x7 + #x17 + #x1b + #x1c + #x24 + #x1f + #x20 + #x26 + #x27 + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x3b + #x3e + #x3f + #x3b + #x3e + #x3e + #x3f + #x41 + #x42 + #x43 + #x44 + #x46 + #x47 + #xa6 + #x42 + #x47 + #x48 + #x49 + #x4a + #x51 + #x52 + #x53 + #x54 + #x9e + #x54 + #x57 + #x5b + #x5c + #x5d + #x5e + #x66 + #x5b + #x5c + #x5d + #x5e + #x5f + #x60 + #x61 + #x62 + #x63 + #x64 + #x65 + #x66 + #xa0 + #x5d + #x5f + #x60 + #x61 + #x66 + #x5d + #x63 + #x64 + #x65 + #x66 + #x6a + #x6b + #x78 + #x79 + #x7a + #x80 + #x80 + #x81 + #x81 + #xaf + #x70 + #x71 + #x72 + #x76 + #x7d + #x7e + #x83 + #x84 + #x9d + #x58 + #x8f + #x59 + #x90 + #x85 + #xad + #x4e + #x4f + #x45 + #xa5 + #x8a + #xd9 + #x2d + #x2e + #xb1 + #xb2 + #xb9 + #xb5 + #xb6 + #xb8 + #xb0 + #xb7 + #xb8 + #xba + #xbb + #xbc + #xbd + #xb7 + #xb9 + #xba + #xbb + #xb7 + #xb8 + #xbb + #xbc + #xbd + #xb7 + #xb8 + #xbb + #xbd + #x4c + #xd3 + #xd4 + #xd5 + #xd6 + #xd7 + #xd3 + #xd7 + #xd8 + #x4c + #xd3 + #xd4 + #xd5 + #xd6 + #xd7 + #xd8 + #xda + #xdb + #xdc + #xdd + #xe0 + #xe1 + #xe2 + #xe3 + #xe5 + #xe6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :conn-hash (new 'static 'trail-conn-hash + :cell-width (meters 166.2812) + :origin (new 'static 'vector :x -4051966.0 :z -2941950.2 :w 1.0) + :cell (new 'static 'inline-array trail-conn-hash-cell 256 + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x7 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x12 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x20 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x28 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x2d :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x35 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x3f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x4d :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x5d :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x68 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x74 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x7f :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x8f :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x92 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x99 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x9d :conn-count #x16) + (new 'static 'trail-conn-hash-cell :first-conn #xb3 :conn-count #x1c) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #xd6 :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #xeb :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x107 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x114 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x118 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x11f :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x124 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x130 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x137 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x149 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x14d :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x154 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x159 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x160 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x16c :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x16e :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x16f) + (new 'static 'trail-conn-hash-cell :first-conn #x16f :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x170) + (new 'static 'trail-conn-hash-cell :first-conn #x170) + (new 'static 'trail-conn-hash-cell :first-conn #x170 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x17c :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x17f :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x186 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x188 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x18b :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x18f :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x195 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x198 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x19a :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x1a7 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x1a9 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1aa :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1ab :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x1ad :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + ) + :conn-ids (new 'static 'array uint16 448 + #x6b + #x6e + #x6f + #x90 + #xc0 + #xc1 + #xc4 + #x90 + #x91 + #x92 + #x93 + #x94 + #x99 + #x9a + #xa2 + #xa4 + #xc3 + #xc4 + #x98 + #x99 + #x9a + #x9b + #x9c + #xc2 + #xc3 + #x95 + #x96 + #xa5 + #xac + #xad + #xd2 + #x103 + #x91 + #x92 + #xa0 + #xa1 + #xa2 + #xa3 + #xa4 + #xa5 + #x9c + #x9d + #xa0 + #x107 + #x10f + #x106 + #x107 + #x10a + #x10b + #x10c + #x10e + #x10f + #x111 + #x96 + #x97 + #xad + #xd4 + #xd6 + #x102 + #x103 + #x104 + #x105 + #x10a + #xd5 + #xd6 + #xd7 + #xd8 + #xd9 + #xda + #xdd + #xde + #xe2 + #xe3 + #xe4 + #xe5 + #xe6 + #xe7 + #xda + #xdb + #xdc + #xdf + #xe0 + #xe1 + #xe2 + #xe6 + #xe7 + #x107 + #x108 + #x109 + #x10d + #x10f + #x110 + #x113 + #xb4 + #xb5 + #xb6 + #xb7 + #xb8 + #x108 + #x110 + #x111 + #x112 + #x113 + #x114 + #xa6 + #xa7 + #xa8 + #xaa + #xab + #xae + #xb0 + #xb2 + #xb3 + #xb4 + #xbf + #xd1 + #xae + #xaf + #xb0 + #xb1 + #xb2 + #xc7 + #xe3 + #xe4 + #xe5 + #xe7 + #xe8 + #x42 + #x43 + #xec + #xf2 + #xf3 + #xf4 + #xf5 + #x9e + #x9f + #xa8 + #xa9 + #xab + #xae + #xb3 + #xbf + #xd1 + #xe8 + #xe9 + #xea + #x3f + #x40 + #x41 + #x42 + #xea + #xeb + #xec + #x3f + #x39 + #x3c + #xef + #x5 + #x1e + #x1f + #x20 + #x21 + #x23 + #x2d + #x2e + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x39 + #x3a + #x3b + #x3d + #x3e + #x3f + #x0 + #x1 + #x2 + #x3 + #x4 + #x5 + #x6 + #x7 + #x8 + #x9 + #xa + #xb + #xc + #xd + #xe + #xf + #x10 + #x11 + #x1f + #x22 + #x23 + #x24 + #x25 + #x26 + #x27 + #x34 + #xed + #xee + #x29 + #x2a + #x2b + #x2c + #x37 + #x38 + #xef + #x16 + #x17 + #x18 + #x19 + #x1a + #x1b + #x1c + #x1d + #x1e + #x23 + #x28 + #x29 + #x2a + #x2b + #x2d + #x3a + #x46 + #x49 + #x4b + #x4c + #x101 + #x11 + #x12 + #x13 + #x14 + #x15 + #x16 + #x44 + #x45 + #xb9 + #xd0 + #xd3 + #xf0 + #xf1 + #x101 + #x12d + #x46 + #x47 + #x48 + #x49 + #x4a + #x4c + #x4d + #x4e + #x4f + #x50 + #x51 + #x52 + #x53 + #x50 + #x51 + #x52 + #x53 + #x54 + #x55 + #x56 + #x57 + #xd0 + #xd3 + #xf0 + #x12c + #x12d + #x128 + #x129 + #x12a + #x12d + #x125 + #x126 + #x127 + #x128 + #x60 + #x61 + #x62 + #x5e + #x5f + #x60 + #x62 + #x66 + #x57 + #x58 + #x59 + #x5a + #x5b + #x5c + #x5d + #x5f + #x11a + #x11b + #x12b + #x12c + #x119 + #x11a + #x123 + #x124 + #x125 + #x12a + #x12b + #x120 + #x121 + #x122 + #x123 + #x125 + #x63 + #x64 + #x65 + #x66 + #x67 + #x68 + #x69 + #x6a + #x6d + #xcc + #xcd + #xce + #xcf + #x6a + #x71 + #x72 + #x115 + #x115 + #x116 + #x117 + #x118 + #x119 + #x11c + #x11d + #x11e + #x11f + #x120 + #xf6 + #xf8 + #x6c + #x6d + #xf6 + #xfb + #xfc + #xfd + #xff + #x72 + #x73 + #x75 + #x76 + #x77 + #xc5 + #xc8 + #xc9 + #xca + #x8e + #x8f + #x115 + #x11d + #x11e + #x11e + #xc6 + #x70 + #x78 + #xba + #xbc + #xbe + #xf7 + #xf8 + #xf9 + #xfa + #xfe + #xff + #x100 + #xfa + #xfb + #xff + #x74 + #x75 + #xfa + #xfb + #x8c + #x8d + #x8e + #x88 + #x8c + #x84 + #x87 + #x88 + #x80 + #x83 + #x84 + #x87 + #x80 + #x81 + #x82 + #x83 + #xc6 + #xcb + #x7f + #x82 + #xcb + #x7a + #x7f + #x79 + #x7a + #xbb + #xbd + #xbe + #x85 + #x86 + #x87 + #x88 + #x89 + #x8a + #x8b + #x8c + #x85 + #x87 + #x85 + #x85 + #x82 + #x85 + #x7a + #x7b + #x7c + #x7d + #x7e + #x7f + #x82 + #x85 + #x8b + #x7e + #x8b + #x7e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + :cell-pov-bit-arrays #f + ) + ) diff --git a/goal_src/jak3/levels/city/common/trail-h.gc b/goal_src/jak3/levels/city/common/trail-h.gc index 00254b93c3..eb5d4d12c1 100644 --- a/goal_src/jak3/levels/city/common/trail-h.gc +++ b/goal_src/jak3/levels/city/common/trail-h.gc @@ -5,6 +5,7 @@ ;; name in dgo: trail-h ;; dgos: GAME +;; +++trail-node-flag (defenum trail-node-flag :type uint8 :bitfield #t @@ -12,7 +13,10 @@ (tnf1 1) (tnf2 2) ) +;; ---trail-node-flag + +;; +++conn-flag (defenum conn-flag :type uint8 :bitfield #t @@ -20,7 +24,12 @@ (cf1 1) (cf2 2) (cf3 3) + (cf4 4) + (cf5 5) + (cf6 6) ) +;; ---conn-flag + (declare-type trail-graph basic) @@ -42,7 +51,7 @@ :pack-me (:methods (get-dist-score (_type_ vector) uint) - (debug-draw (_type_ int) none) + (debug-draw (_type_ int) symbol) (get-position (_type_ vector) vector) ) ) @@ -122,7 +131,7 @@ (deftype trail-cached-start-pov (structure) - ((last-updated uint64) + ((last-updated time-frame) (pov-can-see-start uint64) (next-node-id int32) (start-pos vector :inline) @@ -146,12 +155,12 @@ (conn-mask uint8) (node (inline-array trail-node)) (conn (inline-array trail-conn)) - (blocker uint32) + (blocker (inline-array trail-blocker)) (conn-ids (pointer uint16)) (visgroup (inline-array trail-conn-hash-cell)) (visnode-ids (pointer uint16)) (conn-hash trail-conn-hash) - (cell-pov-bit-arrays uint32) + (cell-pov-bit-arrays (pointer uint64)) (pov-can-see-goal uint64) (cached-start-pov trail-cached-start-pov :inline) (orig-start-pos vector :inline) @@ -164,31 +173,31 @@ (closed-bits vector16ub 2 :inline :overlay-at closed-quads) ) (:methods - (trail-graph-method-9 (_type_ int) none) - (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-9 (_type_ int) int) + (trail-graph-method-10 (_type_ int) symbol) (trail-graph-method-11 (_type_ int int) trail-node) - (trail-graph-method-12 (_type_) none) - (trail-graph-method-13 (_type_ vector vector) none) - (debug-draw (_type_) none) - (trail-graph-method-15 (_type_ int) none) - (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) - (trail-graph-method-17 (_type_) none) + (trail-graph-method-12 (_type_ trail-node vector) symbol) + (trail-graph-method-13 (_type_ vector vector) symbol) + (debug-draw (_type_) symbol) + (trail-graph-method-15 (_type_ int) symbol) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) symbol) + (trail-graph-method-17 (_type_ vector vector) int) (trail-graph-method-18 (_type_ vector) int) (trail-graph-method-19 (_type_) none) - (trail-graph-method-20 (_type_ uint vector) none) - (trail-graph-method-21 (_type_) none) - (trail-graph-method-22 (_type_) none) - (trail-graph-method-23 (_type_) none) - (trail-graph-method-24 (_type_) none) - (trail-graph-method-25 (_type_ int) none) - (trail-graph-method-26 (_type_) none) - (trail-graph-method-27 (_type_) none) - (trail-graph-method-28 (_type_) none) - (trail-graph-method-29 (_type_) none) - (trail-graph-method-30 (_type_) none) + (trail-graph-method-20 (_type_ uint vector) vector) + (trail-graph-method-21 (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) + (trail-graph-method-22 (_type_ int int) symbol) + (trail-graph-method-23 (_type_) symbol) + (trail-graph-method-24 (_type_ uint vector int int) symbol) + (trail-graph-method-25 (_type_ int) int) + (trail-graph-method-26 (_type_) int) + (trail-graph-method-27 (_type_) int) + (trail-graph-method-28 (_type_ trail-conn-search int int) symbol) + (trail-graph-method-29 (_type_ vector vector trail-cached-search-info) int) + (trail-graph-method-30 (_type_) int) (trail-graph-method-31 (_type_ int) none) - (trail-graph-method-32 (_type_) none) - (trail-graph-method-33 (_type_) none) + (trail-graph-method-32 (_type_) uint) + (trail-graph-method-33 (_type_ int) symbol) ) ) diff --git a/goal_src/jak3/levels/city/common/trail.gc b/goal_src/jak3/levels/city/common/trail.gc index be14d42d64..da1d92cb28 100644 --- a/goal_src/jak3/levels/city/common/trail.gc +++ b/goal_src/jak3/levels/city/common/trail.gc @@ -5,5 +5,1147 @@ ;; name in dgo: trail ;; dgos: CWI, WASALL +(declare-type trail-vis-work structure) + ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +(defmethod debug-draw ((this trail-conn) (arg0 trail-graph) (arg1 int)) + (let ((a2-3 (-> arg0 node (-> this head-id))) + (v1-2 (-> arg0 node (-> this tail-id))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! + s4-0 + (* 4096.0 (the float (-> a2-3 x))) + (* 4096.0 (the float (-> a2-3 y))) + (* 4096.0 (the float (-> a2-3 z))) + 1.0 + ) + (set-vector! + s3-0 + (* 4096.0 (the float (-> v1-2 x))) + (* 4096.0 (the float (-> v1-2 y))) + (* 4096.0 (the float (-> v1-2 z))) + 1.0 + ) + (vector-lerp! s5-0 s4-0 s3-0 0.5) + (let* ((s2-0 (math-camera-pos)) + (f0-14 (vector-vector-distance-squared s4-0 s2-0)) + (f1-12 819200.0) + ) + (when (or (< f0-14 (* f1-12 f1-12)) + (let ((f0-15 (vector-vector-distance-squared s3-0 s2-0)) + (f1-15 819200.0) + ) + (< f0-15 (* f1-15 f1-15)) + ) + (let ((f0-16 (vector-vector-distance-squared s5-0 s2-0)) + (f1-18 819200.0) + ) + (< f0-16 (* f1-18 f1-18)) + ) + ) + (add-debug-line #t (bucket-id debug) s4-0 s3-0 *color-orange* #f (the-as rgba -1)) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 583) + ) + (format (clear *temp-string*) "~D" arg1) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow) (the-as vector2h #f)) + ) + ) + ) + ) + (none) + ) + +(defmethod debug-draw ((this trail-node) (arg0 int)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'sphere)) + ) + (set-vector! + s5-0 + (* 4096.0 (the float (-> this x))) + (* 4096.0 (the float (-> this y))) + (* 4096.0 (the float (-> this z))) + 1.0 + ) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (set! (-> s4-0 r) 4096.0) + (let ((f0-8 (vector-vector-distance-squared s5-0 (math-camera-pos))) + (f1-6 819200.0) + ) + (when (and (< f0-8 (* f1-6 f1-6)) (sphere-in-view-frustum? s4-0)) + (add-debug-x #t (bucket-id debug) s5-0 *color-red*) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 583) + ) + (format (clear *temp-string*) "~D" arg0) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan) (the-as vector2h #f)) + ) + ) + ) + ) + ) + +(defmethod trail-graph-method-15 ((this trail-graph) (arg0 int)) + (local-vars (sv-80 int) (sv-96 (function _varargs_ object))) + (let* ((s5-0 (-> this conn-hash)) + (s4-0 (-> s5-0 cell arg0)) + (s3-0 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (set-vector! + (-> s3-0 0) + (+ (* (-> s5-0 cell-width) (the float (logand arg0 15))) (-> s5-0 origin x)) + 53248.0 + (+ (* (-> s5-0 cell-width) (the float (/ arg0 16))) (-> s5-0 origin z)) + 1.0 + ) + (set! (-> s3-0 1 quad) (-> s3-0 0 quad)) + (+! (-> s3-0 1 x) (-> s5-0 cell-width)) + (set! (-> s3-0 2 quad) (-> s3-0 1 quad)) + (+! (-> s3-0 2 z) (-> s5-0 cell-width)) + (set! (-> s3-0 3 quad) (-> s3-0 2 quad)) + (set! (-> s3-0 3 x) (- (-> s3-0 3 x) (-> s5-0 cell-width))) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 1) (-> s3-0 2) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 2) (-> s3-0 3) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 3) (-> s3-0 0) *color-white* #f (the-as rgba -1)) + (set-vector! + (-> s3-0 3) + (* 0.5 (+ (-> s3-0 0 x) (-> s3-0 2 x))) + (-> s3-0 0 y) + (* 0.5 (+ (-> s3-0 0 z) (-> s3-0 2 z))) + 1.0 + ) + (let ((s1-0 add-debug-text-3d) + (s0-0 #t) + ) + (set! sv-80 583) + (set! sv-96 format) + (let ((a0-21 (clear *temp-string*)) + (a1-5 "cell ~D (~D,~D)") + (a2-4 arg0) + (a3-4 (logand arg0 15)) + (t0-4 (/ arg0 16)) + ) + (sv-96 a0-21 a1-5 a2-4 a3-4 t0-4) + ) + (let ((a2-5 *temp-string*) + (a3-5 (-> s3-0 3)) + (t0-5 1) + (t1-4 #f) + ) + (s1-0 s0-0 (the-as bucket-id sv-80) a2-5 a3-5 (the-as font-color t0-5) (the-as vector2h t1-4)) + ) + ) + (countdown (s2-1 (-> s4-0 conn-count)) + (let ((s1-1 (-> this conn (-> s5-0 conn-ids (+ s2-1 (-> s4-0 first-conn)))))) + (get-position (-> this node (-> s1-1 head-id)) (-> s3-0 0)) + (+! (-> s3-0 0 x) -2048.0) + (+! (-> s3-0 0 z) -2048.0) + (get-position (-> this node (-> s1-1 tail-id)) (-> s3-0 1)) + ) + (+! (-> s3-0 1 x) -2048.0) + (+! (-> s3-0 1 z) -2048.0) + (add-debug-line #t (bucket-id debug) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1)) + ) + ) + #f + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-16 ((this trail-graph) (arg0 int) (arg1 (pointer uint16)) (arg2 vector) (arg3 vector) (arg4 rgba) (arg5 float)) + (local-vars (sv-48 int)) + (let ((s0-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set-vector! (-> s0-0 1) (+ (-> arg2 x) arg5) (+ (-> arg2 y) arg5) (+ (-> arg2 z) arg5) 1.0) + (set! sv-48 0) + (until #f + (set! (-> s0-0 0 quad) (-> s0-0 1 quad)) + (cond + ((< sv-48 arg0) + (let ((a0-6 (-> this node (-> arg1 sv-48)))) + (set-vector! + (-> s0-0 1) + (+ (* 4096.0 (the float (-> a0-6 x))) arg5) + (+ (* 4096.0 (the float (-> a0-6 y))) arg5) + (+ (* 4096.0 (the float (-> a0-6 z))) arg5) + 1.0 + ) + ) + ) + ((= sv-48 arg0) + (set-vector! (-> s0-0 1) (+ (-> arg3 x) arg5) (+ (-> arg3 y) arg5) (+ (-> arg3 z) arg5) 1.0) + ) + (else + (return #f) + ) + ) + (add-debug-line #t (bucket-id debug) (-> s0-0 0) (-> s0-0 1) arg4 #f (the-as rgba -1)) + (set! sv-48 (+ sv-48 1)) + ) + ) + #f + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod debug-draw ((this trail-graph)) + (when (= (-> this mode) 3) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-0 1 quad) (-> this orig-goal-pos quad)) + (let ((v1-3 (-> this goal-node-id))) + (until #f + (set! (-> s5-0 0 quad) (-> s5-0 1 quad)) + (cond + ((>= v1-3 0) + (let ((s4-0 (-> this node v1-3))) + (set-vector! + (-> s5-0 1) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 x)))) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 y)))) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 z)))) + 1.0 + ) + (add-debug-line #t (bucket-id debug) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1)) + (set! v1-3 (-> s4-0 parent-id)) + ) + ) + (else + (set! (-> s5-0 1 quad) (-> this orig-start-pos quad)) + (add-debug-line #t (bucket-id debug) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1)) + (goto cfg-7) + ) + ) + ) + ) + ) + #f + ) + (label cfg-7) + (case (-> this mode) + ((1 2 3) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this orig-start-pos) + (meters 1) + (new 'static 'rgba :r #xff :a #x80) + ) + (set! (-> s5-1 quad) (-> this conn-start-pos quad)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :r #xff :a #x80)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this orig-goal-pos) + (meters 1) + (new 'static 'rgba :g #xff :a #x80) + ) + (set! (-> s5-1 quad) (-> this conn-goal-pos quad)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :g #xff :a #x80)) + ) + ) + ) + (dotimes (s5-2 (the-as int (-> this conn-count))) + (debug-draw (-> this conn s5-2) this s5-2) + ) + (dotimes (s5-3 (the-as int (-> this node-count))) + (debug-draw (-> this node s5-3) s5-3) + ) + (let* ((a2-7 (target-pos 0)) + (a0-40 (-> this conn-hash)) + (v1-26 (max 0 (min 15 (the int (/ (- (-> a2-7 x) (-> a0-40 origin x)) (-> a0-40 cell-width)))))) + (a1-16 (max 0 (min 15 (the int (/ (- (-> a2-7 z) (-> a0-40 origin z)) (-> a0-40 cell-width)))))) + ) + (trail-graph-method-15 this (+ (* a1-16 16) v1-26)) + ) + ) + +(defmethod trail-graph-method-18 ((this trail-graph) (arg0 vector)) + (let ((a0-1 (-> this conn-hash))) + (+ (max 0 (min 15 (the int (/ (- (-> arg0 x) (-> a0-1 origin x)) (-> a0-1 cell-width))))) + (* (max 0 (min 15 (the int (/ (- (-> arg0 z) (-> a0-1 origin z)) (-> a0-1 cell-width))))) 16) + ) + ) + ) + +(defmethod get-position ((this trail-node) (arg0 vector)) + (let ((v0-0 arg0)) + (set! (-> v0-0 x) (* 4096.0 (the float (-> this x)))) + (set! (-> v0-0 y) (* 4096.0 (the float (-> this y)))) + (set! (-> v0-0 z) (* 4096.0 (the float (-> this z)))) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +(defmethod trail-graph-method-20 ((this trail-graph) (arg0 uint) (arg1 vector)) + (get-position (-> this node (the-as int arg0)) arg1) + ) + +(defmethod trail-graph-method-21 ((this trail-graph) (arg0 (pointer uint16)) (arg1 int) (arg2 (pointer int32)) (arg3 (pointer float))) + (set! (-> arg3 0) 0.0) + (set! (-> arg2 0) (-> this goal-node-id)) + (let ((v0-0 -1)) + (when (= (-> this mode) 3) + (let ((v1-3 (-> this node)) + (a3-2 0) + ) + (let ((t1-0 (-> this goal-node-id))) + (while (>= t1-0 0) + (+! a3-2 1) + (set! t1-0 (-> v1-3 t1-0 parent-id)) + ) + ) + (let ((t1-4 (-> this goal-node-id))) + (let ((t2-1 (- a3-2 arg1))) + (cond + ((> t2-1 0) + (while (> t2-1 0) + (set! t1-4 (-> v1-3 t1-4 parent-id)) + (+! t2-1 -1) + ) + (set! v0-0 arg1) + ) + (else + (set! v0-0 a3-2) + ) + ) + ) + (countdown (a2-3 v0-0) + (set! (-> arg0 a2-3) (the-as uint t1-4)) + (set! t1-4 (-> v1-3 t1-4 parent-id)) + ) + ) + (when (> a3-2 0) + (let ((a0-3 (-> v1-3 (-> this goal-node-id))) + (v1-4 (-> v1-3 (-> arg0 0))) + ) + (set! (-> arg3 0) + (- (* 512.0 (the float (-> a0-3 cost-from-start))) (* 512.0 (the float (-> v1-4 cost-from-start)))) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +(defmethod trail-graph-method-23 ((this trail-graph)) + (let ((a3-0 (shr (+ (-> this node-count) 127) 7))) + (when (< 6 (the-as int a3-0)) + (format 0 "ERROR: TRAIL_NODE_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 6 a3-0) + (return #f) + ) + ) + (let ((a3-1 (shr (+ (-> this conn-count) 127) 7))) + (when (< 7 (the-as int a3-1)) + (format 0 "ERROR: TRAIL_CONN_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 7 a3-1) + (return #f) + ) + ) + (set! (-> this mode) (the-as uint 0)) + (set! (-> this goal-conn-id) -1) + (set! (-> this goal-node-id) -1) + (set! (-> this open-head-id) -1) + (let ((gp-0 *minimap*)) + (when gp-0 + (countdown (s5-0 6) + (reset (-> gp-0 trail s5-0)) + ) + ) + ) + #t + ) + +(defmethod trail-graph-method-26 ((this trail-graph)) + (when (nonzero? (-> this mode)) + (set! (-> this goal-node-id) -1) + (let ((a1-0 (-> this goal-conn-id))) + (when (>= a1-0 0) + (trail-graph-method-24 this (the-as uint a1-0) (-> this orig-goal-pos) 0 1) + (set! (-> this goal-conn-id) -1) + ) + ) + (set! (-> this pov-can-see-goal) (the-as uint 0)) + (set! (-> this open-head-id) -1) + (let ((v1-7 (-> this open-quads))) + (set! (-> v1-7 0 quad) (the-as uint128 0)) + (set! (-> v1-7 1 quad) (the-as uint128 0)) + (set! (-> v1-7 2 quad) (the-as uint128 0)) + (set! (-> v1-7 3 quad) (the-as uint128 0)) + (set! (-> v1-7 4 quad) (the-as uint128 0)) + (set! (-> v1-7 5 quad) (the-as uint128 0)) + ) + 0 + (let ((v1-9 (-> this closed-quads))) + (set! (-> v1-9 0 quad) (the-as uint128 0)) + (set! (-> v1-9 1 quad) (the-as uint128 0)) + (set! (-> v1-9 2 quad) (the-as uint128 0)) + (set! (-> v1-9 3 quad) (the-as uint128 0)) + (set! (-> v1-9 4 quad) (the-as uint128 0)) + (set! (-> v1-9 5 quad) (the-as uint128 0)) + ) + 0 + (set! (-> this mode) (the-as uint 0)) + 0 + ) + ) + +(defmethod trail-graph-method-24 ((this trail-graph) (arg0 uint) (arg1 vector) (arg2 int) (arg3 int)) + (let* ((s5-0 (lognot arg3)) + (a0-2 (-> this conn arg0)) + (a1-1 (-> a0-2 visgroup-id)) + (v1-1 (-> this node)) + (s4-0 #f) + ) + (cond + ((> a1-1 0) + (let* ((a1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ a1-1 -1) 4)))) + (a0-7 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) a1-4)))) + ) + (countdown (a1-5 (-> (the-as trail-conn-hash-cell a1-4) conn-count)) + (let ((a3-4 (-> v1-1 (-> a0-7 0)))) + (if (logtest? (-> a3-4 flags) (trail-node-flag tnf2)) + (set! s4-0 #t) + (set! (-> a3-4 flags) (logior (logand (-> a3-4 flags) s5-0) arg2)) + ) + ) + (set! a0-7 (&-> a0-7 1)) + ) + ) + ) + (else + (dotimes (a1-6 2) + (let ((a3-7 (-> v1-1 (if (zero? a1-6) + (-> a0-2 head-id) + (-> a0-2 tail-id) + ) + ) + ) + ) + (if (logtest? (-> a3-7 flags) (trail-node-flag tnf2)) + (set! s4-0 #t) + (set! (-> a3-7 flags) (logior (logand (-> a3-7 flags) s5-0) arg2)) + ) + ) + ) + ) + ) + (when s4-0 + (let ((v1-11 (-> this cell-pov-bit-arrays (trail-graph-method-18 this arg1))) + (a0-10 (-> this node 0)) + ) + (while (nonzero? v1-11) + (if (logtest? v1-11 1) + (set! (-> a0-10 flags) (logior (logand (-> a0-10 flags) s5-0) arg2)) + ) + (&+! a0-10 20) + (set! v1-11 (shr v1-11 1)) + ) + ) + 0 + ) + s4-0 + ) + ) + +(defmethod trail-graph-method-28 ((this trail-graph) (arg0 trail-conn-search) (arg1 int) (arg2 int)) + (let* ((v1-1 (+ (* arg2 16) arg1)) + (a0-1 (/ v1-1 8)) + (a1-2 (ash 1 (logand v1-1 7))) + (a2-4 (-> arg0 cell-quads 0 byte a0-1)) + ) + (when (not (logtest? a2-4 a1-2)) + (set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2)) + (let* ((v1-3 (-> this conn-hash cell v1-1)) + (s4-0 (&-> (-> this conn-hash conn-ids) (-> v1-3 first-conn))) + ) + (countdown (s3-0 (-> v1-3 conn-count)) + (let* ((s2-0 (-> s4-0 0)) + (v1-4 (shr s2-0 3)) + (a1-8 (ash 1 (the-as int (logand s2-0 7)))) + (a2-5 (-> arg0 conn-quads 0 byte v1-4)) + ) + (when (not (logtest? a2-5 a1-8)) + (set! (-> arg0 conn-quads 0 byte v1-4) (logior a2-5 a1-8)) + (let* ((v1-7 (-> this conn s2-0)) + (a0-14 (-> v1-7 flags)) + ) + (when (= (logand (the-as conn-flag (-> this conn-mask)) a0-14) a0-14) + (let ((a3-2 (-> this node (-> v1-7 head-id))) + (v1-10 (-> this node (-> v1-7 tail-id))) + (a1-15 (new 'stack-no-clear 'vector)) + (a2-7 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! + a1-15 + (* 4096.0 (the float (-> a3-2 x))) + (* 4096.0 (the float (-> a3-2 y))) + (* 4096.0 (the float (-> a3-2 z))) + 1.0 + ) + (set-vector! + a2-7 + (* 4096.0 (the float (-> v1-10 x))) + (* 4096.0 (the float (-> v1-10 y))) + (* 4096.0 (the float (-> v1-10 z))) + 1.0 + ) + (let ((f0-14 (vector-segment-distance-point! (-> arg0 src-pos) a1-15 a2-7 s1-0))) + (when (or (< (-> arg0 best-conn-id) 0) (< f0-14 (-> arg0 best-dist))) + (when (or (and (>= (-> arg0 src-pos y) (-> this over-under-thresh)) (>= (-> s1-0 y) (-> this over-under-above-too-low))) + (and (< (-> arg0 src-pos y) (-> this over-under-thresh)) (>= (-> this over-under-below-too-high) (-> s1-0 y))) + ) + (set! (-> arg0 best-dist) f0-14) + (set! (-> arg0 best-conn-id) (the-as int s2-0)) + (set! (-> arg0 conn-pos quad) (-> s1-0 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + (set! s4-0 (&-> s4-0 1)) + ) + ) + #f + ) + ) + ) + +(defmethod trail-graph-method-17 ((this trail-graph) (arg0 vector) (arg1 vector)) + (let ((v1-0 (-> this conn-hash)) + (gp-0 (new 'stack-no-clear 'trail-conn-search)) + ) + (set! (-> gp-0 src-pos) arg0) + (set! (-> gp-0 conn-pos) arg1) + (set! (-> gp-0 best-conn-id) -1) + (let ((a0-2 (-> gp-0 conn-quads))) + (set! (-> a0-2 0 quad) (the-as uint128 0)) + (set! (-> a0-2 1 quad) (the-as uint128 0)) + (set! (-> a0-2 2 quad) (the-as uint128 0)) + (set! (-> a0-2 3 quad) (the-as uint128 0)) + (set! (-> a0-2 4 quad) (the-as uint128 0)) + (set! (-> a0-2 5 quad) (the-as uint128 0)) + (set! (-> a0-2 6 quad) (the-as uint128 0)) + ) + 0 + (let ((a0-4 (-> gp-0 cell-quads))) + (set! (-> a0-4 0 quad) (the-as uint128 0)) + (set! (-> a0-4 1 quad) (the-as uint128 0)) + ) + 0 + (let* ((f0-0 (-> v1-0 cell-width)) + (f1-1 (* 0.5 f0-0)) + ) + (let ((f3-0 (- (-> arg0 x) f1-1)) + (f2-2 (- (-> arg0 z) f1-1)) + ) + (set! (-> gp-0 bounds min x) (max 0 (min 15 (the int (/ (- f3-0 (-> v1-0 origin x)) f0-0))))) + (set! (-> gp-0 bounds min z) (max 0 (min 15 (the int (/ (- f2-2 (-> v1-0 origin z)) f0-0))))) + ) + (let ((f2-7 (+ (-> arg0 x) f1-1)) + (f1-2 (+ (-> arg0 z) f1-1)) + ) + (set! (-> gp-0 bounds max x) (max 0 (min 15 (the int (/ (- f2-7 (-> v1-0 origin x)) f0-0))))) + (set! (-> gp-0 bounds max z) (max 0 (min 15 (the int (/ (- f1-2 (-> v1-0 origin z)) f0-0))))) + ) + ) + (let ((s4-0 (-> gp-0 bounds min z))) + (until (< (-> gp-0 bounds max z) s4-0) + (let ((s3-0 (-> gp-0 bounds min x))) + (until (< (-> gp-0 bounds max x) s3-0) + (trail-graph-method-28 this gp-0 s3-0 s4-0) + (+! s3-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (while (< (-> gp-0 best-conn-id) 0) + (let ((v1-8 15)) + (set! (-> gp-0 bounds min x) (max 0 (+ (-> gp-0 bounds min x) -1))) + (set! (-> gp-0 bounds min z) (max 0 (+ (-> gp-0 bounds min z) -1))) + (set! (-> gp-0 bounds max x) (min (+ (-> gp-0 bounds max x) 1) v1-8)) + (set! (-> gp-0 bounds max z) (min (+ (-> gp-0 bounds max z) 1) v1-8)) + ) + (let ((s4-1 (-> gp-0 bounds min x))) + (until (< (-> gp-0 bounds max x) s4-1) + (trail-graph-method-28 this gp-0 s4-1 (-> gp-0 bounds min z)) + (trail-graph-method-28 this gp-0 s4-1 (-> gp-0 bounds max z)) + (+! s4-1 1) + ) + ) + (let ((s4-2 (-> gp-0 bounds min z))) + (until (< (-> gp-0 bounds max z) s4-2) + (trail-graph-method-28 this gp-0 (-> gp-0 bounds min x) s4-2) + (trail-graph-method-28 this gp-0 (-> gp-0 bounds max x) s4-2) + (+! s4-2 1) + ) + ) + ) + (-> gp-0 best-conn-id) + ) + ) + +(defmethod trail-graph-method-9 ((this trail-graph) (arg0 int)) + (let ((s4-0 (-> this node arg0))) + (set! (-> s4-0 cost-from-start) (get-dist-score s4-0 (-> this orig-start-pos))) + (set! (-> s4-0 cost-to-goal) (get-dist-score s4-0 (-> this orig-goal-pos))) + ) + (trail-graph-method-11 this arg0 -1) + 0 + ) + +(defmethod trail-graph-method-10 ((this trail-graph) (arg0 int)) + (let* ((s4-0 (-> this conn arg0)) + (v1-1 (-> s4-0 visgroup-id)) + (s5-0 #f) + ) + (cond + ((> v1-1 0) + (let* ((v1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ v1-1 -1) 4)))) + (s4-1 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) v1-4)))) + (s3-0 (-> (the-as trail-conn-hash-cell v1-4) conn-count)) + ) + (-> this visnode-ids) + (while (nonzero? s3-0) + (+! s3-0 -1) + (let ((a1-2 (-> s4-1 0))) + (if (logtest? (-> this node a1-2 flags) (trail-node-flag tnf2)) + (set! s5-0 #t) + (trail-graph-method-9 this (the-as int a1-2)) + ) + ) + (set! s4-1 (&-> s4-1 1)) + ) + ) + ) + (else + (dotimes (s3-1 2) + (let ((a1-3 (if (zero? s3-1) + (-> s4-0 head-id) + (-> s4-0 tail-id) + ) + ) + ) + (if (logtest? (-> this node a1-3 flags) (trail-node-flag tnf2)) + (set! s5-0 #t) + (trail-graph-method-9 this (the-as int a1-3)) + ) + ) + ) + ) + ) + (when s5-0 + (trail-graph-method-32 this) + (let ((s4-2 (-> this cached-start-pov pov-can-see-start)) + (s3-2 0) + ) + (while (nonzero? s4-2) + (if (logtest? s4-2 1) + (trail-graph-method-9 this s3-2) + ) + (+! s3-2 1) + (set! s4-2 (shr s4-2 1)) + ) + ) + 0 + ) + s5-0 + ) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-32 ((this trail-graph)) + (local-vars (s4-2 uint)) + (let* ((gp-0 (-> this cached-start-pov)) + (v1-1 (current-time)) + (a0-2 (- v1-1 (-> gp-0 last-updated))) + ) + (cond + ((< (seconds 1) a0-2) + (set! (-> gp-0 last-updated) v1-1) + (set! (-> gp-0 start-pos quad) (-> this orig-start-pos quad)) + (let* ((v1-7 (-> this cell-pov-bit-arrays (trail-graph-method-18 this (-> gp-0 start-pos)))) + (s3-0 (-> this node 0)) + (s2-0 1) + (s4-1 (lognot v1-7)) + ) + (countdown (s1-0 (-> this pov-node-count)) + (if (and (logtest? s4-1 s2-0) (not (trail-graph-method-12 this s3-0 (-> gp-0 start-pos)))) + (set! s4-1 (logior s4-1 s2-0)) + ) + (set! s2-0 (* s2-0 2)) + (&+! s3-0 20) + ) + (set! s4-2 (lognot s4-1)) + ) + (set! (-> gp-0 pov-can-see-start) s4-2) + s4-2 + ) + ((> a0-2 0) + (set! (-> gp-0 last-updated) v1-1) + (set! (-> gp-0 start-pos quad) (-> this orig-start-pos quad)) + (let ((s3-1 (-> this cell-pov-bit-arrays (trail-graph-method-18 this (-> gp-0 start-pos))))) + (set! s4-2 (logand (-> gp-0 pov-can-see-start) s3-1)) + (let ((s2-1 (-> gp-0 next-node-id))) + (let ((s1-1 6)) + (until #f + (let ((s0-0 (ash 1 s2-1))) + (when (logtest? s3-1 s0-0) + (if (trail-graph-method-12 this (-> this node s2-1) (-> gp-0 start-pos)) + (set! s4-2 (logior s4-2 s0-0)) + (set! s4-2 (logclear s4-2 s0-0)) + ) + (+! s1-1 -1) + (if (zero? s1-1) + (goto cfg-27) + ) + ) + ) + (set! s2-1 (mod (+ s2-1 1) (the-as int (-> this pov-node-count)))) + (if (= s2-1 (-> gp-0 next-node-id)) + (goto cfg-27) + ) + ) + ) + #f + (label cfg-27) + (set! (-> gp-0 next-node-id) s2-1) + ) + ) + (set! (-> gp-0 pov-can-see-start) s4-2) + s4-2 + ) + ) + ) + ) + +(defmethod trail-graph-method-13 ((this trail-graph) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 1 quad) (-> arg0 quad)) + (set! (-> gp-0 1 y) 0.0) + (set! (-> gp-0 1 w) 1.0) + (set! (-> gp-0 2 quad) (-> arg1 quad)) + (set! (-> gp-0 2 y) 0.0) + (set! (-> gp-0 2 w) 1.0) + (let ((s5-0 (-> this blocker 0))) + (countdown (s4-0 (-> this blocker-count)) + (let ((f0-5 (vector4-dot (-> gp-0 1) (the-as vector (-> s5-0 plane)))) + (f1-1 (vector4-dot (-> gp-0 2) (the-as vector (-> s5-0 plane)))) + ) + (when (< (* f0-5 f1-1) 0.0) + (vector-! (-> gp-0 0) (-> gp-0 2) (-> gp-0 1)) + (vector-float*! (-> gp-0 0) (-> gp-0 0) (/ f0-5 (- f0-5 f1-1))) + (vector+! (-> gp-0 0) (-> gp-0 0) (-> gp-0 1)) + (if (>= (-> s5-0 center w) (vector-vector-xz-distance-squared (-> gp-0 0) (-> s5-0 center))) + (return #f) + ) + ) + ) + (&+! s5-0 32) + ) + ) + ) + #t + ) + +(defmethod trail-graph-method-12 ((this trail-graph) (arg0 trail-node) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set-vector! v1-0 (* 4096.0 (the float (-> arg0 x))) 0.0 (* 4096.0 (the float (-> arg0 z))) 1.0) + (trail-graph-method-13 this v1-0 arg1) + ) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-11 ((this trail-graph) (arg0 int) (arg1 int)) + (let ((v1-0 (/ arg0 8)) + (a3-1 (ash 1 (logand arg0 7))) + ) + (logior! (-> this open-quads 0 byte v1-0) a3-1) + ) + (let* ((v1-2 (-> this node)) + (v0-0 (-> v1-2 arg0)) + ) + (set! (-> v0-0 parent-id) arg1) + (let ((a3-6 (+ (-> v0-0 cost-from-start) (-> v0-0 cost-to-goal))) + (t0-4 (-> this open-head-id)) + (a2-2 -1) + ) + (until #f + (when (< t0-4 0) + (set! (-> v0-0 next-id) -1) + (set! (-> v0-0 prev-id) a2-2) + (if (>= a2-2 0) + (set! (-> v1-2 a2-2 next-id) arg0) + (set! (-> this open-head-id) arg0) + ) + (return v0-0) + ) + (let ((t1-4 (-> v1-2 t0-4))) + (when (>= (+ (-> t1-4 cost-from-start) (-> t1-4 cost-to-goal)) a3-6) + (set! (-> v0-0 next-id) t0-4) + (set! (-> v0-0 prev-id) a2-2) + (set! (-> t1-4 prev-id) arg0) + (if (>= a2-2 0) + (set! (-> v1-2 a2-2 next-id) arg0) + (set! (-> this open-head-id) arg0) + ) + (return v0-0) + ) + (set! a2-2 t0-4) + (set! t0-4 (-> t1-4 next-id)) + ) + ) + ) + #f + v0-0 + ) + ) + +(defmethod trail-graph-method-25 ((this trail-graph) (arg0 int)) + (let ((v1-0 (/ arg0 8)) + (a2-1 (ash 1 (logand arg0 7))) + ) + (logior! (-> this open-quads 0 byte v1-0) a2-1) + ) + (let* ((v1-2 (-> this node)) + (a2-4 (-> v1-2 arg0)) + (a1-2 (-> a2-4 prev-id)) + (a2-5 (-> a2-4 next-id)) + ) + (cond + ((>= a1-2 0) + (set! (-> v1-2 a1-2 next-id) a2-5) + (when (>= a2-5 0) + (set! (-> v1-2 a2-5 prev-id) a1-2) + a1-2 + ) + ) + (else + (set! (-> this open-head-id) a2-5) + (when (>= a2-5 0) + (let ((v0-0 -1)) + (set! (-> v1-2 a2-5 prev-id) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +(defmethod trail-graph-method-27 ((this trail-graph)) + (let ((v0-0 (-> this open-head-id))) + (when (>= v0-0 0) + (let* ((v1-1 (-> this node)) + (a2-0 (-> v1-1 v0-0 next-id)) + ) + (set! (-> this open-head-id) a2-0) + (if (>= a2-0 0) + (set! (-> v1-1 a2-0 prev-id) -1) + ) + ) + (let ((v1-3 (/ v0-0 8)) + (a1-6 (ash 1 (logand v0-0 7))) + ) + (logior! (-> this closed-quads 0 byte v1-3) a1-6) + (logxor! (-> this open-quads 0 byte v1-3) (the-as uint a1-6)) + ) + ) + v0-0 + ) + ) + +;; WARN: Return type mismatch int vs uint. +(defmethod get-dist-score ((this trail-node) (arg0 vector)) + (let* ((f0-1 (- (-> arg0 x) (* 4096.0 (the float (-> this x))))) + (f1-3 (- (-> arg0 z) (* 4096.0 (the float (-> this z))))) + (f0-4 (sqrtf (+ (* f0-1 f0-1) (* f1-3 f1-3)))) + ) + (the uint (fmin 65535.0 (* 0.00024414062 (* 8.0 f0-4)))) + ) + ) + +(defmethod trail-graph-method-33 ((this trail-graph) (arg0 int)) + (let ((s5-0 (-> this node arg0))) + (if (not (logtest? (-> s5-0 flags) (trail-node-flag tnf2))) + (return #t) + ) + (let ((s4-0 (ash 1 arg0))) + (if (logtest? s4-0 (-> this pov-can-see-goal)) + (return #t) + ) + (cond + ((trail-graph-method-12 this s5-0 (-> this orig-goal-pos)) + (logior! (-> this pov-can-see-goal) s4-0) + #t + ) + (else + (logclear! (-> s5-0 flags) (trail-node-flag tnf0)) + #f + ) + ) + ) + ) + ) + +(defmethod trail-graph-method-30 ((this trail-graph)) + (let ((s5-0 (trail-graph-method-27 this))) + (if (< s5-0 0) + (return 2) + ) + (let ((s4-0 (-> this node s5-0))) + (when (and (logtest? (-> s4-0 flags) (trail-node-flag tnf0)) (trail-graph-method-33 this s5-0)) + (set! (-> this goal-node-id) s5-0) + (return 3) + ) + (let ((s3-0 (&-> (-> this conn-ids) (-> s4-0 first-conn)))) + (countdown (s2-0 (-> s4-0 conn-count)) + (let* ((a0-8 (-> this conn (-> s3-0 0))) + (v1-14 (-> a0-8 flags)) + ) + (when (= (logand (the-as conn-flag (-> this conn-mask)) v1-14) v1-14) + (let ((s1-0 (-> a0-8 tail-id))) + (if (= s1-0 s5-0) + (set! s1-0 (cond + ((logtest? v1-14 (conn-flag cf0)) + (goto cfg-27) + s1-0 + ) + (else + (-> a0-8 head-id) + ) + ) + ) + ) + (let ((s0-0 (-> this node s1-0)) + (v1-21 (min #xffff (the-as int (+ (-> a0-8 cost) (-> s4-0 cost-from-start))))) + (a0-11 (shr s1-0 3)) + (a1-9 (ash 1 (the-as int (logand s1-0 7)))) + ) + (cond + ((logtest? (-> this open-quads 0 byte a0-11) a1-9) + (when (< (the-as uint v1-21) (-> s0-0 cost-from-start)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (trail-graph-method-25 this (the-as int s1-0)) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ) + ((not (logtest? (-> this closed-quads 0 byte a0-11) a1-9)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (set! (-> s0-0 cost-to-goal) (get-dist-score s0-0 (-> this orig-goal-pos))) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ((< (the-as uint v1-21) (-> s0-0 cost-from-start)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ) + ) + ) + ) + ) + (label cfg-27) + (set! s3-0 (&-> s3-0 1)) + ) + ) + ) + ) + 1 + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod trail-graph-method-31 ((this trail-graph) (arg0 int)) + (local-vars (v1-1 int)) + (let ((v0-0 (the-as int (-> this mode)))) + 0 + (.mfc0 v1-1 Count) + (while (and (= v0-0 1) + ;; og:preserve-this + ;; changed in PC port: they used to abort early if searching takes too long + ;; it is fast enough on PC that we don't care. + ;; (< (the-as uint v1-1) (the-as uint arg0)) HACK + ) + (set! v0-0 (trail-graph-method-30 this)) + (.mfc0 v1-1 Count) + ) + (set! (-> this mode) (the-as uint v0-0)) + ) + (none) + ) + +(deftype trail-vis-work (structure) + ((best-count uint32) + (best-dist float) + (start-conn-id uint32) + (p0 vector :inline) + (p1 vector :inline) + (best-node-id uint16 64) + ) + ) + + +(defmethod trail-graph-method-22 ((this trail-graph) (arg0 int) (arg1 int)) + (local-vars (s4-1 symbol)) + (let* ((s4-0 (-> this node)) + (v1-2 (-> s4-0 arg1)) + (s5-0 (new 'stack-no-clear 'trail-vis-work)) + ) + (set! (-> s5-0 start-conn-id) (the-as uint arg0)) + (set-vector! + (-> s5-0 p0) + (* 4096.0 (the float (-> v1-2 x))) + (* 4096.0 (the float (-> v1-2 y))) + (* 4096.0 (the float (-> v1-2 z))) + 1.0 + ) + (set! (-> s5-0 p1 quad) (-> s5-0 p0 quad)) + (set! (-> s5-0 best-count) (the-as uint 0)) + (set! (-> s5-0 best-dist) -1.0) + (let ((s2-0 (&-> (-> this conn-ids) (-> v1-2 first-conn)))) + (countdown (s1-0 (-> v1-2 conn-count)) + (let* ((v1-4 (-> this conn (-> s2-0 0))) + (s0-0 (-> v1-4 tail-id)) + ) + (if (= s0-0 arg1) + (set! s0-0 (-> v1-4 head-id)) + ) + (let ((v1-8 (-> s4-0 s0-0))) + (set! (-> s5-0 p1 x) (* 4096.0 (the float (-> v1-8 x)))) + (set! (-> s5-0 p1 y) (* 4096.0 (the float (-> v1-8 y)))) + (set! (-> s5-0 p1 z) (* 4096.0 (the float (-> v1-8 z)))) + ) + (let ((f0-14 (vector-segment-distance-point! (-> this orig-goal-pos) (-> s5-0 p0) (-> s5-0 p1) (the-as vector #f))) + (f1-12 (-> s5-0 best-dist)) + ) + (cond + ((or (< f1-12 0.0) (< f0-14 f1-12)) + (set! (-> s5-0 best-dist) f0-14) + (set! (-> s5-0 best-count) (the-as uint 1)) + (set! (-> s5-0 best-node-id 0) s0-0) + ) + ((= f0-14 f1-12) + (let ((v1-15 (-> s5-0 best-count))) + (when (< v1-15 (the-as uint 64)) + (set! (-> s5-0 best-node-id v1-15) s0-0) + (set! (-> s5-0 best-count) (+ v1-15 1)) + ) + ) + ) + ) + ) + ) + (set! s2-0 (&-> s2-0 1)) + ) + ) + (trail-graph-method-24 this (-> s5-0 start-conn-id) (the-as vector #f) 2 0) + (countdown (v1-20 (-> s5-0 best-count)) + (let ((a1-16 (-> s4-0 (-> s5-0 best-node-id v1-20)))) + (when (= (logand (-> a1-16 flags) (trail-node-flag tnf0 tnf1)) (trail-node-flag tnf0 tnf1)) + (set! s4-1 #t) + (goto cfg-22) + ) + ) + ) + (set! s4-1 #f) + (label cfg-22) + (trail-graph-method-24 this (-> s5-0 start-conn-id) (the-as vector #f) 0 2) + ) + s4-1 + ) + +(defmethod trail-graph-method-29 ((this trail-graph) (arg0 vector) (arg1 vector) (arg2 trail-cached-search-info)) + (local-vars (v0-6 int)) + (trail-graph-method-26 this) + (+! (-> this search-id) 1) + (set! (-> this orig-start-pos quad) (-> arg0 quad)) + (let ((s5-1 0)) + (let ((a1-1 -1)) + (when arg2 + (let ((v1-6 (-> arg2 goal-conn-id))) + (when (and (>= v1-6 0) + (= (-> arg2 orig-goal-pos x) (-> arg1 x)) + (= (-> arg2 orig-goal-pos y) (-> arg1 y)) + (= (-> arg2 orig-goal-pos z) (-> arg1 z)) + ) + (set! a1-1 v1-6) + (set! (-> this conn-goal-pos quad) (-> arg2 conn-goal-pos quad)) + ) + ) + ) + (set! (-> this orig-goal-pos quad) (-> arg1 quad)) + (when (< a1-1 0) + (set! a1-1 (trail-graph-method-17 this (-> this orig-goal-pos) (-> this conn-goal-pos))) + (when arg2 + (set! (-> arg2 goal-conn-id) a1-1) + (set! (-> arg2 orig-goal-pos quad) (-> this orig-goal-pos quad)) + (set! (-> arg2 conn-goal-pos quad) (-> this conn-goal-pos quad)) + ) + ) + (set! (-> this goal-conn-id) a1-1) + (if (trail-graph-method-24 this (the-as uint a1-1) (-> this orig-goal-pos) 1 0) + (set! s5-1 2) + ) + ) + (let ((v1-19 -1)) + (let ((a0-16 (-> *game-info* features))) + (if (not (logtest? (game-feature feature31) a0-16)) + (set! v1-19 (logand -3 v1-19)) + ) + (if (not (logtest? (game-feature feature32) a0-16)) + (set! v1-19 (logand -5 v1-19)) + ) + (if (not (logtest? (game-feature feature33) a0-16)) + (set! v1-19 (logand -9 v1-19)) + ) + (if (not (logtest? (game-feature feature34) a0-16)) + (set! v1-19 (logand -17 v1-19)) + ) + (if (not (logtest? (game-feature feature35) a0-16)) + (set! v1-19 (logand -33 v1-19)) + ) + ) + (set! (-> this conn-mask) (the-as uint v1-19)) + ) + (let ((s4-1 (trail-graph-method-17 this (-> this orig-start-pos) (-> this conn-start-pos)))) + (if (trail-graph-method-10 this s4-1) + (set! s5-1 (logior s5-1 1)) + ) + (set! (-> this mode) (the-as uint 1)) + (cond + ((zero? s5-1) + (let ((a2-5 (-> this open-head-id))) + (when (and (logtest? (-> this node a2-5 flags) (trail-node-flag tnf0)) (trail-graph-method-22 this s4-1 a2-5)) + (set! v0-6 3) + (set! (-> this mode) (the-as uint v0-6)) + v0-6 + ) + ) + ) + ((= s5-1 3) + (when (trail-graph-method-13 this (-> this orig-start-pos) (-> this orig-goal-pos)) + (set! v0-6 3) + (set! (-> this mode) (the-as uint v0-6)) + v0-6 + ) + ) + ) + ) + ) + ) + +(if (not (trail-graph-method-23 *trail-graph*)) + (set! *trail-graph* #f) + ) diff --git a/goal_src/jak3/levels/city/protect/assault-cams.gc b/goal_src/jak3/levels/city/protect/assault-cams.gc index 0240c757af..0294b6ff04 100644 --- a/goal_src/jak3/levels/city/protect/assault-cams.gc +++ b/goal_src/jak3/levels/city/protect/assault-cams.gc @@ -7,3 +7,51 @@ ;; DECOMP BEGINS +(define *assault-cams* (new 'static 'boxed-array :type assault-cam-info + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x -190874.02 :y 106024.96 :z 5588420.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80696344 :z 0.5906011) + :uvec (new 'static 'vector :x -0.36253208 :y 0.7894338 :z -0.49534297) + :fvec (new 'static 'vector :x -0.46624056 :y -0.61383563 :z -0.63704425) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 423746.34 :y 149545.38 :z 7161433.5 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.0033539534 :z 0.9999943) + :uvec (new 'static 'vector :x -0.8762458 :y 0.4818552 :z -0.0029389048) + :fvec (new 'static 'vector :x -0.4818526 :y -0.87625074 :z -0.0016161203) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 754367.3 :y 136453.73 :z 5612391.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.91507846 :z -0.4032754) + :uvec (new 'static 'vector :x 0.34681395 :y 0.51030624 :z -0.7869609) + :fvec (new 'static 'vector :x 0.20579405 :y -0.8599926 :z -0.46697044) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 1701028.2 :y 180959.23 :z 5565024.5 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80724764 :z -0.59021246) + :uvec (new 'static 'vector :x 0.4939913 :y 0.54724586 :z -0.67564356) + :fvec (new 'static 'vector :x 0.32299143 :y -0.8369716 :z -0.44176307) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x -311586.8 :y 110921.73 :z 5417229.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.8088231 :z 0.58805186) + :uvec (new 'static 'vector :x -0.42552334 :y 0.69020355 :z -0.5852767) + :fvec (new 'static 'vector :x -0.4058755 :y -0.7236152 :z -0.5582527) + :trans (new 'static 'vector :w 1.0) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/city/protect/assault-enemies.gc b/goal_src/jak3/levels/city/protect/assault-enemies.gc index d9b00f600f..2434fe2681 100644 --- a/goal_src/jak3/levels/city/protect/assault-enemies.gc +++ b/goal_src/jak3/levels/city/protect/assault-enemies.gc @@ -5,5 +5,2016 @@ ;; name in dgo: assault-enemies ;; dgos: LCTYPALT +;; +++assault-target-type +(defenum assault-target-type + :copy-entries city-target-type + (assault-citizen-norm 1) + (assault-grunt 6) + (assault-metalhead-predator 8) + (other 11) + (assault-bombbot 13) + ) +;; ---assault-target-type + + +(define-extern *curve-assault-bombbot-shot-color-blue* curve-color-fast) +(define-extern *curve-assault-bombbot-shot-width* curve2d-fast) +(define-extern *assault-bombbot-trail* light-trail-composition) +(define-extern *assault-bombbot-trail-2* light-trail-composition) +(define-extern *look-time* time-frame) + ;; DECOMP BEGINS +(deftype assault-object-spawn-params (traffic-object-spawn-params) + ((lev symbol) + (suck-level int32) + (flee-time time-frame) + ) + ) + + +(defbehavior assault-enemy-init-by-other citizen ((arg0 assault-object-spawn-params)) + (set! (-> self level) (level-get *level* (-> arg0 lev))) + (citizen-init-by-other arg0) + ) + +(deftype assault-metalhead-grunt (metalhead-grunt) + () + (:state-methods + exit-transport + ) + ) + + +(deftype assault-metalhead-flitter (metalhead-flitter) + () + (:state-methods + exit-transport + ) + ) + + +(deftype assault-metalhead-predator (metalhead-predator) + () + ) + + +(deftype assault-roboguard (roboguard-city) + ((shoot-wait-time time-frame) + ) + (:state-methods + roll-initial + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + + +(deftype assault-spydroid (spydroid) + () + ) + + +(deftype assault-flying-turret (flying-turret) + () + ) + + +(deftype assault-crimson-guard (crimson-guard) + ((center-pos vector :inline) + ) + (:state-methods + wait-for-enemies + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + + +(deftype assault-citizen-norm (citizen-norm) + ((center-pos vector :inline) + (min-flee-time time-frame) + ) + (:state-methods + flee-madly + flee-to-center + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod go-from-behavior ((this assault-metalhead-flitter) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +(defstate exit-transport (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (logclear! (-> self root status) (collide-status on-surface touch-surface impact-surface)) + ) + :trans (behavior () + (if (logtest? (-> self root status) (collide-status on-surface touch-surface impact-surface)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data 14) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post (behavior () + (enemy-falling-post) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-from-behavior ((this assault-metalhead-grunt) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +(defstate exit-transport (assault-metalhead-grunt) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (logclear! (-> self root status) (collide-status on-surface touch-surface impact-surface)) + ) + :trans (behavior () + (if (logtest? (-> self root status) (collide-status on-surface touch-surface impact-surface)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data 11) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post (behavior () + (enemy-falling-post) + ) + ) + +(defstate knocked-recover (assault-citizen-norm) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + ) + :code (behavior () + (let ((v1-1 (if (zero? (-> self hit-face)) + (-> self anim-get-up-front) + (-> self anim-get-up-back) + ) + ) + ) + (start-ragdoll self (the-as art-joint-anim (-> self draw art-group data v1-1))) + ) + (ja-no-eval :num! (seek! max (* 2.0 (-> self speed-scale)))) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (cond + ((enemy-method-109 self) + (go-die self) + ) + ((< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + (else + (go-virtual flee-to-center) + ) + ) + ) + ) + +(defmethod get-run-anim ((this assault-citizen-norm)) + (if (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'flee) (= v1-3 'flee-to-center) (= v1-3 'flee-madly)) + ) + ) + (-> this anim-panic-run) + (-> this anim-run) + ) + ) + +(defmethod go-from-behavior ((this assault-citizen-norm) (arg0 assault-object-spawn-params)) + (set! (-> this root trans quad) (-> arg0 position quad)) + (set! (-> this hit-points) + (the float (the int (lerp-scale-clamp 10.0 20.0 (the float (-> arg0 suck-level)) 4.0 12.0))) + ) + (set! (-> this attacker-info max-num-attackers) (the-as uint 1)) + (set! (-> this center-pos quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (set! (-> this min-flee-time) (-> arg0 flee-time)) + (go (method-of-object this flee-madly)) + ) + +(defstate flee-to-center (assault-citizen-norm) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let ((v1-8 (-> self nav))) + (set! (-> v1-8 target-speed) (* (-> self speed-scale) (-> self speed-run))) + ) + 0 + (let ((a0-3 (-> self nav state)) + (v1-11 (-> self center-pos)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-11 quad)) + ) + 0 + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + ) + :code (behavior () + (citizen-travel-anim (the-as int (-> self draw art-group data (-> self anim-panic-run))) 30) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +(defstate flee-madly (assault-citizen-norm) + :virtual #t + :parent (assault-citizen-norm flee-to-center) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (-> self min-flee-time)) + (go-virtual flee-to-center) + ) + (let ((t9-1 vector-vector-xz-distance) + (a0-2 (-> self root trans)) + (a2-0 (-> self nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + (when (< (t9-1 a0-2 a1-0) 12288.0) + (let* ((gp-0 vector-rotate-around-y!) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 *x-vector*) + (f30-0 65536.0) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + (gp-1 (gp-0 s5-0 s4-0 (* f30-0 (+ -1.0 (the-as float v1-14))))) + ) + (let* ((s5-1 gp-1) + (s4-1 (-> self center-pos)) + (s3-0 gp-1) + (f30-1 8192.0) + (f28-0 40960.0) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (vector+float*! s5-1 s4-1 s3-0 (+ f30-1 (* f28-0 (+ -1.0 (the-as float v1-20))))) + ) + (let ((v1-23 (-> self nav state))) + (logclear! (-> v1-23 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-23 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-23 target-pos quad) (-> gp-1 quad)) + ) + ) + 0 + ) + ) + ) + ) + +(defmethod event-handler ((this assault-citizen-norm) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((a0-3 (find-offending-process-focusable arg0 (the-as attack-info (-> arg3 param 1))))) + (if (!= (-> a0-3 type) target) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate cower-ground (assault-citizen-norm) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (if (enemy-method-109 self) + (go-virtual die) + ) + ) + :code (behavior () + (local-vars (v1-40 enemy-flag) (v1-42 enemy-flag) (v1-44 enemy-flag)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self info anim-cover-head-start)) + :num! (seek! max (-> self speed-scale)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed-scale))) + ) + (let ((v1-29 (-> self root root-prim))) + (set! (-> v1-29 prim-core collide-as) (collide-spec)) + (set! (-> v1-29 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self enemy-flags) (enemy-flag vulnerable)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (let ((v1-39 (-> self enemy-flags))) + (if (logtest? v1-39 (enemy-flag vulnerable-backup)) + (set! v1-40 (logior v1-39 (enemy-flag vulnerable))) + (set! v1-40 (logclear v1-39 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-40) + (let ((v1-41 (-> self enemy-flags))) + (if (logtest? v1-41 (enemy-flag attackable-backup)) + (set! v1-42 (logior v1-41 (enemy-flag attackable))) + (set! v1-42 (logclear v1-41 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-42) + (let ((v1-43 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-43) + (set! v1-44 (logior (enemy-flag trackable) v1-43)) + (set! v1-44 (logclear v1-43 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-44) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (let ((v1-50 (-> self root root-prim))) + (set! (-> v1-50 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-50 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logand! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + (until #f + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 frame-group) + (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + ) + (set! (-> gp-0 param 0) + (the float + (+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + frames + num-frames + ) + -1 + ) + ) + ) + (let* ((f30-0 0.1) + (f28-0 0.20000002) + (v1-74 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-75 (the-as number (logior #x3f800000 v1-74))) + ) + (set! (-> gp-0 param 1) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-75))))) + ) + (set! (-> gp-0 frame-num) 0.0) + (joint-control-channel-group! + gp-0 + (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((gp-1 (-> self skel root-channel 0))) + (set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1))) + (let* ((f30-1 0.1) + (f28-1 0.20000002) + (v1-91 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-92 (the-as number (logior #x3f800000 v1-91))) + ) + (set! (-> gp-1 param 1) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-92))))) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ) + #f + ) + ) + +(defmethod go-from-behavior ((this assault-roboguard) (arg0 assault-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (set! (-> this move-dest quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (go (method-of-object this roll-initial)) + ) + ) + ) + +(defstate hostile-stand (assault-roboguard) + :virtual #t + :trans (behavior () + (local-vars (v0-5 enemy-flag)) + (let ((v1-1 (roboguard-city-method-236 self))) + (cond + ((= v1-1 4) + (go-virtual close-attack) + ) + ((= v1-1 5) + (if (time-elapsed? (-> self shoot-wait-time) (seconds 2)) + (go-virtual shoot-attack) + ) + ) + ((= v1-1 1) + (go-virtual roll-enter) + ) + ((zero? v1-1) + (if (time-elapsed? (-> self state-time) (-> self reaction-time)) + (go-virtual hostile) + ) + ) + ) + ) + (let ((v1-23 (-> self enemy-flags))) + (if (logtest? v1-23 (enemy-flag vulnerable-backup)) + (set! v0-5 (logior v1-23 (enemy-flag vulnerable))) + (set! v0-5 (logclear v1-23 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v0-5) + ) + ) + +(defstate shoot-attack (assault-roboguard) + :virtual #t + :exit (behavior () + (set-time! (-> self shoot-wait-time)) + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate roll-initial (assault-roboguard) + :virtual #t + :enter (behavior () + (let ((a0-0 (new 'stack-no-clear 'vector))) + (set! (-> a0-0 quad) + (-> (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)) quad) + ) + (set! (-> a0-0 y) 0.0) + (let ((a1-3 (vector-normalize! a0-0 1.0))) + (quaternion-look-at! (-> self root quat) a1-3 *up-vector*) + ) + ) + (let ((a0-2 (-> self nav state)) + (v1-5 (-> self move-dest)) + ) + (logclear! (-> a0-2 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-2 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-2 target-pos quad) (-> v1-5 quad)) + ) + 0 + (nav-enemy-method-181 self) + (logior! (-> self flags) (citizen-flag in-pursuit)) + (if (not (logtest? (-> self squad alert-state flags) (squad-alert-flag war))) + (logior! (-> self flags) (citizen-flag persistent)) + ) + (let ((v1-18 (-> self nav))) + (set! (-> v1-18 acceleration) 16384.0) + ) + 0 + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((gp-0 (-> self nav state)) + (v1-28 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (set! (-> gp-0 heading quad) (-> v1-28 quad)) + ) + 0 + (let ((f30-0 81920.0)) + (let ((s5-0 (-> self nav state)) + (gp-2 (vector-float*! + (new 'stack-no-clear 'vector) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + f30-0 + ) + ) + ) + (set! (-> s5-0 velocity quad) (-> gp-2 quad)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 target-speed) f30-0) + ) + 0 + (set! (-> self nav state speed) f30-0) + ) + 0 + (let ((v1-42 (-> self nav))) + (set! (-> v1-42 turning-acceleration) 20480.0) + ) + 0 + (logior! (-> self robo-flags) (robo-flag r2)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (or (logtest? (-> self nav flags) (nav-control-flag ncf9)) + (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 32768.0) + ) + (set-time! (-> self shoot-wait-time)) + (go-virtual roll-exit) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data 13)) + (until #f + (let ((a0-4 (-> self skel root-channel 0))) + (let ((f0-0 0.000024414063) + (a2-0 (-> self nav state)) + (v1-7 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-7 quad) (-> a2-0 velocity quad)) + (set! (-> a0-4 param 0) (* f0-0 (sqrtf (+ (* (-> v1-7 x) (-> v1-7 x)) (* (-> v1-7 z) (-> v1-7 z)))))) + ) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-loop!) + ) + (suspend) + ) + #f + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +(defstate in-ditch (assault-spydroid) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate in-ditch (assault-flying-turret) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate in-ditch (assault-roboguard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate in-ditch (assault-crimson-guard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate in-ditch (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate in-ditch (assault-metalhead-predator) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-spydroid) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-flying-turret) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-roboguard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-crimson-guard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defstate die-fast (assault-metalhead-predator) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +(defun assault-type->type ((arg0 assault-target-type)) + (case arg0 + (((assault-target-type guard-tazer) (assault-target-type guard-rifle) (assault-target-type guard-grenade)) + assault-crimson-guard + ) + (((assault-target-type assault-citizen-norm)) + assault-citizen-norm + ) + (((assault-target-type assault-grunt)) + assault-metalhead-grunt + ) + (((assault-target-type flitter)) + assault-metalhead-flitter + ) + (((assault-target-type assault-metalhead-predator)) + assault-metalhead-predator + ) + (((assault-target-type roboguard)) + assault-roboguard + ) + (((assault-target-type roboguard-giant)) + roboguard-city + ) + (((assault-target-type turret)) + assault-flying-turret + ) + (((assault-target-type other)) + assault-spydroid + ) + (else + (the-as type #f) + ) + ) + ) + +(deftype assault-cleanup (process) + ((offscreen-time time-frame) + (parent-hand handle) + ) + (:state-methods + tracking + ) + ) + + +(defbehavior assault-cleanup-init-by-other assault-cleanup ((arg0 handle)) + (set! (-> self parent-hand) arg0) + (go-virtual tracking) + ) + +(defstate tracking (assault-cleanup) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 5)) + (suspend) + ) + ) + (set-time! (-> self offscreen-time)) + (until #f + (suspend) + (let* ((gp-1 (handle->process (-> self parent-hand))) + (v1-10 (if (type? gp-1 process-focusable) + (the-as process-focusable gp-1) + ) + ) + ) + (cond + ((and v1-10 (not (logtest? (-> v1-10 focus-status) (focus-status disable dead inactive)))) + (if (not (or (not (logtest? (-> v1-10 draw status) (draw-control-status on-screen))) + (not (sphere-in-view-frustum? (the-as sphere (-> v1-10 root root-prim prim-core)))) + ) + ) + (set-time! (-> self offscreen-time)) + ) + (if (time-elapsed? (-> self offscreen-time) (seconds 3)) + (send-event (handle->process (-> self parent-hand)) 'traffic-off-force) + ) + ) + (else + (return 0) + ) + ) + ) + ) + #f + ) + ) + +(define *assault-levels* (new 'static 'boxed-array :type symbol :length 13 :allocated-length 19 + '#f + 'lctyass + 'ctypepa + 'ctypesa + 'ctypesa + 'ctypesa + 'ctypesb + 'ctypesb + 'ctypepb + 'ctypesc + 'ctypesc + 'ctypesc + 'ctypesc + ) + ) + +;; WARN: Return type mismatch int vs handle. +(defun spawn-assault-enemy ((arg0 assault-target-type) (arg1 process)) + (let ((s5-0 (new 'stack 'assault-object-spawn-params)) + (s4-0 (assault-type->type arg0)) + ) + (if (not s4-0) + (return (the-as handle #f)) + ) + (quaternion-identity! (-> s5-0 rotation)) + (set! (-> s5-0 position quad) (-> (target-pos 0) quad)) + (set! (-> s5-0 lev) (-> *assault-levels* arg0)) + (set! (-> s5-0 velocity quad) (the-as uint128 0)) + (set! (-> s5-0 behavior) (the-as uint 1)) + (set! (-> s5-0 flags) (traffic-spawn-flags tsf0)) + (set! (-> s5-0 nav-branch) #f) + (set! (-> s5-0 guard-type) (the-as uint 0)) + (logior! (-> s5-0 flags) (traffic-spawn-flags tsf7)) + (let ((s4-1 (get-process *default-dead-pool* s4-0 #x4000 1))) + (the-as handle (ppointer->handle (when s4-1 + (let ((t9-5 (method-of-type process activate))) + (t9-5 s4-1 arg1 "assault-enemy" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 assault-enemy-init-by-other s5-0) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + ) + +(defmethod go-from-behavior ((this assault-crimson-guard) (arg0 assault-object-spawn-params)) + (set! (-> this center-pos quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (call-parent-method this arg0) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod citizen-method-194 ((this assault-crimson-guard)) + (call-parent-method this) + (set! (-> this hit-points) 10.0) + (none) + ) + +(defmethod go-inactive ((this assault-crimson-guard)) + (with-pp + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'guard-death) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node city-port-assault-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + (call-parent-method this) + (none) + ) + ) + +(defmethod event-handler ((this assault-crimson-guard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('weaken) + (set! (-> this hit-points) (fmin 1.0 (-> this hit-points))) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this assault-crimson-guard)) + (call-parent-method this) + (when (and (or (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (< 102400.0 (vector-vector-xz-distance (-> this root trans) (-> this center-pos))) + ) + (-> this next-state) + (= (-> this next-state name) 'hostile) + ) + (nav-enemy-method-177 this) + (add-debug-sphere #t (bucket-id debug) (-> this center-pos) (meters 2) *color-red*) + (go (method-of-object this active)) + ) + (none) + ) + +(defstate active (assault-crimson-guard) + :virtual #t + :enter (behavior () + (logclear! (-> self flags) (citizen-flag in-pursuit hostile)) + (set! (-> self already-shot) #f) + (set! (-> self attacker-info callback) + (lambda ((arg0 assault-crimson-guard) (arg1 city-attacker-info)) + (let* ((s5-0 (handle->process (-> arg1 proc))) + (s4-0 (if (type? s5-0 process-focusable) + (the-as process-focusable s5-0) + ) + ) + (s5-1 (new 'stack 'sphere)) + ) + (set! (-> s5-1 quad) (-> s4-0 root root-prim prim-core world-sphere quad)) + (set! (-> s5-1 r) 409.6) + (the-as + int + (and (sphere-in-view-frustum? s5-1) (< (vector-vector-xz-distance s5-1 (-> arg0 center-pos)) 98304.0)) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let ((a0-5 (-> self nav state)) + (v1-12 (-> self center-pos)) + ) + (logclear! (-> a0-5 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-5 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-5 target-pos quad) (-> v1-12 quad)) + ) + 0 + ) + :trans (behavior () + (let ((gp-0 (-> self center-pos))) + 0.0 + (if (< (vector-vector-xz-distance (-> self root trans) gp-0) 40960.0) + (go-virtual wait-for-enemies) + ) + (when #f + (let ((a0-2 (the-as process-focusable (handle->process (-> self target-status handle))))) + (when a0-2 + (if (< (vector-vector-xz-distance (get-trans a0-2 0) gp-0) 102400.0) + (go-hostile self) + ) + ) + ) + ) + ) + ) + :code (behavior () + (citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info run-anim))) 300) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +(defstate wait-for-enemies (assault-crimson-guard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((a0-3 (the-as process-focusable (handle->process (-> self target-status handle))))) + (when a0-3 + (if (< (vector-vector-xz-distance (get-trans a0-3 0) (-> self center-pos)) 122880.0) + (go-hostile self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max (-> self speed-scale)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed-scale))) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(deftype special-health (health) + () + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod initialize-allocations ((this special-health)) + (call-parent-method this) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (none) + ) + +(defbehavior special-health-init-by-other special-health ((arg0 vector)) + (set! (-> self pickup-amount) (-> *FACT-bank* health-default-inc)) + (set! (-> self pickup-type) (pickup-type health)) + (initialize-allocations self) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-effects self (-> self pickup-type)) + (initialize-options self 0 1024.0 (the-as fact-info #f)) + (update-transforms (-> self root)) + (logior! (-> self flags) (collectable-flag fadeout no-distance-check-fadeout)) + (set! (-> self fadeout-timeout) (seconds 5)) + (go-to-initial-state self) + ) + +(deftype ammo-special-pickup (process-focusable) + ((ammo-type pickup-type) + (gun-type pickup-type) + (collect-effect sparticle-launch-group) + (ammo-effect sparticle-launch-group) + (anim-index int32) + ) + (:state-methods + wait + pickup + ) + (:methods + (init-pickup (_type_ vector pickup-type pickup-type) object) + ) + ) + + +(defbehavior ammo-special-pickup-init-by-other ammo-special-pickup ((arg0 pickup-type) (arg1 pickup-type)) + (stack-size-set! (-> self main-thread) 128) + (let ((a2-0 (gun->ammo arg1))) + (if (= a2-0 (pickup-type none)) + (set! a2-0 arg1) + ) + (init-pickup self (the-as vector arg0) a2-0 arg1) + ) + ) + +(defskelgroup skel-ammo-special-gun gun gun-lod0-jg -1 + ((gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :sort 1 + :origin-joint-index 3 + ) + +(defmethod init-pickup ((this ammo-special-pickup) (arg0 vector) (arg1 pickup-type) (arg2 pickup-type)) + (with-pp + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s2-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s2-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s2-0 reaction) cshape-reaction-default) + (set! (-> s2-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-8 local-sphere) 0.0 3276.8 0.0 6553.6) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-8) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-11 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s2-0) + ) + (set! (-> this root trans quad) (-> arg0 quad)) + (set! (-> this ammo-type) arg1) + (set! (-> this gun-type) arg2) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) (rand-vu-float-range 0.0 65536.0)) + (case (-> this ammo-type) + (((pickup-type ammo-yellow)) + (set! (-> this collect-effect) (-> *part-group-id-table* 136)) + ) + (((pickup-type ammo-red)) + (set! (-> this collect-effect) (-> *part-group-id-table* 137)) + ) + (((pickup-type ammo-blue)) + (set! (-> this collect-effect) (-> *part-group-id-table* 138)) + ) + (((pickup-type ammo-dark)) + (set! (-> this collect-effect) (-> *part-group-id-table* 139)) + ) + (((pickup-type eco-pill-dark)) + (set! (-> this collect-effect) (-> *part-group-id-table* 140)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 128) this)) + ) + ) + (case (-> this ammo-type) + (((pickup-type ammo-red) (pickup-type ammo-yellow) (pickup-type ammo-blue) (pickup-type ammo-dark)) + (set! (-> pp level) (-> *target* level)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-special-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-push! 1 0) + (let ((a1-15 (cond + ((= arg2 (pickup-type gun-yellow-1)) + (-> this draw art-group data 19) + ) + ((= arg2 (pickup-type gun-yellow-2)) + (-> this draw art-group data 20) + ) + ((= arg2 (pickup-type gun-yellow-3)) + (-> this draw art-group data 21) + ) + ((= arg2 (pickup-type gun-red-1)) + (-> this draw art-group data 13) + ) + ((= arg2 (pickup-type gun-red-2)) + (-> this draw art-group data 14) + ) + ((= arg2 (pickup-type gun-red-3)) + (-> this draw art-group data 15) + ) + ((= arg2 (pickup-type gun-blue-1)) + (-> this draw art-group data 22) + ) + ((= arg2 (pickup-type gun-blue-2)) + (-> this draw art-group data 23) + ) + ((= arg2 (pickup-type gun-blue-3)) + (-> this draw art-group data 24) + ) + ((= arg2 (pickup-type gun-dark-2)) + (-> this draw art-group data 17) + ) + ((= arg2 (pickup-type gun-dark-3)) + (-> this draw art-group data 18) + ) + (else + (-> this draw art-group data 16) + ) + ) + ) + (a0-30 (-> this skel root-channel 0)) + ) + (set! (-> a0-30 frame-group) (the-as art-joint-anim a1-15)) + (joint-control-channel-group-eval! a0-30 (the-as art-joint-anim a1-15) num-func-identity) + ) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + ) + ) + (case (-> this ammo-type) + (((pickup-type ammo-yellow)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 164)) + ) + (((pickup-type ammo-red)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 158)) + ) + (((pickup-type ammo-blue)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 154)) + ) + (((pickup-type ammo-dark)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 129)) + ) + ) + (update-transforms (-> this root)) + (go (method-of-object this wait)) + ) + ) + +(defstate wait (ammo-special-pickup) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (when (and (or (= message 'touch) (= message 'attack)) + (not (and (-> self next-state) (= (-> self next-state name) 'pickup))) + ) + (process-contact-action proc) + (go-virtual pickup) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + (when (nonzero? (-> self draw)) + (let* ((f1-2 (lerp-scale-clamp 0.0 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))) 3.0 5.0)) + (f0-3 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint (the int (lerp 128.0 0.0 f0-3)))) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go empty-state) + ) + ) + :code sleep-code + :post (behavior () + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 40049.777 (seconds-per-frame))) + (ja-post) + ) + ) + +(defstate pickup (ammo-special-pickup) + :virtual #t + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (if (nonzero? (-> self draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (sound-play "ammo-pickup") + (send-event (ppointer->process (-> self parent)) 'ammo-special (-> self ammo-type) (-> self gun-type)) + (when (nonzero? (-> self collect-effect)) + (cond + ((logtest? (-> self collect-effect flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *target* + :group (-> self collect-effect) + :callback part-tracker-track-target + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn + part-tracker + :to *target* + :group (-> self collect-effect) + :callback part-tracker-track-target + ) + ) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (go empty-state) + ) + ) + +(deftype assault-bombbot (bombbot) + ((next-node int32) + (new-point-choose-time time-frame) + (max-hp float :offset 1532) + (is-final? symbol) + (last-charge-player-count uint32) + (suck-level int32) + ) + (:methods + (assault-bombbot-method-209 (_type_) int) + ) + ) + + +(defstate explode (assault-bombbot) + :virtual #t + :enter (behavior () + (send-event (ppointer->process (-> self parent)) 'bombbot-death) + (let ((gp-0 (new 'stack 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 409600.0) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-11 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-11 + (let* ((s3-1 (-> v1-11 process)) + (a0-9 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when a0-9 + (if (and a0-9 (logtest? (process-mask guard) (-> a0-9 mask)) (not (logtest? (process-mask enemy) (-> a0-9 mask)))) + (send-event + a0-9 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 *target*) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 r))) + (if (and s5-1 (logtest? (process-mask guard) (-> s5-1 mask)) (not (logtest? (process-mask enemy) (-> s5-1 mask)))) + (send-event + s5-1 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + ) + (let ((t9-11 (-> (find-parent-state) enter))) + (if t9-11 + (t9-11) + ) + ) + ) + ) + +(defmethod enemy-common-post ((this assault-bombbot)) + (call-parent-method this) + (none) + ) + +(deftype assault-bombbot-spawn-params (bombbot-spawn-params) + ((is-final? symbol) + (suck-level int32) + ) + ) + + +(defbehavior assault-bombbot-init-by-other assault-bombbot ((arg0 assault-bombbot-spawn-params)) + (set! (-> self is-final?) (-> arg0 is-final?)) + (set! (-> self suck-level) (-> arg0 suck-level)) + (bombbot-init-by-other arg0) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-enemy! ((this assault-bombbot)) + (with-pp + (set! (-> pp level) (level-get *level* 'lctyass)) + (call-parent-method this) + (cond + ((-> this is-final?) + (set! (-> this max-hp) 61.0) + ) + (else + 0.0 + (let* ((f1-0 (lerp-scale-clamp 1.0 0.5 (the float (-> this suck-level)) 5.0 10.0)) + (f0-5 (fmax 0.0 (fmin 1.0 f1-0))) + ) + (set! (-> this max-hp) (* 250.0 f0-5)) + ) + (format 0 "Max hp ~f~%" (-> this max-hp)) + ) + ) + (set! (-> this hit-points) (-> this max-hp)) + (none) + ) + ) + +(defmethod bombbot-method-205 ((this assault-bombbot)) + (when (= (-> this nav state mesh) *default-nav-mesh*) + (let ((a0-4 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when a0-4 + (change-to a0-4 this) + (dotimes (s5-0 4) + (let ((s4-0 (-> this feet s5-0))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-orient-by-quat! s3-0 (-> s4-0 pos-offset) (-> this root quat)) + (vector+! s3-0 s3-0 (-> this root trans)) + (set! (-> s4-0 next-position quad) (-> s3-0 quad)) + (set! (-> s4-0 position quad) (-> s3-0 quad)) + ) + (set! (-> s4-0 delta-y) 0.0) + ) + (set! (-> this legs-strength s5-0) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype assault-bombbot-shot (bombbot-shot) + () + ) + + +(if #t + (set! *curve-assault-bombbot-shot-color-blue* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-assault-bombbot-shot-width* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.5 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *assault-bombbot-trail*) (!= loading-level global)) + (set! *assault-bombbot-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *assault-bombbot-trail* color-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail* color-repeat-dist) 4096.0) + +(set! (-> *assault-bombbot-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail* alpha-2-mode) (the-as uint 6)) + +(set! (-> *assault-bombbot-trail* base-alpha) 1.0) + +(set! (-> *assault-bombbot-trail* alpha-repeat-dist) 4096.0) + +(set! (-> *assault-bombbot-trail* width-mode) (the-as uint 1)) + +(set! (-> *assault-bombbot-trail* base-width) 819.2) + +(set! (-> *assault-bombbot-trail* width-repeat-dist) 8192.0) + +(set! (-> *assault-bombbot-trail* uv-mode) (the-as uint 3)) + +(set! (-> *assault-bombbot-trail* uv-repeat-dist) 4096000.0) + +(set! (-> *assault-bombbot-trail* lie-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail* max-age) (seconds 0.1)) + +(if #f + (set! (-> *assault-bombbot-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *assault-bombbot-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *assault-bombbot-trail* width-curve) (the-as curve2d-piecewise *curve-assault-bombbot-shot-width*)) + +(set! (-> *assault-bombbot-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-white*)) + +(set! (-> *assault-bombbot-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *assault-bombbot-trail* alpha-curve-2) #f) + +(set! (-> *assault-bombbot-trail* zbuffer?) #f) + +(set! (-> *assault-bombbot-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *assault-bombbot-trail* use-tape-mode?) #f) + +(set! (-> *assault-bombbot-trail* blend-mode) (the-as uint 1)) + +(set! (-> *assault-bombbot-trail* frame-stagger) (the-as uint 1)) + +(if (or (zero? *assault-bombbot-trail-2*) (!= loading-level global)) + (set! *assault-bombbot-trail-2* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *assault-bombbot-trail-2* color-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail-2* color-repeat-dist) 4096.0) + +(set! (-> *assault-bombbot-trail-2* alpha-1-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail-2* alpha-2-mode) (the-as uint 6)) + +(set! (-> *assault-bombbot-trail-2* base-alpha) 1.0) + +(set! (-> *assault-bombbot-trail-2* alpha-repeat-dist) 4096.0) + +(set! (-> *assault-bombbot-trail-2* width-mode) (the-as uint 1)) + +(set! (-> *assault-bombbot-trail-2* base-width) 3276.8) + +(set! (-> *assault-bombbot-trail-2* width-repeat-dist) 8192.0) + +(set! (-> *assault-bombbot-trail-2* uv-mode) (the-as uint 3)) + +(set! (-> *assault-bombbot-trail-2* uv-repeat-dist) 4096000.0) + +(set! (-> *assault-bombbot-trail-2* lie-mode) (the-as uint 0)) + +(set! (-> *assault-bombbot-trail-2* max-age) (seconds 0.1)) + +(if #f + (set! (-> *assault-bombbot-trail-2* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *assault-bombbot-trail-2* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *assault-bombbot-trail-2* width-curve) + (the-as curve2d-piecewise *curve-assault-bombbot-shot-width*) + ) + +(set! (-> *assault-bombbot-trail-2* color-curve) + (the-as curve-color-piecewise *curve-assault-bombbot-shot-color-blue*) + ) + +(set! (-> *assault-bombbot-trail-2* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *assault-bombbot-trail-2* alpha-curve-2) #f) + +(set! (-> *assault-bombbot-trail-2* zbuffer?) #f) + +(set! (-> *assault-bombbot-trail-2* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *assault-bombbot-trail-2* use-tape-mode?) #f) + +(set! (-> *assault-bombbot-trail-2* blend-mode) (the-as uint 1)) + +(set! (-> *assault-bombbot-trail-2* frame-stagger) (the-as uint 1)) + +(defpartgroup group-dummy-explode-assault-bombbot-explode + :id 1435 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4717 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 4718 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 4719 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 4717 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4718 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0) + (:b 128.0) + (:a 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4719 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defmethod projectile-method-26 ((this assault-bombbot-shot)) + (cond + ((logtest? (-> *part-group-id-table* 1435 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1435)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1435)) + ) + ) + ((method-of-type guard-shot projectile-method-26) this) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-proj-settings! ((this assault-bombbot-shot)) + (call-parent-method this) + (let ((gp-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-0 tracked-obj) (process->handle this)) + (set! (-> gp-0 appearance) *assault-bombbot-trail*) + (set! (-> gp-0 max-num-crumbs) (the int (* 0.25 (the float (-> gp-0 appearance max-age))))) + (set! (-> gp-0 track-immediately?) #t) + (let* ((v1-11 (estimate-light-trail-mem-usage + (the-as uint (-> gp-0 max-num-crumbs)) + (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-11 8192) 1)) + (v1-12 (when s5-1 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s5-1 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-0) + (-> s5-1 ppointer) + ) + ) + ) + (if v1-12 + (-> v1-12 0 self) + ) + ) + (set! (-> gp-0 appearance) *assault-bombbot-trail-2*) + (let* ((v1-20 (estimate-light-trail-mem-usage + (the-as uint (-> gp-0 max-num-crumbs)) + (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + ) + ) + (s5-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-20 8192) 1)) + (v1-21 (when s5-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s5-2 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 light-trail-tracker-init-by-other gp-0) + (-> s5-2 ppointer) + ) + ) + ) + (if v1-21 + (-> v1-21 0 self) + ) + ) + ) + (none) + ) + +(defmethod projectile-method-25 ((this assault-bombbot-shot)) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer projectile). +(defmethod fire-shot ((this assault-bombbot) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + 819200.0 + (let ((f0-1 2.0)) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 notify-handle) (process->handle this)) + (set! (-> gp-0 owner-handle) (the-as handle #f)) + (set! (-> gp-0 target-handle) (the-as handle #f)) + (set! (-> gp-0 target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 ignore-handle) (process->handle this)) + (let* ((a0-15 *game-info*) + (a2-12 (+ (-> a0-15 attack-id) 1)) + ) + (set! (-> a0-15 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) f0-1) + ) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 1.0) + ) + (the-as (pointer projectile) (spawn-projectile assault-bombbot-shot gp-0 this *default-dead-pool*)) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod bombbot-method-196 ((this assault-bombbot) (arg0 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s4-0 *target*) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (gp-0 + (set! (-> this target-pos quad) (-> (get-trans gp-0 3) quad)) + (let ((v1-3 (-> this target-pos))) + (let ((a0-4 (-> gp-0 control trans))) + (let ((a1-4 (-> gp-0 control transv))) + (let ((a2-0 0.0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> v1-3 quad) vf6) + ) + (set! (-> this start-target-pos quad) (-> this target-pos quad)) + (set! (-> this start-target-vel quad) (-> gp-0 control transv quad)) + (try-update-focus (-> this focus) gp-0 this) + ) + (else + (clear-focused (-> this focus)) + ) + ) + ) + (none) + ) + ) + +(defmethod assault-bombbot-method-209 ((this assault-bombbot)) + (local-vars (s4-1 object)) + (let ((s5-0 (rand-vu-int-count-excluding + (the-as int (+ (-> this city-path node-count) -1)) + (the-as int (-> this current-node)) + ) + ) + ) + (+! (-> this last-charge-player-count) 1) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when (or (not (and (if (type? s4-0 process-focusable) + s4-0 + ) + (begin + (let* ((s4-2 #t) + (s3-0 (handle->process (-> this focus handle))) + (v1-13 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s3-0 process-focusable) + (the-as process-focusable s3-0) + ) + ) + focus-status + ) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (cmove-#f-nonzero s4-1 v1-13 s4-2) + ) + s4-1 + ) + ) + ) + (logtest? (-> this last-charge-player-count) 1) + ) + (set! s5-0 s5-0) + (goto cfg-36) + ) + ) + (let ((s4-4 (vector-! (new 'stack-no-clear 'vector) (-> this target-pos) (-> this root trans)))) + 0.0 + (set! (-> s4-4 y) 0.0) + (vector-normalize-ret-len! s4-4 1.0) + (let ((f30-0 0.3)) + (dotimes (s3-1 (the-as int (-> this city-path node-count))) + (when (!= s3-1 (-> this current-node)) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> this city-path node s3-1)) (-> this root trans)) + ) + ) + 0.0 + (set! (-> s2-1 y) 0.0) + (vector-normalize! s2-1 1.0) + (let ((f28-0 (vector-dot s4-4 s2-1))) + (when (and (< f30-0 f28-0) + (< 40960.0 (vector-vector-xz-distance (-> this root trans) (the-as vector (-> this city-path node s3-1)))) + ) + (set! f30-0 f28-0) + (set! s5-0 s3-1) + ) + ) + ) + ) + ) + ) + ) + (label cfg-36) + s5-0 + ) + ) + +(define *bombbot-bomb-hp-thresholds* (new 'static 'boxed-array :type float 0.7 0.4)) + +(defstate drop-bombs (assault-bombbot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self drop-num) (the-as uint 3)) + ) + ) + +(defmethod bombbot-method-208 ((this assault-bombbot) (arg0 vector) (arg1 vector)) + (set! (-> arg1 quad) (-> this target-pos quad)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + 0.0 + (let* ((f0-1 (vector-normalize-ret-len! s4-1 1.0)) + (f0-2 (fmin 30720.0 f0-1)) + ) + (vector+float*! arg1 arg0 s4-1 f0-2) + ) + ) + arg1 + ) + +(define *look-time* (seconds 4)) + +(defstate hostile (assault-bombbot) + :virtual #t + :enter (behavior () + (set! (-> self attacker-info) (allocate-attacker *cty-attack-controller*)) + (init! (-> self attacker-info) self 13) + (set! (-> self next-node) (the-as int (-> self current-node))) + (set-time! (-> self state-time)) + (set-time! (-> self stop-shoot)) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :exit (behavior () + (remove-attacker *cty-attack-controller* (-> self attacker-info)) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (not (-> self is-final?)) + (let ((f30-0 (/ (-> self hit-points) (-> self max-hp)))) + (when (time-elapsed? (-> self stop-shoot) (seconds 6)) + (dotimes (gp-0 (-> *bombbot-bomb-hp-thresholds* length)) + (if (and (>= (-> *bombbot-bomb-hp-thresholds* gp-0) f30-0) + (>= f30-0 (+ -0.1 (-> *bombbot-bomb-hp-thresholds* gp-0))) + ) + (go-virtual drop-bombs) + ) + ) + ) + ) + ) + (when (< (-> self next-target) (current-time)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 w) 204800.0) + (bombbot-method-196 self a1-0) + ) + (set! (-> self next-target) (+ (current-time) (seconds 8))) + (set! (-> self gun-type) (the-as uint 0)) + 0 + ) + (let ((v1-33 (the-as process-focusable (handle->process (-> self focus handle))))) + (when v1-33 + (when (< (current-time) (+ (-> self next-target) (seconds -2))) + (set-time! (-> self start-target)) + (set! (-> self start-target-pos quad) (-> v1-33 root trans quad)) + (set! (-> self start-target-vel quad) (-> v1-33 root transv quad)) + (vector-! (-> self target-delta) (-> v1-33 root trans) (-> self root trans)) + ) + (let ((a2-2 (-> self target-pos))) + (let ((a0-23 (-> self start-target-pos))) + (let ((a1-12 (-> self start-target-vel))) + (let ((a3-4 (* 0.0033333334 (the float (- (current-time) (-> self start-target)))))) + (.mov vf7 a3-4) + ) + (.lvf vf5 (&-> a1-12 quad)) + ) + (.lvf vf4 (&-> a0-23 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a2-2 quad) vf6) + ) + (if (= (-> v1-33 type) target) + (set! (-> self target-pos quad) (-> self start-target-pos quad)) + ) + (if (< (+ (-> self next-target) (seconds -1)) (current-time)) + (bombbot-method-197 self) + (bombbot-method-204 self) + ) + ) + ) + (bombbot-method-205 self) + (new 'stack-no-clear 'vector) + (let ((f0-8 (* 0.25 (+ (-> self feet 0 next-position y) + (-> self feet 1 next-position y) + (-> self feet 2 next-position y) + (-> self feet 3 next-position y) + ) + ) + ) + ) + (if (!= (-> self nav state mesh) *default-nav-mesh*) + (+! (-> self root trans y) (* 4.0 (seconds-per-frame) (- f0-8 (-> self root trans y)))) + ) + ) + (if (= (vector-length (-> self root transv)) 0.0) + (set-time! (-> self state-time)) + ) + (bombbot-method-202 self) + (bombbot-method-195 self) + ) + ) + :post (behavior () + (let ((v1-0 1200)) + (if (= (logand (-> self last-charge-player-count) 1) 1) + (set! v1-0 600) + ) + (when (and (time-elapsed? (-> self new-point-choose-time) v1-0) + (>= (+ (-> self next-target) (seconds -1)) (current-time)) + ) + (set! (-> self next-node) (assault-bombbot-method-209 self)) + (set-time! (-> self new-point-choose-time)) + ) + ) + (-> self current-node) + (let ((gp-0 (-> self next-node))) + (cond + ((= (-> self nav state mesh) *default-nav-mesh*) + (vector-v+! + (-> self root trans) + (-> self root trans) + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-0)) (-> self root trans)) + (-> *bombbot-nav-enemy-info* run-travel-speed) + ) + ) + (seek! (-> self root trans y) (-> self city-path node gp-0 position y) (* 16384.0 (seconds-per-frame))) + (enemy-common-post self) + (update-transforms (-> self root)) + ) + (else + (let ((v1-29 (-> self nav state)) + (a0-20 (-> self city-path node gp-0)) + ) + (logclear! (-> v1-29 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-29 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-29 target-pos quad) (-> a0-20 position quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-0))) 24576.0) + (set! (-> self current-node) (the-as uint gp-0)) + (set! (-> self next-node) (assault-bombbot-method-209 self)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/city/protect/assault-path.gc b/goal_src/jak3/levels/city/protect/assault-path.gc index 6de479b333..7928a7ad2c 100644 --- a/goal_src/jak3/levels/city/protect/assault-path.gc +++ b/goal_src/jak3/levels/city/protect/assault-path.gc @@ -7,3 +7,145 @@ ;; DECOMP BEGINS +(define *assault-rooms* (new 'static 'boxed-array :type assault-room :length 0 :allocated-length 5)) + +(set! (-> *assault-rooms* length) (-> *assault-rooms* allocated-length)) + +(set! (-> *assault-rooms* 0) + (new 'static 'assault-room :center-pos (new 'static 'vector :x -240257.03 :y 36409.344 :z 5520792.5 :w 1.0)) + ) + +(set! (-> *assault-rooms* 0 cam-info) (-> *assault-cams* 0)) + +(set! (-> *assault-rooms* 0 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80696344 :z 0.5906011) + :uvec (new 'static 'vector :x -0.36253208 :y 0.7894338 :z -0.49534297) + :fvec (new 'static 'vector :x -0.46624056 :y -0.61383563 :z -0.63704425) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x -190874.02 :y 106024.96 :z 5588420.0 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 30608.953 :dist1 40000.055) + :hoz-clip-dist 75502.086 + ) + ) + +(set! (-> *assault-rooms* 0 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x -320432.12 :y 39460.863 :z 5583748.0 :w 1.0) + (new 'static 'vector :x -157367.1 :y 35726.54 :z 5467749.0 :w 1.0) + ) + ) + +(set! (-> *assault-rooms* 1) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 371519.1 :y 35597.105 :z 7164435.0 :w 1.0)) + ) + +(set! (-> *assault-rooms* 1 cam-info) (-> *assault-cams* 1)) + +(set! (-> *assault-rooms* 1 collision) + (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.0033539534 :z 0.9999943) + :uvec (new 'static 'vector :x -0.8762458 :y 0.4818552 :z -0.0029389048) + :fvec (new 'static 'vector :x -0.4818526 :y -0.87625074 :z -0.0016161203) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 423746.75 :y 149545.38 :z 7161433.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 38132.883 :dist1 60766.504) + :hoz-clip-dist 84132.84 + ) + ) + +(set! (-> *assault-rooms* 1 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 451624.56 :y 37709.004 :z 7164598.5 :w 1.0) + (new 'static 'vector :x 314352.03 :y 35603.25 :z 7283629.0 :w 1.0) + (new 'static 'vector :x 319363.06 :y 35609.395 :z 7031069.5 :w 1.0) + ) + ) + +(set! (-> *assault-rooms* 2) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 785399.4 :y 35733.504 :z 5553110.0 :w 1.0)) + ) + +(set! (-> *assault-rooms* 2 cam-info) (-> *assault-cams* 2)) + +(set! (-> *assault-rooms* 2 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.91507846 :z -0.4032754) + :uvec (new 'static 'vector :x 0.34681395 :y 0.51030624 :z -0.7869609) + :fvec (new 'static 'vector :x 0.20579405 :y -0.8599926 :z -0.46697044) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 754367.3 :y 136454.14 :z 5612391.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 34730.176 :dist1 57014.51) + :hoz-clip-dist 76124.41 + ) + ) + +(set! (-> *assault-rooms* 2 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 784477.8 :y 35810.508 :z 5431458.0 :w 1.0) + (new 'static 'vector :x 684347.0 :y 35715.89 :z 5563923.0 :w 1.0) + (new 'static 'vector :x 882867.8 :y 36161.125 :z 5581003.0 :w 1.0) + ) + ) + +(set! (-> *assault-rooms* 3) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 1754726.0 :y 35726.95 :z 5489334.5 :w 1.0)) + ) + +(set! (-> *assault-rooms* 3 cam-info) (-> *assault-cams* 3)) + +(set! (-> *assault-rooms* 3 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80724764 :z -0.59021246) + :uvec (new 'static 'vector :x 0.4939913 :y 0.54724586 :z -0.67564356) + :fvec (new 'static 'vector :x 0.32299143 :y -0.8369716 :z -0.44176307) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 1701028.2 :y 180959.23 :z 5565024.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 51394.637 :dist1 87897.0) + :hoz-clip-dist 111438.664 + ) + ) + +(set! (-> *assault-rooms* 3 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 1655123.5 :y 35728.18 :z 5430803.0 :w 1.0) + (new 'static 'vector :x 1852997.2 :y 35795.76 :z 5552741.0 :w 1.0) + (new 'static 'vector :x 1711406.8 :y 42685.234 :z 5560278.0 :w 1.0) + ) + ) + +(set! (-> *assault-rooms* 4) + (new 'static 'assault-room :center-pos (new 'static 'vector :x -359565.3 :y 41573.17 :z 5346835.0 :w 1.0)) + ) + +(set! (-> *assault-rooms* 4 cam-info) (-> *assault-cams* 4)) + +(set! (-> *assault-rooms* 4 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.8088231 :z 0.58805186) + :uvec (new 'static 'vector :x -0.42552334 :y 0.69020355 :z -0.5852767) + :fvec (new 'static 'vector :x -0.4058755 :y -0.7236152 :z -0.5582527) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x -311586.9 :y 110922.0 :z 5417229.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 29167.535 :dist1 61501.04) + :hoz-clip-dist 59058.156 + ) + ) + +(set! (-> *assault-rooms* 4 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x -318851.9 :y 40452.914 :z 5403400.5 :w 1.0) + (new 'static 'vector :x -350418.94 :y 43542.938 :z 5425846.5 :w 1.0) + (new 'static 'vector :x -292352.4 :y 42613.145 :z 5385706.5 :w 1.0) + (new 'static 'vector :x -426024.56 :y 43729.305 :z 5323487.5 :w 1.0) + (new 'static 'vector :x -350490.22 :y 43717.02 :z 5272411.0 :w 1.0) + (new 'static 'vector :x -326335.7 :y 43717.02 :z 5312429.0 :w 1.0) + (new 'static 'vector :x -406911.38 :y 43717.02 :z 5361293.5 :w 1.0) + ) + ) diff --git a/goal_src/jak3/levels/city/protect/assault-script.gc b/goal_src/jak3/levels/city/protect/assault-script.gc index 52b10e7da4..f0a7fcfb92 100644 --- a/goal_src/jak3/levels/city/protect/assault-script.gc +++ b/goal_src/jak3/levels/city/protect/assault-script.gc @@ -5,5 +5,1169 @@ ;; name in dgo: assault-script ;; dgos: LCTYPALT +;; +++assault-cmd-speech-type +(defenum assault-cmd-speech-type + :type uint64 + (instructions) + (jak-hit) + (room-complete) + (room-start) + (encouragement) + (type5) + (torn-watch-out) + (protect-civilians) + (grab-pickup) + (torn-give-help) + (torn-finish) + (guard-hello) + (guard-bombbot) + ) +;; ---assault-cmd-speech-type + + +;; +++assault-cmd-faction-type +(defenum assault-cmd-faction-type + :type uint8 + (none) + (mh) + (ff) + (kg) + ) +;; ---assault-cmd-faction-type + + +;; +++assault-cmd-wait-type +(defenum assault-cmd-wait-type + :type uint8 + (spawn-delay) + (cmd1) + (cmd2) + ) +;; ---assault-cmd-wait-type + + +;; +++assault-cmd-spawn-type +(defenum assault-cmd-spawn-type + :type uint16 + (cmd0) + (cmd1) + (cmd2) + (cmd3) + (cmd4) + (cmd5) + (cmd6) + (cmd7) + (cmd8) + (cmd9) + (cmd10) + (cmd11) + (cmd12) + ) +;; ---assault-cmd-spawn-type + + +;; +++assault-cmd +(defenum assault-cmd + :type uint8 + (spawn) + (wait) + (advance) + (pickup) + (torn) + (final-bombbot) + (load-continue) + (save-continue) + (speech) + (queue) + (other) + ) +;; ---assault-cmd + + ;; DECOMP BEGINS +(define *port-assault-speech* + (new 'static 'boxed-array :type speech-info + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x1 :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x2 :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #x3 :probability 1.0) + (new 'static 'speech-instance :speech #x4 :probability 1.0) + (new 'static 'speech-instance :speech #x5 :probability 1.0) + (new 'static 'speech-instance :speech #x6 :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #x7 :probability 1.0) + (new 'static 'speech-instance :speech #x8 :probability 1.0) + (new 'static 'speech-instance :speech #x9 :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xa :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xb :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #xc :probability 1.0) + (new 'static 'speech-instance :speech #xb :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xd :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #xe :probability 1.0) + (new 'static 'speech-instance :speech #xf :probability 1.0) + (new 'static 'speech-instance :speech #x10 :probability 1.0) + (new 'static 'speech-instance :speech #x11 :probability 1.0) + ) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x12 :probability 1.0)) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x145 :probability 1.0)) + :flags (speech-info-flag si8) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x13 :probability 1.0)) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x15 :probability 1.0)) + ) + ) + ) + +(deftype assault-spawn-cmd (structure) + ((spawn-delay time-frame) + (command assault-cmd) + (spawn-type assault-cmd-spawn-type) + (count int8) + (spawner-index int8) + (wait-type assault-cmd-wait-type :overlay-at spawn-type) + (faction-type assault-cmd-faction-type :overlay-at spawner-index) + (wait-time time-frame :overlay-at spawn-delay) + (msg symbol) + (path-id int32) + (event0 int32) + (event1 int32) + (event2 int32) + (speech-type assault-cmd-speech-type) + (gun-pickup-type int32) + ) + ) + + +(deftype room-powerup-percentage (structure) + ((avg-spawn-rate uint64) + (percentages float 51) + (red2 float :overlay-at (-> percentages 27)) + (red3 float :overlay-at (-> percentages 28)) + (yellow2 float :overlay-at (-> percentages 30)) + (yellow3 float :overlay-at (-> percentages 31)) + (blue1 float :overlay-at (-> percentages 32)) + (blue2 float :overlay-at (-> percentages 33)) + (blue3 float :overlay-at (-> percentages 34)) + (darkjak float :overlay-at (-> percentages 7)) + (lightjak float :overlay-at (-> percentages 14)) + (health float :overlay-at (-> percentages 20)) + ) + ) + + +(deftype assault-cmd-context (structure) + ((start-time time-frame) + (state-time time-frame) + (current-command assault-spawn-cmd :inline) + (script pair) + ) + ) + + +(define *assault-object-count* + (new 'static 'boxed-array :type int32 :length 15 :allocated-length 19 0 5 0 8 0 0 6 12 0 6 0 15 0 1 0) + ) + +(define *assault-fade-dist* (new 'static 'boxed-array :type float :length 14 :allocated-length 19 + 0.0 + 0.0 + 0.0 + 409600.0 + 409600.0 + 409600.0 + 368640.0 + 245760.0 + 245760.0 + 409600.0 + 245760.0 + 245760.0 + 491520.0 + 0.0 + ) + ) + +(define *assault-graph-classification* + (new 'static 'boxed-array :type int32 :length 16 :allocated-length 19 -1 0 0 0 0 0 1 1 1 2 3 2 2 -1 -1 -1) + ) + +(define *assault-faction-lookup* (new 'static 'boxed-array :type uint8 :length 15 :allocated-length 19 + #x0 + #x2 + #x2 + #x2 + #x2 + #x2 + #x1 + #x1 + #x1 + #x3 + #x3 + #x3 + #x3 + #x3 + #x0 + ) + ) + +(define *assault-guard-count* (new 'static 'boxed-array :type int32 0 2 0 0 0)) + +(define *assault-citizen-count* (new 'static 'boxed-array :type int32 0 0 3 0 0)) + +;; WARN: Return type mismatch int vs assault-target-type. +(defun symbol->assault-target-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as assault-target-type (cond + ((= v1-0 'roboguard) + (the-as assault-target-type (assault-target-type roboguard)) + ) + ((= v1-0 'roboguard-giant) + (the-as assault-target-type (assault-target-type roboguard-giant)) + ) + ((= v1-0 'guard-rifle) + (the-as assault-target-type (assault-target-type guard-rifle)) + ) + ((= v1-0 'guard-tazer) + (the-as assault-target-type (assault-target-type guard-tazer)) + ) + ((= v1-0 'guard-grenade) + (the-as assault-target-type (assault-target-type guard-grenade)) + ) + ((= v1-0 'turret) + (the-as assault-target-type (assault-target-type turret)) + ) + ((= v1-0 'spydroid) + (the-as assault-target-type (assault-target-type other)) + ) + ((= v1-0 'flitter) + (the-as assault-target-type (assault-target-type flitter)) + ) + ((= v1-0 'bombbot) + (the-as assault-target-type (assault-target-type assault-bombbot)) + ) + ((= v1-0 'grunt) + (the-as assault-target-type (assault-target-type assault-grunt)) + ) + (else + (the-as assault-target-type (assault-target-type other)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs assault-cmd-speech-type. +(defun symbol->speech-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as + assault-cmd-speech-type + (cond + ((= v1-0 'instructions) + (the-as assault-cmd-speech-type (assault-cmd-speech-type instructions)) + ) + ((= v1-0 'jak-hit) + (the-as assault-cmd-speech-type (assault-cmd-speech-type jak-hit)) + ) + ((= v1-0 'room-complete) + (the-as assault-cmd-speech-type (assault-cmd-speech-type room-complete)) + ) + ((= v1-0 'room-start) + (the-as assault-cmd-speech-type (assault-cmd-speech-type room-start)) + ) + ((= v1-0 'encouragement) + (the-as assault-cmd-speech-type (assault-cmd-speech-type encouragement)) + ) + ((= v1-0 'torn-watch-out) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-watch-out)) + ) + ((= v1-0 'guard-hello) + (the-as assault-cmd-speech-type (assault-cmd-speech-type guard-hello)) + ) + ((= v1-0 'guard-bombbot) + (the-as assault-cmd-speech-type (assault-cmd-speech-type guard-bombbot)) + ) + ((= v1-0 'protect-civilians) + (the-as assault-cmd-speech-type (assault-cmd-speech-type protect-civilians)) + ) + ((= v1-0 'grab-pickup) + (the-as assault-cmd-speech-type (assault-cmd-speech-type grab-pickup)) + ) + ((= v1-0 'torn-give-help) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-give-help)) + ) + ((= v1-0 'torn-finish) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-finish)) + ) + (else + (the-as assault-cmd-speech-type (assault-cmd-speech-type encouragement)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs assault-cmd-faction-type. +(defun symbol->faction-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as assault-cmd-faction-type (cond + ((= v1-0 'kg) + (the-as assault-cmd-faction-type (assault-cmd-faction-type kg)) + ) + ((= v1-0 'ff) + (the-as assault-cmd-faction-type (assault-cmd-faction-type ff)) + ) + ((= v1-0 'mh) + (the-as assault-cmd-faction-type (assault-cmd-faction-type mh)) + ) + (else + (the-as assault-cmd-faction-type (assault-cmd-faction-type kg)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs pickup-type. +(defun symbol->gun-pickup-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as pickup-type (cond + ((= v1-0 'gun-red-1) + (the-as pickup-type (pickup-type gun-red-1)) + ) + ((= v1-0 'gun-red-2) + (the-as pickup-type (pickup-type gun-red-2)) + ) + ((= v1-0 'gun-red-3) + (the-as pickup-type (pickup-type gun-red-3)) + ) + ((= v1-0 'gun-yellow-1) + (the-as pickup-type (pickup-type gun-yellow-1)) + ) + ((= v1-0 'gun-yellow-2) + (the-as pickup-type (pickup-type gun-yellow-2)) + ) + ((= v1-0 'gun-yellow-3) + (the-as pickup-type (pickup-type gun-yellow-3)) + ) + ((= v1-0 'gun-blue-1) + (the-as pickup-type (pickup-type gun-blue-1)) + ) + ((= v1-0 'gun-blue-2) + (the-as pickup-type (pickup-type gun-blue-2)) + ) + ((= v1-0 'gun-blue-3) + (the-as pickup-type (pickup-type gun-blue-3)) + ) + ((= v1-0 'gun-dark-1) + (the-as pickup-type (pickup-type gun-dark-1)) + ) + ((= v1-0 'gun-dark-2) + (the-as pickup-type (pickup-type gun-dark-2)) + ) + ((= v1-0 'gun-dark-3) + (the-as pickup-type (pickup-type gun-dark-3)) + ) + ((= v1-0 'health) + (the-as pickup-type (pickup-type health)) + ) + ((= v1-0 'darkjak) + (the-as pickup-type (pickup-type eco-pill-dark)) + ) + (else + (the-as pickup-type (pickup-type none)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defun parse-assault-command ((arg0 pair) (arg1 assault-spawn-cmd)) + (local-vars (v0-11 int)) + (case (ref arg0 0) + (('spawn) + (set! (-> arg1 command) (assault-cmd spawn)) + 0 + ) + (('queue) + (set! (-> arg1 command) (assault-cmd queue)) + ) + (('wait) + (set! (-> arg1 command) (assault-cmd wait)) + ) + (('advance) + (set! (-> arg1 command) (assault-cmd advance)) + ) + (('pickup) + (set! (-> arg1 command) (assault-cmd pickup)) + ) + (('torn) + (set! (-> arg1 command) (assault-cmd torn)) + (set! (-> arg1 msg) (the-as symbol (ref arg0 1))) + (set! (-> arg1 event0) 0) + (set! (-> arg1 event1) 1) + (set! (-> arg1 event2) 2) + (let ((a0-9 arg0)) + (when (>= ((method-of-type (rtype-of a0-9) length) a0-9) 3) + (set! (-> arg1 event0) (command-get-int (ref arg0 2) 0)) + (let ((a0-12 arg0)) + (when (>= ((method-of-type (rtype-of a0-12) length) a0-12) 4) + (set! (-> arg1 event1) (command-get-int (ref arg0 3) 0)) + (let ((a0-15 arg0)) + (if (>= ((method-of-type (rtype-of a0-15) length) a0-15) 5) + (set! (-> arg1 event2) (command-get-int (ref arg0 4) 0)) + ) + ) + ) + ) + ) + ) + (return (the-as object 0)) + ) + (('final-bombbot) + (set! (-> arg1 command) (assault-cmd final-bombbot)) + ) + (('load-continue) + (set! (-> arg1 command) (assault-cmd load-continue)) + ) + (('save-continue) + (set! (-> arg1 command) (assault-cmd save-continue)) + ) + (('speech) + (let* ((a0-23 (ref arg0 1)) + (s2-0 (symbol->speech-type (the-as symbol a0-23))) + ) + (speech-play *port-assault-speech* (the-as int s2-0) *assault-speech-list* (target-pos 0)) + ) + (set! (-> arg1 command) (assault-cmd speech)) + ) + (else + (set! (-> arg1 command) (assault-cmd other)) + (return (the-as object 0)) + ) + ) + (case (-> arg1 command) + (((assault-cmd spawn)) + (let ((a0-28 (ref arg0 1))) + (set! (-> arg1 spawn-type) + (the-as assault-cmd-spawn-type (symbol->assault-target-type (the-as symbol a0-28))) + ) + ) + (let ((a0-29 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-29) length) a0-29) 3) + (set! (-> arg1 count) (the-as int (/ (the-as int (ref arg0 2)) 8))) + (let ((a0-31 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-31) length) a0-31) 4) + (set! (-> arg1 spawner-index) (the-as int (/ (the-as int (ref arg0 3)) 8))) + (let ((a0-33 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-33) length) a0-33) 5) + (let ((f0-0 (command-get-float (ref arg0 4) 0.0))) + (set! v0-11 (the int (* 300.0 f0-0))) + ) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + (else + (set! v0-11 150) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + ) + ) + ) + (else + (set! v0-11 -1) + (set! (-> arg1 spawner-index) v0-11) + ) + ) + ) + ) + (else + (set! v0-11 1) + (set! (-> arg1 count) v0-11) + ) + ) + ) + v0-11 + ) + (((assault-cmd pickup)) + (let ((a0-38 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-38) length) a0-38) 2) + (let ((a0-40 (ref arg0 1))) + (set! v0-11 (the-as int (symbol->gun-pickup-type (the-as symbol a0-40)))) + ) + (set! (-> arg1 gun-pickup-type) v0-11) + v0-11 + ) + (else + (set! (-> arg1 gun-pickup-type) 0) + 0 + ) + ) + ) + ) + (((assault-cmd wait)) + (let ((s4-5 (ref arg0 1))) + (case s4-5 + (('time) + (set! (-> arg1 wait-type) (assault-cmd-wait-type spawn-delay)) + (let ((f0-3 (command-get-float (ref arg0 2) 0.0))) + (set! v0-11 (the int (* 300.0 f0-3))) + ) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + (('total) + (format 0 "Yes~%") + (set! (-> arg1 wait-type) (assault-cmd-wait-type cmd2)) + (set! v0-11 (the-as int (/ (the-as int (ref arg0 2)) 8))) + (set! (-> arg1 count) v0-11) + ) + (else + (format 0 "No~%") + (set! (-> arg1 wait-type) (assault-cmd-wait-type cmd1)) + (set! (-> arg1 spawner-index) (the-as int (symbol->faction-type (the-as symbol s4-5)))) + (set! v0-11 (the-as int (/ (the-as int (ref arg0 2)) 8))) + (set! (-> arg1 count) v0-11) + ) + ) + ) + v0-11 + ) + ) + ) + +(define *assault-bombbot-paths* + (new 'static 'boxed-array :type bombbot-path + (new 'static 'bombbot-path + :node-count #xe + :node (new 'static 'inline-array bombbot-node 14 + (new 'static 'bombbot-node) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1664327.6 :y 31580.16 :z 5487821.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1695375.4 :y 31580.16 :z 5511086.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1728061.5 :y 31580.16 :z 5529641.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1762836.5 :y 31580.16 :z 5548933.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1797898.2 :y 31662.08 :z 5559378.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1814814.8 :y 31662.08 :z 5542666.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1837875.2 :y 31703.04 :z 5514731.5)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1817108.5 :y 31703.04 :z 5498347.5)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1788928.0 :y 31621.12 :z 5476393.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1752514.5 :y 31621.12 :z 5443789.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1723473.9 :y 34119.68 :z 5425971.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1699717.1 :y 33751.04 :z 5425152.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1679523.9 :y 31621.12 :z 5452308.5)) + ) + ) + ) + ) + +(define *assault-scripts* (new 'static 'boxed-array :type pair :length 0 :allocated-length 5)) + +(set! (-> *assault-scripts* length) (-> *assault-scripts* allocated-length)) + +(define *room-goal* (new 'static 'boxed-array :type uint8 #x0 #x0 #x2 #x0 #x0)) + +(define *room-powerups* + (new 'static 'boxed-array :type room-powerup-percentage + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 1.0 + 1.0 + 1.0 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1d4c :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.1 + 0.0 + 0.0 + 0.1 + 0.1 + 1.5 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.5 + 0.0 + 0.8 + 0.5 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1770 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.1 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 1.0 + 1.0 + 1.0 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + ) + ) + +(define *room0-script* '((speech instructions) + (wait time (new 'static 'bfloat :data 1.0)) + (load-continue) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait total 4) + (spawn spydroid 5 0) + (wait total 2) + (spawn roboguard 1) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn guard-tazer 1) + (spawn guard-tazer 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 1) + (pickup gun-blue-1) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 0) + (wait time (new 'static 'bfloat :data 0.2)) + (spawn spydroid 4 0) + (spawn spydroid 4 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 2.0)) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.5)) + (advance) + (end) + ) + ) + +(define *room1-script* '((save-continue) + (speech guard-hello) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn grunt 1 1) + (spawn grunt 1 2) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn flitter 4 0) + (wait total 4) + (spawn flitter 2 1) + (spawn flitter 2 2) + (spawn grunt 2) + (spawn grunt 2) + (wait total 3) + (spawn flitter 3 1) + (spawn flitter 3 0) + (spawn flitter 3 2) + (wait total 8) + (spawn grunt 1) + (spawn grunt 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn grunt 3) + (wait total 4) + (spawn flitter 2 0) + (spawn grunt 1) + (spawn grunt 1) + (wait total 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn grunt 1 1) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn grunt 1 1) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (wait total 2) + (spawn grunt 1 0) + (spawn grunt 1 1) + (spawn grunt 1 2) + (spawn flitter 3 0) + (spawn flitter 3 1) + (spawn flitter 3 2) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.0)) + (advance) + (end) + ) + ) + +(define *room2-script* '((save-continue) + (speech room-start) + (speech protect-civilians) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn spydroid 4) + (wait total 4) + (spawn flitter 4) + (spawn flitter 4) + (spawn flitter 4) + (wait total 6) + (spawn roboguard 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn grunt 1) + (spawn grunt 1) + (wait total 4) + (spawn spydroid 2) + (spawn spydroid 2) + (spawn spydroid 2) + (wait total 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (wait total 3) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn flitter 3) + (spawn flitter 3) + (spawn flitter 3) + (wait time (new 'static 'bfloat :data 2.0)) + (pickup gun-red-2) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn roboguard 1) + (spawn roboguard 1) + (spawn grunt 1) + (spawn grunt 1) + (wait total 0) + (spawn flitter 10 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 10 1 (new 'static 'bfloat :data 1.0)) + (wait total 4) + (spawn grunt 1 2) + (spawn roboguard 1 2) + (wait time (new 'static 'bfloat :data 2.5)) + (spawn flitter 5 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 5 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn grunt 1 2) + (spawn roboguard 1 2) + (wait total 4) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (spawn roboguard 1 2) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (spawn roboguard 1 2) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.0)) + (advance) + (end) + ) + ) + +(define *room3-script* '((save-continue) + (speech room-start) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn spydroid 4 0 (new 'static 'bfloat :data 0.3)) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn bombbot 1 0) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn guard-rifle 1 1) + (wait time (new 'static 'bfloat :data 12.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 12.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 1 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 10.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 10.0)) + (spawn spydroid 2 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 2 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 7.0)) + (spawn guard-rifle 1 1) + (spawn spydroid 3 0) + (wait kg 0) + (pickup health) + (wait time (new 'static 'bfloat :data 1.0)) + (final-bombbot) + (spawn bombbot 1 0) + (wait time (new 'static 'bfloat :data 1.5)) + (speech torn-give-help) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn guard-rifle 3 1 (new 'static 'bfloat :data 1.0)) + (spawn guard-rifle 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 1.5)) + (speech guard-bombbot) + (wait time (new 'static 'bfloat :data 1.5)) + (pickup health) + (spawn guard-rifle 127 1 (new 'static 'bfloat :data 2.0)) + (spawn guard-rifle 127 0 (new 'static 'bfloat :data 2.0)) + (wait time (new 'static 'bfloat :data 3.0)) + (pickup health) + (wait time (new 'static 'bfloat :data 3.0)) + (pickup health) + (wait kg 0) + (speech torn-finish) + (wait total 0) + (end) + (advance) + (end) + ) + ) + +(define *room4-script* '((wait time (new 'static 'bfloat :data 1.0)) + (speech torn-watch-out) + (torn spot-assignment 15) + (torn free-to-move) + (wait time (new 'static 'bfloat :data 0.5)) + (torn spot-assignment 10) + (spawn spydroid 3 0) + (wait total 1) + (spawn spydroid 1 1) + (spawn spydroid 1 2) + (wait total 1) + (spawn spydroid 1 3) + (spawn spydroid 1 4) + (spawn spydroid 1 5) + (spawn spydroid 1 6) + (wait total 2) + (torn spot-assignment 4) + (spawn roboguard 1 0) + (spawn spydroid 3 1) + (spawn spydroid 3 2) + (wait total 1) + (spawn flitter 1 4) + (spawn flitter 1 6) + (spawn grunt 1 3) + (spawn grunt 1 5) + (wait total 0) + (torn spot-assignment 15) + (spawn roboguard 1 3) + (spawn roboguard 1 0) + (spawn grunt 1 1) + (spawn grunt 1 2) + (wait total 0) + (spawn roboguard 1 3) + (spawn roboguard 1 4) + (spawn roboguard 1 5) + (wait total 1) + (spawn grunt 1 0) + (wait total 0) + (wait time (new 'static 'bfloat :data 10.0)) + (end) + ) + ) + +(set! (-> *assault-scripts* 0) *room0-script*) + +(set! (-> *assault-scripts* 1) *room1-script*) + +(set! (-> *assault-scripts* 2) *room2-script*) + +(set! (-> *assault-scripts* 3) *room3-script*) + +(set! (-> *assault-scripts* 4) *room4-script*) diff --git a/goal_src/jak3/levels/city/protect/assault-shared.gc b/goal_src/jak3/levels/city/protect/assault-shared.gc index 9e7bfb47db..d540860af6 100644 --- a/goal_src/jak3/levels/city/protect/assault-shared.gc +++ b/goal_src/jak3/levels/city/protect/assault-shared.gc @@ -7,3 +7,216 @@ ;; DECOMP BEGINS +(deftype assault-cam-info (structure) + ((pos vector :inline) + (mat matrix :inline) + ) + ) + + +(deftype triangle-dists (structure) + ((dist0 float) + (dist1 float) + ) + ) + + +(deftype assault-room-collision (structure) + ((cam-matrix matrix :inline) + (cam-pos vector :inline) + (clip-dists triangle-dists :inline) + (hoz-clip-dist float) + ) + ) + + +(deftype assault-room (structure) + ((center-pos vector :inline) + (cam-info assault-cam-info) + (collision assault-room-collision) + (node-positions (array vector)) + ) + ) + + +(define *assault-speech-list* (new 'static 'inline-array talker-speech-class 22 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "torn102" + :channel (gui-channel voicebox) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn202" + :channel (gui-channel voicebox) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn122" + :channel (gui-channel voicebox) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn133" + :channel (gui-channel voicebox) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn203" + :channel (gui-channel voicebox) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn116" + :channel (gui-channel voicebox) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn192" + :channel (gui-channel voicebox) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn205" + :channel (gui-channel voicebox) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn198" + :channel (gui-channel voicebox) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn154" + :channel (gui-channel voicebox) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn194" + :channel (gui-channel rider) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn117" + :channel (gui-channel rider) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "assault-protect-civilians" + :channel (gui-channel message) + :speech #xd + :text-duration (seconds 4) + :neg #x1 + :text-message (text-id text-06de) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax238" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax353" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax330" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax577" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor001" + :channel (gui-channel voicebox) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds178a" + :channel (gui-channel guard) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds178b" + :channel (gui-channel guard) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds103a" + :channel (gui-channel guard) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype assault-speech-instance (speech-instance) + () + ) diff --git a/goal_src/jak3/levels/city/protect/assault-task.gc b/goal_src/jak3/levels/city/protect/assault-task.gc index 39455696b5..c2bebe758c 100644 --- a/goal_src/jak3/levels/city/protect/assault-task.gc +++ b/goal_src/jak3/levels/city/protect/assault-task.gc @@ -5,5 +5,1675 @@ ;; name in dgo: assault-task ;; dgos: LCTYPALT +(declare-type assault-squad-control structure) +(define-extern *assault-squad* assault-squad-control) +(define-extern *port-assault-blur-curve* curve2d-piecewise) + ;; DECOMP BEGINS +(deftype ammo-special-info (structure) + ((ammo-type int32) + (gun-type int32) + (end-lock-time time-frame) + ) + ) + + +(deftype task-manager-city-port-assault (task-manager) + ((script-command assault-cmd-context :inline) + (door-handle handle) + (current-room assault-room) + (current-room-index int8) + (h-player-controller handle) + (spawners assault-cmd-context 12 :inline) + (original-cam-point vector :inline :offset 1296) + (original-cam-quat quaternion :inline) + (ammo-special ammo-special-info :inline) + (torn-h handle) + (next-powerup-spawn-time time-frame) + (final-bombbot? symbol) + (room-override-index int8) + (bombbot-dead? symbol) + (cam-pan-sound sound-id) + ) + (:state-methods + transition + combat + player-entrance + player-quickstart + ) + (:methods + (parse-cmd (_type_) none) + (eval-cmd (_type_) symbol) + (cmd-can-run? (_type_) symbol) + (advance-script (_type_) none) + (room-advance (_type_) none) + (task-manager-city-port-assault-method-41 (_type_ assault-spawn-cmd assault-cmd-context) symbol) + (spawn-special-pickup (_type_ pickup-type) none) + (task-manager-city-port-assault-method-43 (_type_ int) int) + (task-manager-city-port-assault-method-44 (_type_) object) + (check-for-pickup-spawn (_type_) int) + (set-next-powerup-spawn-time (_type_) none) + (spawn-guards (_type_ int) symbol) + (spawn-citizens (_type_ int) none) + (task-manager-city-port-assault-method-49 (_type_ int) int) + (pickup-spawn-chance (_type_ room-powerup-percentage int) float) + (get-suck-level (_type_) int) + (task-manager-city-port-assault-method-52 (_type_) none) + ) + ) + + +(deftype assault-player-controller (player-controller) + ((collision assault-room-collision) + ) + (:methods + (assault-player-controller-method-36 (_type_) none) + ) + ) + + +(deftype assault-squad-control (basic) + ((door-index int16) + (spawn-records (array proc-focusable-spawner)) + (next-spawn-index int16) + (door-pos vector :inline) + ) + (:methods + (init (_type_) none) + (assault-squad-control-method-10 (_type_ int) int) + (spawn-enemies (_type_ process) int) + (init-spawn-records (_type_) symbol) + (reset-enemies (_type_) none) + ) + ) + + +(defmethod reset-enemies ((this assault-squad-control)) + (dotimes (s5-0 (-> *assault-squad* spawn-records length)) + (reset-and-kill-all! (-> *assault-squad* spawn-records s5-0)) + ) + (set! (-> this next-spawn-index) 0) + 0 + (none) + ) + +(defmethod spawn-enemies ((this assault-squad-control) (arg0 process)) + (cond + (#f + (kill-by-name "hip-door-a-6" *active-pool*) + (kill-by-name "hip-door-a-1" *active-pool*) + ) + (else + (set-setting! 'airlock #f 0.0 0) + ) + ) + (when (< (-> this next-spawn-index) (-> this spawn-records length)) + (dotimes (s4-0 (-> this spawn-records (-> this next-spawn-index) records length)) + (set! (-> this spawn-records (-> this next-spawn-index) records data s4-0 proc) + (spawn-assault-enemy (the-as assault-target-type (-> this next-spawn-index)) arg0) + ) + ) + (+! (-> this next-spawn-index) 1) + (return 0) + ) + (dotimes (s5-1 (-> this spawn-records length)) + (check-inactive (-> this spawn-records s5-1)) + ) + (the-as int #f) + ) + +(defmethod init-spawn-records ((this assault-squad-control)) + (set! (-> this spawn-records) (new 'loading-level 'boxed-array proc-focusable-spawner 19)) + (dotimes (s5-0 19) + (set! (-> this spawn-records s5-0) (new 'loading-level 'proc-focusable-spawner)) + (alloc-records! (-> this spawn-records s5-0) (-> *assault-object-count* s5-0) 'loading-level) + ) + #f + ) + +(defmethod init ((this assault-squad-control)) + (dotimes (s5-0 19) + (init-records! (-> this spawn-records s5-0)) + ) + (set! (-> this next-spawn-index) 0) + 0 + (none) + ) + +(when (or (zero? *port-assault-blur-curve*) (!= loading-level global)) + (set! *port-assault-blur-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *port-assault-blur-curve* 4 'loading-level (the-as int #t)) + ) + +(set! (-> *port-assault-blur-curve* pts data 0 first) 0.0) + +(set! (-> *port-assault-blur-curve* pts data 0 second) 1.0) + +(set! (-> *port-assault-blur-curve* pts data 1 first) 0.25) + +(set! (-> *port-assault-blur-curve* pts data 1 second) 0.3) + +(set! (-> *port-assault-blur-curve* pts data 2 first) 0.75) + +(set! (-> *port-assault-blur-curve* pts data 2 second) 0.3) + +(set! (-> *port-assault-blur-curve* pts data 3 first) 1.0) + +(set! (-> *port-assault-blur-curve* pts data 3 second) 1.0) + +;; WARN: Return type mismatch matrix vs none. +(defmethod task-manager-city-port-assault-method-52 ((this task-manager-city-port-assault)) + (let ((s5-0 *camera*) + (f0-1 (* 0.0011111111 (the float (- (current-time) (-> this state-time))))) + ) + 0.0 + 0.0 + (let* ((f30-0 (- 1.0 (* (- 1.0 f0-1) (- 1.0 f0-1)))) + (f0-2 (sin (lerp -16384.0 16384.0 f0-1))) + (f0-3 (+ 1.0 f0-2)) + (f0-4 (* 0.5 f0-3)) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + (when s5-0 + (let ((s5-1 (-> s5-0 slave))) + (when s5-1 + (vector-lerp! (-> s5-1 0 saved-pt) (-> this original-cam-point) (-> this current-room cam-info pos) f0-4) + (let ((s4-1 (matrix->quaternion (new 'stack-no-clear 'quaternion) (-> this current-room cam-info mat)))) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (-> this current-room cam-info pos) (-> this original-cam-point)) + ) + ) + (let ((a0-8 s2-1)) + (set! (-> a0-8 quad) (-> s2-1 quad)) + (set! (-> a0-8 y) 0.0) + (vector-normalize! a0-8 1.0) + ) + (if (< (vector-dot s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this original-cam-quat))) 0.0) + (vector-float*! s2-1 s2-1 -1.0) + ) + (quaternion-look-at! s3-0 s2-1 *up-vector*) + ) + (let ((f0-9 0.7)) + (cond + ((< f30-0 f0-9) + (quaternion-slerp! s4-1 (-> this original-cam-quat) s3-0 (/ f30-0 f0-9)) + ) + ((< (- 1.0 f0-9) f30-0) + (let* ((f0-12 (/ (- f30-0 f0-9) (- 1.0 f0-9))) + (f0-13 (* f0-12 f0-12)) + ) + (quaternion-slerp! s4-1 s3-0 s4-1 f0-13) + ) + ) + (else + (quaternion-copy! s4-1 s3-0) + ) + ) + ) + ) + (quaternion->matrix (the-as matrix (-> s5-1 0 tracking)) s4-1) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defstate transition (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (case (get-status *gui-control* (-> self cam-pan-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self cam-pan-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self cam-pan-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-time! (-> self state-time)) + (set-setting! 'blur-a 'abs 0.5 0) + (let ((v1-10 *camera*)) + (when v1-10 + (let ((v1-11 (-> v1-10 slave))) + (when v1-11 + (set! (-> self original-cam-point quad) (-> v1-11 0 saved-pt quad)) + (matrix->quaternion (-> self original-cam-quat) (the-as matrix (-> v1-11 0 tracking))) + ) + ) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-13 mode) 'lock) + (set! (-> v1-13 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (logclear! (-> v1-13 flags) (player-controller-flag lock-features)) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-13) + ) + ) + :exit (behavior () + (set-setting! 'blur-a 'abs 0.0 0) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + (task-manager-city-port-assault-method-52 self) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (go-virtual player-entrance) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (send-event self 'ammo-special 15 29) + (sleep-code) + ) + ) + +(defstate player-quickstart (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (set-setting! 'interp-time 'abs 0.0 0) + (if *target* + (logior! (-> *target* focus-status) (focus-status teleporting)) + ) + (let ((a0-4 *camera*)) + (when a0-4 + (let ((a0-5 (-> a0-4 slave))) + (when a0-5 + (set! (-> a0-5 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v1-11 (-> a0-5 0 tracking)) + (a3-1 (-> self current-room cam-info mat)) + (a0-8 (-> a3-1 rvec quad)) + (a1-5 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-11 inv-mat rvec quad) a0-8) + (set! (-> v1-11 inv-mat uvec quad) a1-5) + (set! (-> v1-11 inv-mat fvec quad) a2-1) + (set! (-> v1-11 inv-mat trans quad) a3-2) + ) + ) + ) + ) + ) + (when *target* + (move-to-point! (-> *target* control) (-> self current-room center-pos)) + (process-drawable-reset-all-cloth *target*) + ) + (suspend) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (remove-setting! 'interp-time) + (go-virtual combat) + ) + ) + +(defstate player-entrance (task-manager-city-port-assault) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reached-destination) + (if (and *target* (focus-test? *target* board)) + (send-event *target* 'change-mode 'normal) + ) + (go-virtual combat) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-blackout-frames 0) + (until (process-release? *target*) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> *display* force-sync) (the-as uint 20)) + (when *target* + (logior! (-> *target* focus-status) (focus-status teleporting)) + (process-drawable-show-all-cloth *target* #f) + (logior! (-> *target* draw status) (draw-control-status no-draw)) + (if (and (< 1 (-> self current-room-index)) + (not (logtest? (-> self current-room-index) 1)) + (!= (-> self current-room-index) 4) + ) + (send-event *target* 'change-mode 'board #f) + ) + (let ((f30-0 40960000000.0) + (gp-0 0) + ) + (dotimes (s5-0 (-> self current-room node-positions length)) + (let ((f0-0 (vector-vector-xz-distance (target-pos 0) (-> self current-room node-positions s5-0)))) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! gp-0 s5-0) + ) + ) + ) + (let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> self current-room node-positions gp-0 quad)) + (move-to-point! (-> *target* control) a1-5) + ) + ) + ) + (let ((v1-40 *camera*)) + (when v1-40 + (let ((v1-41 (-> v1-40 slave))) + (when v1-41 + (set! (-> v1-41 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v0-9 (-> v1-41 0 tracking)) + (a2-0 (-> self current-room cam-info mat)) + (v1-45 (-> a2-0 rvec quad)) + (a0-20 (-> a2-0 uvec quad)) + (a1-10 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> v0-9 inv-mat rvec quad) v1-45) + (set! (-> v0-9 inv-mat uvec quad) a0-20) + (set! (-> v0-9 inv-mat fvec quad) a1-10) + (set! (-> v0-9 inv-mat trans quad) a2-1) + ) + ) + ) + ) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (suspend) + (when *target* + (process-drawable-show-all-cloth *target* #t) + (logclear! (-> *target* draw status) (draw-control-status no-draw)) + ) + (suspend) + (let ((v1-4 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-4 mode) 'active) + (set! (-> v1-4 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> v1-4 targ-pos quad) (-> self current-room center-pos quad)) + (logclear! (-> v1-4 flags) (player-controller-flag lock-features)) + (set! (-> v1-4 notify-proc) (process->handle self)) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-4) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (sleep-code) + ) + ) + +(defstate combat (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-setting! 'board #f 0.0 0) + (set-blackout-frames 0) + (let ((v1-2 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-2 mode) 'active) + (set! (-> v1-2 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> v1-2 mode) 'clip-to-nav-mesh) + (logclear! (-> v1-2 flags) (player-controller-flag lock-features)) + (let ((a0-8 (the-as assault-player-controller (handle->process (-> self h-player-controller))))) + (if a0-8 + (set! (-> a0-8 collision) (-> self current-room collision)) + ) + ) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-2) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (remove-setting! 'board) + (apply-settings *setting-control*) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + (check-for-pickup-spawn self) + (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (= (-> *room-goal* (-> self current-room-index)) 1) + (<= (task-manager-city-port-assault-method-49 self 2) 0) + ) + (send-event self 'fail) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (= (-> *room-goal* (-> self current-room-index)) 2) + (let ((v1-28 (-> *assault-squad* spawn-records 1))) + 0 + (<= (- (-> v1-28 unused-list allocated-length) (-> v1-28 unused-list length)) 0) + ) + ) + (send-event self 'fail) + ) + (task-manager-city-port-assault-method-44 self) + (spawn-enemies *assault-squad* self) + (dotimes (gp-0 (-> self current-room node-positions length)) + (task-manager-city-port-assault-method-43 self gp-0) + ) + (let ((v1-47 *camera*)) + (when v1-47 + (let ((v1-48 (-> v1-47 slave))) + (when v1-48 + (set! (-> v1-48 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v0-10 (-> v1-48 0 tracking)) + (a2-0 (-> self current-room cam-info mat)) + (v1-52 (-> a2-0 rvec quad)) + (a0-22 (-> a2-0 uvec quad)) + (a1-9 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> v0-10 inv-mat rvec quad) v1-52) + (set! (-> v0-10 inv-mat uvec quad) a0-22) + (set! (-> v0-10 inv-mat fvec quad) a1-9) + (set! (-> v0-10 inv-mat trans quad) a2-1) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until (process-release? *target*) + (suspend) + ) + (until #f + (until (cmd-can-run? self) + (when (not (eval-cmd self)) + 0 + (goto cfg-7) + ) + (suspend) + ) + (advance-script self) + (parse-cmd self) + ) + #f + (label cfg-7) + (send-event self 'complete) + (sleep-code) + ) + ) + +(defun compute-player-ammo ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-red-1)) + 10.0 + ) + (((pickup-type gun-red-2)) + 20.0 + ) + (((pickup-type gun-red-3)) + 30.0 + ) + (((pickup-type gun-yellow-1)) + 200.0 + ) + (((pickup-type gun-yellow-2)) + 30.0 + ) + (((pickup-type gun-yellow-3)) + 50.0 + ) + (((pickup-type gun-blue-1)) + 40.0 + ) + (((pickup-type gun-blue-2)) + 50.0 + ) + (((pickup-type gun-blue-3)) + 60.0 + ) + (((pickup-type gun-dark-1)) + 5.0 + ) + (((pickup-type gun-dark-2)) + 0.0 + ) + (((pickup-type gun-dark-3)) + 0.0 + ) + (else + 0.0 + ) + ) + ) + +;; WARN: disable def twice: 36. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 106. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod taskman-event-handler ((this task-manager-city-port-assault) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (case arg2 + (('restart) + (let ((v1-2 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-2 status) (entity-perm-status bit-5)) + (set! (-> v1-2 user-uint64) (the-as uint 0)) + (logior! (-> v1-2 status) (entity-perm-status bit-14)) + ) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + (('bombbot-death) + (when (-> this final-bombbot?) + (set! v0-2 #t) + (set! (-> this bombbot-dead?) (the-as symbol v0-2)) + v0-2 + ) + ) + (('ammo-special) + (set! (-> this ammo-special ammo-type) (the-as int (-> arg3 param 0))) + (set! (-> this ammo-special gun-type) (the-as int (-> arg3 param 1))) + (if (!= (-> this ammo-special gun-type) 29) + (speech-play *port-assault-speech* 8 *assault-speech-list* (target-pos 0)) + ) + (let ((s5-2 (new 'static 'boxed-array :type int32 15 16 17 18))) + (dotimes (s4-2 (-> s5-2 length)) + (adjust-player-ammo -500.0 (the-as pickup-type (-> s5-2 s4-2))) + ) + ) + (adjust-player-ammo + (compute-player-ammo (the-as pickup-type (-> this ammo-special gun-type))) + (the-as pickup-type (-> this ammo-special ammo-type)) + ) + (let ((t1-0 (logclear + (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (gun-pickup-type->game-feature (the-as pickup-type (-> this ammo-special gun-type))) + ) + ) + ) + (set-setting! 'features 'clear (shr (the-as int t1-0) 32) t1-0) + ) + (apply-settings *setting-control*) + (when *target* + (if (= (-> this ammo-special ammo-type) 7) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage active)) + (send-event *target* 'change-mode 'gun #f (-> this ammo-special gun-type)) + ) + (cond + ((= (-> this ammo-special gun-type) 29) + (set! (-> this ammo-special end-lock-time) 0) + (set! v0-2 (logior (target-flags tf16) (-> *target* target-flags))) + (set! (-> *target* target-flags) (the-as target-flags v0-2)) + ) + (else + (logclear! (-> *target* target-flags) (target-flags tf16)) + (set! v0-2 (current-time)) + (set! (-> this ammo-special end-lock-time) (the-as time-frame v0-2)) + ) + ) + v0-2 + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate active (task-manager-city-port-assault) + :virtual #t + :enter (behavior () + (set! (-> self room-override-index) (the-as int (-> (task-perm-by-index *game-info* 46) user-uint64))) + (speeches-reset *port-assault-speech*) + (set-setting! 'allow-look-around #f 0.0 0) + (set-setting! 'gem-seek-target-dir? #t 0.0 0) + (set-setting! 'disable-parking-spots? #t 0.0 0) + (set! (-> *game-info* eco-pill-light) 0.0) + (set-setting! 'pilot #f 0.0 0) + (set-setting! 'hide-crates? #t 0.0 0) + (set-setting! 'sound-ear-scale 'abs 0.25 0) + (set! (-> self bombbot-dead?) #f) + (set! (-> self final-bombbot?) #f) + (set-setting! 'city-sound '(citymhf citykgf citypedh cityffh) 0.0 2) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (set-setting! 'rain 'abs 0.0 0) + (set-setting! 'music 'portattk 0.0 0) + (set-setting! 'exclusive-load '((ignore all)) 0.0 0) + (set-setting! 'gun-special-mode #t 0.0 0) + (set-setting! 'calm #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (send-event self 'ammo-special 15 29) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self h-player-controller) (the-as handle #f)) + (set-setting! 'gun-target-guards? #f 0.0 0) + (reset-hatred *cty-attack-controller*) + (init *assault-squad*) + (init-attack-controller *cty-attack-controller*) + (set! (-> *cty-attack-controller* target-attacker max-num-attackers) (the-as uint 127)) + (set! (-> self h-player-controller) (the-as handle #f)) + (let ((gp-0 (new 'static 'boxed-array :type uint16 #x3 #x4 #x5))) + (dotimes (s5-0 (-> gp-0 length)) + (dotimes (s4-0 19) + (let ((v1-56 (get-hatred-at-idx *cty-attack-controller* s5-0 s4-0))) + (if (nonzero? (-> v1-56 index)) + (set! (-> v1-56 max-consider-dist) 102400.0) + ) + ) + ) + ) + ) + (set! (-> self torn-h) (the-as handle #f)) + (let ((gp-1 (push-back-hatred *cty-attack-controller*)) + (a2-17 (get-hatred-at-idx *cty-attack-controller* 9 0)) + ) + (set! (-> gp-1 hatred) (-> a2-17 hatred)) + (set! (-> gp-1 max-consider-dist) (-> a2-17 max-consider-dist)) + (set! (-> gp-1 hatred-dist) (-> a2-17 hatred-dist)) + (set! (-> gp-1 dist-scale) (-> a2-17 dist-scale)) + (set! (-> gp-1 attacker-scale) (-> a2-17 attacker-scale)) + (set-hatred-indices-for-all *cty-attack-controller* 0 a2-17 gp-1 14) + ) + (let ((gp-2 (push-back-hatred *cty-attack-controller*))) + (set! (-> gp-2 hatred) 0.8) + (set! (-> gp-2 max-consider-dist) 245760.0) + (set! (-> gp-2 hatred-dist) 245760.0) + (set! (-> gp-2 dist-scale) 0.1) + (set! (-> gp-2 attacker-scale) 1.0) + (set-hatred-indices *cty-attack-controller* gp-2 4 13) + (set-hatred-indices *cty-attack-controller* gp-2 3 13) + (set-hatred-indices *cty-attack-controller* gp-2 5 13) + ) + (let ((v1-79 (get-hatred-at-idx *cty-attack-controller* 9 1))) + (set! (-> v1-79 hatred) 1.5) + (set! (-> v1-79 attacker-scale) 0.0) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (spawn-enemies *assault-squad* self) + ) + :code (behavior () + (while (< (-> *assault-squad* next-spawn-index) (-> *assault-squad* spawn-records length)) + (suspend) + ) + (set! (-> self current-room-index) -1) + (let ((gp-0 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> gp-0 mode) 'active) + (set! (-> gp-0 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> gp-0 mode) 'clip-to-nav-mesh) + (logclear! (-> gp-0 flags) (player-controller-flag lock-features)) + (set! (-> self h-player-controller) (ppointer->handle (process-spawn + assault-player-controller + :init player-controller-init-by-other + gp-0 + :name "assault-player-controller" + :to self + ) + ) + ) + ) + (room-advance self) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun lctypalt-login ((arg0 level)) + (set! *assault-squad* (new 'loading-level 'assault-squad-control)) + (init-spawn-records *assault-squad*) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun lctypalt-logout ((arg0 level)) + (set! *assault-squad* #f) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod advance-script ((this task-manager-city-port-assault)) + (set! (-> this script-command script) (the-as pair (-> this script-command script cdr))) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod parse-cmd ((this task-manager-city-port-assault)) + (format 0 "Parsing command ~s~%" (-> this script-command script car)) + (parse-assault-command + (the-as pair (-> this script-command script car)) + (-> this script-command current-command) + ) + (set-time! (-> this script-command start-time)) + (set! (-> this script-command state-time) + (- (current-time) (-> this script-command current-command spawn-delay)) + ) + (none) + ) + +(defmethod task-manager-city-port-assault-method-43 ((this task-manager-city-port-assault) (arg0 int)) + (when (and (-> this final-bombbot?) (-> this bombbot-dead?)) + (set! (-> this spawners arg0 current-command count) 0) + (return 0) + ) + (let ((s4-0 (the-as assault-spawn-cmd (+ (the-as uint (-> this spawners 0 current-command)) (* 80 arg0))))) + (set! (-> s4-0 spawner-index) arg0) + (when (> (-> s4-0 count) 0) + (when (time-elapsed? (-> this spawners arg0 state-time) (-> s4-0 spawn-delay)) + (when (or (task-manager-city-port-assault-method-41 this s4-0 (-> this spawners arg0)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd3)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd4)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd5)) + (-> *setting-control* user-current nuke-active?) + ) + (set-time! (-> this spawners arg0 state-time)) + (let ((v0-0 (+ (-> s4-0 count) -1))) + (set! (-> s4-0 count) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +(defmethod eval-cmd ((this task-manager-city-port-assault)) + (let ((s5-0 (-> this script-command current-command))) + (case (-> s5-0 command) + (((assault-cmd queue)) + (set! (-> this cam-pan-sound) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "cam-pan" -99.0 0) + ) + ) + (((assault-cmd other)) + (return #f) + ) + (((assault-cmd torn)) + (send-event + (handle->process (-> this torn-h)) + (-> s5-0 msg) + (-> s5-0 event0) + (-> s5-0 event1) + (-> s5-0 event2) + ) + ) + (((assault-cmd final-bombbot)) + (set! (-> this final-bombbot?) #t) + ) + (((assault-cmd load-continue)) + (set! (-> this room-override-index) (the-as int (-> (task-perm-by-index *game-info* 46) user-uint64))) + (if (!= (-> this room-override-index) (-> this current-room-index)) + (room-advance this) + ) + ) + (((assault-cmd save-continue)) + (let ((v1-18 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-18 status) (entity-perm-status bit-5)) + (set! (-> v1-18 user-uint64) (the-as uint (-> this current-room-index))) + (logior! (-> v1-18 status) (entity-perm-status bit-14)) + ) + ) + (((assault-cmd advance)) + (room-advance this) + ) + (((assault-cmd pickup)) + (spawn-special-pickup this (the-as pickup-type (-> s5-0 gun-pickup-type))) + ) + (((assault-cmd spawn)) + (let ((v1-21 (-> s5-0 spawner-index))) + (when (= v1-21 -1) + (let ((a1-5 (current-time))) + (set! v1-21 -1) + (let ((a0-44 -1)) + (dotimes (a2-2 (-> this current-room node-positions length)) + (let ((a3-4 (-> this spawners a2-2))) + (when (zero? (-> a3-4 current-command count)) + (set! a0-44 a2-2) + (when (< (-> a3-4 state-time) a1-5) + (set! a1-5 (-> a3-4 state-time)) + (set! v1-21 a2-2) + ) + ) + ) + ) + (if (= v1-21 -1) + (set! v1-21 a0-44) + ) + ) + ) + (set! (-> s5-0 spawner-index) v1-21) + ) + (when (and (< -1 v1-21) (zero? (-> this spawners v1-21 current-command count))) + (mem-copy! (the-as pointer (-> this spawners v1-21)) (the-as pointer (-> this script-command)) 72) + (set! (-> s5-0 count) 0) + 0 + ) + ) + ) + ) + ) + #t + ) + +(defmethod cmd-can-run? ((this task-manager-city-port-assault)) + (let ((gp-0 (-> this script-command current-command))) + (case (-> gp-0 command) + (((assault-cmd spawn)) + (zero? (-> gp-0 count)) + ) + (((assault-cmd torn)) + #t + ) + (((assault-cmd speech)) + #t + ) + (((assault-cmd queue)) + #t + ) + (((assault-cmd final-bombbot)) + #t + ) + (((assault-cmd pickup)) + #t + ) + (((assault-cmd advance)) + #f + ) + (((assault-cmd other)) + #f + ) + (((assault-cmd load-continue) (assault-cmd save-continue)) + #t + ) + (((assault-cmd wait)) + (case (-> gp-0 wait-type) + (((assault-cmd-wait-type spawn-delay)) + (time-elapsed? (-> this script-command start-time) (-> gp-0 spawn-delay)) + ) + (((assault-cmd-wait-type cmd2)) + (let ((v1-9 (+ (task-manager-city-port-assault-method-49 this 1) (task-manager-city-port-assault-method-49 this 3))) + ) + (>= (-> gp-0 count) v1-9) + ) + ) + (((assault-cmd-wait-type cmd1)) + (>= (-> gp-0 count) (task-manager-city-port-assault-method-49 this (the-as int (-> gp-0 faction-type)))) + ) + ) + ) + ) + ) + ) + +(defmethod task-manager-city-port-assault-method-49 ((this task-manager-city-port-assault) (arg0 int)) + 0 + (let ((v0-0 (assault-squad-control-method-10 *assault-squad* arg0))) + (dotimes (v1-2 12) + (if (= (-> *assault-faction-lookup* (-> this spawners v1-2 current-command spawn-type)) arg0) + (+! v0-0 (-> this spawners v1-2 current-command count)) + ) + ) + v0-0 + ) + ) + +(defmethod assault-squad-control-method-10 ((this assault-squad-control) (arg0 int)) + (let ((v0-0 0)) + (dotimes (v1-0 (-> this spawn-records length)) + (if (= (-> *assault-faction-lookup* v1-0) arg0) + (+! v0-0 + (- (-> this spawn-records v1-0 unused-list allocated-length) (-> this spawn-records v1-0 unused-list length)) + ) + ) + ) + v0-0 + ) + ) + +(defmethod spawn-guards ((this task-manager-city-port-assault) (arg0 int)) + (local-vars (sv-848 vector) (sv-864 vector) (sv-880 assault-object-spawn-params)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *x-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (/ 65536.0 (the float arg0))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s1-0 arg0) + (let ((s0-0 s3-0)) + (set! sv-848 (-> this current-room center-pos)) + (set! sv-864 s4-0) + (let* ((f28-0 24576.0) + (f26-0 0.0) + (v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + (f0-5 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-7))))) + ) + (.lvf vf2 (&-> sv-864 quad)) + (.lvf vf1 (&-> sv-848 quad)) + (let ((v1-11 f0-5)) + (.mov vf3 v1-11) + ) + ) + (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf2 vf3) + (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.svf (&-> s0-0 quad) vf4) + ) + (let ((v1-12 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-12 quad) (-> s3-0 quad)) + (vector+float*! (-> s0-1 start-pos) s3-0 *up-vector* 24576.0) + (set! (-> s0-1 move-dist quad) (the-as uint128 0)) + (set! (-> s0-1 move-dist y) -49152.0) + (let ((v1-17 s0-1)) + (set! (-> v1-17 radius) 409.6) + (set! (-> v1-17 collide-with) (collide-spec backgnd)) + (set! (-> v1-17 ignore-process0) #f) + (set! (-> v1-17 ignore-process1) #f) + (set! (-> v1-17 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-17 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s0-1) 0.0) + (set! (-> s3-0 quad) (-> s0-1 best-other-tri intersect quad)) + ) + ) + (vector-! s2-0 s3-0 (-> this current-room center-pos)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (let ((s0-2 (get-last-unused-handle! (-> *assault-squad* spawn-records 3)))) + (when (handle->process s0-2) + (set! sv-880 (new 'stack 'assault-object-spawn-params)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 position quad) (-> s3-0 quad)) + (set! (-> sv-880 behavior) (the-as uint 2)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 suck-level) (get-suck-level this)) + (set! (-> sv-880 user-data) (the-as uint (-> this current-room center-pos))) + (logior! (-> sv-880 flags) (traffic-spawn-flags tsf7)) + (set! (-> sv-880 velocity quad) (the-as uint128 0)) + (quaternion-identity! (-> sv-880 rotation)) + (quaternion-look-at! (-> sv-880 rotation) s2-0 *up-vector*) + (set! (-> sv-880 nav-mesh) (find-nearest-nav-mesh (-> sv-880 position) (the-as float #x7f800000))) + (set! (-> sv-880 nav-branch) #f) + (set! (-> sv-880 guard-type) (the-as uint 1)) + (send-event (handle->process s0-2) 'traffic-activate sv-880 *traffic-engine*) + ) + ) + (vector-rotate-around-y! s4-0 s4-0 f30-0) + ) + ) + ) + #f + ) + ) + +(defmethod spawn-citizens ((this task-manager-city-port-assault) (arg0 int)) + (local-vars + (v1-65 int) + (sv-848 vector) + (sv-864 vector) + (sv-880 assault-object-spawn-params) + (sv-896 (function quaternion quaternion float quaternion)) + (sv-912 quaternion) + (sv-928 quaternion) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *x-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (/ 65536.0 (the float arg0))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s1-0 arg0) + (let ((s0-0 s3-0)) + (set! sv-848 (-> this current-room center-pos)) + (set! sv-864 s4-0) + (let* ((f28-0 10240.0) + (f26-0 47104.0) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + (f0-5 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-8))))) + ) + (.lvf vf2 (&-> sv-864 quad)) + (.lvf vf1 (&-> sv-848 quad)) + (let ((v1-12 f0-5)) + (.mov vf3 v1-12) + ) + ) + (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf2 vf3) + (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.svf (&-> s0-0 quad) vf4) + ) + (let ((v1-13 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-13 quad) (-> s3-0 quad)) + (vector+float*! (-> s0-1 start-pos) s3-0 *up-vector* 24576.0) + (set! (-> s0-1 move-dist quad) (the-as uint128 0)) + (set! (-> s0-1 move-dist y) -49152.0) + (let ((v1-18 s0-1)) + (set! (-> v1-18 radius) 409.6) + (set! (-> v1-18 collide-with) (collide-spec backgnd)) + (set! (-> v1-18 ignore-process0) #f) + (set! (-> v1-18 ignore-process1) #f) + (set! (-> v1-18 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-18 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s0-1) 0.0) + (set! (-> s3-0 quad) (-> s0-1 best-other-tri intersect quad)) + ) + ) + (vector-! s2-0 s3-0 (-> this current-room center-pos)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (let ((s0-2 (get-last-unused-handle! (-> *assault-squad* spawn-records 1)))) + (when (handle->process s0-2) + (set! sv-880 (new 'stack 'assault-object-spawn-params)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 position quad) (-> s3-0 quad)) + (set! (-> sv-880 behavior) (the-as uint 2)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 suck-level) (get-suck-level this)) + (set! (-> sv-880 user-data) (the-as uint (-> this current-room center-pos))) + (logior! (-> sv-880 flags) (traffic-spawn-flags tsf7)) + (set! (-> sv-880 velocity quad) (the-as uint128 0)) + (quaternion-identity! (-> sv-880 rotation)) + (quaternion-look-at! (-> sv-880 rotation) s2-0 *up-vector*) + (set! (-> sv-880 nav-mesh) (find-nearest-nav-mesh (-> sv-880 position) (the-as float #x7f800000))) + (set! (-> sv-880 nav-branch) #f) + (set! sv-896 quaternion-rotate-y!) + (set! sv-912 (-> sv-880 rotation)) + (set! sv-928 (-> sv-880 rotation)) + (let* ((f28-1 65536.0) + (v1-56 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-57 (the-as number (logior #x3f800000 v1-56))) + (a2-2 (* f28-1 (+ -1.0 (the-as float v1-57)))) + ) + (sv-896 sv-912 sv-928 a2-2) + ) + (+! (-> sv-880 position y) 409.6) + (cond + ((= (-> this current-room-index) (-> (task-perm-by-index *game-info* 46) user-uint64)) + (set! v1-65 600) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + ) + (else + (set! v1-65 2100) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + ) + ) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + (send-event (handle->process s0-2) 'traffic-activate sv-880 *traffic-engine*) + ) + ) + (vector-rotate-around-y! s4-0 s4-0 f30-0) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod task-manager-city-port-assault-method-41 ((this task-manager-city-port-assault) (arg0 assault-spawn-cmd) (arg1 assault-cmd-context)) + (if (logtest? (process-mask enemy guard) (-> *kernel-context* prevent-from-run)) + (return #f) + ) + (if (-> *setting-control* user-current nuke-active?) + (return #f) + ) + (let ((s1-0 (-> arg0 spawner-index)) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (the-as int (-> arg0 spawn-type))) + ) + (if (= s1-0 -1) + (set! s1-0 0) + ) + (set! (-> s5-0 quad) (-> this current-room node-positions s1-0 quad)) + (vector-! s4-0 (-> this current-room center-pos) s5-0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (let ((v1-14 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-14 quad) (-> s5-0 quad)) + (vector+float*! (-> s0-0 start-pos) s5-0 *up-vector* 16384.0) + (set! (-> s0-0 move-dist quad) (the-as uint128 0)) + (set! (-> s0-0 move-dist y) -32768.0) + (let ((v1-19 s0-0)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec backgnd)) + (set! (-> v1-19 ignore-process0) #f) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s0-0) 0.0) + (set! (-> s5-0 quad) (-> s0-0 best-other-tri intersect quad)) + (+! (-> s5-0 y) 8192.0) + ) + ) + (case (the-as assault-cmd-spawn-type s2-0) + (((assault-cmd-spawn-type cmd4) (assault-cmd-spawn-type cmd5)) + (set! s2-0 3) + ) + (((assault-cmd-spawn-type cmd12)) + (set! s2-0 9) + ) + ) + (cond + ((= s2-0 13) + (let ((s3-1 (get-last-unused-val! (-> *assault-squad* spawn-records s2-0)))) + (when (>= s3-1 0) + (let ((s1-1 (new 'stack 'assault-bombbot-spawn-params))) + (set! (-> s1-1 position quad) (-> s5-0 quad)) + (quaternion-look-at! (-> s1-1 quat) s4-0 *up-vector*) + (set! (-> s1-1 path) (-> *assault-bombbot-paths* 0)) + (set! (-> s1-1 path node 0 position quad) (-> s5-0 quad)) + (set! (-> s1-1 first-node) (the-as uint 0)) + (set! (-> s1-1 stop-offset) 36000.0) + (set! (-> s1-1 is-final?) (-> this final-bombbot?)) + (set! (-> s1-1 suck-level) (get-suck-level this)) + (set! (-> *assault-squad* spawn-records s2-0 records data s3-1 proc) + (ppointer->handle (process-spawn assault-bombbot s1-1 :name "assault-bombbot" :to this)) + ) + ) + (return #t) + ) + ) + ) + (else + (let ((s2-1 (get-last-unused-handle! (-> *assault-squad* spawn-records s2-0)))) + (when (handle->process s2-1) + (let ((s0-1 (new 'stack 'assault-object-spawn-params))) + (set! (-> s0-1 flags) (traffic-spawn-flags)) + (set! (-> s0-1 position quad) (-> s5-0 quad)) + (set! (-> s0-1 behavior) (the-as uint 2)) + (when (and (< 2 s1-0) (= (-> this current-room-index) 4)) + (+! (-> s0-1 position y) 61440.0) + (set! (-> s0-1 behavior) (the-as uint 6)) + ) + (set! (-> s0-1 flags) (traffic-spawn-flags)) + (logior! (-> s0-1 flags) (traffic-spawn-flags tsf7)) + (set! (-> s0-1 velocity quad) (the-as uint128 0)) + (set! (-> s0-1 user-data) (the-as uint (-> this current-room center-pos))) + (quaternion-identity! (-> s0-1 rotation)) + (quaternion-look-at! (-> s0-1 rotation) s4-0 *up-vector*) + (let ((v1-74 (-> arg0 spawn-type))) + (set! (-> s0-1 guard-type) (the-as uint (cond + ((= v1-74 (assault-cmd-spawn-type cmd4)) + 1 + ) + ((= v1-74 (assault-cmd-spawn-type cmd5)) + 2 + ) + ((= v1-74 (assault-cmd-spawn-type cmd12)) + 7 + ) + (else + 0 + ) + ) + ) + ) + ) + (set! (-> s0-1 nav-mesh) (find-nearest-nav-mesh s5-0 (the-as float #x7f800000))) + (set! (-> s0-1 nav-branch) #f) + (send-event (handle->process s2-1) 'traffic-activate s0-1 *traffic-engine*) + ) + (process-spawn assault-cleanup s2-1 :name "assault-cleanup" :to (handle->process s2-1)) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +(defmethod task-manager-method-25 ((this task-manager-city-port-assault)) + (reset-enemies *assault-squad*) + (if *target* + (logclear! (-> *target* target-flags) (target-flags tf16)) + ) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (call-parent-method this) + (none) + ) + +(defmethod room-advance ((this task-manager-city-port-assault)) + (let ((a1-0 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-0 9) #f) + (set! (-> a1-0 8) #f) + (set! (-> a1-0 7) #f) + (set! (-> a1-0 6) #f) + (set! (-> a1-0 5) #f) + (set! (-> a1-0 4) #f) + (set! (-> a1-0 3) #f) + (set! (-> a1-0 2) 'hiphog) + (set! (-> a1-0 1) 'ctyport) + (set! (-> a1-0 0) 'ctywide-ff) + (want-levels *load-state* a1-0) + ) + (want-display-level *load-state* 'ctyport 'display) + (want-display-level *load-state* 'hiphog 'display) + (kill-by-type barge *active-pool*) + (kill-by-name "hip-door-a-6" *active-pool*) + (kill-by-name "hip-door-a-1" *active-pool*) + (if (> (-> this room-override-index) 0) + (set! (-> this current-room-index) (-> this room-override-index)) + (+! (-> this current-room-index) 1) + ) + (set-next-powerup-spawn-time this) + (if (= (-> this current-room-index) 3) + (set-setting! 'city-sound '(cityalth citymhf citykgf) 0.0 2) + (set-setting! 'city-sound '(citymhf citykgf citypedh cityffh) 0.0 2) + ) + (if (= (-> this current-room-index) 2) + (set-setting! 'gem-pool-index #f 0.0 -1) + (set-setting! 'gem-pool-index #f 0.0 1) + ) + (cond + ((= (-> this current-room-index) (-> *assault-scripts* length)) + (send-event this 'complete) + ) + (else + (if (> (-> this current-room-index) 0) + (sound-play "room-advance") + ) + (set! (-> this current-room) (-> *assault-rooms* (-> this current-room-index))) + (set! (-> this script-command script) (-> *assault-scripts* (-> this current-room-index))) + (parse-cmd this) + (let ((v1-45 (the-as assault-player-controller (handle->process (-> this h-player-controller))))) + (if v1-45 + (set! (-> v1-45 collision) (-> this current-room collision)) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (remove-setting! 'entity-name) + (dotimes (s5-1 (-> *assault-squad* spawn-records length)) + (when (!= s5-1 1) + (dotimes (s4-1 (-> *assault-squad* spawn-records s5-1 records length)) + (send-event + (handle->process (-> *assault-squad* spawn-records s5-1 records data s4-1 proc)) + 'traffic-off-force + ) + ) + ) + ) + (spawn-guards this (-> *assault-guard-count* (-> this current-room-index))) + (let ((s5-2 (-> *assault-citizen-count* (-> this current-room-index)))) + (cond + ((> s5-2 0) + (let ((a1-19 (+ s5-2 (the int (fmin 2.0 (lerp-scale-clamp 0.0 2.0 (the float (get-suck-level this)) 7.0 14.0)))))) + (spawn-citizens this a1-19) + ) + ) + (else + (process-spawn-function + process + (lambda :behavior process + () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (dotimes (gp-1 (-> *assault-squad* spawn-records 1 records length)) + (send-event (handle->process (-> *assault-squad* spawn-records 1 records data gp-1 proc)) 'traffic-off-force) + ) + #f + ) + :to this + ) + ) + ) + ) + (dotimes (v1-96 12) + (set! (-> this spawners v1-96 current-command count) 0) + ) + (cond + ((> (-> this room-override-index) 0) + (set! (-> this room-override-index) -1) + (go (method-of-object this player-quickstart)) + ) + ((> (-> this current-room-index) 0) + (go (method-of-object this transition)) + ) + (else + (go (method-of-object this combat)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod assault-player-controller-method-36 ((this assault-player-controller)) + (let ((s4-0 (matrix-transpose! (new 'stack-no-clear 'matrix) (-> this collision cam-matrix))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this collision cam-pos))) + ) + (set! (-> s5-1 w) 0.0) + (vector-matrix*! s5-1 s5-1 s4-0) + (set! (-> s5-1 y) + (fmax (fmin (-> s5-1 y) (-> this collision clip-dists dist1)) (- (-> this collision clip-dists dist0))) + ) + (set! (-> s5-1 x) (fmax + (fmin (-> s5-1 x) (* 0.75 (-> this collision hoz-clip-dist))) + (- (* 0.75 (-> this collision hoz-clip-dist))) + ) + ) + (vector-matrix*! s5-1 s5-1 (-> this collision cam-matrix)) + (vector+! s5-1 s5-1 (-> this collision cam-pos)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 x) (-> s5-1 x)) + (set! (-> gp-1 y) (-> (target-pos 0) y)) + (set! (-> gp-1 z) (-> s5-1 z)) + (set! (-> gp-1 w) 1.0) + (let ((s5-2 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s5-2 start-pos) gp-1 *up-vector* 20480.0) + (set! (-> s5-2 move-dist quad) (the-as uint128 0)) + (set! (-> s5-2 move-dist y) -61440.0) + (let ((v1-15 s5-2)) + (set! (-> v1-15 radius) 0.0) + (set! (-> v1-15 collide-with) (collide-spec backgnd)) + (set! (-> v1-15 ignore-process0) #f) + (set! (-> v1-15 ignore-process1) #f) + (set! (-> v1-15 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-15 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-2) 0.0) + (if (< (fabs (- (-> gp-1 y) (-> s5-2 best-other-tri intersect y))) 6144.0) + (set! (-> gp-1 y) (fmax (-> gp-1 y) (-> s5-2 best-other-tri intersect y))) + ) + ) + ) + (move-to-point! (-> *target* control) gp-1) + ) + ) + (none) + ) + +(defstate wait (task-manager-city-port-assault) + :virtual #t + :code (behavior () + (if (> (-> (task-perm-by-index *game-info* 46) user-uint64) 0) + (set-blackout-frames (seconds 100)) + ) + (while (or (not *target*) + (not *spawn-actors*) + (!= (status-of-level-and-borrows *level* 'ctypesa #f) 'active) + (!= (status-of-level-and-borrows *level* 'ctypesb #f) 'active) + (!= (status-of-level-and-borrows *level* 'ctypesc #f) 'active) + (!= (status-of-level-and-borrows *level* 'lctypalt #f) 'active) + ) + (suspend) + ) + (set-time-limit self) + (go-virtual active) + ) + ) + +(defstate clip-to-nav-mesh (assault-player-controller) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (assault-player-controller-method-36 self) + ) + ) + +(defmethod spawn-special-pickup ((this task-manager-city-port-assault) (arg0 pickup-type)) + (when (or (= arg0 (pickup-type health)) (logtest? (-> *game-info* features) (gun-pickup-type->game-feature arg0))) + (set-next-powerup-spawn-time this) + (let* ((s4-2 (-> this current-room center-pos)) + (f30-0 0.75) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + (f30-1 + (+ f30-0 + (* (+ -1.0 (the-as float v1-10)) + (+ -0.75 + (* 0.95 + (fmin (-> this current-room collision clip-dists dist0) (-> this current-room collision clip-dists dist1)) + ) + ) + ) + ) + ) + ) + 0.0 + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> *target* control trans) (-> this current-room center-pos))) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (let ((a0-9 s2-1)) + (set! (-> a0-9 quad) (-> s2-1 quad)) + (set! (-> a0-9 y) 0.0) + (vector-normalize! a0-9 1.0) + ) + (let* ((f28-0 20024.889) + (f26-0 25486.22) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + (f0-11 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-27))) (vector-y-angle s2-1))) + ) + (vector-rotate-around-y! s3-1 *z-vector* f0-11) + ) + (vector+float*! s3-1 s4-2 s3-1 f30-1) + (let ((s4-3 (new 'stack-no-clear 'vector)) + (a0-17 (find-nearest-nav-mesh s3-1 (the-as float #x7f800000))) + ) + (when a0-17 + (when (nav-mesh-method-10 a0-17 s4-3 s3-1 (the-as nav-poly #f)) + (set! (-> s4-3 y) (-> s3-1 y)) + (set! (-> s3-1 quad) (-> s4-3 quad)) + ) + ) + ) + (sound-play "pickup-spawn") + (case arg0 + (((pickup-type health)) + (process-spawn special-health s3-1 :name "special-health" :to this) + ) + (else + (process-spawn ammo-special-pickup s3-1 arg0 :name "ammo-special-pickup" :to this) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-city-port-assault-method-44 ((this task-manager-city-port-assault)) + (when *target* + (let ((s4-0 (new 'static 'boxed-array :type int32 15 16 17 18)) + (s5-0 0) + ) + (dotimes (s3-0 (-> s4-0 length)) + (+! s5-0 (the int (get-remaining-player-ammo (the-as pickup-type (-> s4-0 s3-0))))) + ) + (if (and (or (= s5-0 0) + (and (< s5-0 2) (= (-> this ammo-special gun-type) 30)) + (and (< s5-0 11) (= (-> this ammo-special gun-type) 31)) + ) + (not (and (focus-test? *target* dark) (nonzero? (-> *target* darkjak)))) + ) + (send-event this 'ammo-special 15 29) + ) + ) + (when (and (or (> (-> this ammo-special end-lock-time) 0) (!= (-> *game-info* gun-type) (-> this ammo-special gun-type))) + (and (time-elapsed? (-> this ammo-special end-lock-time) (seconds 0.1)) + (!= (-> this ammo-special ammo-type) 7) + (not (and (focus-test? *target* dark) (nonzero? (-> *target* darkjak)))) + ) + ) + (set! (-> this ammo-special end-lock-time) 0) + (send-event *target* 'change-mode 'gun #f (-> this ammo-special gun-type)) + ) + ) + ) + +(defmethod pickup-spawn-chance ((this task-manager-city-port-assault) (arg0 room-powerup-percentage) (arg1 int)) + (case arg1 + ((20) + (let ((f0-1 (/ (-> *target* fact health) (-> *target* fact health-max)))) + 0.0 + (let* ((f0-2 (- 1.0 f0-1)) + (f0-3 (* f0-2 f0-2)) + (f0-4 (lerp 0.0 7.0 f0-3)) + ) + (* (-> arg0 percentages arg1) f0-4) + ) + ) + ) + (else + (-> arg0 percentages arg1) + ) + ) + ) + +(defmethod check-for-pickup-spawn ((this task-manager-city-port-assault)) + (when (< (-> this next-powerup-spawn-time) (current-time)) + (let* ((f30-0 0.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f28-0 (+ -1.0 (the-as float v1-3))) + ) + (dotimes (s5-0 51) + (+! f30-0 (pickup-spawn-chance this (-> *room-powerups* (-> this current-room-index)) s5-0)) + ) + (let ((f30-1 (* f28-0 f30-0)) + (f28-1 0.0) + (s5-1 0) + ) + (while (< s5-1 51) + (+! f28-1 (pickup-spawn-chance this (-> *room-powerups* (-> this current-room-index)) s5-1)) + (when (< f30-1 f28-1) + (spawn-special-pickup this (the-as pickup-type s5-1)) + (return 0) + ) + (set! s5-1 (+ s5-1 1)) + ) + ) + ) + (the-as int #f) + ) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod get-suck-level ((this task-manager-city-port-assault)) + (the-as int (-> *game-info* sub-task-list (game-task-node city-port-assault-resolution) death-count)) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod set-next-powerup-spawn-time ((this task-manager-city-port-assault)) + (let ((f30-0 0.0) + (f28-0 10.0) + ) + (dotimes (s5-0 (the int f28-0)) + (let* ((f26-0 1.0) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! f30-0 (+ f26-0 (+ -1.0 (the-as float v1-4)) f30-0)) + ) + ) + (let* ((f30-1 (/ (- f30-0 f28-0) f28-0)) + (f0-8 (lerp-scale-clamp 1.0 2.5 (the float (get-suck-level this)) 0.0 12.0)) + (f28-1 (fmax 1.0 (fmin 2.5 f0-8))) + ) + (format 0 "Powerup frequency scalar : ~f~%" f28-1) + (let* ((f0-10 (/ f30-1 f28-1)) + (s5-2 (the int (* 2.0 (the float (-> *room-powerups* (-> this current-room-index) avg-spawn-rate)) f0-10))) + ) + (format 0 "Spawning in ~f seconds~%" (* 0.0033333334 (the float s5-2))) + (set! (-> this next-powerup-spawn-time) (+ (current-time) s5-2)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs none. +(defun skip-to-room ((arg0 uint)) + (let ((v1-1 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-1 status) (entity-perm-status bit-5)) + (set! (-> v1-1 user-uint64) arg0) + (logior! (-> v1-1 status) (entity-perm-status bit-14)) + ) + (none) + ) diff --git a/goal_src/jak3/levels/city/protect/cty-protect.gc b/goal_src/jak3/levels/city/protect/cty-protect.gc index 3a57d33a66..b36cf6bde6 100644 --- a/goal_src/jak3/levels/city/protect/cty-protect.gc +++ b/goal_src/jak3/levels/city/protect/cty-protect.gc @@ -7,3 +7,571 @@ ;; DECOMP BEGINS +(deftype task-manager-protect-hq (task-manager) + ((gunships handle 2) + (spawn-records (array proc-focusable-spawner)) + (spawn-index int8) + (death-count int8) + ) + (:state-methods + fight-gunship + fight-gunship-2 + wait-finish + ) + (:methods + (gunship-spawn (_type_ protect-gunship-enemy-spawn-params) object) + (spawn-gunship (_type_ vector int float) handle) + (get-spawn-pos-for-ship (_type_ vector vector symbol) vector) + ) + ) + + +(define *protect-object-count* + (new 'static 'boxed-array :type int32 :length 13 :allocated-length 17 0 0 0 0 0 0 0 0 0 8 8 8 0) + ) + +(defmethod init! ((this task-manager-protect-hq)) + (set-setting! 'music 'factoryb 0.0 0) + (set-setting! 'gun-target-guards? #f 0.0 0) + (set! (-> this spawn-records) (new 'process 'boxed-array proc-focusable-spawner 17)) + (set-setting! 'disable-parking-spots? #t 0.0 0) + (dotimes (v1-7 2) + (set! (-> this gunships v1-7) (the-as handle #f)) + (set! (-> *active-gunships* v1-7 proc) (the-as handle #f)) + ) + (dotimes (s5-0 17) + (set! (-> this spawn-records s5-0) (new 'process 'proc-focusable-spawner)) + (alloc-records! (-> this spawn-records s5-0) (-> *protect-object-count* s5-0) 'process) + ) + (set-setting! 'extra-bank '((cityhq3 citykg)) 0.0 0) + (set! (-> this spawn-index) 0) + (set-cloud-and-fog-interp! *mood-control* 1.0 1.0 50.0 50.0) + (set-time-for-random-weather! *mood-control* 100000000.0 100000000.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 16) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 2.0) + (call-parent-method this) + (none) + ) + +(defmethod relocate ((this task-manager-protect-hq) (offset int)) + (dotimes (v1-0 17) + (if (nonzero? (-> this spawn-records v1-0)) + (&+! (-> this spawn-records v1-0) offset) + ) + ) + (if (nonzero? (-> this spawn-records)) + (&+! (-> this spawn-records) offset) + ) + (call-parent-method this offset) + ) + +(defun protect-type->type ((arg0 gunship-cmd-spawn-type)) + (case arg0 + (((gunship-cmd-spawn-type guard-tazer) + (gunship-cmd-spawn-type guard-rifle) + (gunship-cmd-spawn-type guard-grenade) + ) + crimson-guard + ) + (((gunship-cmd-spawn-type grunt)) + metalhead-grunt + ) + (((gunship-cmd-spawn-type flitter)) + metalhead-flitter + ) + (((gunship-cmd-spawn-type unknown)) + metalhead-predator + ) + (((gunship-cmd-spawn-type roboguard)) + roboguard-city + ) + (((gunship-cmd-spawn-type turret)) + flying-turret + ) + (((gunship-cmd-spawn-type spydroid)) + spydroid + ) + (else + (the-as type #f) + ) + ) + ) + +(define *protect-levels* (new 'static 'boxed-array :type symbol :length 12 :allocated-length 17 + '#f + 'ctypepa + 'ctypepa + 'ctypesa + 'ctypesa + 'ctypesa + 'ctypesb + 'ctypesb + 'ctypepb + 'ctypesc + 'ctypesc + 'ctypesc + ) + ) + +;; WARN: Return type mismatch int vs handle. +(defun spawn-protect-enemy ((arg0 int) (arg1 process)) + (if (logtest? (process-mask enemy guard) (-> *kernel-context* prevent-from-run)) + (return (the-as handle #f)) + ) + (let ((s4-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> s4-0 velocity quad) (the-as uint128 0)) + (set! (-> s4-0 behavior) (the-as uint 1)) + (set! (-> s4-0 object-type) (city-target-type->traffic-object-type (the-as city-target-type arg0))) + (set! (-> s4-0 flags) (traffic-spawn-flags)) + (logior! (-> s4-0 flags) (traffic-spawn-flags tsf7)) + (set! (-> s4-0 nav-branch) #f) + (set! (-> s4-0 guard-type) (the-as uint 0)) + (let ((s5-1 (get-process *default-dead-pool* (protect-type->type (the-as gunship-cmd-spawn-type arg0)) #x4000 1))) + (the-as handle (ppointer->handle (when s5-1 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s5-1 arg1 "protect-enemy" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 citizen-init-by-other s4-0) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + ) + +(defstate wait (task-manager-protect-hq) + :virtual #t + :enter (behavior () + (set-blackout-frames (seconds 10)) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defstate active (task-manager-protect-hq) + :virtual #t + :enter (behavior () + (set-setting! 'city-sound '(cityprot) 0.0 2) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set-setting! 'airlock #f 0.0 0) + (let ((v1-8 (get-hatred-at-idx *cty-attack-controller* 9 0))) + (set! (-> v1-8 hatred) 1.0) + (set! (-> v1-8 hatred-dist) 245760.0) + (set! (-> v1-8 dist-scale) 0.25) + (set! (-> v1-8 attacker-scale) 0.0) + (set! (-> v1-8 max-consider-dist) 12288000.0) + ) + (set! (-> *cty-attack-controller* target-attacker max-num-attackers) (the-as uint 100)) + (let ((gp-0 (push-back-hatred *cty-attack-controller*))) + (set! (-> gp-0 hatred) 0.3) + (set! (-> gp-0 hatred-dist) 491520.0) + (set! (-> gp-0 dist-scale) 0.25) + (set! (-> gp-0 attacker-scale) 0.01) + (set! (-> gp-0 max-consider-dist) 12288000.0) + (set-hatred-indices *cty-attack-controller* gp-0 4 13) + (set-hatred-indices *cty-attack-controller* gp-0 3 13) + (set-hatred-indices *cty-attack-controller* gp-0 5 13) + ) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (while (< (-> self spawn-index) (-> self spawn-records length)) + (dotimes (gp-0 (-> self spawn-records (-> self spawn-index) records length)) + (set! (-> self spawn-records (-> self spawn-index) records data gp-0 proc) + (spawn-protect-enemy (-> self spawn-index) self) + ) + ) + (+! (-> self spawn-index) 1) + (suspend) + ) + (go-virtual fight-gunship) + ) + ) + +(define *gunship-start-positions* + (new 'static 'boxed-array :type vector (new 'static 'vector :x 2304696.2 :y 40345.6 :z -2179358.8 :w 1.0)) + ) + +(defstate fight-gunship (task-manager-protect-hq) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gunship-destroyed) + (go-virtual fight-gunship-2) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (ff-squad-control-method-56 *ff-squad-control* 0 0 0) + (ff-squad-control-method-56 *ff-squad-control* 1 4 4) + (let ((a1-3 (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) *zero-vector* #t))) + (set! (-> self gunships 0) (spawn-gunship self a1-3 0 0.0)) + ) + ) + :trans (behavior () + (if (< 1228800.0 (vector-vector-xz-distance (target-pos 0) (-> *gunship-start-positions* 0))) + (send-event self 'fail) + ) + ((-> (method-of-type task-manager active) trans)) + (dotimes (gp-1 (-> self spawn-records length)) + (check-inactive (-> self spawn-records gp-1)) + ) + ) + :code (behavior () + (suspend) + (set-blackout-frames 0) + (sleep-code) + ) + ) + +(define *fountain-center-pos* (new 'static 'vector :x 2298060.8 :y 31825.92 :z -2276925.5 :w 1.0)) + +(defmethod get-spawn-pos-for-ship ((this task-manager-protect-hq) (arg0 vector) (arg1 vector) (arg2 symbol)) + (let ((s5-0 0)) + (let ((f30-0 409600000.0)) + (dotimes (s2-0 (-> *protect-path* length)) + (let ((s1-0 (-> *protect-path* s2-0))) + 0.0 + (when (and (< 122880.0 (vector-vector-xz-distance (target-pos 0) s1-0)) + (or (< (vector-length arg1) 4096.0) (< 122880.0 (vector-vector-xz-distance arg1 s1-0))) + ) + (let ((a0-6 (new 'stack 'sphere))) + (set! (-> a0-6 quad) (-> s1-0 quad)) + (+! (-> a0-6 y) 36864.0) + (set! (-> a0-6 r) 61440.0) + (when (or arg2 (not (sphere-in-view-frustum? a0-6))) + (let ((f0-7 (vector-vector-xz-distance s1-0 *fountain-center-pos*))) + (when (and (< 81920.0 f0-7) (< f0-7 f30-0)) + (set! f30-0 f0-7) + (set! s5-0 s2-0) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg0 quad) (-> *protect-path* s5-0 quad)) + ) + arg0 + ) + +(defun get-protect-suck-t () + (lerp-scale-clamp + 0.0 + 1.0 + (the float (-> *game-info* sub-task-list (game-task-node city-protect-hq-resolution) death-count)) + 3.0 + 10.0 + ) + ) + +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-gunship ((this task-manager-protect-hq) (arg0 vector) (arg1 int) (arg2 float)) + (let ((s5-0 (new 'stack-no-clear 'protect-gunship-init-params))) + (set! (-> s5-0 task-man) (process->handle this)) + (set! (-> s5-0 script) *gunship-0-script*) + (set! (-> s5-0 num-stages) 2) + (set! (-> s5-0 self-index) arg1) + (set! (-> s5-0 difficulty) arg2) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (quaternion-identity! (-> s5-0 quat)) + (let ((f0-1 (get-protect-suck-t))) + (set! (-> s5-0 difficulty-scalar) (lerp 0.29 1.0 (- 1.0 f0-1))) + ) + (the-as handle (ppointer->handle (process-spawn protect-gunship s5-0 :name "protect-gunship" :to this))) + ) + ) + +(defstate wait-finish (task-manager-protect-hq) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (dotimes (gp-0 17) + (dotimes (s5-0 (-> self spawn-records gp-0 records length)) + (send-event + (handle->process (-> self spawn-records gp-0 records data s5-0 proc)) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 337) *entity-pool* (target-pos 0) (the-as region #f)) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2.5)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 336) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + (sleep-code) + ) + ) + +(defstate fight-gunship-2 (task-manager-protect-hq) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gunship-destroyed) + (+! (-> self death-count) 1) + (if (= (-> self death-count) 2) + (go-virtual wait-finish) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (ff-squad-control-method-56 *ff-squad-control* 0 0 0) + (ff-squad-control-method-56 *ff-squad-control* 1 7 7) + (let ((gp-0 (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) *zero-vector* #f))) + (dotimes (s5-0 2) + (set! (-> self gunships s5-0) (spawn-gunship self gp-0 s5-0 1.0)) + (set! (-> gp-0 quad) (-> (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) gp-0 #f) quad)) + ) + ) + ) + :trans (behavior () + (if (< 1228800.0 (vector-vector-xz-distance (target-pos 0) (-> *gunship-start-positions* 0))) + (send-event self 'fail) + ) + ((-> (method-of-type task-manager active) trans)) + (dotimes (gp-1 (-> self spawn-records length)) + (check-inactive (-> self spawn-records gp-1)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 334) *entity-pool* (target-pos 0) (the-as region #f)) + (sleep-code) + ) + ) + +(defmethod gunship-spawn ((this task-manager-protect-hq) (arg0 protect-gunship-enemy-spawn-params)) + (let ((gp-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> gp-0 velocity quad) (the-as uint128 0)) + (set! (-> gp-0 position quad) (-> arg0 pos quad)) + (quaternion-copy! (-> gp-0 rotation) (-> arg0 quat)) + (set! (-> gp-0 behavior) (the-as uint 6)) + (set! (-> gp-0 object-type) + (city-target-type->traffic-object-type (the-as city-target-type (-> arg0 spawn-type))) + ) + (set! (-> gp-0 flags) (traffic-spawn-flags)) + (set! (-> gp-0 handle) (-> arg0 parent)) + (set! (-> gp-0 user-data) (the-as uint 0)) + (set! (-> gp-0 proc) #f) + (logior! (-> gp-0 flags) (traffic-spawn-flags tsf7)) + (set! (-> gp-0 nav-branch) #f) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-0 quad) (-> arg0 pos quad)) + (vector+float*! (-> s2-0 start-pos) (-> arg0 pos) *up-vector* 24576.0) + (set! (-> s2-0 move-dist quad) (the-as uint128 0)) + (set! (-> s2-0 move-dist y) -81920.0) + (let ((v1-11 s2-0)) + (set! (-> v1-11 radius) 40.96) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 quad) (-> s2-0 best-other-tri intersect quad)) + ) + ) + (set! (-> gp-0 nav-mesh) (find-nearest-nav-mesh-protect s3-0 (the-as float #x7f800000))) + ) + (let ((v1-21 (get-last-unused-handle! (-> this spawn-records (-> arg0 spawn-type))))) + (send-event (handle->process v1-21) 'traffic-activate gp-0 *traffic-engine*) + ) + ) + ) + +(defmethod taskman-event-handler ((this task-manager-protect-hq) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('count-active) + (let ((s5-1 0)) + (dotimes (s4-1 (-> this spawn-records length)) + (case (city-target-type->cty-faction (the-as city-target-type s4-1)) + (((cty-faction mh) (cty-faction kg)) + (+! s5-1 + (- (-> this spawn-records s4-1 unused-list allocated-length) (-> this spawn-records s4-1 unused-list length)) + ) + ) + ) + ) + (return s5-1) + ) + v0-1 + ) + (('gunship-spawn) + (let ((a1-3 (-> arg3 param 0))) + (gunship-spawn this (the-as protect-gunship-enemy-spawn-params a1-3)) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(deftype prot-crate (process-drawable) + ((h-crate handle :offset 208) + (dummy-ent entity-actor) + ) + (:state-methods + active + ) + (:methods + (spawn-crate (_type_) handle) + ) + ) + + +(defmethod init-from-entity! ((this prot-crate) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this h-crate) (the-as handle #f)) + (set! (-> this dummy-ent) (the-as entity-actor (entity-by-name "crate-1148"))) + (go (method-of-object this active)) + ) + +(defstate active (prot-crate) + :virtual #t + :trans (behavior () + (if (handle->process (-> self h-crate)) + (set-time! (-> self state-time)) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 15)) (not (handle->process (-> self h-crate)))) + (let ((a0-11 (new 'stack 'sphere))) + (set! (-> a0-11 quad) (-> self root trans quad)) + (set! (-> a0-11 r) 8192.0) + (if (not (sphere-in-view-frustum? a0-11)) + (spawn-crate self) + ) + ) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-crate ((this prot-crate)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'static 'fact-info)) + ) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) 1.0) + (set! (-> s4-0 pickup-type) (pickup-type ammo-random)) + (let ((f30-0 (get-protect-suck-t))) + (set! (-> s4-0 pickup-spawn-amount) (the float (the int (lerp 1.0 3.0 f30-0)))) + (set! (-> s4-0 pickup-amount) 10.0) + (format 0 "Suck t is ~f, pickup spawn ~f~%" f30-0 (-> s4-0 pickup-spawn-amount)) + (when *target* + (let ((f28-0 (/ (-> *target* fact health) (-> *target* fact health-max)))) + 0.0 + (let* ((f0-9 (lerp 0.3 0.5 f30-0)) + (f1-2 (- 1.0 f28-0)) + (f1-3 (* f1-2 f1-2)) + (f30-1 (lerp 0.0 f0-9 f1-3)) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (when (< (+ -1.0 (the-as float v1-14)) f30-1) + (set! (-> s4-0 pickup-type) (pickup-type health)) + (set! (-> s4-0 pickup-spawn-amount) (-> *FACT-bank* health-small-inc)) + (if (and (< 0.9 f30-1) (let* ((v1-23 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-24 (the-as number (logior #x3f800000 v1-23))) + ) + (< (+ -1.0 (the-as float v1-24)) 0.5) + ) + ) + (set! (-> s4-0 pickup-spawn-amount) (-> *FACT-bank* health-default-inc)) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 + (ppointer->process (process-spawn crate (-> this entity) s5-0 'blue s4-0 :name "crate" :to *entity-pool*)) + ) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (let ((a0-18 s5-1)) + (if a0-18 + (process-entity-set! a0-18 (-> this dummy-ent)) + ) + ) + (let ((v0-12 (process->handle s5-1))) + (set! (-> this h-crate) (the-as handle v0-12)) + (the-as handle v0-12) + ) + ) + ) + ) + +(defstate fail (task-manager-protect-hq) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (let ((v1-0 *game-info*)) + (set! (-> v1-0 gun-ammo 0) (fmax (-> v1-0 gun-ammo 0) (-> *FACT-bank* ammo-yellow-start))) + (set! (-> v1-0 gun-ammo 1) (fmax (-> v1-0 gun-ammo 1) (-> *FACT-bank* ammo-red-start))) + (set! (-> v1-0 gun-ammo 2) (fmax (-> v1-0 gun-ammo 2) (-> *FACT-bank* ammo-blue-start))) + (set! (-> v1-0 gun-ammo 3) (fmax (-> v1-0 gun-ammo 3) (-> *FACT-bank* ammo-dark-start))) + ) + (let* ((t9-0 find-parent-method) + (a0-5 task-manager-protect-hq) + (t9-1 (-> (the-as (state resetter-params task-manager-protect-hq) (t9-0 a0-5 18)) enter)) + ) + (if t9-1 + (t9-1 (the-as resetter-params a0-5)) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-protect-hq)) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (none) + ) diff --git a/goal_src/jak3/levels/city/protect/protect-gunship.gc b/goal_src/jak3/levels/city/protect/protect-gunship.gc index 123bc500ca..c86f93589a 100644 --- a/goal_src/jak3/levels/city/protect/protect-gunship.gc +++ b/goal_src/jak3/levels/city/protect/protect-gunship.gc @@ -5,5 +5,3788 @@ ;; name in dgo: protect-gunship ;; dgos: LCTYPROT +(define-extern *range-ffexplo-dust-color* curve-color-fast) +(define-extern *range-ffexplo-dust-alpha* curve2d-fast) +(define-extern *range-ffexplo-dust-scale-x* curve2d-fast) +(define-extern *range-ffexplo-dust-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-dust-alpha* curve2d-fast) +(define-extern *curve-ffexplo-dust-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-dust-scale-y* curve2d-fast) +(define-extern *range-gunship-explo-color* curve-color-fast) +(define-extern *range-gunship-explo-alpha* curve2d-fast) +(define-extern *range-gunship-explo-scale-x* curve2d-fast) +(define-extern *range-gunship-explo-scale-y* curve2d-fast) +(define-extern *curve-gunship-explo-alpha* curve2d-fast) +(define-extern *curve-gunship-explo-scale-x* curve2d-fast) +(define-extern *curve-gunship-explo-scale-y* curve2d-fast) +(define-extern *gunship-engine-lightning* lightning-appearance) + ;; DECOMP BEGINS +(define *gunship-nav-mesh* (the-as actor-id #xe7d4)) + +(defpart 4752 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 4753 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpart 4754 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 30.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 4755 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 6.0) + (:z (meters 0.1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -2.56 -2.56) + (:friction 0.9) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4756 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpartgroup group-gunship-laser-guard-hit + :id 1450 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4757 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 4758 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 4759 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 4760 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 4761 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 4762 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +(defpartgroup group-gunship-damage + :id 1451 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4763 :flags (sp7)) (sp-item 4764 :flags (sp7))) + ) + +(defpart 4763 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:scale-x (meters 0.6) (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4764 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 30.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.0033333334) (meters -0.0033333334)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:fade-g -0.8) + (:fade-b -0.2) + (:fade-a -0.2 -0.6666667) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-missile-beacon + :id 1452 + :flags (sp0) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 4765 :flags (is-3d sp3 sp7))) + ) + +(defpart 4765 + :init-specs ((:texture (kg-rob-target-01 lctyprot-sprite)) + (:num 1.0) + (:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 0.0) + (:rotvel-y (degrees 3.6)) + (:fade-a 2.56) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 4766) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 4767 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpart 4766 + :init-specs ((:r 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:rotvel-y (degrees 0)) + (:fade-a 0.0) + (:next-time (seconds 0.035)) + (:next-launcher 4768) + ) + ) + +(defpart 4768 + :init-specs ((:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.04)) + (:rotvel-y (degrees -3.6)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.167)) + (:next-launcher 4769) + ) + ) + +(defpart 4769 + :init-specs ((:scalevel-x (meters 0)) (:rotvel-y (degrees 0.15)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 4770 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:a 128.0) + (:scalevel-x (meters -0.001)) + (:rotvel-y (degrees 0.15)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.04)) + (:next-launcher 4771) + ) + ) + +(defpart 4771 + :init-specs ((:r 128.0) + (:a 64.0) + (:scalevel-x (meters -0.001)) + (:rotvel-y (degrees 0.15)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.5)) + (:next-launcher 4770) + ) + ) + +(defpartgroup group-grp-gunship-explosion + :id 1453 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4773 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4774 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4775 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4776 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4777 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4778 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4779 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4780 :period (seconds 30) :length (seconds 0.5)) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 4773 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4774 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 1.2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.5) (meters 0.8333333)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4775 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.22857143) + (:fade-b -0.08571429) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.93) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4776 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 8.0 8.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4777 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-ffexplo-dust-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 70.0 :y 70.0 :z 70.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 64.0 :y 32.0 :z 33.0 :w 34.0) + :one-over-x-deltas (new 'static 'vector :x -32.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 24.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 24.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ffexplo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.7 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.4285715 :y -3.3333333 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ffexplo-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ffexplo-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-grp-gunship-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4777 init-specs 14 initial-valuef) + (the-as float *part-grp-gunship-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ffexplo-dust-scale-x*) + +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ffexplo-dust-scale-y*) + +(defpart 4779 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.7) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4780 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.13333334) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 20) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-gunship-explo-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-gunship-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 128.0 :y 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-gunship-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-gunship-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-gunship-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-gunship-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-gunship-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-grp-gunship-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4780 init-specs 16 initial-valuef) + (the-as float *part-grp-gunship-explosion-texture-curve-settings*) + ) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* color-start) *range-gunship-explo-color*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* alpha-start) *range-gunship-explo-alpha*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-x-start) *range-gunship-explo-scale-x*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-y-start) *range-gunship-explo-scale-y*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* a-scalar) *curve-gunship-explo-alpha*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-x-scalar) *curve-gunship-explo-scale-x*) + +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-y-scalar) *curve-gunship-explo-scale-y*) + +(defpart 4778 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.33333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4781 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 6)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.1)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 170)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4772 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.0) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 32.0) + (:a 128.0) + (:fade-a -0.36571428 -0.36571428) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-protect-gunship-cannon-charge + :id 1454 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 4782 :flags (sp6)) (sp-item 4783 :flags (sp6)) (sp-item 4784)) + ) + +(defpart 4782 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 8.0) + (:b 255.0) + (:a 50.0 10.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1.0) + ) + ) + +(defpart 4783 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.02)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 5.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 1.0) + ) + ) + +(defpart 4784 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 1.0) + (:func 'spt-func-relative-pos) + ) + ) + +(defpart 4785 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(deftype fire-missile-state (structure) + ((missile-dest-positions vector 16 :inline) + (missile-handles handle 16) + (beacon-handles handle 16) + (last-fire-missile-time time-frame) + (last-probe-missile-time time-frame) + (launcher-rotate-time time-frame) + (num-missiles int8) + (missile-launch-index int8) + (missile-probe-index int8) + (missile-shoot-index int8) + (current-probe-angle float) + (probe-angle-shift float) + (difficulty-scalar float) + ) + (:methods + (init (_type_) none) + ) + ) + + +(deftype gunship-info (structure) + ((proc handle) + (want-target uint8) + (cur-state symbol) + (difficulty float) + ) + ) + + +(define *active-gunships* + (new 'static 'inline-array gunship-info 2 (new 'static 'gunship-info) (new 'static 'gunship-info)) + ) + +(deftype gunship-movement-state (structure) + ((state-time time-frame) + (next-update-time time-frame) + (cur-mode uint8) + (dest-mode uint8) + (dest-pos vector :inline) + (completed? symbol) + ) + ) + + +(deftype gunship-spawn-info (structure) + ((counts int8 17) + (next-spawn-time time-frame) + ) + :pack-me + (:methods + (init (_type_) none) + ) + ) + + +(defskelgroup skel-protect-gunship kg-robot-transport kg-robot-transport-lod0-jg kg-robot-transport-idle-ja + ((kg-robot-transport-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12.5) + :shadow kg-robot-transport-shadow-mg + ) + +(define *gunship-door-joints* (new 'static 'boxed-array :type int32 4 5 6 7)) + +(define *gunship-engine-segs-undamaged* (new 'static 'boxed-array :type uint64 #x4 #x10 #x100 #x40)) + +(define *gunship-engine-segs-damaged* (new 'static 'boxed-array :type uint64 #x8 #x20 #x200 #x80)) + +(deftype protect-gunship (process-focusable) + ((task-man handle) + (missile-info fire-missile-state :inline) + (stage-index int8) + (num-stages int8) + (hit-points float) + (last-attack-id uint32) + (minimap connection-minimap) + (ground-pt vector :inline) + (basetrans vector :inline) + (move-state gunship-movement-state :inline) + (reaction-time time-frame) + (choose-new-point-time time-frame) + (chosen-point vector :inline) + (last-repo-pos vector :inline) + (suppress-times time-frame 8) + (want uint8) + (target uint8) + (spawn-info gunship-spawn-info :inline) + (next-fire-missile-time time-frame) + (next-spin-laser-time time-frame) + (next-spawn-time time-frame) + (last-land-time time-frame) + (last-thrust-vec vector :inline) + (roll-quat quaternion :inline) + (difficulty float) + (base-difficulty float) + (land-start-hp float) + (jmod-turret-twist joint-mod-rotate-local :inline) + (jmod-turret-pitch joint-mod-rotate-local :inline) + (jmod-doors joint-mod-rotate-local 4 :inline) + (open-doors uint8) + (num-open-doors uint8) + (last-door-index uint8) + (engines handle 4) + (rotate-start-time time-frame) + (rotate-total-time time-frame) + (rotate-rate float) + (laser-rotate-speed float) + (current-laser-rotate-speed float) + (base-laser-dir vector :inline) + (next-new-laser-rot-time time-frame) + (laser-y float) + (jmod-laser-descend joint-mod-add-local :inline) + (num-hp-per-stage float) + (self-index int8) + (other-ship-index int8) + (attacker-info city-attacker-info) + (difficulty-scalar float) + (sound-engine-loop sound-id) + (sound-lock-on sound-id) + (sound-lock-on-hi sound-id) + (alive-engines uint8) + (last-engine? symbol) + (desired-thruster-length float) + (last-thrust vector :inline) + (smoke-parts sparticle-launch-control 4) + ) + (:state-methods + protect-gunship-base-state + hover + landed + raising + lowering + enemy-spawning + spinning-laser + die + ) + (:methods + (spawn-missile (_type_ vector vector vector float int) handle) + (protect-gunship-method-37 (_type_) int) + (protect-gunship-method-38 (_type_ int float) none) + (spawn-enemy (_type_ gunship-cmd-spawn-type) symbol) + (update-nav-mesh (_type_) none) + (gunship-post (_type_) none) + (probe-ground (_type_) none) + (protect-gunship-method-43 (_type_) none) + (gunship-init (_type_) object) + (gunship-handler (_type_ process int symbol event-message-block) object) + (protect-gunship-method-46 (_type_) symbol) + (protect-gunship-method-47 (_type_) none) + (protect-gunship-method-48 (_type_ vector) symbol) + (protect-gunship-method-49 (_type_) none) + (protect-gunship-method-50 (_type_) object) + (protect-gunship-method-51 (_type_) none) + (protect-gunship-method-52 (_type_) quaternion) + (open-doors (_type_) int) + (protect-gunship-method-54 (_type_) float) + (fire-laser (_type_ vector vector) object) + (protect-gunship-method-56 (_type_ float) float) + (protect-gunship-method-57 (_type_ int vector) vector) + ) + ) + + +(defskelgroup skel-protect-gunship-engine kg-robot-transport-bomb kg-robot-transport-bomb-lod0-jg kg-robot-transport-bomb-idle-ja + ((kg-robot-transport-bomb-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + ) + +(deftype gunship-engine (process-focusable) + ((hit-points float) + (child-index int16) + (last-attack-id uint32) + (attacker-info city-attacker-info) + (bolt lightning-bolt) + (hit-recently? symbol) + (last-hit-time time-frame) + ) + (:state-methods + idle + explode + ) + (:methods + (gunship-engine-method-30 (_type_) none) + ) + ) + + +(if (or (zero? *gunship-engine-lightning*) (!= loading-level global)) + (set! *gunship-engine-lightning* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *gunship-engine-lightning* base-alpha) 1.0) + +(set! (-> *gunship-engine-lightning* tex-id) (the-as uint #x408f00)) + +(set! (-> *gunship-engine-lightning* blend-mode) (the-as uint 1)) + +(set! (-> *gunship-engine-lightning* alpha-1-curve) *curve-linear-down*) + +(set! (-> *gunship-engine-lightning* alpha-1-mode) (the-as uint 0)) + +(set! (-> *gunship-engine-lightning* alpha-1-repeat-dist) 262144.0) + +(set! (-> *gunship-engine-lightning* alpha-2-curve) #f) + +(set! (-> *gunship-engine-lightning* alpha-2-mode) (the-as uint 3)) + +(set! (-> *gunship-engine-lightning* alpha-2-repeat-dist) 4096.0) + +(set! (-> *gunship-engine-lightning* width-curve) *curve-linear-down*) + +(set! (-> *gunship-engine-lightning* width-mode) (the-as uint 3)) + +(set! (-> *gunship-engine-lightning* width-repeat-dist) 4096.0) + +(set! (-> *gunship-engine-lightning* uv-repeat-dist) 28672.0) + +(set! (-> *gunship-engine-lightning* regenerate-time-start) (seconds 0.167)) + +(set! (-> *gunship-engine-lightning* regenerate-time-end) (seconds 0.25)) + +(set! (-> *gunship-engine-lightning* width-range-start) 3072.0) + +(set! (-> *gunship-engine-lightning* width-range-end) 3072.0) + +(set! (-> *gunship-engine-lightning* fade-time) (seconds 0.1)) + +(set! (-> *gunship-engine-lightning* uv-shift?) #t) + +(set! (-> *gunship-engine-lightning* uv-shift-speed) (seconds -0.5)) + +(set! (-> *gunship-engine-lightning* use-sprite-bucket?) #t) + +(set! (-> *gunship-engine-lightning* use-accurate-interp?) #t) + +(defbehavior gunship-engine-init-by-other gunship-engine ((arg0 int) (arg1 float)) + (stack-size-set! (-> self main-thread) 128) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self child-index) arg0) + (let ((s5-1 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-1 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-1 reaction) cshape-reaction-default) + (set! (-> s5-1 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-1 penetrated-by) (penetrate)) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-1 (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s5-1 total-prims) (the-as uint 1)) + (set! (-> s5-1 root-prim) v1-10) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-13 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> self root) s5-1) + ) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-protect-gunship-engine" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self hit-points) arg1) + (set! (-> self hit-recently?) #f) + (set! (-> self attacker-info) (allocate-attacker *cty-attack-controller*)) + (init! (-> self attacker-info) self 13) + (set! (-> self bolt) (new 'process 'lightning-bolt)) + (init! (-> self bolt) 2 10 *gunship-engine-lightning*) + (go-virtual idle) + ) + +;; WARN: Function (method 30 gunship-engine) has a return type of none, but the expression builder found a return statement. +(defmethod gunship-engine-method-30 ((this gunship-engine)) + (cond + ((not (logtest? (-> this draw status) (draw-control-status on-screen))) + (lightning-bolt-method-13 (-> this bolt) 3) + (lightning-bolt-method-12 (-> this bolt)) + (return 0) + ) + ((and (-> this next-state) (= (-> this next-state name) 'idle)) + (lightning-bolt-method-13 (-> this bolt) 0) + ) + ) + (let ((s5-0 (-> this bolt))) + (set-vector! (-> this draw color-mult) 0.75 0.75 0.75 1.0) + (cond + ((-> this hit-recently?) + (set-vector! (-> this draw color-emissive) 1.0 1.0 1.0 0.0) + ) + ((zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 6)) + (set-vector! (-> this draw color-emissive) 0.15 0.15 0.3 0.0) + ) + (else + (set! (-> this draw color-emissive quad) (the-as uint128 0)) + ) + ) + (set! (-> s5-0 inner-point-travel-time) (seconds 0.417)) + (set! (-> s5-0 snap-inner-points?) #t) + (set! (-> s5-0 fractal-reduction) 0.3) + (set! (-> s5-0 generate-mode) (the-as uint 1)) + (set! (-> s5-0 appearance) *gunship-engine-lightning*) + (set! (-> s5-0 num-active-spans) 1) + (set! (-> s5-0 spans data 0 random-offset-size-start) 409.6) + (set! (-> s5-0 spans-internal data 0 num-inner-points) 5) + (set! (-> s5-0 spans data 0 inner-random-offset-size) 1228.8) + (when (not (time-elapsed? (-> this last-hit-time) (seconds 0.3))) + (let* ((f0-16 (* 0.011111111 (the float (- (current-time) (-> this last-hit-time))))) + (f0-17 (* f0-16 f0-16)) + ) + (set! (-> s5-0 spans data 0 inner-random-offset-size) + (* (-> s5-0 spans data 0 inner-random-offset-size) (lerp 5.0 1.0 f0-17)) + ) + ) + ) + (vector<-cspace! (the-as vector (-> s5-0 span-pts-start data)) (-> this node-list data 4)) + (vector+float*! + (the-as vector (-> s5-0 span-pts-start data)) + (the-as vector (-> s5-0 span-pts-start data)) + (-> this node-list data 4 bone transform fvec) + 819.2 + ) + (vector<-cspace! (-> s5-0 span-pts-start data 1) (-> this node-list data 5)) + (vector+float*! + (-> s5-0 span-pts-start data 1) + (-> s5-0 span-pts-start data 1) + (-> this node-list data 4 bone transform fvec) + 819.2 + ) + (set! (-> s5-0 spans data 1 random-offset-size-start) 409.6) + (set! (-> s5-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 s5-0) + (lightning-bolt-method-12 s5-0) + ) + (set! (-> this hit-recently?) #f) + (none) + ) + +(defmethod relocate ((this gunship-engine) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +(defmethod get-trans ((this gunship-engine) (arg0 int)) + "Get the `trans` for this process." + (case arg0 + ((3) + (let ((gp-1 (new 'static 'vector))) + (set! (-> gp-1 quad) (-> this root trans quad)) + (vector+float*! gp-1 gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) 1638.4) + (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) -6144.0) + (set! (-> gp-1 w) 10240.0) + gp-1 + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + +(defstate explode (gunship-engine) + :virtual #t + :enter (behavior () + (lightning-bolt-method-13 (-> self bolt) 3) + (gunship-engine-method-30 self) + (sound-play "gship-fuel-expl") + (when (type? (-> self root) collide-shape) + (let ((v1-8 (-> self root root-prim))) + (set! (-> v1-8 prim-core collide-as) (collide-spec)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (logclear! (-> self mask) (process-mask enemy)) + (cond + ((logtest? (-> *part-group-id-table* 997 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 997)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 997)) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + (remove-attacker *cty-attack-controller* (-> self attacker-info)) + (send-event (ppointer->process (-> self parent)) 'engine-destroyed (-> self child-index)) + ) + :code sleep-code + ) + +(defstate idle (gunship-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 symbol)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (when (!= (-> v1-1 id) (-> self last-attack-id)) + (set! (-> self last-attack-id) (-> v1-1 id)) + (let ((f0-1 (if (logtest? (attack-mask damage) (-> v1-1 mask)) + (-> v1-1 damage) + (penetrate-using->damage (-> v1-1 penetrate-using)) + ) + ) + ) + (if (= (-> proc type) gun-yellow-shot-3) + (set! f0-1 0.5) + ) + (set! (-> self hit-recently?) #t) + (set-time! (-> self last-hit-time)) + (let ((f0-2 (fmin 6.0 f0-1))) + (set! (-> self hit-points) (- (-> self hit-points) f0-2)) + ) + ) + (if (>= 0.0 (-> self hit-points)) + (go-virtual explode) + ) + (return (the-as object #t)) + v0-0 + ) + ) + ) + ) + ) + :trans (behavior () + (send-event + (ppointer->process (-> self parent)) + 'child-engine-update + (-> self child-index) + (-> self root trans) + (-> self root quat) + ) + ) + :code sleep-code + :post (behavior () + (logior! (-> self skel status) (joint-control-status sync-math)) + (transform-post) + (gunship-engine-method-30 self) + ) + ) + +(defmethod init ((this gunship-spawn-info)) + (dotimes (v1-0 17) + (set! (-> this counts v1-0) 0) + ) + (set! (-> this next-spawn-time) 0) + 0 + (none) + ) + +(defun find-nearest-nav-mesh-protect ((arg0 vector) (arg1 float)) + (local-vars (v1-15 float) (sv-64 nav-poly) (sv-68 nav-mesh) (sv-72 float) (sv-76 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-poly)) + (set! sv-68 (the-as nav-mesh #f)) + (set! sv-72 arg1) + (set! sv-76 arg0) + (set! (-> sv-64 data 20) (the-as uint 7)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (when (!= (-> v1-5 name) 'lctyprot) + (let ((s5-0 (-> v1-5 bsp nav-meshes))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) + (when s3-0 + (vector-! (the-as vector (-> sv-64 vertex)) sv-76 (the-as vector (-> s3-0 bounds))) + (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-15 vf1) + (let ((f0-1 v1-15) + (f1-0 (-> s3-0 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 vertex1 x) (-> s3-0 nearest-y-threshold)) + (nav-mesh-method-46 s3-0 sv-64) + (when (>= sv-72 (-> sv-64 vertex1 w)) + (set! sv-72 (-> sv-64 vertex1 w)) + (set! sv-68 s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + sv-68 + ) + ) + +(defbehavior gunship-event-handler protect-gunship ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (gunship-handler self arg0 arg1 arg2 arg3) + ) + +(deftype protect-gunship-init-params (structure) + ((pos vector :inline) + (quat quaternion :inline) + (task-man handle) + (script pair) + (num-stages int8) + (self-index int8) + (difficulty float) + (difficulty-scalar float) + ) + ) + + +(deftype protect-gunship-enemy-spawn-params (structure) + ((pos vector :inline) + (quat quaternion :inline) + (spawn-type gunship-cmd-spawn-type) + (parent handle) + ) + ) + + +(define *gunship-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x28)) + :shadow-dir (new 'static 'vector :y -1.0 :w 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 32768.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +(defmethod gunship-init ((this protect-gunship)) + (set! (-> this alive-engines) (the-as uint 15)) + (set! (-> this last-engine?) #f) + (set! (-> this hit-points) (* (the float (-> this num-stages)) (-> this num-hp-per-stage))) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (probe-ground this) + (let ((a0-4 (get-nav-mesh *gunship-nav-mesh*))) + (when a0-4 + (add-process-drawable-to-nav-mesh a0-4 this #t) + (update-nav-mesh this) + ) + ) + (set! (-> this sound-engine-loop) (new-sound-id)) + (set! (-> this sound-lock-on) (new-sound-id)) + (set! (-> this sound-lock-on-hi) (new-sound-id)) + (quaternion-copy! (-> this roll-quat) (-> this root quat)) + (set! (-> this move-state cur-mode) (the-as uint 0)) + (set! (-> this move-state dest-mode) (the-as uint 0)) + (set! (-> this move-state completed?) #f) + (init (-> this jmod-turret-twist) this (the-as uint 8) (joint-mod-base-flags attached)) + (init (-> this jmod-turret-pitch) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-laser-descend) this (the-as uint 16) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this jmod-laser-descend transform scale y) -0.01) + (dotimes (s5-0 4) + (init + (-> this jmod-doors s5-0) + this + (the-as uint (-> *gunship-door-joints* s5-0)) + (joint-mod-base-flags attached) + ) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-0 32)))) + ) + (set! (-> this suppress-times (log2 16)) (+ (current-time) (seconds 4))) + (set! (-> this suppress-times (log2 32)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 10.1))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 5))) + (when (-> this draw shadow) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -81920.0 81920.0 614400.0 (the-as vector #f) (shadow-flags shdf04) 245760.0) + ) + (let ((v1-50 (-> this draw shadow-ctrl))) + (logclear! (-> v1-50 settings flags) (shadow-flags disable-draw)) + ) + 0 + (shadow-control-method-14 + (-> this draw shadow-ctrl) + (-> this root trans) + (-> this draw shadow-ctrl settings shadow-dir) + -122880.0 + -40960.0 + 40960.0 + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1454) this)) + (let* ((s5-5 (-> this part)) + (s4-0 (method-of-object s5-5 set-local-space-info)) + (s3-0 (add-connection *part-local-space-engine* this local-space-proc-joint 17 0 0)) + ) + (let ((v1-65 (process->handle this))) + (if (= v1-65 #f) + (set! v1-65 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-0) hand) (the-as handle v1-65)) + ) + (matrix-identity! (-> (the-as particle-local-space-info s3-0) mat-new)) + (matrix-identity! (-> (the-as particle-local-space-info s3-0) mat-prev)) + (set! (-> (the-as particle-local-space-info s3-0) flags) (part-local-space-flags)) + (s4-0 s5-5 (the-as particle-local-space-info s3-0)) + ) + (dotimes (s5-6 4) + (set! (-> this smoke-parts s5-6) (create-launch-control (-> *part-group-id-table* 1451) this)) + ) + (go (method-of-object this raising)) + ) + +(defbehavior protect-gunship-init-by-other protect-gunship ((arg0 protect-gunship-init-params)) + (stack-size-set! (-> self main-thread) 256) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self level) (level-get *level* 'lctyprot)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 18432.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 9) + (set-vector! (-> v1-19 local-sphere) 0.0 2048.0 0.0 16384.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 0.0 49152.0 0.0 21708.8) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 18432.0 0.0 32768.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 0.0 18432.0 0.0 36864.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-28 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-28 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-28 prim-core collide-with)) + ) + (set! (-> s5-0 nav-radius) 32768.0) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-protect-gunship" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self task-man) (-> arg0 task-man)) + (set! (-> self self-index) (-> arg0 self-index)) + (set! (-> self other-ship-index) (logand (+ (-> self self-index) 1) 1)) + (set! (-> *active-gunships* (-> self self-index) proc) (process->handle self)) + (ja :group! (-> self draw art-group data 3) :num! (identity 1.0)) + (set! (-> self base-difficulty) (-> arg0 difficulty)) + (set! (-> self difficulty-scalar) (-> arg0 difficulty-scalar)) + (init (-> self missile-info)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self basetrans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self num-stages) 4) + (set-vector! (-> self root scale) 0.4 0.4 0.4 1.0) + (set! (-> self num-hp-per-stage) (lerp 22.0 33.0 (-> self base-difficulty))) + (set! (-> self num-hp-per-stage) (* (-> self num-hp-per-stage) (lerp 0.5 1.0 (-> self difficulty-scalar)))) + (dotimes (gp-1 4) + (set! (-> self engines gp-1) + (ppointer->handle + (process-spawn gunship-engine gp-1 (-> self num-hp-per-stage) :name "gunship-engine" :to self) + ) + ) + ) + (gunship-init self) + ) + +(defmethod relocate ((this protect-gunship) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this smoke-parts v1-0)) + (&+! (-> this smoke-parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +(deftype gunship-exploder (process-drawable) + () + (:state-methods + explode + ) + ) + + +(defskelgroup skel-gunship-exploder kg-robot-transport-break kg-robot-transport-break-lod0-jg kg-robot-transport-break-idle-ja + ((kg-robot-transport-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80.5) + ) + +(defstate explode (gunship-exploder) + :virtual #t + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + :post ja-post + ) + +(defbehavior gunship-exploder-init-by-other gunship-exploder ((arg0 vector) (arg1 quaternion)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gunship-exploder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) 0.4 0.4 0.4 1.0) + (go-virtual explode) + ) + +(defstate die (protect-gunship) + :virtual #t + :enter (behavior () + (sound-stop (-> self sound-engine-loop)) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> *active-gunships* (-> self self-index) want-target) (the-as uint 0)) + (set! (-> *active-gunships* (-> self self-index) cur-state) 'die) + (when (type? (-> self root) collide-shape) + (let ((v1-9 (-> self root root-prim))) + (set! (-> v1-9 prim-core collide-as) (collide-spec)) + (set! (-> v1-9 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-play "gship-explode") + (cond + ((logtest? (-> *part-group-id-table* 1453 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1453)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1453)) + ) + ) + ) + :code (behavior () + (process-spawn gunship-exploder (-> self root trans) (-> self root quat) :name "gunship-exploder" :to self) + (set! (-> self root trans quad) (-> self ground-pt quad)) + (let ((gp-1 (new 'static 'fact-info))) + (set! (-> gp-1 process) self) + (set! (-> gp-1 pickup-type) (pickup-type ammo-random)) + (set! (-> gp-1 pickup-amount) 15.0) + (dotimes (s5-0 3) + (set! (-> gp-1 pickup-spawn-amount) (the float (+ (logand (rand-uint31-gen *random-generator*) 1) 1))) + (drop-pickup gp-1 #t *entity-pool* gp-1 0 #t) + ) + (set! (-> gp-1 pickup-type) (pickup-type health)) + (set! (-> gp-1 pickup-spawn-amount) 1.0) + (set! (-> gp-1 pickup-amount) 2.0) + (drop-pickup gp-1 #t *entity-pool* gp-1 0 #t) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 5)) + (suspend) + ) + ) + ) + ) + +(defmethod gunship-handler ((this protect-gunship) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('engine-destroyed) + (let ((v0-0 (the-as object (logclear (-> this alive-engines) (ash 1 (the-as int (-> arg3 param 0))))))) + (set! (-> this alive-engines) (the-as uint v0-0)) + v0-0 + ) + ) + (('child-engine-update) + (let ((s2-0 (-> arg3 param 0)) + (s3-0 (-> arg3 param 1)) + (s5-0 (-> arg3 param 2)) + (s4-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) + ) + (vector-rotate-around-axis! + (-> s4-0 fvec) + (the-as quaternion (-> s4-0 fvec)) + (+ 8192.0 (* 16384.0 (the float s2-0))) + (-> s4-0 uvec) + ) + (vector+float*! (the-as vector s3-0) (-> this root trans) (-> s4-0 fvec) 25804.8) + (vector+float*! (the-as vector s3-0) (the-as vector s3-0) (-> s4-0 uvec) 8192.0) + (quaternion-look-at! (the-as quaternion s5-0) (-> s4-0 fvec) *up-vector*) + ) + #t + ) + (('missile-die) + (let ((v1-10 (-> arg3 param 0))) + (if (and (>= (the-as int v1-10) 0) (< (the-as int v1-10) 16)) + (send-event (handle->process (-> this missile-info beacon-handles v1-10)) 'die) + ) + ) + #t + ) + (else + #f + ) + ) + ) + +(deftype gunship-missile (process-focusable) + ((dest-pos vector :inline) + (launch-dir vector :inline) + (particle-trail sparticle-subsampler) + (travel-speed float) + (attack-time float) + (attack-id uint32) + (index int16) + (swoosh-sound sound-id) + ) + (:state-methods + launch + attack-targ + explode + ) + (:methods + (gunship-missile-method-31 (_type_) none) + (gunship-missile-method-32 (_type_) sound-id) + ) + ) + + +(defpart 4786 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 150.0) + (:b 150.0) + (:a 30.0 30.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2 -0.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x400000 #x405c00)) + (:rotate-y (degrees 0)) + ) + ) + +(defskelgroup skel-gunship-missile cty-homing-missile cty-homing-missile-lod0-jg cty-homing-missile-idle-ja + ((cty-homing-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :origin-joint-index 3 + ) + +(deftype gunship-missile-init-params (structure) + ((pos vector :inline) + (dest-pos vector :inline) + (launch-dir vector :inline) + (time-to-targ float) + (index int16) + ) + ) + + +(defbehavior gunship-missile-init-by-other gunship-missile ((arg0 gunship-missile-init-params)) + (set! (-> self level) (level-get *level* 'lctyprot)) + (stack-size-set! (-> self main-thread) 256) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-with) (collide-spec backgnd obstacle pusher)) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-12) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-15 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self swoosh-sound) (new-sound-id)) + (let* ((v1-17 *game-info*) + (a0-12 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-12) + (set! (-> self attack-id) a0-12) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gunship-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self dest-pos quad) (-> arg0 dest-pos quad)) + (set! (-> self launch-dir quad) (-> arg0 launch-dir quad)) + (set! (-> self index) (-> arg0 index)) + (let ((a1-9 (matrix-f-compose (new 'stack-no-clear 'matrix) (-> self launch-dir)))) + (matrix->quaternion (-> self root quat) a1-9) + ) + (let* ((s5-2 quaternion-rotate-local-z!) + (s4-1 (-> self root quat)) + (s3-0 (-> self root quat)) + (f30-0 65536.0) + (v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-32 (the-as number (logior #x3f800000 v1-31))) + ) + (s5-2 s4-1 s3-0 (* f30-0 (+ -1.0 (the-as float v1-32)))) + ) + (set! (-> self travel-speed) + (/ (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) (-> arg0 time-to-targ)) + ) + self + (set! (-> self particle-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4786) 4.0) + ) + (set-vector! (-> self root scale) 0.8 0.8 0.9 1.0) + (ja-post) + (go-virtual launch) + ) + +(defstate launch (gunship-missile) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack-targ) + (set! (-> self dest-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self attack-time) (the float (-> block param 1))) + (go-virtual attack-targ) + ) + ) + ) + :trans (behavior () + (gunship-missile-method-31 self) + (gunship-missile-method-32 self) + ) + :code sleep-code + :post ja-post + ) + +(defstate attack-targ (gunship-missile) + :virtual #t + :enter (behavior () + (sound-play "gship-incoming") + (set-time! (-> self state-time)) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) (-> self dest-pos) (-> self root trans)))) + 0.0 + (set! (-> self travel-speed) (/ (vector-normalize-ret-len! gp-2 1.0) (* 0.0033333334 (-> self attack-time)))) + (let ((a1-3 (matrix-f-compose (new 'stack-no-clear 'matrix) gp-2))) + (matrix->quaternion (-> self root quat) a1-3) + ) + ) + ) + :trans (behavior () + (gunship-missile-method-31 self) + (gunship-missile-method-32 self) + (if (time-elapsed? (-> self state-time) (the int (-> self attack-time))) + (go-virtual explode) + ) + ) + :code sleep-code + :post ja-post + ) + +(define *rand-missile-sound-list* (new 'static 'boxed-array :type string + "missle-expl-1" + "missle-expl-2" + "missle-expl-3" + "missle-expl-5" + "missle-expl-6" + ) + ) + +(defstate explode (gunship-missile) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play-by-name + (string->sound-name + (-> *rand-missile-sound-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *rand-missile-sound-list* length)) + ) + ) + (new-sound-id) + 1024 + 0 + 0 + (sound-group) + #t + ) + (sound-stop (-> self swoosh-sound)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-11 (-> self root root-prim))) + (set! (-> v1-11 prim-core collide-as) (collide-spec)) + (set! (-> v1-11 prim-core collide-with) (collide-spec)) + ) + 0 + (transform-post) + (cond + ((logtest? (-> *part-group-id-table* 104 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self dest-pos quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 104)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self dest-pos quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 104)) + ) + ) + (send-event (ppointer->process (-> self parent)) 'missile-die (-> self index)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.35)) + (go empty-state) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let* ((f1-2 (* 0.00952381 (the float (- (current-time) (-> self state-time))))) + (f0-4 (fmax 0.0 (fmin 1.0 f1-2))) + (f30-0 (lerp 10240.0 17920.0 f0-4)) + ) + (set! (-> gp-0 quad) (-> self dest-pos quad)) + (set! (-> gp-0 w) (* 2.0 f30-0)) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-16 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-16 + (let* ((s2-0 (-> v1-16 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s3-1 mask)) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive)) + (-> (the-as process-focusable s3-1) root root-prim) + (let ((f0-7 + (vector-vector-distance-squared + (-> self dest-pos) + (the-as vector (-> (the-as process-focusable s3-1) root root-prim prim-core)) + ) + ) + (f1-4 f30-0) + ) + (< f0-7 (* f1-4 f1-4)) + ) + ) + (send-event + s3-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (if (= (-> s3-1 type) target) + 1.0 + 12.0 + ) + ) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 *target*) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 w))) + (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s5-1 mask)) + (not (focus-test? s5-1 disable dead inactive)) + (-> s5-1 control root-prim) + (< (vector-vector-distance-squared (-> self dest-pos) (the-as vector (-> s5-1 control root-prim prim-core))) + (* f30-0 f30-0) + ) + ) + (send-event + s5-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (if (= (-> s5-1 type) target) + 1.0 + 12.0 + ) + ) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch matrix vs none. +(defmethod gunship-missile-method-31 ((this gunship-missile)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) *up-vector*) + (set! (-> gp-0 trans quad) (-> this root trans quad)) + (vector+float*! (-> gp-0 trans) (-> gp-0 trans) (-> gp-0 fvec) -3686.4) + (vector+float*! (-> gp-0 trans) (-> gp-0 trans) (-> gp-0 fvec) -4096.0) + (init-with-mat! (-> this particle-trail) gp-0) + ) + (none) + ) + +(defmethod gunship-missile-method-32 ((this gunship-missile)) + (let ((v1-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (vector+float*! (-> this root trans) (-> this root trans) v1-1 (* (-> this travel-speed) (seconds-per-frame))) + (sound-play-by-name + (static-sound-name "gship-mslstreak") + (-> this swoosh-sound) + 1024 + (the int (* 1524.0 (doppler-pitch-shift + (-> this root trans) + (vector-float*! (new 'stack-no-clear 'vector) v1-1 (-> this travel-speed)) + ) + ) + ) + 0 + (sound-group) + #t + ) + ) + ) + +(defmethod relocate ((this gunship-missile) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-missile ((this protect-gunship) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int)) + (let ((s5-0 (new 'stack-no-clear 'gunship-missile-init-params))) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s5-0 launch-dir) arg1 1.0) + (set! (-> s5-0 dest-pos quad) (-> arg2 quad)) + (set! (-> s5-0 index) arg4) + (set! (-> s5-0 time-to-targ) arg3) + (the-as handle (ppointer->handle (process-spawn gunship-missile s5-0 :name "gunship-missile" :to this))) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init ((this fire-missile-state)) + (set! (-> this num-missiles) 0) + (set! (-> this missile-launch-index) 0) + (set! (-> this missile-probe-index) 0) + (set! (-> this missile-shoot-index) 0) + (dotimes (v1-0 16) + (set! (-> this beacon-handles v1-0) (the-as handle #f)) + (set! (-> this missile-handles v1-0) (the-as handle #f)) + ) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod protect-gunship-method-38 ((this protect-gunship) (arg0 int) (arg1 float)) + (init (-> this missile-info)) + (set! (-> this missile-info num-missiles) arg0) + (let* ((f30-0 65536.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (set! (-> this missile-info current-probe-angle) (* f30-0 (+ -1.0 (the-as float v1-5)))) + ) + (set! (-> this missile-info probe-angle-shift) (/ 65536.0 (the float arg0))) + (set! (-> this missile-info difficulty-scalar) arg1) + (set-time! (-> this missile-info launcher-rotate-time)) + (none) + ) + +(define *missile-launch-locations* (new 'static 'boxed-array :type int16 10 11 12 13 14 15)) + +(defmethod protect-gunship-method-37 ((this protect-gunship)) + (if (zero? (-> this missile-info num-missiles)) + (return 0) + ) + (when (not (time-elapsed? (-> this missile-info launcher-rotate-time) (seconds 0.5))) + (let ((v1-7 (target-pos 0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s5-0 v1-7 (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-float*! s5-0 s5-0 0.85) + (set! (-> s5-0 y) 163840.0) + (vector-normalize! s5-0 1.0) + (let* ((f0-5 (- 16384.0 (acos (vector-dot s5-0 *up-vector*)))) + (f0-8 + (lerp 0.0 f0-5 (* 0.006666667 (the float (- (current-time) (-> this missile-info launcher-rotate-time))))) + ) + (f30-1 (fmin 8192.0 f0-8)) + ) + (quaternion-rotate-x! + (-> this jmod-turret-pitch rotation) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (- f30-1) + ) + ) + ) + (return 0) + ) + (when (and (>= (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.6)) + ) + (dotimes (s5-2 (-> this missile-info num-missiles)) + (send-event (handle->process (-> this missile-info beacon-handles s5-2)) 'die) + ) + (init (-> this missile-info)) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + ) + (when (< (-> this missile-info missile-launch-index) (-> this missile-info num-missiles)) + (if (zero? (-> this missile-info missile-launch-index)) + (sound-play "gship-msllaunch") + ) + (when (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.03)) + (let ((s3-0 (target-pos 0)) + (s4-1 (new 'stack-no-clear 'vector)) + (s5-4 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! + s5-4 + (-> this + node-list + data + (-> *missile-launch-locations* + (mod (-> this missile-info missile-launch-index) (-> *missile-launch-locations* length)) + ) + ) + ) + (vector-! s4-1 s3-0 s5-4) + (set! (-> s4-1 y) 0.0) + (vector-float*! s4-1 s4-1 0.85) + (set! (-> s4-1 y) 163840.0) + (set! (-> this missile-info missile-handles (-> this missile-info missile-launch-index)) + (spawn-missile + this + s5-4 + s4-1 + (target-pos 0) + (lerp 1.2 0.6 (-> this missile-info difficulty-scalar)) + (-> this missile-info missile-launch-index) + ) + ) + ) + (set-time! (-> this missile-info last-fire-missile-time)) + (+! (-> this missile-info missile-launch-index) 1) + ) + (return 0) + ) + (if (and *target* (focus-test? *target* board)) + (set! (-> this missile-info difficulty-scalar) 1.2) + ) + (when (and (< (-> this missile-info missile-probe-index) (-> this missile-info num-missiles)) + (time-elapsed? (-> this missile-info last-probe-missile-time) (seconds 0.03)) + ) + (let ((s5-5 (-> this missile-info missile-probe-index))) + (when (zero? s5-5) + (let ((v1-86 (the int (* 300.0 (lerp 1.2 0.6 (-> this missile-info difficulty-scalar)))))) + (+! (-> this missile-info last-fire-missile-time) v1-86) + ) + ) + (let ((s4-3 (min 1 (- (-> this missile-info num-missiles) s5-5)))) + (set-time! (-> this missile-info last-probe-missile-time)) + (dotimes (s3-2 s4-3) + (when *target* + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> (get-trans *target* 1) quad)) + 0.0 + 0.75 + (let ((f30-3 (vector-length (get-transv *target*))) + (f28-0 (lerp 0.0 0.75 (* 0.0625 (the float (-> this missile-info num-missiles))))) + ) + (if (focus-test? *target* board) + (set! f28-0 1.2) + ) + (let ((f26-0 (* 0.1875 (the float (-> this missile-info num-missiles))))) + (vector+float*! s2-1 s2-1 (get-transv *target*) f28-0) + (let* ((f28-1 (* f26-0 (-> this missile-info probe-angle-shift) (the float s5-5))) + (f26-1 8192.0) + (f24-0 8192.0) + (v1-115 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-116 (the-as number (logior #x3f800000 v1-115))) + (f26-2 (+ f26-1 (* f24-0 (+ -1.0 (the-as float v1-116))))) + (s1-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-3 quad) (-> *x-vector* quad)) + 0.0 + (let* ((v1-121 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-122 (the-as number (logior #x3f800000 v1-121))) + (f0-35 (- (* (+ -1.0 (the-as float v1-122)) (-> this missile-info probe-angle-shift)))) + (f24-1 (* 0.25 f0-35)) + (f0-38 (floor (the float (/ s5-5 3)))) + (f2-0 (* 0.000016276043 f30-3)) + (f1-15 (fmax 0.0 (fmin 1.0 f2-0))) + (f1-16 (* f1-15 f1-15)) + (f0-39 (* f0-38 (- 1.0 f1-16))) + (f0-41 (* f26-2 (+ 0.75 f0-39))) + (f30-4 (fmin 40960.0 f0-41)) + ) + (vector-rotate-around-y! s1-3 s1-3 (+ f28-1 f24-1 (-> this missile-info current-probe-angle))) + (vector+float*! (-> this missile-info missile-dest-positions s5-5) s2-1 s1-3 f30-4) + ) + ) + ) + ) + ) + (let ((v1-138 (new 'stack-no-clear 'vector)) + (s2-2 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-138 quad) (-> this missile-info missile-dest-positions s5-5 quad)) + (vector+float*! (-> s2-2 start-pos) v1-138 *up-vector* 24576.0) + (set! (-> s2-2 move-dist quad) (the-as uint128 0)) + (set! (-> s2-2 move-dist y) -81920.0) + (let ((v1-141 s2-2)) + (set! (-> v1-141 radius) 40.96) + (set! (-> v1-141 collide-with) (collide-spec backgnd)) + (set! (-> v1-141 ignore-process0) #f) + (set! (-> v1-141 ignore-process1) #f) + (set! (-> v1-141 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-141 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-2) 0.0) + (set! (-> this missile-info missile-dest-positions s5-5 quad) (-> s2-2 best-other-tri intersect quad)) + (set! (-> this missile-info missile-dest-positions s5-5 y) 0.0) + ) + ) + (sound-play "gship-bombscan") + (let ((v1-152 (new 'stack-no-clear 'vector))) + (set! (-> v1-152 quad) (-> this missile-info missile-dest-positions s5-5 quad)) + (+! (-> v1-152 y) 409.6) + (set! (-> this missile-info beacon-handles s5-5) + (ppointer->handle + (cond + ((logtest? (-> *part-group-id-table* 1452 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-152 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 1452)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-152 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 1452)) + ) + ) + ) + ) + ) + (+! (-> this missile-info missile-probe-index) 1) + (+! s5-5 1) + ) + ) + ) + ) + ) + (when (and (< (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (< (-> this missile-info missile-shoot-index) (-> this missile-info missile-probe-index)) + ) + (when (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.05)) + (set-time! (-> this missile-info last-fire-missile-time)) + (sound-stop (-> this sound-lock-on)) + (sound-play "gship-bomblock" :id (-> this sound-lock-on-hi)) + (send-event + (handle->process (-> this missile-info missile-handles (-> this missile-info missile-shoot-index))) + 'attack-targ + (-> this missile-info missile-dest-positions (-> this missile-info missile-shoot-index)) + 180 + ) + (+! (-> this missile-info missile-shoot-index) 1) + ) + ) + (cond + ((or (< (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (not (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.6))) + ) + (set-setting! 'string-min-height 'abs (meters 8) 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (dotimes (v1-221 (-> this missile-info missile-probe-index)) + ) + (the-as int #f) + ) + (else + (sound-stop (-> this sound-lock-on-hi)) + ) + ) + ) + +(defmethod spawn-enemy ((this protect-gunship) (arg0 gunship-cmd-spawn-type)) + (let ((s5-0 (new 'stack-no-clear 'protect-gunship-enemy-spawn-params))) + (set! (-> s5-0 parent) (process->handle this)) + (case arg0 + (((gunship-cmd-spawn-type turret)) + (let ((v1-4 0)) + (dotimes (a0-6 4) + (when (and (logtest? (-> this open-doors) (ash 1 a0-6)) + (or (!= a0-6 (-> this last-door-index)) (>= (the-as uint 1) (-> this num-open-doors))) + ) + (set! v1-4 a0-6) + (set! (-> this last-door-index) (the-as uint a0-6)) + 0 + (goto cfg-21) + ) + ) + (label cfg-21) + (let ((v1-10 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* v1-4))) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-0 v1-10 (-> this root trans)) + (set! (-> s3-0 y) 0.0) + (vector+! (-> s5-0 pos) (-> this root trans) s3-0) + (+! (-> s5-0 pos y) 12288.0) + (vector-normalize! s3-0 1.0) + (quaternion-look-at! (-> s5-0 quat) s3-0 *up-vector*) + ) + ) + ) + (else + (set! (-> s5-0 pos quad) (-> this root trans quad)) + (quaternion-copy! (-> s5-0 quat) (-> this root quat)) + ) + ) + (if (not (protect-gunship-method-48 this (-> s5-0 pos))) + (return #f) + ) + (set! (-> s5-0 spawn-type) arg0) + (send-event (handle->process (-> this task-man)) 'gunship-spawn s5-0) + ) + #t + ) + +(defmethod probe-ground ((this protect-gunship)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> this ground-pt quad) (-> this basetrans quad)) + (vector+float*! (-> s5-0 start-pos) (-> this ground-pt) *up-vector* 24576.0) + (set! (-> s5-0 move-dist quad) (the-as uint128 0)) + (set! (-> s5-0 move-dist y) -81920.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec backgnd)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> this ground-pt quad) (-> s5-0 best-other-tri intersect quad)) + (set! (-> this ground-pt y) 7372.8) + ) + ) + 0 + (none) + ) + +(defmethod protect-gunship-method-57 ((this protect-gunship) (arg0 int) (arg1 vector)) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat)))) + (vector-rotate-around-axis! + (-> s5-0 fvec) + (the-as quaternion (-> s5-0 fvec)) + (+ 8192.0 (* 16384.0 (the float arg0))) + (-> s5-0 uvec) + ) + (vector+float*! arg1 (-> this root trans) (-> s5-0 fvec) 21708.8) + ) + arg1 + ) + +(defmethod gunship-post ((this protect-gunship)) + (probe-ground this) + (sound-play "gship-engn-loop" :id (-> this sound-engine-loop)) + (set-virtual-cur-pos! (-> this nav state) (-> this ground-pt)) + (protect-gunship-method-37 this) + (set! (-> this want) (the-as uint 0)) + (set! (-> this target) (the-as uint 0)) + (set! (-> this root trans quad) (-> this basetrans quad)) + (let* ((f0-0 0.4) + (f1-1 (* 0.0033333334 (the float (current-time)))) + (f0-1 (* f0-0 (- f1-1 (* (the float (the int (/ f1-1 2.5))) 2.5)))) + ) + (set! (-> this root trans y) (+ 1228.8 (* 1228.8 (cos (* 65536.0 f0-1))) (-> this basetrans y))) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this last-thrust quad)) + 0.0 + 0.0 + (vector+! s5-0 s5-0 (-> this root transv)) + (vector-float*! s5-0 s5-0 0.5) + (set! (-> s5-0 y) 0.0) + (let* ((f0-11 (vector-normalize-ret-len! s5-0 1.0)) + (f1-6 (* 0.000009765625 f0-11)) + (f0-13 (fmax 0.0 (fmin 1.0 f1-6))) + (f0-14 (* f0-13 f0-13)) + ) + (vector-cross! (new 'stack-no-clear 'vector) *up-vector* s5-0) + (let ((f0-15 (* 2730.6667 f0-14)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! s4-0 s5-0 f0-15) + (quaternion-slerp! (-> this roll-quat) (-> this roll-quat) s4-0 (* 2.0 (seconds-per-frame))) + ) + ) + ) + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (quaternion-look-at! (-> this root quat) s5-1 *up-vector*) + ) + (quaternion*! (-> this root quat) (-> this roll-quat) (-> this root quat)) + (let ((s5-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-2 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0))) + ) + 0.0 + (set! (-> s5-2 y) 0.0) + (set! (-> s4-2 y) 0.0) + (vector-normalize! s5-2 1.0) + (vector-normalize! s4-2 1.0) + (vector-float*! s5-2 s5-2 -1.0) + (let ((a2-6 + (quaternion-rotate-y! + (new 'stack-no-clear 'quaternion) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (- (vector-y-angle s4-2) (vector-y-angle s5-2)) + ) + ) + ) + (quaternion-slerp! + (-> this jmod-turret-twist rotation) + (-> this jmod-turret-twist rotation) + a2-6 + (* 3.0 (seconds-per-frame)) + ) + ) + ) + (if (zero? (-> this missile-info num-missiles)) + (quaternion-slerp! + (-> this jmod-turret-pitch rotation) + (-> this jmod-turret-pitch rotation) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 2.0 (seconds-per-frame)) + ) + ) + (when (and (not (and (-> this next-state) (= (-> this next-state name) 'enemy-spawning))) + (time-elapsed? (-> this spawn-info next-spawn-time) (seconds 1)) + ) + (when (> (-> this num-open-doors) 0) + (sound-play "gship-doorclose") + (set! (-> this num-open-doors) (the-as uint 0)) + 0 + ) + (dotimes (s5-5 4) + (quaternion-slerp! + (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-5 32))) + (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-5 32))) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 2.0 (seconds-per-frame)) + ) + ) + ) + (cond + ((and (-> this next-state) (let ((v1-75 (-> this next-state name))) + (or (= v1-75 'lowering) (= v1-75 'landed)) + ) + ) + (seek! (-> this desired-thruster-length) 4096.0 (* 8192.0 (seconds-per-frame))) + ) + ((and (-> this next-state) (= (-> this next-state name) 'raising)) + (seek! (-> this desired-thruster-length) 22528.0 (* 24576.0 (seconds-per-frame))) + ) + (else + (let* ((f0-39 (vector-length (-> this last-thrust))) + (f0-40 (lerp-scale-clamp 10240.0 16384.0 f0-39 12288.0 81920.0)) + ) + (seek! (-> this desired-thruster-length) f0-40 (* 12288.0 (seconds-per-frame))) + ) + ) + ) + (set! (-> this hit-points) 0.0) + (dotimes (s5-6 4) + (let ((f0-45 (-> (the-as gunship-engine (handle->process (-> this engines s5-6))) hit-points))) + (+! (-> this hit-points) (fmax 0.0 f0-45)) + (cond + ((>= 0.0 f0-45) + (setup-masks + (-> this draw) + (the-as int (-> *gunship-engine-segs-damaged* s5-6)) + (the-as int (-> *gunship-engine-segs-undamaged* s5-6)) + ) + (let ((a1-32 (protect-gunship-method-57 this s5-6 (new 'stack-no-clear 'vector)))) + (spawn (-> this smoke-parts s5-6) a1-32) + ) + ) + (else + (setup-masks + (-> this draw) + (the-as int (-> *gunship-engine-segs-undamaged* s5-6)) + (the-as int (-> *gunship-engine-segs-damaged* s5-6)) + ) + (let ((s4-6 (protect-gunship-method-57 this s5-6 (new 'stack-no-clear 'vector)))) + (let* ((f30-2 (-> this desired-thruster-length)) + (f28-1 -1228.8) + (f26-0 2457.6) + (v1-117 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-118 (the-as number (logior #x3f800000 v1-117))) + (f0-51 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-118))) f30-2)) + ) + (set! (-> *part-id-table* 4785 init-specs 4 initial-valuef) f0-51) + (set! (-> *part-id-table* 4785 init-specs 3 initial-valuef) (* 0.5 f0-51)) + ) + (draw-beam + (-> *part-id-table* 4785) + s4-6 + (vector-float*! + (new 'stack-no-clear 'vector) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) + -20480.0 + ) + #f + ) + ) + ) + ) + ) + ) + (when (>= 0.0 (-> this hit-points)) + (send-event (handle->process (-> this task-man)) 'gunship-destroyed) + (go (method-of-object this die)) + ) + (set! (-> this stage-index) + (- (-> this num-stages) (the int (ceil (/ (-> this hit-points) (-> this num-hp-per-stage))))) + ) + (set! (-> this difficulty) + (- 1.0 (/ (-> this hit-points) (* (the float (-> this num-stages)) (-> this num-hp-per-stage)))) + ) + (set! (-> this difficulty) (fmax 0.0 (fmin 1.0 (-> this difficulty)))) + (when (>= (-> this base-difficulty) 0.5) + (set! (-> *active-gunships* (-> this self-index) difficulty) (-> this difficulty)) + (set! (-> this difficulty) + (* 0.5 (+ (-> this difficulty) (-> *active-gunships* (-> this other-ship-index) difficulty))) + ) + ) + (set! (-> this difficulty) (* (-> this difficulty) (-> this difficulty-scalar))) + (if (not (and (-> this next-state) (= (-> this next-state name) 'spinning-laser))) + (seek! (-> this jmod-laser-descend transform scale y) -0.01 (seconds-per-frame)) + ) + (transform-post) + (none) + ) + +;; WARN: Return type mismatch nav-callback-info vs none. +(defmethod update-nav-mesh ((this protect-gunship)) + (let ((a0-2 (get-nav-mesh *gunship-nav-mesh*))) + (if (and nav-mesh (!= nav-mesh (-> this nav state mesh))) + (change-to a0-2 this) + ) + ) + (let ((a0-3 (-> this nav state)) + (v1-7 (-> this ground-pt)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-7 quad)) + ) + 0 + (set! (-> this nav flags) (nav-control-flag display-marks)) + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 sphere-mask) (the-as uint 0)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 target-speed) 4096.0) + ) + 0 + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 acceleration) 409600000.0) + ) + 0 + (let ((v1-17 (-> this nav))) + (set! (-> v1-17 turning-acceleration) 40960000.0) + ) + 0 + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 speed-scale) 1.0) + ) + 0 + (let ((v1-21 (-> this nav))) + (set! (-> v1-21 max-rotation-rate) 18204444.0) + ) + 0 + (set! (-> this nav callback-info) *default-nav-callback-info*) + (none) + ) + +(defstate protect-gunship-base-state (protect-gunship) + :virtual #t + :event gunship-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self reaction-time)) + ) + :trans (behavior () + (protect-gunship-method-47 self) + ) + :code sleep-code + :post (behavior () + (gunship-post self) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod protect-gunship-method-49 ((this protect-gunship)) + (let* ((f30-0 (lerp 0.25 1.2 (-> this difficulty))) + (f28-0 10.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (s5-0 (the int (+ f28-0 (* (+ -1.0 (the-as float v1-3)) (+ -10.0 (lerp 12.0 16.0 (-> this difficulty))))))) + (f28-1 (lerp 7.5 5.5 (-> this difficulty))) + ) + (protect-gunship-method-38 this s5-0 f30-0) + (if (handle->process (-> *active-gunships* (-> this other-ship-index) proc)) + (set! f28-1 (* 2.0 f28-1)) + ) + (set! (-> this next-fire-missile-time) (+ (current-time) (the int (* 300.0 f28-1)))) + ) + (set! (-> this suppress-times (log2 32)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 2.5))) + (none) + ) + +(defmethod protect-gunship-method-50 ((this protect-gunship)) + (when (time-elapsed? (-> this reaction-time) (seconds 0.2)) + (cond + ((logtest? (-> this target) 32) + (go (method-of-object this enemy-spawning)) + ) + ((logtest? (-> this target) 64) + (let ((v1-11 -1) + (a0-2 0) + ) + (dotimes (a1-0 4) + (when (logtest? (-> this alive-engines) (ash 1 a1-0)) + (+! a0-2 1) + (set! v1-11 a1-0) + ) + ) + (cond + ((= a0-2 1) + (set! (-> this last-engine?) #t) + (let ((a0-4 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (send-event this 'child-engine-update v1-11 a0-4 s5-0) + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0))) + ) + 0.0 + (set! (-> s5-1 y) 0.0) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-normalize! s4-1 1.0) + (vector-float*! s5-1 s5-1 -1.0) + (let ((f30-1 (- (vector-y-angle s4-1) (vector-y-angle s5-1)))) + (format 0 "Doing inverse rotate~%") + (set! (-> this rotate-rate) (* 0.25 f30-1)) + ) + ) + ) + (set-time! (-> this rotate-start-time)) + (let ((v0-0 (the-as object 1200))) + (set! (-> this rotate-total-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + (let* ((f30-2 5461.3335) + (f28-0 2730.6665) + (v1-23 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-24 (the-as number (logior #x3f800000 v1-23))) + ) + (set! (-> this rotate-rate) (+ f30-2 (* f28-0 (+ -1.0 (the-as float v1-24))))) + ) + (set-time! (-> this rotate-start-time)) + (set! (-> this rotate-total-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 1501) 900)) + ) + (if (not (logtest? (rand-uint31-gen *random-generator*) 1)) + (set! (-> this rotate-rate) (* -1.0 (-> this rotate-rate))) + ) + ) + ) + ) + ) + ((logtest? (-> this target) 128) + (go (method-of-object this lowering)) + ) + ((logtest? (-> this target) 16) + (protect-gunship-method-49 this) + ) + ((logtest? (-> this target) 8) + (go (method-of-object this spinning-laser)) + ) + ) + ) + ) + +(defmethod protect-gunship-method-54 ((this protect-gunship)) + (let ((f0-1 (lerp 5.0 8.0 (-> this base-difficulty)))) + (lerp 2.0 f0-1 (-> this difficulty)) + ) + ) + +;; WARN: Return type mismatch sound-id vs int. +(defmethod open-doors ((this protect-gunship)) + (with-pp + (init (-> this spawn-info)) + 0.0 + (let ((f30-0 (protect-gunship-method-54 this)) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'count-active) + (let* ((f1-0 (/ (the float (send-event-function (handle->process (-> this task-man)) a1-0)) f30-0)) + (f28-0 (fmax 0.0 (fmin 1.0 f1-0))) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + (f26-0 (+ -1.0 (the-as float v1-13))) + (f24-0 0.5) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + (f24-1 (* f24-0 (+ -1.0 (the-as float v1-18)))) + (f22-0 2.0) + (v1-22 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-23 (the-as number (logior #x3f800000 v1-22))) + (f0-12 (* f22-0 (+ -1.0 (the-as float v1-23)))) + ) + 0.0 + 0.0 + (let* ((f1-8 (+ f26-0 f24-1 f0-12)) + (f22-1 (/ f26-0 f1-8)) + (f24-2 (/ f24-1 f1-8)) + (f26-1 (/ f0-12 f1-8)) + (f0-15 (lerp 1.0 f30-0 (- 1.0 f28-0))) + ) + (set! (-> this spawn-info counts 9) (the int (the float (the int (+ 0.5 (* f0-15 f22-1)))))) + (set! (-> this spawn-info counts 10) (the int (the float (the int (+ 0.5 (* f0-15 f24-2)))))) + (set! (-> this spawn-info counts 11) (the int (the float (the int (+ 0.5 (* f0-15 f26-1)))))) + ) + ) + ) + (set! (-> this open-doors) (the-as uint 0)) + (set! (-> this num-open-doors) (the-as uint 0)) + (the-as + int + (when (> (-> this spawn-info counts 10) 0) + (let ((f30-1 40960000.0) + (f28-1 40960000.0) + (s4-0 -1) + (s5-0 -1) + ) + (dotimes (s3-0 4) + (let ((s2-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* s3-0))) + ) + ) + 0.0 + (let ((f0-23 (vector-vector-xz-distance (target-pos 0) s2-0))) + (cond + ((< f0-23 f30-1) + (set! f28-1 f30-1) + (set! s5-0 s4-0) + (set! f30-1 f0-23) + (set! s4-0 s3-0) + ) + ((< f0-23 f28-1) + (set! f28-1 f0-23) + (set! s5-0 s3-0) + ) + ) + ) + ) + ) + (let ((s3-1 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* s4-0))) + ) + ) + (when (protect-gunship-method-48 this s3-1) + (logior! (-> this open-doors) (ash 1 s4-0)) + (+! (-> this num-open-doors) 1) + ) + (vector<-cspace! s3-1 (-> this node-list data (-> *gunship-door-joints* s5-0))) + (when (protect-gunship-method-48 this s3-1) + (+! (-> this num-open-doors) 1) + (logior! (-> this open-doors) (ash 1 s5-0)) + ) + ) + ) + (when (and (= (-> this spawn-info counts 10) 1) (< (the-as uint 1) (-> this num-open-doors))) + (set! (-> this num-open-doors) (the-as uint 1)) + (dotimes (v1-79 4) + (when (logtest? (-> this open-doors) (ash 1 v1-79)) + (logclear! (-> this open-doors) (ash 1 v1-79)) + 0 + (goto cfg-42) + ) + ) + ) + (label cfg-42) + (when (zero? (-> this num-open-doors)) + (set! (-> this spawn-info counts 10) 0) + 0 + ) + (if (> (-> this num-open-doors) 0) + (sound-play "gship-dooropen") + ) + ) + ) + ) + ) + +(defstate enemy-spawning (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (let ((a0-1 (-> self nav state)) + (v1-5 (-> self basetrans)) + ) + (logclear! (-> a0-1 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-1 target-pos quad) (-> v1-5 quad)) + ) + 0 + (open-doors self) + ) + :exit (behavior () + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + (set! (-> self next-spawn-time) (+ (current-time) (the int (* 300.0 (lerp 7.5 5.0 (-> self difficulty)))))) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (cond + ((and (not (time-elapsed? (-> self state-time) (seconds 0.5))) (> (-> self num-open-doors) 0)) + (dotimes (gp-1 4) + (if (logtest? (-> self open-doors) (ash 1 gp-1)) + (quaternion-rotate-x! + (the-as quaternion (+ (the-as uint (-> self jmod-doors 0 rotation)) (* gp-1 32))) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 103.158516 (the float (- (current-time) (-> self state-time)))) + ) + ) + ) + ) + (else + (let ((gp-2 #f)) + (dotimes (s5-1 17) + (when (> (-> self spawn-info counts s5-1) 0) + (when (< (-> self spawn-info next-spawn-time) (current-time)) + (cond + ((spawn-enemy self (the-as gunship-cmd-spawn-type s5-1)) + (set! (-> self spawn-info next-spawn-time) (+ (current-time) (seconds 0.5))) + (+! (-> self spawn-info counts s5-1) -1) + #t + ) + (else + (logior! (-> self target) 2) + ) + ) + ) + ) + ) + (dotimes (v1-43 17) + (if (> (-> self spawn-info counts v1-43) 0) + (set! gp-2 #t) + ) + ) + (when (time-elapsed? (-> self spawn-info next-spawn-time) (seconds 1)) + (logior! (-> self target) 2) + (protect-gunship-method-51 self) + ) + (if (not gp-2) + (go-virtual hover) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +(defmethod protect-gunship-method-46 ((this protect-gunship)) + (when (time-elapsed? (-> this reaction-time) (seconds 0.2)) + (let ((f0-0 (vector-vector-xz-distance (-> this basetrans) (target-pos 0)))) + (or (< 327680.0 f0-0) (< f0-0 122880.0)) + ) + ) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5] +(defun find-reposition-pt ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 int) (arg4 int) (arg5 float) (arg6 float)) + (local-vars + (f0-16 float) + (sv-32 int) + (sv-40 float) + (sv-44 float) + (sv-48 vector) + (sv-52 symbol) + (sv-56 float) + (sv-60 vector) + (sv-64 float) + (sv-68 float) + (sv-72 float) + (sv-76 float) + (sv-80 float) + (sv-144 (function vector vector float)) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-32 -1) + (let ((f0-0 409600000.0)) + (set! sv-40 (* f0-0 f0-0)) + ) + (set! sv-44 (the-as float 409600000.0)) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 #t) + (set! sv-56 (the-as float 0.0)) + (let ((v1-9 (the-as protect-gunship (handle->process (-> *active-gunships* arg4 proc))))) + (when v1-9 + (vector-! sv-48 (-> v1-9 root trans) arg1) + (set! (-> sv-48 y) 0.0) + (set! sv-56 (vector-normalize-ret-len! sv-48 1.0)) + ) + ) + (dotimes (s0-0 (-> *protect-path* length)) + (set! sv-60 (-> *protect-path* s0-0)) + (set! sv-64 (vector-vector-xz-distance-squared arg2 (-> *protect-path* s0-0))) + (set! sv-68 (vector-vector-xz-distance-squared arg1 (-> *protect-path* s0-0))) + (set! sv-144 vector-vector-xz-distance-squared) + (set! sv-160 (-> *protect-path* s0-0)) + (let ((a1-8 (target-pos 0))) + (set! sv-72 (sv-144 sv-160 a1-8)) + ) + (set! sv-76 (the-as float 0.0)) + (set! sv-80 (the-as float 1.0)) + (set! sv-52 #t) + (let ((v1-30 (the-as protect-gunship (handle->process (-> *active-gunships* arg4 proc))))) + (when v1-30 + (set! sv-44 (vector-vector-xz-distance sv-60 (-> v1-30 root trans))) + (set! sv-176 (new 'stack-no-clear 'vector)) + (let ((v1-34 sv-60) + (a0-24 arg1) + ) + (.lvf vf4 (&-> v1-34 quad)) + (.lvf vf5 (&-> a0-24 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-176 quad) vf6) + 0.0 + (let ((a0-25 sv-176)) + (set! (-> a0-25 quad) (-> sv-176 quad)) + (set! (-> a0-25 y) 0.0) + (vector-normalize! a0-25 1.0) + ) + (let* ((v1-38 sv-48) + ; (f0-15 (-> sv-176 x)) + ; (f1-0 (-> sv-176 y)) + ; (f2-0 (-> sv-176 z)) + ; (f3-0 (-> v1-38 x)) + ; (f4-0 (-> v1-38 y)) + ; (f5-0 (-> v1-38 z)) + ) + ;; og:preserve-this + ; (.mula.s f0-15 f3-0) + ; (.madda.s f1-0 f4-0) + ; (.madd.s f0-16 f2-0 f5-0) + (set! f0-16 (vector-dot sv-176 v1-38)) + ) + (let ((f0-17 f0-16)) + (if (and (< 0.8 f0-17) (< sv-44 sv-56)) + (set! sv-52 (the-as symbol #f)) + ) + ) + ) + ) + (let ((f0-19 143360.0)) + (when (and (< (* f0-19 f0-19) sv-72) + (let ((f0-22 sv-72) + (f1-4 319488.0) + ) + (< f0-22 (* f1-4 f1-4)) + ) + (and (< 102400.0 sv-44) sv-52) + ) + (when (or (not (logtest? arg3 2)) (let ((a0-32 (find-nearest-nav-mesh-protect sv-60 (the-as float #x7f800000)))) + (when a0-32 + (set! sv-192 (new 'stack-no-clear 'vector)) + (nav-mesh-method-10 a0-32 sv-192 sv-60 (the-as nav-poly #f)) + (let ((t9-9 vector-vector-xz-distance) + (a1-14 sv-60) + ) + (< (t9-9 sv-192 a1-14) 4096.0) + ) + ) + ) + ) + (when (or (not (logtest? arg3 6)) (let ((f0-25 arg5)) + (< (* f0-25 f0-25) sv-64) + ) + ) + (when (or (not (logtest? arg3 1)) (let ((f0-28 sv-72) + (f1-10 286720.0) + ) + (and (< f0-28 (* f1-10 f1-10)) (let ((f0-29 163840.0)) + (< (* f0-29 f0-29) sv-72) + ) + ) + ) + ) + (let ((f0-32 sv-68) + (f1-14 arg6) + ) + (set! sv-76 (fabs (- f0-32 (* f1-14 f1-14)))) + ) + (let ((a0-35 (new 'stack 'sphere))) + (set! (-> a0-35 quad) (-> sv-60 quad)) + (set! (-> a0-35 r) 20480.0) + (if (not (sphere-in-view-frustum? a0-35)) + (set! sv-76 (* 100.0 sv-76)) + ) + ) + (when (< sv-76 sv-40) + (set! sv-40 sv-76) + (set! sv-32 s0-0) + ) + ) + ) + ) + ) + ) + ) + (cond + ((< -1 sv-32) + (-> *protect-path* sv-32) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + +(defmethod protect-gunship-method-51 ((this protect-gunship)) + (when (logtest? (-> this target) 7) + (let ((v1-2 (find-reposition-pt + (new 'stack-no-clear 'vector) + (-> this basetrans) + (-> this last-repo-pos) + (the-as int (-> this target)) + (-> this other-ship-index) + 122880.0 + 122880.0 + ) + ) + (a0-3 (-> this nav state)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-2 quad)) + ) + 0 + ) + (none) + ) + +(defmethod fire-laser ((this protect-gunship) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 491520.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd obstacle pusher)) + (set! (-> v1-3 ignore-process0) this) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-2 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-2) + ) + ) + (set! (-> *part-id-table* 4752 init-specs 4 initial-valuef) (vector-length (-> s5-0 move-dist))) + (draw-beam (-> *part-id-table* 4752) arg0 (-> s5-0 move-dist) #t) + (launch-particles + (-> *part-id-table* 4755) + (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (-> s5-0 start-pos)) + ) + (launch-particles + (-> *part-id-table* 4756) + (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (-> s5-0 start-pos)) + ) + (let ((v1-19 s5-0)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec jak civilian enemy hit-by-others-list player-list)) + (set! (-> v1-19 ignore-process0) this) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-5 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) + (set! (-> s5-0 best-other-tri collide-ptr) #f) + ) + ) + (when (and (-> s5-0 best-other-tri collide-ptr) (let ((s4-1 (-> s5-0 best-other-tri collide-ptr))) + (if (type? s4-1 collide-shape-prim-sphere) + s4-1 + ) + ) + ) + (let* ((s5-1 (-> s5-0 best-other-tri collide-ptr)) + (s5-2 (-> (the-as collide-shape-prim-sphere (if (type? s5-1 collide-shape-prim-sphere) + (the-as collide-shape-prim-sphere s5-1) + ) + ) + cshape + process + ) + ) + ) + (send-event + s5-2 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 1.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + (send-event this 'notify 'attack s5-2) + ) + ) + ) + ) + +(defstate spinning-laser (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self laser-y) (-> self root trans y)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (vector-z-quaternion! (-> self base-laser-dir) (-> self root quat)) + (set! (-> self base-laser-dir y) 0.0) + (vector-normalize! (-> self base-laser-dir) 1.0) + (set! (-> self current-laser-rotate-speed) 0.0) + (set! (-> self next-new-laser-rot-time) 0) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 3))) + ) + :exit (behavior () + (set! (-> self next-spin-laser-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 1501) 5250 (current-time))) + ) + ) + :trans (behavior () + (set! (-> self suppress-times (log2 32)) (+ (current-time) (seconds 1))) + (set! (-> self suppress-times (log2 64)) (+ (current-time) (seconds 1))) + (set! (-> self suppress-times (log2 128)) (+ (current-time) (seconds 1.2))) + (if (logtest? (-> self target) 16) + (protect-gunship-method-49 self) + ) + (let ((gp-3 #f)) + (let ((t9-4 vector-vector-xz-distance) + (a0-4 (-> self basetrans)) + (a2-0 (-> self nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + (if (< (t9-4 a0-4 a1-0) 20480.0) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + ) + ) + (when (time-elapsed? (-> self choose-new-point-time) (seconds 3)) + (set-time! (-> self choose-new-point-time)) + (set! gp-3 #t) + ) + (when gp-3 + (let ((v1-30 + (find-reposition-pt + (new 'stack-no-clear 'vector) + (-> self basetrans) + (-> self last-repo-pos) + (the-as int (-> self target)) + (-> self other-ship-index) + 122880.0 + 122880.0 + ) + ) + (a0-10 (-> self nav state)) + ) + (logclear! (-> a0-10 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-10 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-10 target-pos quad) (-> v1-30 quad)) + ) + 0 + ) + ) + (when (< (-> self next-new-laser-rot-time) (current-time)) + (if (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (go-virtual hover) + ) + (let* ((f30-0 8192.0) + (v1-44 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-45 (the-as number (logior #x3f800000 v1-44))) + ) + (set! (-> self laser-rotate-speed) + (+ f30-0 (* (+ -1.0 (the-as float v1-45)) (+ -8192.0 (lerp 15473.777 17294.223 (-> self difficulty))))) + ) + ) + (if (not (logtest? (rand-uint31-gen *random-generator*) 1)) + (set! (-> self laser-rotate-speed) (* -1.0 (-> self laser-rotate-speed))) + ) + (set! (-> self next-new-laser-rot-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 901) 900 (current-time))) + ) + ) + (seek! (-> self current-laser-rotate-speed) (-> self laser-rotate-speed) (* 3640.889 (seconds-per-frame))) + (vector-rotate-around-axis! + (-> self base-laser-dir) + (the-as quaternion (-> self base-laser-dir)) + (* (-> self current-laser-rotate-speed) (seconds-per-frame)) + *up-vector* + ) + (quaternion-rotate-y! + (-> self jmod-laser-descend transform quat) + (-> self jmod-laser-descend transform quat) + (* (-> self current-laser-rotate-speed) (seconds-per-frame)) + ) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (set! (-> gp-4 quad) (-> self root trans quad)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (the int (lerp 2.0 4.5 (-> self difficulty)))) + ) + 0.0 + (let ((f30-1 0.0) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (let ((s1-0 *target*)) + (when s1-0 + (set! (-> s2-0 quad) (-> (target-pos 0) quad)) + (set! (-> s3-0 quad) (-> (get-trans s1-0 3) quad)) + (let ((s0-3 (vector-! (new 'stack-no-clear 'vector) s2-0 (-> self root trans))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self root trans))) + ) + 0.0 + (set! (-> s0-3 y) 0.0) + (set! (-> s1-2 y) 0.0) + (let ((f0-26 (vector-normalize-ret-len! s0-3 1.0))) + (vector-float*! s0-3 s0-3 f0-26) + ) + (set! (-> s2-0 x) (+ (-> self root trans x) (-> s0-3 x))) + (set! (-> s2-0 z) (+ (-> self root trans z) (-> s0-3 z))) + (let* ((f0-31 (vector-normalize-ret-len! s1-2 1.0)) + (f0-32 (fmin 184320.0 f0-31)) + ) + (vector-float*! s1-2 s1-2 f0-32) + ) + (set! (-> s3-0 x) (+ (-> self root trans x) (-> s1-2 x))) + (set! (-> s3-0 z) (+ (-> self root trans z) (-> s1-2 z))) + ) + ) + ) + (let ((s1-3 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s1-3 start-pos) s2-0 *up-vector* 24576.0) + (set! (-> s1-3 move-dist quad) (the-as uint128 0)) + (set! (-> s1-3 move-dist y) -81920.0) + (let ((v1-85 s1-3)) + (set! (-> v1-85 radius) 40.96) + (set! (-> v1-85 collide-with) (collide-spec backgnd)) + (set! (-> v1-85 ignore-process0) #f) + (set! (-> v1-85 ignore-process1) #f) + (set! (-> v1-85 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-85 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s1-3) 0.0) + (set! f30-1 (-> s1-3 best-other-tri intersect y)) + ) + ) + ) + (seek! (-> self jmod-laser-descend transform scale y) 1.9 (seconds-per-frame)) + (vector<-cspace! gp-4 (joint-node kg-robot-transport-lod0-jg laser)) + (let ((f0-44 (vector-vector-xz-distance gp-4 s3-0)) + (f1-13 (- (-> gp-4 y) f30-1)) + ) + (set! (-> self base-laser-dir y) + (lerp (-> self base-laser-dir y) (- (/ f1-13 (+ 32768.0 f0-44))) (* 2.0 (seconds-per-frame))) + ) + ) + ) + (+! (-> gp-4 y) (* 2048.0 (- (-> self base-laser-dir y)))) + (vector-normalize-copy! s5-0 (-> self base-laser-dir) 1.0) + (cond + ((time-elapsed? (-> self state-time) (seconds 3)) + (dotimes (s3-1 s4-0) + (fire-laser self gp-4 s5-0) + (vector-rotate-around-axis! s5-0 (the-as quaternion s5-0) (/ 65536.0 (the float s4-0)) *up-vector*) + ) + ) + ((time-elapsed? (-> self state-time) (seconds 1.5)) + (spawn-from-mat (-> self part) (-> self node-list data 17 bone transform)) + ) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 15)) + (go-virtual hover) + ) + ) + :code sleep-code + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +(defmethod protect-gunship-method-52 ((this protect-gunship)) + (let ((a0-1 (-> this nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a0-1 target-pos quad)) + 0.0 + (let ((a0-4 (-> this nav state)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-4 heading quad)) + 0.0 + (let* ((f0-2 (vector-vector-xz-distance (-> this basetrans) a1-0)) + (f0-3 (fmin 102400.0 f0-2)) + ) + (vector-float*! s5-0 s5-0 f0-3) + ) + (let ((v1-8 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> this root transv)))) + 0.0 + 0.0 + (let* ((f0-6 (vector-length v1-8)) + (f0-7 (* 0.000009765625 f0-6)) + (f1-3 (* f0-7 f0-7 (seconds-per-frame))) + (f0-10 (fmax 0.0 (fmin 1.0 f1-3))) + ) + (vector+float*! (-> this root transv) (-> this root transv) v1-8 f0-10) + ) + (vector-float*! (-> this last-thrust) v1-8 1.0) + ) + ) + ) + (vector+float*! (-> this basetrans) (-> this basetrans) (-> this root transv) (seconds-per-frame)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (nav-mesh-method-10 (-> this nav state mesh) s5-1 (-> this basetrans) (the-as nav-poly #f)) + (let ((v1-15 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this basetrans)))) + 0.0 + (set! (-> v1-15 y) 0.0) + (vector+float*! (-> this root transv) (-> this root transv) v1-15 (* 0.1 (seconds-per-frame))) + ) + ) + (let ((a0-29 (the-as protect-gunship (handle->process (-> *active-gunships* (-> this other-ship-index) proc))))) + (when a0-29 + (let ((s5-3 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> a0-29 root trans)))) + 0.0 + (set! (-> s5-3 y) 0.0) + (let ((f1-6 (vector-normalize-ret-len! s5-3 1.0))) + (when (< f1-6 122880.0) + (let* ((f0-21 (* 0.000008138021 f1-6)) + (f0-22 (- 1.0 f0-21)) + (f0-23 (* f0-22 f0-22)) + ) + (vector-float*! s5-3 s5-3 (- 122880.0 f1-6)) + (vector+float*! (-> this root transv) (-> this root transv) s5-3 (* 4.0 (seconds-per-frame) f0-23)) + ) + ) + ) + ) + ) + ) + (let* ((f0-25 (vector-normalize-ret-len! (-> this root transv) 1.0)) + (f0-26 (fmin 102400.0 f0-25)) + ) + (vector-float*! (-> this root transv) (-> this root transv) f0-26) + ) + (if (not (time-elapsed? (-> this rotate-start-time) (-> this rotate-total-time))) + (quaternion-rotate-local-y! + (-> this root quat) + (-> this root quat) + (* (-> this rotate-rate) (seconds-per-frame)) + ) + ) + ) + +(defstate hover (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self choose-new-point-time) 0) + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (protect-gunship-method-50 self) + (protect-gunship-method-51 self) + ) + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +(defstate landed (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self last-thrust quad) (the-as uint128 0)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (set! (-> self land-start-hp) (-> self hit-points)) + ) + :exit (behavior () + (set-time! (-> self last-land-time)) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (logtest? (-> self target) 16) + (protect-gunship-method-49 self) + ) + (if (or (time-elapsed? (-> self state-time) (the int (* 300.0 (lerp 6.0 4.5 (-> self difficulty))))) + (< 0.2 (/ (- (-> self land-start-hp) (-> self hit-points)) (-> self num-hp-per-stage))) + (< 348160.0 (vector-vector-xz-distance (-> self basetrans) (target-pos 0))) + ) + (go-virtual raising) + ) + ) + ) + +(defstate raising (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (sound-play "gship-thrust") + (set! (-> self move-state dest-pos y) (+ 22528.0 (-> self ground-pt y))) + (set! (-> self root nav-radius) 0.0) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-2 (-> v1-4 enter))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (seek! (-> self basetrans y) (-> self move-state dest-pos y) (* 20480.0 (seconds-per-frame))) + (if (= (the int (-> self basetrans y)) (the int (-> self move-state dest-pos y))) + (go-virtual hover) + ) + ) + ) + +(defstate lowering (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self root nav-radius) 32768.0) + (set! (-> self move-state dest-pos y) (+ 6144.0 (-> self ground-pt y))) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-1 (-> v1-8 enter))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + :trans (behavior () + (vector-lerp! (-> self root transv) (-> self root transv) *zero-vector* (* 5.0 (seconds-per-frame))) + (vector-lerp! (-> self last-thrust) (-> self last-thrust) *zero-vector* (* 5.0 (seconds-per-frame))) + (let ((a0-2 (-> self state parent))) + (when a0-2 + (let ((t9-2 (-> a0-2 trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + (seek! (-> self basetrans y) (-> self move-state dest-pos y) (* 12288.0 (seconds-per-frame))) + (if (= (the int (-> self basetrans y)) (the int (-> self move-state dest-pos y))) + (go-virtual landed) + ) + ) + :post (behavior () + (protect-gunship-method-52 self) + (let ((v1-3 (-> self state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + ) + +(defmethod protect-gunship-method-56 ((this protect-gunship) (arg0 float)) + 0.0 + (let ((f0-2 (- (-> this root trans y) arg0))) + (* 0.00012849507 f0-2) + ) + ) + +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 47 protect-gunship) has a return type of none, but the expression builder found a return statement. +(defmethod protect-gunship-method-47 ((this protect-gunship)) + (if (not (time-elapsed? (-> this reaction-time) (seconds 0.2))) + (return 0) + ) + (if (protect-gunship-method-46 this) + (logior! (-> this want) 1) + ) + (if (and (< (-> this next-fire-missile-time) (current-time)) + (not (and (-> this next-state) (let ((v1-15 (-> this next-state name))) + (or (= v1-15 'raising) (= v1-15 'lowering)) + ) + ) + ) + ) + (logior! (-> this want) 16) + ) + (if (and (< (-> this next-spin-laser-time) (current-time)) + (and (not (and (-> this next-state) (let ((v1-24 (-> this next-state name))) + (or (= v1-24 'raising) (= v1-24 'lowering)) + ) + ) + ) + (>= (-> this base-difficulty) 0.5) + (>= (-> this difficulty) 0.3) + ) + ) + (logior! (-> this want) 8) + ) + (if (and (< (-> this next-spawn-time) (current-time)) + (not (and (-> this next-state) (let ((v1-36 (-> this next-state name))) + (or (= v1-36 'raising) (= v1-36 'lowering)) + ) + ) + ) + ) + (logior! (-> this want) 32) + ) + (if (time-elapsed? (-> this last-land-time) (the int (* 300.0 (lerp 10.0 15.0 (-> this difficulty))))) + (logior! (-> this want) 128) + ) + (if (and (and (-> this next-state) (= (-> this next-state name) 'hover)) + (or (and (-> this last-engine?) (time-elapsed? (-> this rotate-start-time) (seconds 4))) + (time-elapsed? (-> this rotate-start-time) (+ (-> this rotate-total-time) (seconds 5))) + ) + ) + (logior! (-> this want) 64) + ) + (dotimes (v1-63 8) + (if (>= (-> this suppress-times v1-63) (current-time)) + (logclear! (-> this want) (ash 1 v1-63)) + ) + ) + (when (and (logtest? (-> this want) 128) + (< (vector-vector-xz-distance (-> this basetrans) (-> this last-repo-pos)) 81920.0) + ) + (logior! (-> this want) 4) + (logand! (-> this want) -129) + ) + (if (and (logtest? (-> this want) 32) + (let ((s5-1 (the int (protect-gunship-method-54 this)))) + (< s5-1 (the-as int (send-event (handle->process (-> this task-man)) 'count-active))) + ) + ) + (logand! (-> this want) -33) + ) + (when (and (logtest? (-> this want) 32) + (or (< (vector-vector-xz-distance (-> this basetrans) (-> this last-repo-pos)) 122880.0) + (not (protect-gunship-method-48 this (-> this basetrans))) + ) + ) + (logior! (-> this want) 2) + (logand! (-> this want) -33) + ) + (if (and (logtest? (-> this want) 16) + (let ((s5-2 (the int (* 2.0 (protect-gunship-method-54 this))))) + (< s5-2 (the-as int (send-event (handle->process (-> this task-man)) 'count-active))) + ) + ) + (logand! (-> this want) -17) + ) + (when (or (logtest? (-> *active-gunships* (-> this other-ship-index) want-target) 8) + (= (-> *active-gunships* (-> this other-ship-index) cur-state) 'spinning-laser) + ) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 5))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 5))) + ) + (if (logtest? (-> *active-gunships* (-> this other-ship-index) want-target) 16) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 5))) + ) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 2))) + ) + (dotimes (v1-153 8) + (if (>= (-> this suppress-times v1-153) (current-time)) + (logclear! (-> this want) (ash 1 v1-153)) + ) + ) + (set! (-> this target) (the-as uint 0)) + (set! (-> this target) (logand (-> this want) 7)) + (cond + ((logtest? (-> this target) 7) + (if (logtest? (-> this want) 64) + (logior! (-> this target) 64) + ) + (if (and (or (not (logtest? (-> this target) 1)) + (< 327680.0 (vector-vector-xz-distance (-> this basetrans) (target-pos 0))) + ) + (logtest? (-> this want) 16) + ) + (logior! (-> this target) 16) + ) + ) + (else + (dotimes (v1-174 8) + (when (logtest? (-> this want) (ash 1 v1-174)) + (logior! (-> this target) (ash 1 v1-174)) + 0 + (goto cfg-150) + ) + ) + ) + ) + (label cfg-150) + (dotimes (v1-181 8) + (when (logtest? (-> this want) (ash 1 v1-181)) + (cond + ((logtest? (-> this target) (ash 1 v1-181)) + ) + (else + ) + ) + ) + ) + (set! (-> *active-gunships* (-> this self-index) want-target) (-> this target)) + (if (-> this next-state) + (set! (-> *active-gunships* (-> this self-index) cur-state) (-> this next-state name)) + (set! (-> *active-gunships* (-> this self-index) cur-state) #f) + ) + (none) + ) + +(defmethod protect-gunship-method-48 ((this protect-gunship) (arg0 vector)) + (let ((a0-2 (find-nearest-nav-mesh-protect arg0 (the-as float #x7f800000)))) + (when a0-2 + (let ((s5-0 (new 'stack-no-clear 'vector))) + (nav-mesh-method-10 a0-2 s5-0 arg0 (the-as nav-poly #f)) + (if (< (vector-vector-xz-distance s5-0 arg0) 4096.0) + (return #t) + ) + ) + ) + ) + #f + ) + +(defmethod deactivate ((this protect-gunship)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-engine-loop)) + (sound-stop (-> this sound-lock-on)) + (sound-stop (-> this sound-lock-on-hi)) + (call-parent-method this) + (none) + ) diff --git a/goal_src/jak3/levels/city/protect/protect-path.gc b/goal_src/jak3/levels/city/protect/protect-path.gc index 8b06a5848f..c581381a75 100644 --- a/goal_src/jak3/levels/city/protect/protect-path.gc +++ b/goal_src/jak3/levels/city/protect/protect-path.gc @@ -7,3 +7,37 @@ ;; DECOMP BEGINS +(define *protect-path* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 2211630.2 :y 22453.863 :z -2517228.8 :w 1.0) + (new 'static 'vector :x 2295778.5 :y 22453.863 :z -2456190.2 :w 1.0) + (new 'static 'vector :x 2446499.0 :y 22453.453 :z -2412481.8 :w 1.0) + (new 'static 'vector :x 2310667.5 :y 21837.004 :z -2087288.4 :w 1.0) + (new 'static 'vector :x 2148552.0 :y 22453.863 :z -2113359.0 :w 1.0) + (new 'static 'vector :x 2152553.8 :y 22453.863 :z -2376441.0 :w 1.0) + (new 'static 'vector :x 2515651.8 :y 21837.004 :z -2508594.5 :w 1.0) + (new 'static 'vector :x 2602777.8 :y 22453.863 :z -2511727.8 :w 1.0) + (new 'static 'vector :x 2831592.8 :y 21837.004 :z -1880559.2 :w 1.0) + (new 'static 'vector :x 2487184.5 :y 21837.004 :z -1848802.9 :w 1.0) + (new 'static 'vector :x 2380442.8 :y 21837.004 :z -1984007.8 :w 1.0) + (new 'static 'vector :x 2432462.0 :y 21837.004 :z -1985765.0 :w 1.0) + (new 'static 'vector :x 2299293.0 :y 21836.596 :z -2372226.2 :w 1.0) + (new 'static 'vector :x 2080341.6 :y 22453.453 :z -2027671.1 :w 1.0) + (new 'static 'vector :x 2017324.6 :y 22453.863 :z -2045197.9 :w 1.0) + (new 'static 'vector :x 2351111.2 :y 22453.863 :z -2034216.5 :w 1.0) + (new 'static 'vector :x 2449616.0 :y 22453.863 :z -2154450.0 :w 1.0) + (new 'static 'vector :x 2448837.8 :y 22453.863 :z -2273426.8 :w 1.0) + (new 'static 'vector :x 2518544.0 :y 22453.863 :z -2397093.0 :w 1.0) + (new 'static 'vector :x 2314292.5 :y 22453.863 :z -2181963.0 :w 1.0) + (new 'static 'vector :x 2300230.8 :y 22453.863 :z -2519006.5 :w 1.0) + (new 'static 'vector :x 2557939.0 :y 22453.863 :z -1909649.0 :w 1.0) + (new 'static 'vector :x 2473258.2 :y 22453.863 :z -1937055.4 :w 1.0) + (new 'static 'vector :x 2541858.0 :y 22453.863 :z -1848254.0 :w 1.0) + (new 'static 'vector :x 2211847.2 :y 22453.863 :z -2048368.2 :w 1.0) + (new 'static 'vector :x 2186792.2 :y 21836.596 :z -2284154.0 :w 1.0) + (new 'static 'vector :x 2247048.5 :y 21836.596 :z -2196921.5 :w 1.0) + (new 'static 'vector :x 2281217.2 :y 21836.596 :z -2032336.5 :w 1.0) + (new 'static 'vector :x 2398612.8 :y 21836.596 :z -2275601.5 :w 1.0) + (new 'static 'vector :x 2336705.8 :y 21836.596 :z -2370383.0 :w 1.0) + (new 'static 'vector :x 2144562.5 :y 22453.863 :z -2027876.0 :w 1.0) + ) + ) diff --git a/goal_src/jak3/levels/city/protect/protect-script.gc b/goal_src/jak3/levels/city/protect/protect-script.gc index 7abb21979a..e202c41f93 100644 --- a/goal_src/jak3/levels/city/protect/protect-script.gc +++ b/goal_src/jak3/levels/city/protect/protect-script.gc @@ -5,5 +5,169 @@ ;; name in dgo: protect-script ;; dgos: LCTYPROT +;; +++gunship-command +(defenum gunship-command + :type uint8 + (spawn) + (wait) + (missiles) + (script-set-jump) + (script-jump) + (no-op) + (other) + ) +;; ---gunship-command + + +;; +++gunship-cmd-spawn-type +(defenum gunship-cmd-spawn-type + :type uint16 + :copy-entries city-target-type + ) +;; ---gunship-cmd-spawn-type + + +;; +++gunship-cmd-wait-type +(defenum gunship-cmd-wait-type + :type uint8 + (time) + (total) + ) +;; ---gunship-cmd-wait-type + + ;; DECOMP BEGINS +(deftype gunship-cmd (structure) + ((command gunship-command) + (spawn-type gunship-cmd-spawn-type) + (count int8) + (wait-type gunship-cmd-wait-type :overlay-at spawn-type) + (difficulty float) + (wait-time time-frame) + (timeout-period time-frame) + ) + :pack-me + ) + + +(deftype gunship-cmd-context (structure) + ((start-time time-frame) + (current-command gunship-cmd :inline) + (script pair) + (script-jump-point basic) + ) + ) + + +;; WARN: Return type mismatch int vs object. +(defun parse-protect-command ((arg0 gunship-cmd-context)) + (let ((s5-0 (-> arg0 script car)) + (gp-0 (-> arg0 current-command)) + ) + (case (ref s5-0 0) + (('spawn) + (set! (-> gp-0 command) (gunship-command spawn)) + 0 + ) + (('wait) + (set! (-> gp-0 command) (gunship-command wait)) + ) + (('missiles) + (set! (-> gp-0 command) (gunship-command missiles)) + ) + (('script-set-jump) + (set! (-> gp-0 command) (gunship-command script-set-jump)) + (return (the-as object 0)) + ) + (('no-op) + (set! (-> gp-0 command) (gunship-command no-op)) + (return (the-as object 0)) + ) + (('script-jump) + (set! (-> gp-0 command) (gunship-command script-jump)) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 1)) 8))) + (return (the-as object 0)) + ) + (else + (set! (-> gp-0 command) (gunship-command other)) + (return (the-as object 0)) + ) + ) + (case (-> gp-0 command) + (((gunship-command spawn)) + (let ((a0-11 (ref s5-0 1))) + (set! (-> gp-0 spawn-type) (the-as gunship-cmd-spawn-type (symbol->city-target-type (the-as symbol a0-11)))) + ) + (let ((a0-12 s5-0)) + (if (>= ((method-of-type (rtype-of a0-12) length) a0-12) 3) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 2)) 8))) + (set! (-> gp-0 count) 1) + ) + ) + ) + (((gunship-command missiles)) + (set! (-> gp-0 count) (max 0 (min 16 (the-as int (/ (the-as int (ref s5-0 1)) 8))))) + (set! (-> gp-0 difficulty) 1.0) + (let ((a0-17 s5-0)) + (if (>= ((method-of-type (rtype-of a0-17) length) a0-17) 3) + (set! (-> gp-0 difficulty) (command-get-float (ref s5-0 2) 0.0)) + ) + ) + ) + (((gunship-command wait)) + (case (ref s5-0 1) + (('time) + (set! (-> gp-0 wait-type) (gunship-cmd-wait-type time)) + (let ((f0-2 (command-get-float (ref s5-0 2) 0.0))) + (set! (-> gp-0 wait-time) (the-as time-frame (the int (* 300.0 f0-2)))) + ) + ) + (('total) + (set! (-> gp-0 wait-type) (gunship-cmd-wait-type total)) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 2)) 8))) + ) + ) + ) + ) + (let* ((a0-28 s5-0) + (s3-2 ((method-of-type (rtype-of a0-28) length) a0-28)) + (s4-4 (ref s5-0 (+ s3-2 -2))) + (a0-31 (ref s5-0 (+ s3-2 -1))) + (v0-1 6000) + ) + (if (= s4-4 'timeout) + (set! v0-1 (the int (* 300.0 (command-get-float a0-31 0.0)))) + ) + (set! (-> gp-0 timeout-period) (the-as time-frame v0-1)) + v0-1 + ) + ) + ) + +(define *gunship-0-script* '((no-op) + (spawn roboguard 1) + (missiles 16) + (spawn turret 1) + (wait total 0) + (missiles 10 (new 'static 'bfloat :data 0.5)) + (spawn roboguard 1) + (missiles 16) + (wait time (new 'static 'bfloat :data 5.0)) + (script-set-jump) + (spawn roboguard 2) + (wait time (new 'static 'bfloat :data 5.0)) + (missiles 16) + (spawn spydroid 5) + (wait time (new 'static 'bfloat :data 2.0)) + (missiles 8) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2) + (wait time (new 'static 'bfloat :data 5.0)) + (spawn roboguard 1) + (missiles 16) + (wait time (new 'static 'bfloat :data 10.0)) + (script-jump 1) + (end) + ) + ) diff --git a/goal_src/jak3/levels/city/slums/neon-baron-part.gc b/goal_src/jak3/levels/city/slums/neon-baron-part.gc index 20edfa28e2..30c69c9803 100644 --- a/goal_src/jak3/levels/city/slums/neon-baron-part.gc +++ b/goal_src/jak3/levels/city/slums/neon-baron-part.gc @@ -5,5 +5,3485 @@ ;; name in dgo: neon-baron-part ;; dgos: CTA +;; +++neon-baron-flag +(defenum neon-baron-flag + :type uint64 + :bitfield #t + (nb0) + (nb1) + (nb2) + (nb3) + ) +;; ---neon-baron-flag + + ;; DECOMP BEGINS +(define *baron-neon-skull* + (new 'static 'boxed-array :type object + (the binteger 54) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'array uint64 1 #x3ffffffe0f8000)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x40418ff :y #x100) + (new 'static 'vector4w :x #x487f :y #x20001) + (new 'static 'vector4w :x #x80097f) + (new 'static 'vector4w :x #x1000887f :y #x8200) + (new 'static 'vector4w :x #x4010087f :y #x80000) + (new 'static 'vector4w :x #x4000a7f :y #x804) + (new 'static 'vector4w :x #x2087f) + (new 'static 'vector4w :x #x2000087f :y #x20440) + (new 'static 'vector4w :x #x1000a7f :y #x1000) + (new 'static 'vector4w :x #x287f :y #x100010) + (new 'static 'vector4w :x #x1208087f :y #x4200) + (new 'static 'vector4w :x #xc7f :y #x10000) + (new 'static 'vector4w :x #x840487f :y 2) + (new 'static 'vector4w :x #x97f :y #x420) + (new 'static 'vector4w :x #x1087f :y #x40000) + (new 'static 'vector4w :x #x1000c7f :y #x202080) + (new 'static 'vector4w :x -2146957057 :y 8) + (new 'static 'vector4w :x #x400087f :y #x8100) + (new 'static 'vector4w :x #x10a7f :y #x100020) + (new 'static 'vector4w :x #x2020087f) + ) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x -1073739649 :y #x3fffff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x3fffffff)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x20007fff :y #x200000) + (new 'static 'vector4w :x #x30007fff :y #x300000) + (new 'static 'vector4w :x #x18007fff :y #x180000) + (new 'static 'vector4w :x #xc007fff :y #xc0000) + (new 'static 'vector4w :x #x6007fff :y #x60000) + (new 'static 'vector4w :x #x2007fff :y #x30000) + (new 'static 'vector4w :y #x18000) + (new 'static 'vector4w :y #xc000) + (new 'static 'vector4w :x #x1000000 :y #x6000) + (new 'static 'vector4w :x #x1007fff :y #x3000) + (new 'static 'vector4w :x #x7fff :y #x1800) + (new 'static 'vector4w :x #x7fff :y #xc00) + (new 'static 'vector4w :x #x807fff :y #x600) + (new 'static 'vector4w :x #xc07fff :y #x300) + (new 'static 'vector4w :x #x607fff :y #x180) + (new 'static 'vector4w :x #x300000 :y #xc0) + (new 'static 'vector4w :x #x100000 :y 96) + (new 'static 'vector4w :y 48) + (new 'static 'vector4w :x #x7fff :y 24) + (new 'static 'vector4w :x #x87fff :y 12) + (new 'static 'vector4w :x #xc7fff :y 6) + (new 'static 'vector4w :x #x67fff :y 3) + (new 'static 'vector4w :x -2147254273 :y 1) + (new 'static 'vector4w :x -1073610753) + (new 'static 'vector4w :x #x40008000) + (new 'static 'vector4w) + (new 'static 'vector4w) + ) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x7fffffff :y #x10410) + (new 'static 'vector4w :x #x7fffffff :y #x10410) + (new 'static 'vector4w :x -1073741825 :y #x20820) + (new 'static 'vector4w :x -1073741825 :y #x20820) + (new 'static 'vector4w :x #x3fffffff :y #x41041) + (new 'static 'vector4w :x #x3fffffff :y #x41041) + (new 'static 'vector4w :x #x3fffffff :y #x82082) + (new 'static 'vector4w :x #x3fffffff :y #x82082) + (new 'static 'vector4w :x #x3fffffff :y #x104104) + (new 'static 'vector4w :x #x3fffffff :y #x104104) + (new 'static 'vector4w :x #x3fffffff :y #x208208) + (new 'static 'vector4w :x #x3fffffff :y #x208208) + ) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x7fff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x7800)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x -1 :y #x3fffff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w :x 4) + (new 'static 'vector4w :x 6) + (new 'static 'vector4w :x 70) + (new 'static 'vector4w :x 71) + (new 'static 'vector4w :x #x847) + (new 'static 'vector4w :x #x847) + (new 'static 'vector4w :x #x84f) + (new 'static 'vector4w :x #x84f) + (new 'static 'vector4w :x #x85f) + (new 'static 'vector4w :x #x85f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x4000087f) + (new 'static 'vector4w :x -536868737) + (new 'static 'vector4w :x -268433281 :y 1) + (new 'static 'vector4w :x -134215553 :y 3) + (new 'static 'vector4w :x -67106689 :y 7) + (new 'static 'vector4w :x -33552257 :y 15) + (new 'static 'vector4w :x -16775041 :y 31) + (new 'static 'vector4w :x -16775041 :y 63) + (new 'static 'vector4w :x -16775041 :y #x7f) + (new 'static 'vector4w :x -16775041 :y #xff) + (new 'static 'vector4w :x -16775041 :y #x1ff) + (new 'static 'vector4w :x -8370049 :y #x3ff) + (new 'static 'vector4w :x -4167553 :y #x7ff) + (new 'static 'vector4w :x -2066305 :y #xfff) + (new 'static 'vector4w :x -1017729 :y #x1fff) + (new 'static 'vector4w :x -1017729 :y #x3fff) + (new 'static 'vector4w :x -1016705 :y #x7fff) + (new 'static 'vector4w :x -1016193 :y #xffff) + (new 'static 'vector4w :x -1015937 :y #x1ffff) + (new 'static 'vector4w :x -491521 :y #x3ffff) + (new 'static 'vector4w :x -229377 :y #x7ffff) + (new 'static 'vector4w :x -98305 :y #xfffff) + (new 'static 'vector4w :x -32769 :y #x1fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + ) + ) + ) + +(defpart 3456 + :init-specs ((:texture (baron-neon-skull-main ctysluma-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata + :data (new 'static 'boxed-array :type object '*baron-neon-skull* 0 (the binteger 17434368) (the binteger 17434400)) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3457 + :init-specs ((:texture (baron-neon-skull-main ctysluma-sprite)) + (:num 1.0) + (:x (meters 4)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata + :data (new 'static 'boxed-array :type object '*baron-neon-skull* 0 (the binteger 17434368) (the binteger 17434400)) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3458 + :init-specs ((:texture (baron-neon-skull-circle ctysluma-sprite)) + (:num 1.0) + (:x (meters -2.9)) + (:y (meters 1.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 1) + (the binteger 17434304) + (the binteger 17434336) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3459 + :init-specs ((:texture (baron-neon-skull-circle ctysluma-sprite)) + (:num 1.0) + (:x (meters 2.9)) + (:y (meters 1.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 1) + (the binteger 17434304) + (the binteger 17434336) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3460 + :init-specs ((:texture (baron-neon-eye-border ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.4)) + (:y (meters -2.3)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 8.88)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 11) + (the binteger 17433984) + (the binteger 17434016) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3461 + :init-specs ((:texture (baron-neon-eye-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -1.5)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 12) + (the binteger 17433856) + (the binteger 17433888) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3462 + :init-specs ((:texture (baron-neon-eye-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 13) + (the binteger 17433920) + (the binteger 17433952) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3463 + :init-specs ((:texture (baron-neon-eye-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 14) + (the binteger 17434048) + (the binteger 17434080) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3464 + :init-specs ((:texture (baron-neon-eye-border ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.4)) + (:y (meters -2.3)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 8.88)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 11) + (the binteger 17433984) + (the binteger 17434016) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3465 + :init-specs ((:texture (baron-neon-eye-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -1.5)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 12) + (the binteger 17433856) + (the binteger 17433888) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3466 + :init-specs ((:texture (baron-neon-eye-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 13) + (the binteger 17433920) + (the binteger 17433952) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3467 + :init-specs ((:texture (baron-neon-eye-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 14) + (the binteger 17434048) + (the binteger 17434080) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3468 + :init-specs ((:texture (baron-neon-triangle-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 9)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 4.44)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 2) + (the binteger 17434432) + (the binteger 17434464) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3469 + :init-specs ((:texture (baron-neon-dot-ring ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 3.5)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 10)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 6) + (the binteger 17433792) + (the binteger 17433824) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3470 + :init-specs ((:texture (baron-neon-dot-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 5.25)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 7) + (the binteger 17433536) + (the binteger 17433568) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3471 + :init-specs ((:texture (baron-neon-dot-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 8) + (the binteger 17433664) + (the binteger 17433696) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3472 + :init-specs ((:texture (baron-neon-dot-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 9) + (the binteger 17433664) + (the binteger 17433696) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3473 + :init-specs ((:texture (baron-neon-dot-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.325)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 10) + (the binteger 17433728) + (the binteger 17433760) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3474 + :init-specs ((:texture (baron-neon-nose ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -7.8)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 3) + (the binteger 17434240) + (the binteger 17434272) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3475 + :init-specs ((:texture (baron-neon-mouth ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.2)) + (:y (meters -10.1)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 4)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 4) + (the binteger 17434176) + (the binteger 17434208) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3476 + :init-specs ((:texture (baron-neon-mouth ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.2)) + (:y (meters -10.1)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 4)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 4) + (the binteger 17434176) + (the binteger 17434208) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3477 + :init-specs ((:texture (baron-neon-ghotee ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -14)) + (:z (meters 0)) + (:scale-x (meters 5.3)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 5.3)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 5) + (the binteger 17434112) + (the binteger 17434144) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3478 + :init-specs ((:texture (baron-neon-cheek-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters 0.75)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 20) + (the binteger 17433280) + (the binteger 17433312) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3479 + :init-specs ((:texture (baron-neon-cheek-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -0.325)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 21) + (the binteger 17433344) + (the binteger 17433376) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3480 + :init-specs ((:texture (baron-neon-cheek-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -1.625)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 22) + (the binteger 17433408) + (the binteger 17433440) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3481 + :init-specs ((:texture (baron-neon-cheek-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -2.875)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 23) + (the binteger 17433472) + (the binteger 17433504) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3482 + :init-specs ((:texture (baron-neon-cheek-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters 0.75)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 20) + (the binteger 17433280) + (the binteger 17433312) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3483 + :init-specs ((:texture (baron-neon-cheek-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -0.325)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 21) + (the binteger 17433344) + (the binteger 17433376) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3484 + :init-specs ((:texture (baron-neon-cheek-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -1.625)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 22) + (the binteger 17433344) + (the binteger 17433440) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3485 + :init-specs ((:texture (baron-neon-cheek-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -2.875)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 23) + (the binteger 17433472) + (the binteger 17433504) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3486 + :init-specs ((:texture (baron-neon-white-long ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 10.6)) + (:z (meters 0)) + (:scale-x (meters 16)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 15) + (the binteger 17434816) + (the binteger 17434848) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3487 + :init-specs ((:texture (baron-neon-white-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 9.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 16) + (the binteger 17434496) + (the binteger 17434528) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3488 + :init-specs ((:texture (baron-neon-white-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 8.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 17) + (the binteger 17434560) + (the binteger 17434592) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3489 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 7.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 18) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3490 + :init-specs ((:texture (baron-neon-white-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 6.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 19) + (the binteger 17434688) + (the binteger 17434720) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3491 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -8.200001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 24) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3492 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -12.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 25) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3493 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -13.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 26) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3494 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -14.700001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 27) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3495 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -15.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 28) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3496 + :init-specs ((:texture (baron-neon-white-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 9.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 16) + (the binteger 17434496) + (the binteger 17434528) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3497 + :init-specs ((:texture (baron-neon-white-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 8.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 17) + (the binteger 17434560) + (the binteger 17434592) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3498 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 7.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 18) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3499 + :init-specs ((:texture (baron-neon-white-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 6.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 19) + (the binteger 17434688) + (the binteger 17434720) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3500 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -8.200001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 24) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3501 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -12.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 25) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3502 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -13.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 26) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3503 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -14.700001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 27) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3504 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -15.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 28) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3505 + :init-specs ((:texture (baron-neon-white-long ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -17)) + (:z (meters 0)) + (:scale-x (meters 16)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 29) + (the binteger 17434816) + (the binteger 17434848) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3506 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 10.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 30) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3507 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 9.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 31) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3508 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 8.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 32) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3509 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 6.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 33) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3510 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 5.675)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 34) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3511 + :init-specs ((:texture (baron-neon-blue-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 4.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 35) + (the binteger 17432640) + (the binteger 17432672) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3512 + :init-specs ((:texture (baron-neon-blue-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 3.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 36) + (the binteger 17432704) + (the binteger 17432736) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3513 + :init-specs ((:texture (baron-neon-blue-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 2.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 37) + (the binteger 17432768) + (the binteger 17432800) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3514 + :init-specs ((:texture (baron-neon-blue-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 0.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 38) + (the binteger 17432832) + (the binteger 17432864) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3515 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -0.32500005)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 39) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3516 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -1.5250001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 40) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3517 + :init-specs ((:texture (baron-neon-blue-g ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -2.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 41) + (the binteger 17432960) + (the binteger 17432992) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3518 + :init-specs ((:texture (baron-neon-blue-h ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -3.9250002)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 42) + (the binteger 17433024) + (the binteger 17433056) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3519 + :init-specs ((:texture (baron-neon-blue-i ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -5.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 43) + (the binteger 17433088) + (the binteger 17433120) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3520 + :init-specs ((:texture (baron-neon-blue-j ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -6.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 44) + (the binteger 17433152) + (the binteger 17433184) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3521 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -7.5249996)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 45) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3522 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -8.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 46) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3523 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -9.925)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 47) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3524 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -11.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 48) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3525 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -12.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 49) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3526 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -13.525)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 50) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3527 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -14.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 51) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3528 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -15.924999)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 52) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3529 + :init-specs ((:texture (baron-neon-blue-k ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -17.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 53) + (the binteger 17433216) + (the binteger 17433248) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3530 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 10.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 30) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3531 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 9.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 31) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3532 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 8.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 32) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3533 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 6.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 33) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3534 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 5.675)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 34) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3535 + :init-specs ((:texture (baron-neon-blue-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 4.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 35) + (the binteger 17432640) + (the binteger 17432672) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3536 + :init-specs ((:texture (baron-neon-blue-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 3.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 36) + (the binteger 17432704) + (the binteger 17432736) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3537 + :init-specs ((:texture (baron-neon-blue-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 2.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 37) + (the binteger 17432768) + (the binteger 17432800) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3538 + :init-specs ((:texture (baron-neon-blue-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 0.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 38) + (the binteger 17432832) + (the binteger 17432864) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3539 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -0.32500005)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 39) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3540 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -1.5250001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 40) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3541 + :init-specs ((:texture (baron-neon-blue-g ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -2.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 41) + (the binteger 17432960) + (the binteger 17432992) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3542 + :init-specs ((:texture (baron-neon-blue-h ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -3.9250002)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 42) + (the binteger 17433024) + (the binteger 17433056) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3543 + :init-specs ((:texture (baron-neon-blue-i ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -5.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 43) + (the binteger 17433088) + (the binteger 17433120) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3544 + :init-specs ((:texture (baron-neon-blue-j ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -6.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 44) + (the binteger 17433152) + (the binteger 17433184) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3545 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -7.5249996)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 45) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3546 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -8.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 46) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3547 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -9.925)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 47) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3548 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -11.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 48) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3549 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -12.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 49) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3550 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -13.525)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 50) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3551 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -14.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 51) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3552 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -15.924999)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 52) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3553 + :init-specs ((:texture (baron-neon-blue-k ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -17.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 53) + (the binteger 17433216) + (the binteger 17433248) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-neon-baron + :id 972 + :bounds (static-bspherem 0 -3 0 16) + :parts ((sp-item 3456 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3457 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3458 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3459 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3460 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3461 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3462 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3463 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3464 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3465 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3466 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3467 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3468 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3469 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3470 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3471 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3472 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3473 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3474 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3475 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3476 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3477 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3478 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3479 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3480 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3481 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3482 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3483 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3484 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3485 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3506 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3507 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3508 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3509 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3510 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3511 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3512 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3513 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3514 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3515 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3516 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3517 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3518 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3519 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3520 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3521 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3522 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3523 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3524 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3525 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3526 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3527 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3528 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3529 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3486 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3487 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3488 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3489 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3490 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3496 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3497 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3498 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3499 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3491 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3492 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3493 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3494 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3495 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3500 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3501 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3502 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3503 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3504 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3505 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3530 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3531 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3532 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3533 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3534 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3535 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3536 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3537 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3538 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3539 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3540 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3541 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3542 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3543 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3544 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3545 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3546 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3547 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3548 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3549 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3550 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3551 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3552 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3553 :flags (is-3d sp3 sp6 sp7)) + ) + ) + +(define *city-baron-group-ids* (new 'static 'boxed-array :type int32 #x3cc)) + +(deftype neon-baron (process) + ((flags neon-baron-flag) + (master-enable uint64) + (mode uint64) + (sign (array object)) + (parts sparticle-launch-control 1) + (state-time time-frame) + (mat matrix :inline) + ) + (:state-methods + idle + ) + (:methods + (spawn-parts (_type_) symbol) + (update-mode (_type_) none) + ) + ) + + +(defmethod deactivate ((this neon-baron)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((s5-0 0)) + (while (< s5-0 1) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + (set! s5-0 (the-as int (+ (the-as uint s5-0) 1))) + ) + ) + ((method-of-type process deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process vs neon-baron. +(defmethod relocate ((this neon-baron) (offset int)) + (dotimes (v1-0 1) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (the-as neon-baron ((method-of-type process relocate) this offset)) + ) + +(defmethod spawn-parts ((this neon-baron)) + (+! (-> this parts 0 state-counter) 1) + (when (!= (-> this parts 0 state-mode 0) (-> this flags)) + (set! (-> this parts 0 state-mode 0) (the-as uint (-> this flags))) + (set! (-> this parts 0 state-counter) (the-as uint 0)) + 0 + ) + (let ((s5-0 (the-as int (-> this master-enable)))) + (dotimes (s4-0 1) + (if (logtest? s5-0 1) + (spawn-from-mat (-> this parts s4-0) (-> this mat)) + ) + (set! s5-0 (/ s5-0 2)) + ) + ) + #f + ) + +(defmethod update-mode ((this neon-baron)) + (set! (-> this mode) (the-as uint (rand-vu-int-count-excluding 12 (ash 1 (the-as int (-> this mode)))))) + (none) + ) + +(define *neon-baron-flashing-acc* (new 'static 'array uint32 40 + #x258 + #x168 + #x168 + #xd8 + #xd8 + #x81 + #x81 + #x4d + #x4d + #x2e + #x2e + #x2e + #x1b + #x1b + #x10 + #x10 + #xa + #xa + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x5a + #x0 + #x0 + ) + ) + +(defstate idle (neon-baron) + :virtual #t + :trans (behavior () + (spawn-parts self) + ) + :code (behavior () + (until #f + (update-mode self) + (let ((v1-2 (-> self mode))) + (cond + ((= v1-2 2) + 600 + (dotimes (gp-0 19) + (let ((s5-0 (-> *neon-baron-flashing-acc* (* gp-0 2)))) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-0)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (let ((s5-1 (-> *neon-baron-flashing-acc* (+ (* gp-0 2) 1)))) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-1)) + (suspend) + ) + ) + ) + ) + ((zero? v1-2) + (dotimes (gp-1 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ((= v1-2 1) + (dotimes (gp-2 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + ) + ) + ((= v1-2 10) + 600 + (dotimes (gp-3 19) + (let ((s5-2 (-> *neon-baron-flashing-acc* (* gp-3 2)))) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-2)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (let ((s5-3 (-> *neon-baron-flashing-acc* (+ (* gp-3 2) 1)))) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-3)) + (suspend) + ) + ) + ) + ) + ((= v1-2 8) + (dotimes (gp-4 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ((= v1-2 9) + (dotimes (gp-5 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + ) + ) + ((= v1-2 3) + (set! (-> self flags) (neon-baron-flag nb1 nb3)) + (let ((gp-6 (rand-vu-int-range 2 3))) + (dotimes (s5-4 gp-6) + (let ((s4-0 0)) + (while (let ((a0-38 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-0 (* (+ (-> a0-38 length) -1) (the-as int (/ (the-as int (-> a0-38 0)) 8)))) + ) + (suspend) + (+! s4-0 1) + ) + ) + ) + ) + ) + ((= v1-2 4) + (set! (-> self flags) (neon-baron-flag nb0 nb2)) + (let ((gp-7 (rand-vu-int-range 10 40))) + (dotimes (s5-5 gp-7) + (let ((s4-1 0)) + (while (let ((a0-45 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-1 (* (+ (-> a0-45 length) -1) (the-as int (/ (the-as int (-> a0-45 0)) 8)))) + ) + (suspend) + (+! s4-1 1) + ) + ) + ) + ) + ) + ((= v1-2 5) + (set! (-> self flags) (neon-baron-flag nb2)) + (let ((gp-8 (rand-vu-int-range 3 10))) + (dotimes (s5-6 gp-8) + (let ((s4-2 0)) + (while (let ((a0-52 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-2 (* (+ (-> a0-52 length) -1) (the-as int (/ (the-as int (-> a0-52 0)) 8)))) + ) + (suspend) + (+! s4-2 1) + ) + ) + ) + ) + ) + ((= v1-2 6) + (set! (-> self flags) (neon-baron-flag nb0 nb1 nb2)) + (let ((gp-9 (rand-vu-int-range 3 6))) + (dotimes (s5-7 gp-9) + (let ((s4-3 0)) + (while (let ((a0-59 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-3 (* (+ (-> a0-59 length) -1) (the-as int (/ (the-as int (-> a0-59 0)) 8)))) + ) + (suspend) + (+! s4-3 1) + ) + ) + ) + ) + ) + ((= v1-2 11) + (set! (-> self flags) (neon-baron-flag nb1 nb2)) + (let ((gp-10 (rand-vu-int-range 3 6))) + (dotimes (s5-8 gp-10) + (let ((s4-4 0)) + (while (let ((a0-66 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-4 (* (+ (-> a0-66 length) -1) (the-as int (/ (the-as int (-> a0-66 0)) 8)))) + ) + (suspend) + (+! s4-4 1) + ) + ) + ) + ) + ) + ((= v1-2 7) + (set! (-> self flags) (neon-baron-flag nb0)) + (let ((gp-11 (rand-vu-int-range 3 6))) + (dotimes (s5-9 gp-11) + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +(defmethod init-from-entity! ((this neon-baron) (arg0 entity-actor)) + (matrix-rotate-y! (-> this mat) (quaternion-y-angle (-> arg0 quat))) + (set! (-> this mat trans quad) (-> arg0 extra trans quad)) + (set! (-> this master-enable) (the-as uint -1)) + (set! (-> this flags) (neon-baron-flag nb0 nb3)) + (set! (-> this mode) (the-as uint 0)) + (set! (-> this sign) *baron-neon-skull*) + (let ((s5-1 *city-baron-group-ids*)) + (dotimes (s4-1 1) + (set! (-> this parts s4-1) (create-launch-control (-> *part-group-id-table* (-> s5-1 s4-1)) this)) + ) + ) + (update-mode this) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/comb/combx-obs.gc b/goal_src/jak3/levels/comb/combx-obs.gc index 64c93a7edf..3715fedc17 100644 --- a/goal_src/jak3/levels/comb/combx-obs.gc +++ b/goal_src/jak3/levels/comb/combx-obs.gc @@ -7,3 +7,188 @@ ;; DECOMP BEGINS +(deftype combx-elevator (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + (setup-skel-and-draw-masks (_type_) none) + ) + ) + + +(defstate idle (combx-elevator) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defskelgroup skel-combx-elevator tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this combx-elevator)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 45056.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 3) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-21 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-21 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-21 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defmethod setup-skel-and-draw-masks ((this combx-elevator)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-combx-elevator" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 1 2) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this combx-elevator) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (setup-skel-and-draw-masks this) + (set! (-> this draw light-index) (the-as uint 1)) + (go (method-of-object this idle)) + ) + +(deftype combx-states (structure) + () + ) + + +(defun init-mood-combx ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a0-1 (-> v1-0 dir0))) + (set! (-> a0-1 direction x) 0.0) + (set! (-> a0-1 direction y) 1.0) + (set! (-> a0-1 direction z) 0.0) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 dir0 extra x) 0.75) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.25) + ) + ) + +(defbehavior update-mood-combx time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let* ((s5-0 (camera-pos)) + (f0-1 (fmin + (vector-vector-distance s5-0 (new 'static 'vector :x 368640.0 :z 40960.0 :w 1.0)) + (vector-vector-distance s5-0 (new 'static 'vector :x 14274560.0 :y -167936.0 :z 614400.0 :w 1.0)) + ) + ) + ) + (when (< f0-1 716800.0) + (let ((f30-1 (fmax 0.0 (fmin 1.0 (* 0.000009765625 (- 819200.0 f0-1))))) + (a1-4 (-> arg0 current-fog)) + (s5-1 (-> arg0 current-fog fog-dists)) + ) + (vector4-lerp! + (the-as vector a1-4) + (the-as vector a1-4) + (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) + f30-1 + ) + (vector4-lerp! s5-1 s5-1 (new 'static 'vector :x 262144.0 :y 937984.0 :z 255.0 :w 200.0) f30-1) + ) + ) + ) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (let* ((s5-2 (-> *display* part-clock frame-counter)) + (f0-6 (* 1310.72 (the float (mod s5-2 25)))) + (f30-2 (sin f0-6)) + (f0-8 (* 109.22667 (the float (mod s5-2 600)))) + (s5-3 (/ (mod s5-2 125) 25)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) f30-2) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.15 (cos f0-8)))) + (set! (-> arg0 times 3 w) (if (zero? s5-3) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 4 w) (if (= s5-3 1) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 5 w) (if (= s5-3 2) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 6 w) (if (= s5-3 3) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 7 w) (if (= s5-3 4) + f30-2 + 0.0 + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/lfaccity-mood.gc b/goal_src/jak3/levels/factory/lfaccity-mood.gc index 7701cc67b1..5d8e2dfbd9 100644 --- a/goal_src/jak3/levels/factory/lfaccity-mood.gc +++ b/goal_src/jak3/levels/factory/lfaccity-mood.gc @@ -5,5 +5,212 @@ ;; name in dgo: lfaccity-mood ;; dgos: LFACB, LFACCITY +(declare-type lfaccity-pparticle-mover process-drawable) + ;; DECOMP BEGINS +(define *faccity-part-updater* (the-as lfaccity-pparticle-mover #f)) + +(deftype lfaccity-states (structure) + ((light light-state :inline) + (roty float) + (rotz float) + (rot-bob float) + (wobble float) + (bob float) + (zero-test int32) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defbehavior update-mood-lfaccity time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (let ((gp-1 (the-as object (-> arg0 state)))) + (cond + ((level-get *level* 'factoryb) + (set-vector! (-> *math-camera* trans-other) 1228800.0 (-> (the-as lfaccity-states gp-1) bob) 1228800.0 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set-vector! s3-0 -409600.0 0.0 0.0 1.0) + (vector-rotate-y! s3-0 s3-0 (-> (the-as lfaccity-states gp-1) roty)) + (vector+! (-> *math-camera* trans-other) (-> *math-camera* trans-other) s3-0) + ) + ) + ((or (level-get *level* 'factoryc) (level-get *level* 'factoryd)) + (set-vector! + (-> *math-camera* trans-other) + 696320.0 + (+ -614400.0 (-> (the-as lfaccity-states gp-1) bob)) + -368640.0 + 1.0 + ) + ) + ) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (let ((s5-1 *math-camera*)) + (when (not (paused?)) + (let ((s3-1 (new 'stack-no-clear 'quaternion)) + (s4-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! s3-1 *y-vector* (-> (the-as lfaccity-states gp-1) roty)) + (quaternion-vector-angle! s4-1 *z-vector* (-> (the-as lfaccity-states gp-1) wobble)) + (quaternion*! (-> s5-1 quat-other) s4-1 s3-1) + ) + (let ((f0-17 (+ (-> (the-as lfaccity-states gp-1) roty) (* 910.2222 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) roty) (- f0-17 (* (the float (the int (/ f0-17 65536.0))) 65536.0))) + ) + (let ((f0-20 (+ (-> (the-as lfaccity-states gp-1) rotz) (* 8192.0 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) rotz) (- f0-20 (* (the float (the int (/ f0-20 65536.0))) 65536.0))) + ) + (set! (-> (the-as lfaccity-states gp-1) wobble) (* 910.2222 (sin (-> (the-as lfaccity-states gp-1) rotz)))) + (let ((f0-26 (+ (-> (the-as lfaccity-states gp-1) rot-bob) (* 16384.0 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) rot-bob) + (- f0-26 (* (the float (the int (/ f0-26 65536.0))) 65536.0)) + ) + ) + (set! (-> (the-as lfaccity-states gp-1) bob) + (+ -40960.0 (* 40960.0 (sin (-> (the-as lfaccity-states gp-1) rot-bob)))) + ) + (send-event *faccity-part-updater* 'mood-update) + ) + ) + ) + ) + (none) + ) + +(deftype faccity-pparticle-info (structure) + ((original-pos vector :inline) + (inited? symbol) + ) + ) + + +(deftype faccity-pparticle-array (inline-array-class) + ((data faccity-pparticle-info :inline :dynamic) + ) + ) + + +(set! (-> faccity-pparticle-array heap-base) (the-as uint 32)) + +(deftype lfaccity-pparticle-mover (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (particles faccity-pparticle-array) + ) + (:state-methods + active + ) + (:methods + (mood-update (_type_) symbol) + ) + ) + + +(defmethod init-from-entity! ((this lfaccity-pparticle-mover) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this root) (new 'process 'trsqv)) + (if (<= (-> this actor-group-count) 0) + (go process-drawable-art-error "actor group") + ) + (set! (-> this entity extra vis-dist) 40960000000000.0) + (set! (-> this particles) (new 'process 'faccity-pparticle-array (-> this actor-group 0 length))) + (dotimes (v1-18 (-> this particles length)) + (set! (-> this particles data v1-18 inited?) #f) + ) + (set! *faccity-part-updater* this) + (go (method-of-object this active)) + ) + +(defbehavior lfaccity-pparticle-mover-init-by-other lfaccity-pparticle-mover ((arg0 entity-actor)) + (init-from-entity! self arg0) + ) + +(defstate active (lfaccity-pparticle-mover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('mood-update) + (mood-update self) + ) + ) + ) + :code sleep-code + ) + +(defmethod run-logic? ((this lfaccity-pparticle-mover)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod deactivate ((this lfaccity-pparticle-mover)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *faccity-part-updater* #f) + (call-parent-method this) + (none) + ) + +(defmethod mood-update ((this lfaccity-pparticle-mover)) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> *math-camera* quat-other)))) + (dotimes (s4-0 (-> this particles length)) + (cond + ((-> this particles data s4-0 inited?) + (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (the-as vector (-> this particles data s4-0)) s5-0)) + (a1-4 (-> this actor-group 0 data s4-0 actor)) + ) + (when a1-4 + (let ((a1-5 (-> a1-4 extra process))) + (when a1-5 + (set! (-> (the-as process-drawable a1-5) root trans quad) (-> v1-6 quad)) + (vector+! + (-> (the-as process-drawable a1-5) root trans) + (-> (the-as process-drawable a1-5) root trans) + (-> *math-camera* trans-other) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-14 (-> this actor-group 0 data s4-0 actor))) + (when v1-14 + (set! (-> this particles data s4-0 original-pos quad) (-> v1-14 extra trans quad)) + (set! (-> this particles data s4-0 inited?) #t) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod relocate ((this lfaccity-pparticle-mover) (offset int)) + (set! *faccity-part-updater* this) + (if *faccity-part-updater* + (set! *faccity-part-updater* (&+ *faccity-part-updater* offset)) + ) + (if (nonzero? (-> this particles)) + (&+! (-> this particles) offset) + ) + (call-parent-method this offset) + ) diff --git a/goal_src/jak3/levels/precursor/hover-nav-precura.gc b/goal_src/jak3/levels/precursor/hover-nav-precura.gc index f230e8c34d..e0743fc108 100644 --- a/goal_src/jak3/levels/precursor/hover-nav-precura.gc +++ b/goal_src/jak3/levels/precursor/hover-nav-precura.gc @@ -7,3 +7,637 @@ ;; DECOMP BEGINS +(define *precura-adjacency* + (new 'static 'nav-network-data + :node-array (new 'static 'boxed-array :type nav-network-info + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :parent #f) + :pos (new 'static 'vector :x 155320.31 :y 2275000.2 :z -253829.12 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 97320.96) + (new 'static 'nav-network-adjacency :index 23 :dist 81141.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 173219.84 :y 2275000.2 :z -149340.16 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 103505.92) + (new 'static 'nav-network-adjacency :index 24 :dist 83312.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 184770.56 :y 2180259.8 :z -189399.05 :w 1.0) + :index 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 103505.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 175063.05 :y 2180259.8 :z -263946.25 :w 1.0) + :index 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 (new 'static 'nav-network-adjacency :dist 97320.96)) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 153722.88 :y 2289991.8 :z 150568.95 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 86548.48) + (new 'static 'nav-network-adjacency :index 26 :dist 136929.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 152453.12 :y 2247188.5 :z 225812.48 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 86548.48) + (new 'static 'nav-network-adjacency :index 6 :dist 99409.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 232693.77 :y 2190991.2 :z 242606.08 :w 1.0) + :index 6 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 99409.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 632709.1 :y 2243788.8 :z -189972.48 :w 1.0) + :index 7 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 39198.72) + (new 'static 'nav-network-adjacency :index 16 :dist 110510.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 593551.4 :y 2243788.8 :z -192307.2 :w 1.0) + :index 8 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 7 :dist 39198.72) + (new 'static 'nav-network-adjacency :index 9 :dist 47308.8) + (new 'static 'nav-network-adjacency :index 17 :dist 110387.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 546693.1 :y 2243788.8 :z -198656.0 :w 1.0) + :index 9 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 8 :dist 47308.8) + (new 'static 'nav-network-adjacency :index 10 :dist 93020.16) + (new 'static 'nav-network-adjacency :index 18 :dist 109363.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 483450.88 :y 2243788.8 :z -266895.38 :w 1.0) + :index 10 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 9 :dist 93020.16) + (new 'static 'nav-network-adjacency :index 11 :dist 105594.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 484024.3 :y 2272174.0 :z -368599.03 :w 1.0) + :index 11 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 10 :dist 105594.88) + (new 'static 'nav-network-adjacency :index 12 :dist 71106.56) + (new 'static 'nav-network-adjacency :index 19 :dist 97812.48) + (new 'static 'nav-network-adjacency :index 20 :dist 107069.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 555130.9 :y 2272174.0 :z -367861.75 :w 1.0) + :index 12 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 71106.56) + (new 'static 'nav-network-adjacency :index 13 :dist 48906.24) + (new 'static 'nav-network-adjacency :index 20 :dist 103464.96) + (new 'static 'nav-network-adjacency :index 21 :dist 104120.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 570736.6 :y 2272174.0 :z -321495.03 :w 1.0) + :index 13 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 12 :dist 48906.24) + (new 'static 'nav-network-adjacency :index 14 :dist 49233.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 568074.25 :y 2272174.0 :z -272343.03 :w 1.0) + :index 14 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 13 :dist 49233.92) + (new 'static 'nav-network-adjacency :index 15 :dist 62709.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 607887.4 :y 2272174.0 :z -223846.4 :w 1.0) + :index 15 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 14 :dist 62709.76) + (new 'static 'nav-network-adjacency :index 22 :dist 111329.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 611205.1 :y 2137948.2 :z -166584.31 :w 1.0) + :index 16 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 110510.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 577331.2 :y 2137948.2 :z -165478.4 :w 1.0) + :index 17 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 8 :dist 110387.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 542105.6 :y 2137948.2 :z -171540.48 :w 1.0) + :index 18 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 109363.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 480256.0 :y 2178048.0 :z -394936.3 :w 1.0) + :index 19 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 11 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 525189.1 :y 2178048.0 :z -398704.62 :w 1.0) + :index 20 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 11 :dist 107069.44) + (new 'static 'nav-network-adjacency :index 12 :dist 103464.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 591872.0 :y 2178048.0 :z -392847.38 :w 1.0) + :index 21 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 104120.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 631521.25 :y 2178048.0 :z -278446.1 :w 1.0) + :index 22 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 15 :dist 111329.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 236093.44 :y 2270126.0 :z -259768.31 :w 1.0) + :index 23 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 81141.76) + (new 'static 'nav-network-adjacency :index 24 :dist 63242.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 241541.12 :y 2270126.0 :z -196730.88 :w 1.0) + :index 24 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 83312.64) + (new 'static 'nav-network-adjacency :index 23 :dist 63242.24) + (new 'static 'nav-network-adjacency :index 25 :dist 73809.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 263168.0 :y 2270126.0 :z -126197.76 :w 1.0) + :index 25 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 24 :dist 73809.92) + (new 'static 'nav-network-adjacency :index 26 :dist 193863.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 260874.23 :y 2270126.0 :z 67665.92 :w 1.0) + :index 26 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 136929.28) + (new 'static 'nav-network-adjacency :index 25 :dist 193863.69) + (new 'static 'nav-network-adjacency :index 27 :dist 129720.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 258252.8 :y 2323169.2 :z 185999.36 :w 1.0) + :index 27 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 26 :dist 129720.32) + (new 'static 'nav-network-adjacency :index 28 :dist 40427.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 232939.52 :y 2323169.2 :z 217497.6 :w 1.0) + :index 28 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 40427.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 876871.7 :y 2194350.0 :z -19251.2 :w 1.0) + :index 29 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 30 :dist 37724.16) + (new 'static 'nav-network-adjacency :index 34 :dist 91299.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 914595.8 :y 2194350.0 :z -19660.8 :w 1.0) + :index 30 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 29 :dist 37724.16) + (new 'static 'nav-network-adjacency :index 31 :dist 39936.0) + (new 'static 'nav-network-adjacency :index 34 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 954531.8 :y 2194350.0 :z -19496.96 :w 1.0) + :index 31 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 30 :dist 39936.0) + (new 'static 'nav-network-adjacency :index 32 :dist 37642.24) + (new 'static 'nav-network-adjacency :index 33 :dist 89292.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x 992092.2 :y 2194350.0 :z -21667.84 :w 1.0) + :index 32 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 31 :dist 37642.24) + (new 'static 'nav-network-adjacency :index 33 :dist 88350.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x 977551.4 :y 2274304.0 :z 12943.36 :w 1.0) + :index 33 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 31 :dist 89292.8) + (new 'static 'nav-network-adjacency :index 32 :dist 88350.72) + (new 'static 'nav-network-adjacency :index 34 :dist 69427.2) + (new 'static 'nav-network-adjacency :index 35 :dist 87531.52) + (new 'static 'nav-network-adjacency :index 39 :dist 87244.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x 908124.2 :y 2274304.0 :z 11837.44 :w 1.0) + :index 34 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 29 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 30 :dist 86179.84) + (new 'static 'nav-network-adjacency :index 33 :dist 69427.2) + (new 'static 'nav-network-adjacency :index 35 :dist 84500.48) + (new 'static 'nav-network-adjacency :index 39 :dist 81756.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x 940277.75 :y 2279997.5 :z -66068.48 :w 1.0) + :index 35 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 87531.52) + (new 'static 'nav-network-adjacency :index 34 :dist 84500.48) + (new 'static 'nav-network-adjacency :index 36 :dist 210984.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x 935976.94 :y 2279997.5 :z -277012.47 :w 1.0) + :index 36 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 35 :dist 210984.95) + (new 'static 'nav-network-adjacency :index 37 :dist 73359.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x 876789.75 :y 2279997.5 :z -320430.1 :w 1.0) + :index 37 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 36 :dist 73359.36) + (new 'static 'nav-network-adjacency :index 38 :dist 64471.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x 812728.3 :y 2279997.5 :z -327311.38 :w 1.0) + :index 38 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 37 :dist 64471.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x 934993.94 :y 2252636.2 :z 85975.04 :w 1.0) + :index 39 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 34 :dist 81756.16) + (new 'static 'nav-network-adjacency :index 40 :dist 131072.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x 1011507.2 :y 2215198.8 :z 185630.72 :w 1.0) + :index 40 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 39 :dist 131072.0) + (new 'static 'nav-network-adjacency :index 41 :dist 179691.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x 1152450.5 :y 2198446.0 :z 295854.1 :w 1.0) + :index 41 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 179691.52) + (new 'static 'nav-network-adjacency :index 42 :dist 135741.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x 1048125.44 :y 2184806.5 :z 381665.28 :w 1.0) + :index 42 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 135741.44) + (new 'static 'nav-network-adjacency :index 43 :dist 183541.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x 917012.5 :y 2120540.2 :z 492830.72 :w 1.0) + :index 43 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 42 :dist 183541.77) + (new 'static 'nav-network-adjacency :index 44 :dist 160808.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x 985210.9 :y 2077532.1 :z 631971.8 :w 1.0) + :index 44 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 43 :dist 160808.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x 992419.8 :y 2083635.2 :z 907796.5 :w 1.0) + :index 45 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 46 :dist 127754.24) + (new 'static 'nav-network-adjacency :index 47 :dist 117800.96) + (new 'static 'nav-network-adjacency :index 50 :dist 116244.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x 993730.56 :y 2083635.2 :z 780001.25 :w 1.0) + :index 46 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 45 :dist 127754.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x 995328.0 :y 1966202.9 :z 899112.94 :w 1.0) + :index 47 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 45 :dist 117800.96) + (new 'static 'nav-network-adjacency :index 48 :dist 68853.76) + (new 'static 'nav-network-adjacency :index 49 :dist 70082.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x 1031454.75 :y 1966202.9 :z 840458.25 :w 1.0) + :index 48 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 47 :dist 68853.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x 952811.5 :y 1966202.9 :z 843407.4 :w 1.0) + :index 49 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 47 :dist 70082.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x 991232.0 :y 2083635.2 :z 1024040.94 :w 1.0) + :index 50 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 45 :dist 116244.48) + (new 'static 'nav-network-adjacency :index 51 :dist 122675.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x 946298.9 :y 2083635.2 :z 1138196.5 :w 1.0) + :index 51 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 50 :dist 122675.2) + (new 'static 'nav-network-adjacency :index 52 :dist 104857.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x 866672.6 :y 2083635.2 :z 1206435.9 :w 1.0) + :index 52 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 51 :dist 104857.6) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 7 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 9 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 22 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 23 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 24 :radius 20889.6) + (new 'static 'nav-network-edge :start-index 24 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 35553.28) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 46694.4) + (new 'static 'nav-network-edge :start-index 26 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 27 :radius 24780.8) + (new 'static 'nav-network-edge :start-index 27 :end-index 28 :radius 18841.6) + (new 'static 'nav-network-edge :start-index 29 :end-index 30 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 29 :end-index 34 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 30 :end-index 31 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 31 :end-index 33 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 32 :end-index 31 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 33 :end-index 32 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 34 :end-index 30 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 34 :end-index 35 :radius 19456.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 35 :end-index 33 :radius 19251.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 35 :end-index 36 :radius 22118.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 36 :end-index 37 :radius 19988.48 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 37 :end-index 38 :radius 21299.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 39 :end-index 33 :radius 29941.76 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 39 :end-index 34 :radius 33013.76 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 40 :end-index 39 :radius 25968.64 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 41 :end-index 40 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 42 :end-index 41 :radius 38215.68 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 43 :end-index 42 :radius 45875.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 44 :end-index 43 :radius 17203.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 45 :end-index 46 :radius 25804.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 45 :end-index 50 :radius 36945.92 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 45 :radius 17612.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 48 :radius 22937.6 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 49 :radius 19251.2 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 50 :end-index 51 :radius 23961.6 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 51 :end-index 52 :radius 35553.28 :sub-graph 3) + ) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precura-mood.gc b/goal_src/jak3/levels/precursor/precura-mood.gc index a59c3da2d9..e1780de721 100644 --- a/goal_src/jak3/levels/precursor/precura-mood.gc +++ b/goal_src/jak3/levels/precursor/precura-mood.gc @@ -7,3 +7,256 @@ ;; DECOMP BEGINS +(deftype precura-states (structure) + ((pulse pulse-state :inline) + (generator pulse-state :inline) + (main float) + (target-laser float 2) + (current-laser float 2) + (speed-laser float) + (target-bomb float) + (current-bomb float) + (speed-bomb float) + ) + ) + + +(defun init-mood-precura ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (set! (-> v1-0 3) (the-as uint 1.0)) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 6) (the-as uint 1.0)) + (let ((f0-5 2.0)) + (set! (-> v1-0 7) (the-as uint f0-5)) + f0-5 + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-precura-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a0-1 (-> v1-0 0))) + (set! (-> a0-1 dir0 direction x) 0.0) + (set! (-> a0-1 dir0 direction y) 1.0) + (set! (-> a0-1 dir0 direction z) 0.0) + (set! (-> a0-1 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.5 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.25 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + (none) + ) + +(defbehavior update-mood-precura time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precura-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((gp-0 (the-as object (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (update-mood-pulse arg0 4 16 1.0 0.125 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-10 (-> *display* part-clock frame-counter)) + (f0-7 (* 218.45334 (the float (mod v1-10 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-7)))) + ) + (set! (-> arg0 times 5 w) (-> (the-as precura-states gp-0) current-bomb)) + (set! (-> arg0 times 6 w) (-> (the-as precura-states gp-0) current-laser 0)) + (set! (-> arg0 times 7 w) (-> (the-as precura-states gp-0) current-laser 1)) + (when (not (paused?)) + (seek! + (-> (the-as precura-states gp-0) current-bomb) + (-> (the-as precura-states gp-0) target-bomb) + (-> (the-as precura-states gp-0) speed-bomb) + ) + (seek! + (-> (the-as precura-states gp-0) current-laser 0) + (-> (the-as precura-states gp-0) target-laser 0) + (-> (the-as precura-states gp-0) speed-laser) + ) + (seek! + (-> (the-as precura-states gp-0) current-laser 1) + (-> (the-as precura-states gp-0) target-laser 1) + (-> (the-as precura-states gp-0) speed-laser) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-precura-generator-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) generator target-brightness) arg0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-precura-laser-light! ((arg0 float) (arg1 float) (arg2 int)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) target-laser arg2) arg0) + (set! (-> (the-as precura-states v1-2) speed-laser) arg1) + (if (= arg1 0.0) + (set! (-> (the-as precura-states (+ (* arg2 4) (the-as int v1-2))) current-laser 0) arg0) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-precura-bomb-light! ((arg0 float) (arg1 float)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) target-bomb) arg0) + (set! (-> (the-as precura-states v1-2) speed-bomb) arg1) + ) + ) + ) + (none) + ) + +(deftype precurb-states (structure) + ((pulse pulse-state :inline) + (main float) + ) + ) + + +(defun init-mood-precurb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +(defbehavior update-mood-precurb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precura-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-9 (-> *display* part-clock frame-counter)) + (f0-5 (* 218.45334 (the float (mod v1-9 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-5)))) + ) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +(deftype lprecurc-loader (process) + () + (:state-methods + idle + die + ) + ) + + +(defstate idle (lprecurc-loader) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('deactivate) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set-setting! 'borrow '((precurc 0 lprecurc copy)) 0.0 0) + (apply-settings *setting-control*) + ) + :exit (behavior () + (remove-setting! 'borrow) + (apply-settings *setting-control*) + ) + :code sleep-code + ) + +(defstate die (lprecurc-loader) + :virtual #t + :code (behavior () + '() + ) + ) + +(defbehavior lprecurc-loader-init-by-other lprecurc-loader ((arg0 level)) + (set! (-> self level) arg0) + (go-virtual idle) + ) + +(defun precura-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +(defun precura-activate ((arg0 level)) + (persist-with-delay + *setting-control* + 'precur-activate + (the-as time-frame (the-as uint #xb2d05e00)) + 'sky-type + 'star-field + 0.0 + 0 + ) + (process-spawn lprecurc-loader arg0 :name "lprecurc-loader" :to *entity-pool*) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *precura-adjacency*) + ) + (none) + ) + +(defun precura-deactivate ((arg0 level)) + (persist-with-delay *setting-control* 'precur-activate 0 'sky-type #f 0.0 0) + (none) + ) + +(defun precura-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/precursor/precura-obs.gc b/goal_src/jak3/levels/precursor/precura-obs.gc index 5107801064..738a3f1256 100644 --- a/goal_src/jak3/levels/precursor/precura-obs.gc +++ b/goal_src/jak3/levels/precursor/precura-obs.gc @@ -5,5 +5,2606 @@ ;; name in dgo: precura-obs ;; dgos: PRECA +;; +++precur-hint-type +(defenum precur-hint-type + :type uint8 + (pickup-hint) + (place-hint) + (normal) + ) +;; ---precur-hint-type + + ;; DECOMP BEGINS +(defun spawn-mech-shock-effect () + (process-spawn-function + process + (lambda :behavior process + () + (let ((gp-0 (current-time)) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 (seconds 1)) + (when (time-elapsed? gp-0 (seconds 0.03)) + (set! gp-0 (current-time)) + (process-drawable-shock-effect + *target* + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + (suspend) + ) + ) + #f + ) + :to *target* + ) + 0 + (none) + ) + +(deftype precur-switch (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + idle + going-down + going-up + idle-down + ) + ) + + +(defskelgroup skel-precur-switch precur-switch 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 4)) + +(defstate idle (precur-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual going-down) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! (-> self draw art-group data 2) :num! zero) + (transform-post) + ) + :trans rider-trans + :code sleep-code + :post rider-post + ) + +(defstate going-down (precur-switch) + :virtual #t + :enter (behavior () + (sound-play "bridge-button") + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle-down) + ) + :post rider-post + ) + +(defstate going-up (precur-switch) + :virtual #t + :trans rider-trans + :code (behavior () + (let* ((v1-0 (-> self alt-actor)) + (a0-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-0 + (send-event a0-0 'stop-rotate) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! 0.0) :frame-num 1.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (go-virtual idle) + ) + :post rider-post + ) + +(defstate idle-down (precur-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (let ((v0-0 (current-time))) + (set! (-> self state-time) v0-0) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (go-virtual going-up) + ) + ) + :code (behavior () + (let* ((v1-0 (-> self alt-actor)) + (a0-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-0 + (send-event a0-0 'start-rotate) + ) + ) + (sleep-code) + ) + :post rider-post + ) + +(defmethod init-from-entity! ((this precur-switch) (arg0 entity-actor)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-16 transform-index) 4) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-19 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype precur-jump-plate (process-drawable) + ((start-quat quaternion :inline) + (turn-start time-frame) + (angle float) + (first? symbol) + (idx uint8) + (sound-id sound-id) + ) + (:state-methods + idle + turn + ) + ) + + +(defskelgroup skel-precur-jump-plate precur-jump-plate precur-jump-plate-lod0-jg precur-jump-plate-idle-ja + ((precur-jump-plate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defstate idle (precur-jump-plate) + :virtual #t + :enter (behavior () + (transform-post) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + ) + :code (behavior () + (local-vars (v1-3 time-frame) (a0-3 float) (f0-0 float)) + (let ((gp-0 (current-time))) + (until (>= v1-3 (the int (* f0-0 a0-3))) + (suspend) + (set! v1-3 (- (current-time) gp-0)) + (set! f0-0 300.0) + (set! a0-3 (if (-> self first?) + (the float (-> self idx)) + 2.0 + ) + ) + ) + ) + (set! (-> self first?) #f) + (go-virtual turn) + ) + :post rider-post + ) + +(defmethod run-logic? ((this precur-jump-plate)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate turn (precur-jump-plate) + :virtual #t + :enter (behavior () + (set-time! (-> self turn-start)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-stop") + ) + :trans (behavior () + float + (set! (-> self angle) + (the float (sar (shl (the int (* 72.81778 (the float (- (current-time) (-> self turn-start))))) 48) 48)) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self start-quat) (-> self angle)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :pitch 1) + (when #f + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :position (-> self root trans)) + ) + (when #f + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :position (-> self root trans)) + ) + (when (and (< (seconds 1) (- (current-time) (-> self turn-start))) + (< 0.0 (-> self angle)) + (< (-> self angle) 3640.889) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self start-quat) 0.0) + (go-virtual idle) + ) + (rider-trans) + ) + :code sleep-code + :post (behavior () + (if (< (fabs (-> self angle)) 8192.0) + (rider-post) + (ja-post) + ) + ) + ) + +(defmethod init-from-entity! ((this precur-jump-plate) (arg0 entity-actor)) + (set-time! (-> this state-time)) + (set-time! (-> this turn-start)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 2) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-22 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-jump-plate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (quaternion-copy! (-> this start-quat) (-> this root quat)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this first?) #t) + (set! (-> this idx) (the-as uint (the int (* 0.000027126736 (+ 147456.0 (-> this root trans z)))))) + (go (method-of-object this idle)) + ) + +(set! (-> *lightning-spec-id-table* 36) (new 'static 'lightning-spec + :name "generator-lightning-shock" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :end-color (new 'static 'rgba :b #xff :a #xff) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3b :page #x4) + :reduction 0.6 + :num-points 20 + :box-size 40960.0 + :merge-factor 0.5 + :merge-count 2 + :radius 3276.8 + :duration 210.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 37) (new 'static 'lightning-spec + :name "generator-lightning-shock-target" + :flags (lightning-spec-flags lsf2) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.5 + :num-points 16 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 4096.0 + :duration -1.0 + :sound #f + ) + ) + +(defpartgroup group-debug-placeholder-multiple-generator + :id 1324 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4445 :flags (sp7))) + ) + +(defpart 4445 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 2)) + (:flags ()) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(deftype precur-generator (process-drawable) + ((root collide-shape :override) + (attack-id uint32) + (shove-id uint32) + (sound-id sound-id) + (next-lightning-time uint32) + (shock-distance float) + ) + (:state-methods + idle + explode + ) + (:methods + (init-fields (_type_) none) + ) + ) + + +(defstate idle (precur-generator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (format 0 "explode-event~%") + (if (type? proc explosion) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (local-vars (sv-128 symbol) (sv-144 vector)) + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 40960.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + (when (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) (-> self shock-distance)) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0)) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.3)) + (send-event + *target* + 'shove + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self shove-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector gp-1) + (shove-back (meters 2)) + (shove-up (meters 1.5)) + ) + ) + ) + ) + (let ((gp-2 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-2 + (let ((t9-10 (method-of-type lightning-tracker activate))) + (t9-10 (the-as lightning-tracker gp-2) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-2 run-function-in-process) + (s4-0 gp-2) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 37)) + (s1-0 90) + (s0-0 #f) + ) + (set! sv-128 (the-as symbol #f)) + (set! sv-144 (new 'stack-no-clear 'vector)) + (set! (-> sv-144 x) (-> (target-pos 0) x)) + (let* ((f30-0 (-> (target-pos 0) y)) + (f28-0 4096.0) + (f26-0 1.0) + (f24-0 4.0) + (v1-35 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-36 (the-as number (logior #x3f800000 v1-35))) + ) + (set! (-> sv-144 y) (+ f30-0 (* f28-0 (+ f26-0 (* f24-0 (+ -1.0 (the-as float v1-36))))))) + ) + (set! (-> sv-144 z) (-> (target-pos 0) z)) + (set! (-> sv-144 w) 1.0) + (let ((t3-0 (-> self root trans))) + ((the-as (function object object object object object object object object none) s5-2) + s4-0 + s3-0 + s2-0 + s1-0 + s0-0 + sv-128 + sv-144 + t3-0 + ) + ) + ) + (-> gp-2 ppointer) + ) + ) + (if *target* + (spawn-mech-shock-effect) + ) + ) + ) + :code sleep-code + ) + +(defstate explode (precur-generator) + :virtual #t + :enter (behavior () + (sound-play "gen-explode") + ) + :code sleep-code + ) + +(defmethod init-fields ((this precur-generator)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this next-lightning-time) (the-as uint 0)) + (let* ((v1-0 *game-info*) + (a0-2 (+ (-> v1-0 attack-id) 1)) + ) + (set! (-> v1-0 attack-id) a0-2) + (set! (-> this attack-id) a0-2) + ) + (let* ((v1-1 *game-info*) + (a0-4 (+ (-> v1-1 attack-id) 1)) + ) + (set! (-> v1-1 attack-id) a0-4) + (set! (-> this shove-id) a0-4) + ) + (set! (-> this shock-distance) 61440.0) + 0 + (none) + ) + +(deftype precur-generator-a (precur-generator) + () + ) + + +(defskelgroup skel-precur-generator-a precur-generator-a precur-generator-a-lod0-jg precur-generator-a-idle-ja + ((precur-generator-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defskelgroup skel-precur-generator-a-explode precur-generator-a precur-generator-a-explode-lod0-jg precur-generator-a-explode-idle-ja + ((precur-generator-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(define *precur-generator-a-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (precur-generator-a) + :virtual #t + :enter (behavior () + (set-precura-generator-light! 1.0) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type precur-generator idle) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate explode (precur-generator-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-36 (-> self root root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-stop (-> self sound-id)) + (set-precura-generator-light! 0.0) + (format 0 "tag1~%") + (let ((t9-11 (-> (method-of-type precur-generator explode) enter))) + (if t9-11 + (t9-11) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-a-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-a-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this precur-generator-a) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-13 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-fields this) + (go (method-of-object this idle)) + ) + +(deftype precur-generator-b (precur-generator) + () + ) + + +(defskelgroup skel-precur-generator-b precur-generator-b precur-generator-b-lod0-jg precur-generator-b-idle-ja + ((precur-generator-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +(defskelgroup skel-precur-generator-b-explode precur-generator-b precur-generator-b-explode-lod0-jg precur-generator-b-explode-idle-ja + ((precur-generator-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(define *precur-generator-b-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (precur-generator-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (if (type? proc explosion) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type precur-generator idle) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate explode (precur-generator-b) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-36 (-> self root root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-stop (-> self sound-id)) + (let ((t9-9 (-> (method-of-type precur-generator explode) enter))) + (if t9-9 + (t9-9) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-b-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-b-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this precur-generator-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-fields this) + (set! (-> this shock-distance) 40960.0) + (go (method-of-object this idle)) + ) + +(deftype precur-generator-c (process-drawable) + ((root collide-shape :override) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (next-lightning-time uint32) + (sound-id sound-id) + ) + (:state-methods + idle + explode + ) + ) + + +(defskelgroup skel-precur-generator-c precur-generator-c precur-generator-c-lod0-jg precur-generator-c-idle-ja + ((precur-generator-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +(defskelgroup skel-precur-generator-c-explode precur-generator-c precur-generator-c-explode-lod0-jg precur-generator-c-explode-idle-ja + ((precur-generator-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(define *precur-generator-c-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (precur-generator-c) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (type? proc explosion) + (when (nonzero? (-> self actor-group-count)) + (dotimes (gp-0 (length (-> self actor-group 0))) + (let ((v1-5 (-> self actor-group 0 data gp-0))) + (when v1-5 + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'trigger) + (let ((t9-1 send-event-function) + (v1-6 (-> v1-5 actor)) + ) + (t9-1 + (if v1-6 + (-> v1-6 extra process) + ) + a1-3 + ) + ) + ) + 0 + ) + ) + ) + ) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 81920.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate explode (precur-generator-c) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-stop (-> self sound-id)) + (let ((t9-7 (-> (method-of-type precur-generator explode) enter))) + (if t9-7 + (t9-7) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-c-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-c-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1.2)) + (suspend) + ) + ) + (when (res-lump-struct (-> self entity) 'art-name structure) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-grab? *target* #f) + (set-setting! 'entity-name "camera-359" 0.0 0) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (task-close! "precursor-tour-generator-trigger") + (send-event (process-by-name "precur-door-b-4" *active-pool*) 'open) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 1)) + (suspend) + ) + ) + (set-setting! 'interp-time 'abs 450.0 0) + (remove-setting! 'entity-name) + (process-release? *target*) + (suspend) + 0 + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this precur-generator-c) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-13 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-id) (new-sound-id)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this next-lightning-time) (the-as uint 0)) + (set! (-> this entity) arg0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-19 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-19)) + ) + (else + (format 0 "ERROR: entity missing actor-group!~%") + ) + ) + ) + (go (method-of-object this idle)) + ) + +(deftype precur-generator-d-gem (process-drawable) + ((root collide-shape :override) + (ang-vel float) + (offset-vec vector :inline) + (init-pos vector :inline) + (sound-id sound-id) + ) + (:state-methods + idle + orbit-gen + smoking + explode + ) + ) + + +(defskelgroup skel-precur-generator-d-gem precur-generator-d-gem precur-generator-d-gem-lod0-jg precur-generator-d-gem-idle-ja + ((precur-generator-d-gem-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('spin) + (let ((v1-1 (the-as object (-> block param 0))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate orbit-gen (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual smoking) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (sound-play "gem-pain") + ) + :trans (behavior () + (sound-play "gem-airloop" :id (-> self sound-id)) + (vector-rotate-around-y! (-> self offset-vec) (-> self offset-vec) (* (-> self ang-vel) (seconds-per-frame))) + (vector+! (-> self root trans) (-> self init-pos) (-> self offset-vec)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self offset-vec quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate smoking (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (sound-play "gem-smokeloop" :id (-> self sound-id)) + (vector-rotate-around-y! + (-> self offset-vec) + (-> self offset-vec) + (* 3.0 (seconds-per-frame) (-> self ang-vel)) + ) + (vector+! (-> self root trans) (-> self init-pos) (-> self offset-vec)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self offset-vec quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! s5-0 3072.0) + (vector+! (-> self root trans) (-> self root trans) s5-0) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate explode (precur-generator-d-gem) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (type? (-> self root) collide-shape) + (let ((v1-4 (-> self root root-prim))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (cond + ((logtest? (-> *part-group-id-table* 1318 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1318)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1318)) + ) + ) + (sound-play "gem-explode") + ) + :code (behavior () + (suspend) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defbehavior precur-generator-d-gem-init-by-other precur-generator-d-gem ((arg0 vector) (arg1 float) (arg2 vector)) + (let ((s3-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s3-0 penetrated-by) (penetrate)) + (let ((s2-0 (new 'process 'collide-shape-prim-group s3-0 (the-as uint 1) 0))) + (set! (-> s3-0 total-prims) (the-as uint 2)) + (set! (-> s2-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s2-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s3-0 root-prim) s2-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s3-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w))) + (let ((v1-11 (-> s3-0 root-prim))) + (set! (-> s3-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s3-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s3-0) + ) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self offset-vec quad) (-> arg2 quad)) + (set! (-> self ang-vel) arg1) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1317) self)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self init-pos quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-precur-generator-d-gem" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (go-virtual orbit-gen) + ) + +(deftype precur-generator-d (process-drawable) + ((root collide-shape :override) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (next-lightning-time uint32) + (proc-handle handle 3) + (animation-speed float) + (sound-id sound-id) + ) + (:state-methods + idle + explode + explosions + ) + (:methods + (spawn-gems (_type_) none) + ) + ) + + +(defskelgroup skel-precur-generator-d precur-generator-d precur-generator-d-lod0-jg precur-generator-d-idle-ja + ((precur-generator-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +(defskelgroup skel-precur-generator-d-explode precur-generator-d precur-generator-d-explode-lod0-jg precur-generator-d-explode-idle-ja + ((precur-generator-d-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(define *precur-generator-d-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 24 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 25 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 26 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 27 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 28 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 29 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 30 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defmethod spawn-gems ((this precur-generator-d)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> this proc-handle 0) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + 14563.556 + (new 'static 'vector :x 61440.0 :y -40960.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + (set! (-> this proc-handle 1) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + -6553.6 + (new 'static 'vector :x 61440.0 :y -32768.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + (set! (-> this proc-handle 2) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + 11650.845 + (new 'static 'vector :x 61440.0 :y -53248.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + ) + (none) + ) + +(defstate idle (precur-generator-d) + :virtual #t + :trans (behavior () + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 163840.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + (let ((v1-10 (the-as object #f))) + (set! (-> self animation-speed) 0.5) + (dotimes (a0-7 3) + (set! v1-10 (or (handle->process (-> self proc-handle a0-7)) v1-10)) + (if (not v1-10) + (set! (-> self animation-speed) (* 2.0 (-> self animation-speed))) + ) + ) + (if (not v1-10) + (go-virtual explode) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! precur-generator-d-idle-ja :num! (seek! max (-> self animation-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self animation-speed))) + ) + ) + #f + ) + :post ja-post + ) + +(defstate explode (precur-generator-d) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-stop (-> self sound-id)) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) 0.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 0.0 0.0 0.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-d-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-d-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (go-virtual explosions) + ) + ) + +(defstate explosions (precur-generator-d) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (activate! *camera-smush-control* 2048.0 15 1500 1.0 0.9 (-> *display* camera-clock)) + (persist-with-delay *setting-control* 'blur-a (seconds 5) 'blur-a 'abs 0.8 0) + (disable *screen-filter*) + (process-grab? *target* #f) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (seconds 0.5))) + (suspend) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-0 105472.0) + (set! (-> gp-0 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-0 105472.0) + (set! (-> gp-0 y) -32768.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 0.033333335 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + (while (not (time-elapsed? (-> self state-time) (seconds 1.5))) + (suspend) + ) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-4 105472.0) + (set! (-> gp-4 y) -61440.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-4 105472.0) + (set! (-> gp-4 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (while (not (time-elapsed? (-> self state-time) (seconds 2))) + (suspend) + ) + (let ((gp-8 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-8 105472.0) + (set! (-> gp-8 y) -61440.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-8 105472.0) + (set! (-> gp-8 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (while (not (time-elapsed? (-> self state-time) (seconds 6))) + (suspend) + ) + (process-spawn scene-player :init scene-player-init "precursor-tour-res" #t #f :name "scene-player") + ) + ) + +(defmethod init-from-entity! ((this precur-generator-d) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this next-lightning-time) (the-as uint 0)) + (set! (-> this entity) arg0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this animation-speed) 0.5) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-18 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-18 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-18)) + ) + (else + (format 0 "ERROR: entity missing actor-group!~%") + ) + ) + ) + (dotimes (v1-20 3) + (set! (-> this proc-handle v1-20) (the-as handle #f)) + ) + (spawn-gems this) + (set! (-> this root scale z) 1.3) + (go (method-of-object this idle)) + ) + +(deftype precur-platform-round (process-drawable) + ((root collide-shape :override) + (start-quat quaternion :inline) + (start-height float) + (sound-id sound-id) + (start-dip-time float) + (last-ridden-time float) + ) + (:state-methods + idle + hidden-state + rotate-plat + fade-in + ) + (:methods + (precur-platform-round-method-24 () none) + ) + ) + + +(defskelgroup skel-precur-platform-round precur-platform-round precur-platform-round-lod0-jg precur-platform-round-idle-ja + ((precur-platform-round-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 17.5) + ) + +(defstate idle (precur-platform-round) + :virtual #t + :code sleep-code + :post ja-post + ) + +(defstate hidden-state (precur-platform-round) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('stop-rotate) + (go-virtual idle) + ) + (('trigger) + (go-virtual fade-in) + ) + ) + ) + :enter (behavior () + (when (type? (-> self root) collide-shape) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (collide-spec)) + (set! (-> v1-2 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (set! (-> self draw force-fade) (the-as uint 0)) + 0 + ) + :exit (behavior () + (when (type? (-> self root) collide-shape) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-2 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + ) + :code sleep-code + :post rider-post + ) + +(defstate fade-in (precur-platform-round) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "plat-appear") + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + ) + :trans (behavior () + (let ((f30-0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))))) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + (let ((f0-2 (fmax 0.0 (fmin 1.0 f30-0)))) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 f0-2)))) + (when (= f0-2 1.0) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + (go-virtual rotate-plat) + ) + ) + ) + (rider-trans) + ) + :code sleep-code + :post rider-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior rotate-platform-behavior precur-platform-round () + (add-debug-sphere + #t + (bucket-id debug) + (-> self node-list data 4 bone transform trans) + (meters 1) + *color-green* + ) + (sound-play "prec-plats" :id (-> self sound-id) :position (-> self root trans)) + (if (not (time-elapsed? (-> self state-time) (seconds 10))) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + ) + 0.0 + (let* ((f0-2 (* 0.00033333336 (the float (- (current-time) (-> self state-time))))) + (f0-3 (lerp 0.0 65536.0 f0-2)) + ) + (quaternion-rotate-local-y! (-> self root quat) (-> self start-quat) f0-3) + ) + (rider-trans) + (when (< 0.0 (-> self start-dip-time)) + (let ((f30-0 + (sin-rad + (* 0.010471975 (the float (- (current-time) (the-as time-frame (the int (-> self start-dip-time)))))) + ) + ) + ) + (when (< (seconds 1) (- (current-time) (the-as time-frame (the int (-> self start-dip-time))))) + (set! (-> self start-dip-time) -1.0) + (set! (-> self root trans y) (-> self start-height)) + (format 0 "end-dip~%") + ) + (set! (-> self root trans y) (+ (* -10240.0 f30-0) (-> self start-height))) + (format 0 "processing-dip: ~f~%" f30-0) + ) + ) + (none) + ) + +(defstate rotate-plat (precur-platform-round) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (persist-with-delay *setting-control* 'pilot-exit (seconds 0.5) 'pilot-exit #f 0.0 0) + ) + (('ridden) + (when (< (-> self start-dip-time) 0.0) + (when (< (seconds 0.1) (- (current-time) (the-as time-frame (the int (-> self last-ridden-time))))) + (set! (-> self start-dip-time) (the float (current-time))) + (format 0 "start-dip~%") + ) + ) + (set! (-> self last-ridden-time) (the float (current-time))) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans rotate-platform-behavior + :code sleep-code + :post rider-post + ) + +(defmethod init-from-entity! ((this precur-platform-round) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 71680.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 2) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 71680.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-16 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this start-dip-time) -1.0) + (set! (-> this start-height) (-> this root trans y)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-precur-platform-round" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (quaternion-copy! (-> this start-quat) (-> this root quat)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1314) this)) + (let* ((s5-2 (-> this part)) + (s4-2 (method-of-object s5-2 set-local-space-info)) + (s3-1 (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0)) + ) + (let ((v1-31 (process->handle this))) + (if (= v1-31 #f) + (set! v1-31 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-1) hand) (the-as handle v1-31)) + ) + (matrix-identity! (-> (the-as particle-local-space-info s3-1) mat-new)) + (matrix-identity! (-> (the-as particle-local-space-info s3-1) mat-prev)) + (set! (-> (the-as particle-local-space-info s3-1) flags) (part-local-space-flags)) + (s4-2 s5-2 (the-as particle-local-space-info s3-1)) + ) + (go (method-of-object this hidden-state)) + ) + +(deftype precur-door-d (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-precur-door-d precur-door-d precur-door-d-lod0-jg precur-door-d-idle-ja + ((precur-door-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(defskelgroup skel-precur-door-d-explode precur-door-d precur-door-d-explode-lod0-jg precur-door-d-explode-idle-ja + ((precur-door-d-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(define *precur-door-d-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (precur-door-d) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? proc process-drawable) + proc + ) + (the-as touching-shapes-entry (-> block param 0)) + ) + (if (logtest? (-> s3-0 mask) (attack-mask intersection)) + (go-virtual die) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (let ((gp-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> self root trans)))) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion-rotate-local-y! s5-0 s5-0 16384.0) + (when (= (status-of-level-and-borrows *level* 'lmech #f) 'active) + (mech-target-spawn + (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :x 8192.0 :w 1.0) gp-0) + self + s5-0 + (-> self entity) + ) + (mech-target-spawn + (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :x -8192.0 :w 1.0) gp-0) + self + s5-0 + (-> self entity) + ) + ) + ) + ) + :exit (behavior () + (while (-> self child) + (deactivate (-> self child 0)) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post transform-post + ) + +(defstate die (precur-door-d) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (sound-play "prec-break-door") + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-door-d-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-door-d-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this precur-door-d) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 71680.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 2) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 71680.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-12 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defbehavior precur-door-d-init-by-other precur-door-d ((arg0 object) (arg1 entity-actor)) + (process-entity-set! self arg1) + (init-from-entity! self arg1) + ) + +(defskelgroup skel-precur-door-c precur-door-c precur-door-c-lod0-jg precur-door-c-idle-ja + ((precur-door-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defskelgroup skel-precur-door-c-explode precur-door-c precur-door-c-explode-lod0-jg precur-door-c-explode-idle-ja + ((precur-door-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *precur-door-c-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(deftype precur-door-c (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + explode + ) + (:methods + (init-collision! (_type_) none) + (spawn-exploder (_type_) (pointer joint-exploder)) + ) + ) + + +(defbehavior precur-door-c-handler precur-door-c ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('spin 'dark-smack) + (go-virtual explode) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod spawn-exploder ((this precur-door-c)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f0-0 (rand-vu-float-range 0.5 1.5)) + ) + (let ((v1-1 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-4 (-> this root trans))) + (let ((a1-2 *up-vector*)) + (let ((a2-1 0.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> a0-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> v1-1 quad) vf6) + ) + (vector-reset! s4-0) + (let ((a1-3 s4-0)) + (let ((v1-3 s4-0)) + (let ((a0-5 *up-vector*)) + (let ((a2-3 40960.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-3 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-3 quad) vf6) + ) + (let ((a1-4 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-4 s4-0)) + (let ((a0-6 *identity-vector*)) + (let ((a2-5 (* -204800.0 f0-0))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-4 quad) vf6) + ) + (let ((a0-7 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-5 *identity-vector*)) + (let ((a1-6 (* 204800.0 f0-0))) + (.mov vf7 a1-6) + ) + (.lvf vf5 (&-> v1-5 quad)) + ) + (.lvf vf4 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 0.3) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-door-c-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-door-c-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +(defstate explode (precur-door-c) + :virtual #t + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (spawn-exploder self) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate idle (precur-door-c) + :virtual #t + :event precur-door-c-handler + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +(defmethod init-collision! ((this precur-door-c)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-12 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this precur-door-c) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defun-debug hint-type->string ((arg0 precur-hint-type)) + (case arg0 + (((precur-hint-type pickup-hint)) + "pickup-hint" + ) + (((precur-hint-type normal)) + "normal" + ) + (((precur-hint-type place-hint)) + "place-hint" + ) + (else + "*unknown*" + ) + ) + ) + +(deftype task-manager-precur-tour (task-manager) + ((hint-type precur-hint-type) + ) + ) + + +(defmethod set-time-limit ((this task-manager-precur-tour)) + (call-parent-method this) + (disable *screen-filter*) + (set-setting! 'gun-special-mode #t 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'music 'pretour 0.0 0) + (set! (-> this hint-type) (precur-hint-type normal)) + (none) + ) + +;; WARN: disable def twice: 12. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod taskman-event-handler ((this task-manager-precur-tour) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('pickup-hint) + (when (= (-> this hint-type) (precur-hint-type normal)) + (set! (-> this hint-type) (precur-hint-type pickup-hint)) + 0 + ) + ) + (('place-hint) + (when (= (-> this hint-type) (precur-hint-type pickup-hint)) + (let ((v0-0 (the-as object 1))) + (set! (-> this hint-type) (the-as precur-hint-type v0-0)) + v0-0 + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod task-manager-method-26 ((this task-manager-precur-tour)) + (cond + ((= (-> this hint-type) (precur-hint-type pickup-hint)) + (talker-spawn-func (-> *talker-speech* 348) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this hint-type) (precur-hint-type place-hint)) + (talker-spawn-func (-> *talker-speech* 349) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this hint-type) (precur-hint-type normal)) + (talker-spawn-func (-> *talker-speech* 350) *entity-pool* (target-pos 0) (the-as region #f)) + (talker-spawn-func (-> *talker-speech* 141) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (none) + ) + +(defskelgroup skel-precura-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +(deftype precura-door-a (process-drawable) + ((open-test pair) + (open-started time-frame) + (do-camera? symbol) + (open-frame float) + (precur-tour? symbol) + ) + (:state-methods + open + close + ) + (:methods + (precura-door-a-method-22 () none) + ) + ) + + +(defmethod init-from-entity! ((this precura-door-a) (arg0 entity-actor)) + (set! (-> this open-started) 0) + (set! (-> this open-frame) 45.0) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-14 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this precur-tour?) (task-node-open? (game-task-node precursor-tour-generator-trigger))) + (set! (-> this open-test) + (the-as + pair + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this do-camera?) + (the-as + symbol + (and (res-lump-struct (-> this entity) 'camera-name structure) + (task-node-closed? (game-task-node precursor-tour-resolution)) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precura-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 1228800.0) + (go (method-of-object this close)) + ) + +(defstate close (precura-door-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (when (script-eval (-> self open-test)) + (when (and (-> self precur-tour?) + (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (set-setting! 'entity-name "camera-420" 0.0 0) + (process-grab? *target* #f) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + (go-virtual open) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +(defun precura-do-blur-if-more-than-dist-away ((arg0 vector) (arg1 float)) + (let ((f0-0 (vector-vector-distance (target-pos 0) arg0))) + (when (< arg1 f0-0) + (persist-with-delay *setting-control* 'blur-a (seconds 2) 'blur-a 'abs 0.5 0) + (set! (-> *display* force-sync) (the-as uint 200)) + ) + ) + 0 + (none) + ) + +(defstate open (precura-door-a) + :virtual #t + :enter (behavior () + (cond + ((-> self precur-tour?) + (set-time! (-> self state-time)) + (set-time! (-> self open-started)) + ) + (else + (cond + ((and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (and (-> self do-camera?) (zero? (-> self open-started))) + ) + (precura-do-blur-if-more-than-dist-away (-> self root trans) 368640.0) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 900 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let* ((v1-19 (-> *game-info* sub-task-list (game-task-node precursor-destroy-ship-escape))) + (v1-21 (if (-> v1-19 manager) + (-> v1-19 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-21 + (send-event (handle->process v1-21) 'extra-time 1200) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set-time! (-> self open-started)) + ) + (else + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + ) + (set-time! (-> self state-time)) + ) + ) + ) + :code (behavior () + (when (-> self precur-tour?) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2.5)) + (suspend) + ) + ) + (remove-setting! 'entity-name) + (process-release? *target*) + ) + (sleep-code) + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= 0.0 (ja-frame-num 0)) + (sound-play "prec-door-open") + ) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0))) + ) + (transform-post) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precura-obs2.gc b/goal_src/jak3/levels/precursor/precura-obs2.gc index 3c6a43e9fd..5a8c60966a 100644 --- a/goal_src/jak3/levels/precursor/precura-obs2.gc +++ b/goal_src/jak3/levels/precursor/precura-obs2.gc @@ -5,5 +5,2633 @@ ;; name in dgo: precura-obs2 ;; dgos: PRECA +;; +++precur-hint-mode +(defenum precur-hint-mode + :type uint8 + (teach-bomb) + (normal) + ) +;; ---precur-hint-mode + + +(define-extern *precur-tour-lightning* lightning-appearance) + ;; DECOMP BEGINS +(defpartgroup group-kg-bomb-explosion + :id 1325 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6 sp7) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :scale (1.5 1.5 1.5) + :parts ((sp-item 4446 :flags (sp3)) + (sp-item 4447 :flags (sp3)) + (sp-item 4448 :flags (sp3)) + (sp-item 4449 :flags (sp3)) + ) + ) + +(defpart 4446 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4447 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4448 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4450 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -1) 2.0 (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 200.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4449 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -1) 2.0 (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.013333334)) + (:fade-g -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 4451) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4451 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-g -0.6666667) (:friction 0.99)) + ) + +(deftype mechblock (process-focusable) + ((root collide-shape-moving :override) + (origin vector :inline) + (drop-point vector :inline :offset 256) + (allow-drag? symbol) + (reset-on-land? symbol) + (nav-mesh nav-mesh) + (hit-something? symbol) + (attack-id uint32) + (next-entity entity) + ) + (:state-methods + idle + carry + drag-object + fall + wait + ) + (:methods + (can-drop? (_type_ vector) symbol) + ) + ) + + +(defmethod can-drop? ((this mechblock) (arg0 vector)) + (let ((v1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg0 8192.0)) + (a1-1 (new 'stack-no-clear 'collide-query)) + ) + (vector+float*! (-> a1-1 start-pos) (-> this root trans) v1-0 -1.0) + (vector-float*! (-> a1-1 move-dist) v1-0 2.0) + (let ((v1-1 a1-1)) + (set! (-> v1-1 radius) 40.96) + (set! (-> v1-1 collide-with) (collide-spec backgnd)) + (set! (-> v1-1 ignore-process0) #f) + (set! (-> v1-1 ignore-process1) #f) + (set! (-> v1-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-1 action-mask) (collide-action solid)) + ) + (cond + ((= (fill-and-probe-using-line-sphere *collide-cache* a1-1) -100000000.0) + (return #t) + ) + (else + (sound-play "mech-drag-pikup") + (return #f) + ) + ) + ) + (the-as symbol 0) + ) + +(defstate idle (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('pickup) + (go-virtual carry) + (cond + ((-> self allow-drag?) + (carry! + (the-as carry-info (-> block param 0)) + (-> self carry) + (the-as vector (-> block param 1)) + (the-as vector (-> block param 2)) + ) + (go-virtual drag-object) + ) + (else + (drag! (the-as carry-info (-> block param 0)) (-> self carry)) + (go-virtual carry) + ) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (dotimes (gp-0 2) + (transform-post) + (carry-info-method-9 (-> self carry)) + (suspend) + ) + (sleep-code) + ) + :post (behavior () + (when *display-nav-marks* + ) + ) + ) + +(defstate wait (mechblock) + :virtual #t + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :trans (behavior () + (when (or (not *target*) (< 40960.0 (vector-vector-distance (-> self origin) (-> *target* control trans)))) + (move-to-point! + (-> self root) + (vector+! (new 'stack-no-clear 'vector) (-> self origin) (new 'static 'vector :y 81920.0 :w 1.0)) + ) + (quaternion-copy! (-> self root quat) (the-as quaternion (&-> self stack 96))) + (set-vector! (-> self root transv) 0.0 -4096.0 0.0 1.0) + (set! (-> self drop-point quad) (-> self origin quad)) + (go-virtual fall) + ) + ) + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +(defstate carry (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('can-drop?) + (can-drop? self (the-as vector (-> block param 0))) + ) + (('drop) + (set! (-> self root transv quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (go-virtual fall) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + (carry-info-method-9 (-> self carry)) + (carry-info-method-13 (-> self carry)) + (update-transforms (-> self root)) + ) + ) + +(defstate drag-object (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('drop) + (if (handle->process (-> self carry other)) + (drop! (the-as carry-info (send-event (handle->process (-> self carry other)) 'carry-info)) (-> self carry)) + ) + (set! (-> self root transv quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (go-virtual fall) + ) + (('move) + (let ((s4-0 (-> self root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> s4-0 trans quad)) + (set! (-> s4-0 transv quad) (-> (the-as vector (-> block param 0)) quad)) + (let ((s2-0 (-> self nav)) + (s1-0 (-> s4-0 root-prim prim-core)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> (-> s4-0 transv) quad)) + (let ((f0-0 (seconds-per-frame))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s3-0 quad) vf1) + (set! (-> s3-0 y) 0.0) + (vector-float*! s3-0 s3-0 10.0) + (when (nonzero? s2-0) + (let ((v1-28 s2-0) + (a0-26 s1-0) + (a1-6 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-6 vertex)) (the-as vector a0-26) (the-as vector (-> v1-28 state mesh bounds))) + (set! (-> a1-6 vertex1 x) (-> v1-28 nearest-y-threshold)) + (set! (-> a1-6 data 20) (the-as uint 2)) + (let ((a2-4 (nav-mesh-method-45 (-> v1-28 state mesh) a1-6))) + (cond + (a2-4 + (clamp-vector-to-mesh-cross-gaps + s2-0 + (the-as vector s1-0) + a2-4 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + ) + (else + ) + ) + ) + ) + ) + (vector-float*! (-> s4-0 transv) s3-0 (* 0.1 (-> self clock frames-per-second))) + ) + (let ((v1-35 (-> s4-0 root-prim))) + (set! (-> v1-35 prim-core collide-as) (-> s4-0 backup-collide-as)) + (set! (-> v1-35 prim-core collide-with) (-> s4-0 backup-collide-with)) + ) + (set! (-> s4-0 root-prim type) collide-shape-prim-sphere) + (let ((a2-5 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-5 collide-with) + (logclear (-> s4-0 root-prim prim-core collide-with) (collide-spec backgnd jak player-list tobot)) + ) + (set! (-> a2-5 ignore-process0) self) + (set! (-> a2-5 ignore-process1) #f) + (set! (-> a2-5 ignore-pat) (-> s4-0 pat-ignore-mask)) + (set! (-> a2-5 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide s4-0 (-> s4-0 transv) a2-5 (meters 0)) + ) + (when (nonzero? (-> self nav)) + (let ((v1-44 (-> self nav)) + (a0-41 (-> self root root-prim prim-core)) + (a1-9 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-9 vertex)) (the-as vector a0-41) (the-as vector (-> v1-44 state mesh bounds))) + (set! (-> a1-9 vertex1 x) (-> v1-44 nearest-y-threshold)) + (set! (-> a1-9 data 20) (the-as uint 2)) + (let ((v1-46 (nav-mesh-method-45 (-> v1-44 state mesh) a1-9))) + (when v1-46 + (when (< (-> self root trans y) (-> v1-46 vertex0 y)) + (let* ((a0-47 (-> self root)) + (t9-7 (method-of-object a0-47 move-by-vector!)) + (a1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-11 x) 0.0) + (set! (-> a1-11 y) (- (-> v1-46 vertex0 y) (-> self root trans y))) + (set! (-> a1-11 z) 0.0) + (set! (-> a1-11 w) 1.0) + (t9-7 a0-47 a1-11) + ) + ) + ) + ) + ) + ) + (set! (-> s4-0 root-prim type) collide-shape-prim-mesh) + (let ((v1-50 (-> s4-0 root-prim))) + (set! (-> v1-50 prim-core collide-as) (collide-spec)) + (set! (-> v1-50 prim-core collide-with) (collide-spec)) + ) + 0 + (vector-! (the-as vector (-> block param 1)) (-> s4-0 trans) s5-0) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + (carry-info-method-9 (-> self carry)) + (translate! (-> self carry)) + (update-transforms (-> self root)) + ) + ) + +(defstate fall (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry-info) + (-> self carry) + ) + (('carry? 'pickup) + (the-as basic #f) + ) + (('touched) + (when (!= (-> proc type) target) + (sound-play "block-hit") + (let ((v0-0 (the-as basic (-> proc entity)))) + (set! (-> self hit-something?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + (if (handle->process (-> self carry other)) + (drop-impl! + (the-as carry-info (send-event (handle->process (-> self carry other)) 'carry-info)) + (-> self carry) + ) + ) + (set! (-> self root status) (collide-status)) + (set! (-> self root root-prim local-sphere w) (-> self carry carry-radius)) + ) + :trans (behavior () + (when (or (and (logtest? (-> self root status) (collide-status on-surface)) (< 0.8 (-> self root surface-angle))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (vector-reset! (-> self root transv)) + (set! (-> self root root-prim local-sphere w) (-> self carry backup-radius)) + (cond + ((and (-> self reset-on-land?) + (and (or (< 12288.0 (vector-vector-distance (-> self drop-point) (-> self root trans))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (and (-> self next-entity) + (not (logtest? (-> self next-entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + ) + (sound-play "block-break") + (cond + ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) + ) + ) + (go-virtual wait) + ) + ((or (< 12288.0 (vector-vector-distance (-> self drop-point) (-> self root trans))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (sound-play "block-break") + (cond + ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) + ) + ) + (go-virtual wait) + ) + (else + (go-virtual idle) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) + (let ((v1-2 (new-stack-vector0)) + (f0-1 (vector-dot (-> self root dynam gravity-normal) (-> self root transv))) + ) + 0.0 + (vector-! v1-2 (-> self root transv) (vector-float*! v1-2 (-> self root dynam gravity-normal) f0-1)) + (let* ((f1-2 (vector-length v1-2)) + (f2-0 f1-2) + ) + (if (< f0-1 (- (-> self root dynam gravity-max))) + (set! f0-1 (- (-> self root dynam gravity-max))) + ) + (vector+! + (-> self root transv) + (vector-float*! (-> self root transv) (-> self root dynam gravity-normal) f0-1) + (vector-float*! v1-2 v1-2 (/ f1-2 f2-0)) + ) + ) + ) + (let ((a2-8 (new 'stack-no-clear 'collide-query)) + (gp-1 (-> self root)) + ) + (let ((v1-3 #x80402)) + (set! (-> gp-1 root-prim type) collide-shape-prim-sphere) + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (set! v1-3 0) + ) + (set! (-> a2-8 collide-with) (logclear (-> gp-1 root-prim prim-core collide-with) v1-3)) + ) + (set! (-> a2-8 ignore-process0) self) + (set! (-> a2-8 ignore-process1) #f) + (set! (-> a2-8 ignore-pat) (-> gp-1 pat-ignore-mask)) + (set! (-> a2-8 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-1 (-> gp-1 transv) a2-8 (meters 0)) + (set! (-> gp-1 root-prim type) collide-shape-prim-mesh) + ) + (transform-post) + (carry-info-method-9 (-> self carry)) + ) + ) + +(defun precur-bomb-bounce-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((f28-0 (vector-dot arg3 (-> arg0 surface-normal))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (let ((f30-0 (vector-length arg3))) + 0.0 + (let* ((f0-5 (fabs (vector-dot (-> arg0 surface-normal) *up-vector*))) + (f0-6 (* f0-5 f0-5)) + (f0-7 (- 1.0 f0-6)) + ) + (set! (-> s3-0 quad) (-> arg0 surface-normal quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 f0-7) + ) + (vector-float*! s3-0 s3-0 f30-0) + (vector-float*! s2-0 (-> arg0 surface-normal) (* f28-0 (rand-vu-float-range 1.6 2.2))) + (vector-! arg2 arg3 s2-0) + (vector+! arg2 arg2 s3-0) + (let ((f0-12 (fmin (vector-normalize-ret-len! arg2 1.0) f30-0))) + (vector-float*! arg2 arg2 f0-12) + ) + ) + ) + (-> arg0 status) + ) + +(deftype precur-bomb (mechblock) + ((bomb-timer uint32) + (blink-timer uint32) + (blink-rate float) + (blink symbol) + (collide-timer uint32) + (spin-quat quaternion :inline) + (default-emissive-color vector :inline) + (hint? symbol) + (sound-id sound-id) + ) + (:state-methods + ready + explode + spawn-up + pre-spawn-up + ) + (:methods + (update-blink (_type_) object) + ) + ) + + +(defmethod get-trans ((this precur-bomb) (arg0 int)) + "Get the `trans` for this process." + (let ((s5-0 (-> this root))) + (cond + ((zero? arg0) + (-> s5-0 trans) + ) + ((and (= arg0 1) (type? s5-0 collide-shape-moving)) + (-> s5-0 gspot-pos) + ) + ((= arg0 2) + (the-as vector #f) + ) + ((= arg0 3) + (-> s5-0 trans) + ) + (else + (-> s5-0 trans) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this precur-bomb)) + (the-as search-info-flag (logior 0 16)) + ) + +(defmethod update-blink ((this precur-bomb)) + (when (and (>= (the-as uint (- (current-time) (the-as int (-> this blink-timer)))) + (the-as uint (the int (-> this blink-rate))) + ) + (nonzero? (-> this blink-timer)) + ) + (let ((f0-3 (* 0.00033333333 (the float (- (current-time) (the-as int (-> this bomb-timer))))))) + (set! (-> this blink-rate) (lerp 600.0 30.0 f0-3)) + ) + (set! (-> this blink-timer) (the-as uint (current-time))) + (sound-play "prec-bomb-timer") + (cond + ((-> this blink) + (set-vector! (-> this draw color-emissive) 1.0 0.0 0.0 1.0) + (set! (-> this blink) (not (-> this blink))) + ) + (else + (set! (-> this draw color-emissive quad) (-> this default-emissive-color quad)) + (set! (-> this blink) (not (-> this blink))) + ) + ) + ) + (if (and (>= (the-as uint (- (current-time) (the-as int (-> this bomb-timer)))) (the-as uint 3000)) + (nonzero? (-> this bomb-timer)) + ) + (go (method-of-object this explode)) + ) + ) + +(defbehavior precur-bomb-handler precur-bomb ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((s4-0 (the-as attack-info (-> arg3 param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? arg0 process-drawable) + arg0 + ) + (the-as touching-shapes-entry (-> arg3 param 0)) + ) + (when (logtest? (-> s3-0 mask) (attack-mask intersection)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-1 (target-rot)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (vector-normalize-copy! gp-1 gp-1 102400.0) + (+! (-> gp-1 y) 102400.0) + (set! (-> self root transv quad) (-> gp-1 quad)) + ) + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + (go-virtual fall) + ) + ) + ) + (else + (go-virtual explode) + ) + ) + ) + ) + (('combo) + #t + ) + (('dont-face?) + #t + ) + ) + ) + +(defstate ready (precur-bomb) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fall) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (target-rot)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (vector-normalize-copy! gp-0 gp-0 102400.0) + (+! (-> gp-0 y) 102400.0) + (set! (-> self root transv quad) (-> gp-0 quad)) + ) + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + (go-virtual fall) + ) + (else + (precur-bomb-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (set-precura-bomb-light! 0.0 (* 10.0 (seconds-per-frame))) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (until #f + (let ((f30-0 27306.666)) + (sound-play "bomb-hover" :id (-> self sound-id)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f30-0 (seconds-per-frame))) + (quaternion-rotate-z! (-> self root quat) (-> self root quat) (* f30-0 (seconds-per-frame))) + ) + (suspend) + 0 + ) + #f + ) + :post transform-post + ) + +(defstate idle (precur-bomb) + :virtual #t + :event precur-bomb-handler + :trans (behavior () + (update-blink self) + (let ((t9-1 (-> (method-of-type mechblock idle) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate pre-spawn-up (precur-bomb) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (if (time-elapsed? (-> self state-time) (seconds 0.4)) + (go-virtual spawn-up) + ) + ) + ) + +(defstate spawn-up (precur-bomb) + :virtual #t + :event precur-bomb-handler + :enter (behavior () + (set-precura-bomb-light! 1.0 (* 2.0 (seconds-per-frame))) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((f30-0 3072.0) + (f28-0 36408.89) + ) + (while (< 40.96 f30-0) + (+! (-> self root trans y) f30-0) + (set! f30-0 (* 0.87 f30-0)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f28-0 (seconds-per-frame))) + (quaternion-rotate-z! (-> self root quat) (-> self root quat) (* f28-0 (seconds-per-frame))) + (set! f28-0 (* 0.95 f28-0)) + (suspend) + ) + ) + (go-virtual ready) + ) + :post transform-post + ) + +(defstate carry (precur-bomb) + :virtual #t + :enter (behavior () + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + ) + :trans (behavior () + (when (-> self hint?) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 280 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (send-event (ppointer->process (-> self parent)) 'stop-hint) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (let ((v1-9 gp-0)) + (set! (-> v1-9 width) (the float 340)) + ) + (let ((v1-10 gp-0)) + (set! (-> v1-10 height) (the float 80)) + ) + (let ((v1-11 gp-0)) + (set! (-> v1-11 scale) 0.9) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-077c) #f)) + (s5-0 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (let ((t9-6 (-> (method-of-type mechblock carry) trans))) + (if t9-6 + (t9-6) + ) + ) + (let ((a2-3 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (add-debug-matrix #t (bucket-id debug) a2-3 (meters 4)) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type mechblock carry) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (update-blink self) + ) + ) + +(defstate fall (precur-bomb) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry-info) + (-> self carry) + ) + (('carry? 'pickup) + #f + ) + (('touched) + (if (not (type? proc target)) + (go-virtual explode) + ) + (let ((v0-0 (the-as object (-> proc entity)))) + (set! (-> self hit-something?) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (precur-bomb-handler proc argc message block) + ) + ) + ) + :trans (behavior () + (when (logtest? (-> self root status) (collide-status touch-surface)) + (if (< 0.09 (* 0.0033333334 (the float (- (current-time) (the-as int (-> self collide-timer)))))) + (sound-play "pre-bomb-bounce") + ) + (set! (-> self collide-timer) (the-as uint (current-time))) + (vector-float*! (-> self root transv) (-> self root transv) 0.75) + ) + (when (and (logtest? (-> self root status) (collide-status on-surface)) + (< 0.8 (-> self root surface-angle)) + (let ((v1-26 (-> self root transv))) + (< (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z)))) 2048.0) + ) + ) + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self root root-prim local-sphere w) (-> self carry backup-radius)) + (go-virtual idle) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root transv quad)) + (let ((f0-9 32768.0)) + (set! (-> gp-1 y) 0.0) + (let* ((f0-11 (* 0.000048828126 f0-9 (vector-length gp-1))) + (f30-0 (fmin 32768.0 f0-11)) + ) + (vector-normalize! gp-1 1.0) + (vector-cross! gp-1 *up-vector* gp-1) + (quaternion-vector-angle! (-> self spin-quat) gp-1 (* f30-0 (seconds-per-frame))) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self spin-quat) (-> self root quat)) + (if (< (* 0.00024414062 (-> self root trans y)) 500.0) + (go-virtual explode) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type mechblock fall) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (update-blink self) + ) + ) + +(defstate explode (precur-bomb) + :virtual #t + :enter (behavior () + (sound-play "prec-bomb-xplo") + (let ((gp-1 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-1 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 spawn-quat)) + (set! (-> gp-1 radius) 40960.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1325)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-1 damage) 2.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 1.0) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (when (type? (-> self root) collide-shape) + (let ((v1-17 (-> self root root-prim))) + (set! (-> v1-17 prim-core collide-as) (collide-spec)) + (set! (-> v1-17 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (explosion-spawn gp-1 self) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defskelgroup skel-precur-bomb precur-bomb precur-bomb-lod0-jg precur-bomb-idle-ja + ((precur-bomb-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 2.7) + ) + +(defbehavior precur-bomb-init-by-other precur-bomb ((arg0 vector) (arg1 symbol)) + (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) precur-bomb-bounce-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak crate obstacle hit-by-others-list player-list tobot) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 11059.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-6) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-9 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s4-0 max-iteration-count) (the-as uint 4)) + (set! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self hint?) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-bomb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (mem-copy! (the-as pointer (-> self origin)) (the-as pointer (-> self root trans)) 48) + (set! (-> self collide-timer) (the-as uint 0)) + (set! (-> self bomb-timer) (the-as uint 0)) + (set! (-> self blink-timer) (the-as uint 0)) + (set! (-> self blink-rate) 600.0) + (set! (-> self blink) #t) + (set! (-> self default-emissive-color quad) (-> self draw color-emissive quad)) + (set! (-> self allow-drag?) #f) + (set! (-> self reset-on-land?) #f) + (let* ((v1-22 *game-info*) + (a0-19 (+ (-> v1-22 attack-id) 1)) + ) + (set! (-> v1-22 attack-id) a0-19) + (set! (-> self attack-id) a0-19) + ) + (set! (-> self hit-something?) #f) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 12288.0) + (let ((v1-28 (new 'process 'carry-info self 3 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0) 0.0))) + (set! (-> v1-28 max-distance) 16384.0) + (set! (-> v1-28 min-pull) 2048.0) + (set! (-> v1-28 max-pull) 6963.2) + (set! (-> v1-28 carry-radius) 6144.0) + (set! (-> v1-28 mode) (carry-mode mech-carry)) + (set! (-> v1-28 point quad) (-> gp-1 quad)) + (set! (-> v1-28 hold-trans quad) (-> (new 'static 'vector :y 12288.0 :w 1.0) quad)) + (set! (-> self carry) v1-28) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (logior! (-> self focus-status) (focus-status hit)) + (go-virtual pre-spawn-up) + ) + +(deftype precur-box (mechblock) + ((taskman handle) + ) + ) + + +(defskelgroup skel-precur-box precur-box precur-box-lod0-jg precur-box-idle-ja + ((precur-box-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 4) + ) + +(defstate idle (precur-box) + :virtual #t + :exit (behavior () + (if (handle->process (-> self taskman)) + (send-event (handle->process (-> self taskman)) 'place-hint) + ) + (let ((t9-1 (-> (method-of-type mechblock idle) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (if (and (handle->process (-> self taskman)) + (< (vector-vector-distance (-> self root trans) (target-pos 0)) 20480.0) + ) + (send-event (handle->process (-> self taskman)) 'pickup-hint) + ) + (let ((t9-3 (-> (method-of-type mechblock idle) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(defmethod init-from-entity! ((this precur-box) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak crate obstacle hit-by-others-list player-list tobot) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 1228.8 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-6) + ) + (set! (-> s4-0 nav-radius) 16384.0) + (let ((v1-8 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-8 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-8 prim-core collide-with)) + ) + (set! (-> s4-0 max-iteration-count) (the-as uint 4)) + (set! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-box" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (mem-copy! (the-as pointer (-> this origin)) (the-as pointer (-> this root trans)) 48) + (set! (-> this allow-drag?) #f) + (set! (-> this reset-on-land?) #t) + (let* ((v1-17 *game-info*) + (a0-16 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-16) + (set! (-> this attack-id) a0-16) + ) + (set! (-> this hit-something?) #f) + (set! (-> this next-entity) (entity-actor-lookup (-> this entity) 'next-actor 0)) + (let ((v1-19 (new 'process 'carry-info this 3 (new 'static 'vector :w 1.0) (new 'static 'vector :y 1.0 :w 1.0) 0.0)) + ) + (set! (-> v1-19 max-distance) 24576.0) + (set! (-> v1-19 min-pull) 2048.0) + (set! (-> v1-19 max-pull) 6963.2) + (set! (-> v1-19 carry-radius) 4096.0) + (set! (-> v1-19 mode) (carry-mode mech-carry)) + (set! (-> this carry) v1-19) + ) + (set! (-> this nav-mesh) (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0)) + (if (not (-> this nav-mesh)) + (go process-drawable-art-error "no nav-mesh") + ) + (add-process-drawable-to-nav-mesh (-> this nav-mesh) this #f) + (let ((v1-28 (-> *game-info* sub-task-list (game-task-node precursor-tour-generator-trigger)))) + (set! (-> this taskman) (if (-> v1-28 manager) + (-> v1-28 manager manager) + (the-as handle #f) + ) + ) + ) + (go (method-of-object this idle)) + ) + +(defun-debug hint-mode->string ((arg0 precur-hint-mode)) + (case arg0 + (((precur-hint-mode normal)) + "normal" + ) + (((precur-hint-mode teach-bomb)) + "teach-bomb" + ) + (else + "*unknown*" + ) + ) + ) + +(deftype precur-bomb-spawner (process-drawable) + ((proc-handle handle) + (hint-mode precur-hint-mode) + ) + (:state-methods + idle + ) + (:methods + (spawn-bomb (_type_) handle) + ) + ) + + +(defskelgroup skel-precur-bomb-spawner precur-bomb-spawner precur-bomb-spawner-lod0-jg precur-bomb-spawner-idle-ja + ((precur-bomb-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-bomb ((this precur-bomb-spawner)) + (local-vars (v1-10 (pointer process))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (format 0 "spawning bomb~%") + (sound-play "prec-bomb-spawn") + (format 0 "spawning bomb-post~%") + (+! (-> s5-0 y) -10240.0) + (cond + ((= (-> this hint-mode) (precur-hint-mode teach-bomb)) + (let ((s4-1 (get-process *default-dead-pool* precur-bomb #x4000 1))) + (set! v1-10 (when s4-1 + (let ((t9-5 (method-of-type precur-bomb activate))) + (t9-5 (the-as precur-bomb s4-1) this "precur-bomb" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 precur-bomb-init-by-other s5-0 #t) + (-> s4-1 ppointer) + ) + ) + ) + ) + (else + (let ((s4-2 (get-process *default-dead-pool* precur-bomb #x4000 1))) + (set! v1-10 (when s4-2 + (let ((t9-8 (method-of-type precur-bomb activate))) + (t9-8 (the-as precur-bomb s4-2) this "precur-bomb" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 precur-bomb-init-by-other s5-0 #f) + (-> s4-2 ppointer) + ) + ) + ) + ) + ) + ) + (the-as handle (when (-> v1-10 0) + (let ((v0-10 (ppointer->handle v1-10))) + (set! (-> this proc-handle) (the-as handle v0-10)) + v0-10 + ) + ) + ) + ) + +(defstate idle (precur-bomb-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('stop-hint) + (let ((v0-0 (the-as object 1))) + (set! (-> self hint-mode) (the-as precur-hint-mode v0-0)) + v0-0 + ) + ) + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? proc process-drawable) + proc + ) + (the-as touching-shapes-entry (-> block param 0)) + ) + (when (logtest? (-> s3-0 mask) (attack-mask intersection)) + (let ((a0-10 (handle->process (-> self proc-handle)))) + (when a0-10 + (if (and (-> a0-10 next-state) (= (-> a0-10 next-state name) 'ready)) + (send-event a0-10 'fall) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + :code (behavior () + (until #f + (let ((v1-1 (handle->process (-> self proc-handle)))) + (cond + (v1-1 + (when (not (or (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'idle)) + (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'ready)) + (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'spawn-up)) + ) + ) + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + (else + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + ) + (spawn (-> self part) (-> self root trans)) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this precur-bomb-spawner) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-bomb-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (cond + ((res-lump-struct (-> this entity) 'art-name structure) + (set! (-> this hint-mode) (precur-hint-mode teach-bomb)) + 0 + ) + (else + (set! (-> this hint-mode) (precur-hint-mode normal)) + ) + ) + (set! (-> this proc-handle) (the-as handle #f)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1315) this)) + (go (method-of-object this idle)) + ) + +(set! (-> *lightning-spec-id-table* 38) (new 'static 'lightning-spec + :name "laser-lightning-shock-target" + :flags (lightning-spec-flags lsf2) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 120.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(defpart 4452 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(define *laser-angles-array* (new 'static 'boxed-array :type float 36.40889 8192.0 16384.0 24576.0)) + +(defpartgroup group-placeholder-single-laser + :id 1326 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4453 :flags (sp7) :period (seconds 11) :length (seconds 0.017))) + ) + +(defpart 4453 + :init-specs ((:texture (middot level-default-sprite)) + (:num 3.0) + (:y (meters -0.3) (meters -0.3)) + (:scale-y (meters 0.1) (meters 0.05)) + (:r 80.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00083333335)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-x (degrees 90)) + ) + ) + +(deftype precur-laser-beam (process-drawable) + ((laser-dir vector :inline) + (attack-id uint32) + (org-laser-quat quaternion :inline) + (on-duration float) + (off-duration float) + (current-angle int8) + (last-attack-time uint32) + (counter uint8) + (sound-id sound-id) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + active + telegraph + hide + dormant + ) + (:methods + (fire-beam (_type_ vector vector) none) + (fire-beam0 (_type_ vector vector) none) + ) + ) + + +(defun elec-mech ((arg0 vector) (arg1 uint)) + (format 0 "~d~%" arg1) + (send-event + *target* + 'shove + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id arg1) + (damage 10.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector arg0) + (shove-back (meters 3)) + (mode 'shock) + (shove-up (meters 1)) + ) + ) + ) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + (spawn-mech-shock-effect) + (none) + ) + +(defmethod fire-beam ((this precur-laser-beam) (arg0 vector) (arg1 vector)) + (local-vars (sv-560 collide-query) (sv-564 float)) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 83968.0) + (set! (-> sv-560 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! arg1 arg1 sv-564) + (vector-normalize-copy! (-> sv-560 move-dist) arg1 sv-564) + (let ((v1-5 sv-560)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec backgnd)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f0-4 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (cond + ((>= f0-4 0.0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 move-dist) f0-4) + (set! sv-564 (* sv-564 f0-4)) + ) + (else + (set! (-> sv-560 best-other-tri collide-ptr) #f) + ) + ) + ) + (set! (-> *part-id-table* 4452 init-specs 4 initial-valuef) sv-564) + (draw-beam (-> *part-id-table* 4452) arg0 arg1 #t) + (let ((v1-19 sv-560)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec jak enemy player-list)) + (set! (-> v1-19 ignore-process0) #f) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* sv-560)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-0 (target-pos 0) arg0) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (when (and (>= f30-0 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (elec-mech s3-0 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (vector-float*! arg1 arg1 -1.0) + (vector-normalize-copy! (-> sv-560 move-dist) arg1 sv-564) + (let ((f30-1 (fill-and-probe-using-line-sphere *collide-cache* sv-560)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-1 (target-pos 0) arg0) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (when (and (>= f30-1 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (format 0 "attack-time: ~d~%" (-> this last-attack-time)) + (elec-mech s3-1 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (draw-beam (-> *part-id-table* 4452) arg0 arg1 #t) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod fire-beam0 ((this precur-laser-beam) (arg0 vector) (arg1 vector)) + "Unused." + (local-vars (sv-560 collide-query) (sv-564 float)) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 83968.0) + (set! (-> sv-560 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> sv-560 move-dist) arg1 sv-564) + (let ((v1-7 sv-560)) + (set! (-> v1-7 radius) 40.96) + (set! (-> v1-7 collide-with) (collide-spec backgnd)) + (set! (-> v1-7 ignore-process0) #f) + (set! (-> v1-7 ignore-process1) #f) + (set! (-> v1-7 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (cond + ((>= f0-3 0.0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 move-dist) f0-3) + (set! sv-564 (* sv-564 f0-3)) + ) + (else + (set! (-> sv-560 best-other-tri collide-ptr) #f) + ) + ) + ) + (set! (-> *part-id-table* 4452 init-specs 4 initial-valuef) sv-564) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'matrix)) + ) + (vector+float*! s3-0 arg0 arg1 sv-564) + (matrix-f-compose s4-0 arg1) + (set! (-> s4-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> *part-group-id-table* 1326 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1326) + :mat-joint s4-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1326) :mat-joint s4-0) + ) + (vector+float*! s3-0 arg0 arg1 (- sv-564)) + (matrix-f-compose s4-0 (vector-float*! (new 'stack-no-clear 'vector) arg1 -1.0)) + (set! (-> s4-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> *part-group-id-table* 1326 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1326) + :mat-joint s4-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1326) :mat-joint s4-0) + ) + ) + (none) + ) + +(defstate telegraph (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (vector-y-quaternion! (-> self laser-dir) (-> self root quat)) + (cond + ((= (-> self counter) 2) + (set! (-> self counter) (the-as uint 0)) + (set! (-> self on-duration) 690.0) + ) + (else + (+! (-> self counter) 1) + (set! (-> self on-duration) 60.0) + ) + ) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self off-duration)))) + (when (not (time-elapsed? (-> self state-time) (seconds 0.1))) + ) + (suspend) + ) + (go-virtual active) + ) + ) + +(defstate dormant (precur-laser-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-active) + (go-virtual active) + ) + ) + ) + :code (behavior () + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (let ((gp-0 (res-lump-data (-> self entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and gp-0 (nonzero? (-> sv-16 elt-count))) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 1)) + (suspend) + ) + ) + (set! (-> self actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> self actor-group) (the-as (pointer actor-group) gp-0)) + (dotimes (gp-1 (length (-> self actor-group 0))) + (let* ((v1-15 (-> self actor-group 0 data gp-1 actor)) + (a0-6 (if v1-15 + (-> v1-15 extra process) + ) + ) + ) + (if a0-6 + (send-event a0-6 'go-active) + ) + ) + ) + ) + (else + (format #t "entity missing actor-group!~%") + (until #f + (suspend) + ) + #f + ) + ) + ) + ) + ) + +(defstate active (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (sound-play "arc-bar" :id (-> self sound-id) :position (-> self root trans)) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self on-duration)))) + (vector-y-quaternion! (-> self laser-dir) (-> self root quat)) + (if (>= (the-as uint (- (current-time) (the-as int (-> self last-attack-time)))) (the-as uint 600)) + (fire-beam self (-> self root trans) (-> self laser-dir)) + ) + (suspend) + ) + (go-virtual hide) + ) + :post ja-post + ) + +(defstate hide (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((< (-> self current-angle) (+ (length *laser-angles-array*) -1)) + (+! (-> self current-angle) 1) + ) + (else + (set! (-> self current-angle) 0) + 0 + ) + ) + (quaternion-rotate-local-x! + (-> self root quat) + (-> self org-laser-quat) + (-> *laser-angles-array* (-> self current-angle)) + ) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self off-duration)))) + (suspend) + ) + (go-virtual telegraph) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this precur-laser-beam) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this on-duration) 60.0) + (set! (-> this off-duration) 15.0) + (set! (-> this last-attack-time) (the-as uint 0)) + (set! (-> this counter) (the-as uint 0)) + (set! (-> this sound-id) (new-sound-id)) + (quaternion-copy! (-> this org-laser-quat) (-> this root quat)) + (let* ((v1-4 *game-info*) + (a0-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-5) + (set! (-> this attack-id) a0-5) + ) + (set! (-> this current-angle) 0) + (quaternion-rotate-local-x! + (-> this root quat) + (-> this org-laser-quat) + (-> *laser-angles-array* (-> this current-angle)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this dormant)) + ) + +(defpartgroup group-precura-engulfing-death + :id 1327 + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4454 :flags (sp7))) + ) + +(defpart 4454 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0 5.0) + (:x (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 240.0 15.0) + (:g 200.0 16.0) + (:b 160.0 16.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.20833333)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:timer (seconds 0.535) (seconds 0.265)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1) (seconds 0.03)) + (:next-launcher 4455) + ) + ) + +(defpart 4455 + :init-specs ((:b 0.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.4 -0.2) + (:next-time (seconds 0.017) (seconds 0.03)) + (:next-launcher 4456) + ) + ) + +(defpart 4456 + :init-specs ((:fade-r -0.125) (:fade-g 0.4) (:fade-b 0.4)) + ) + +(deftype task-manager-precura (task-manager) + ((part-doom sparticle-launch-control) + (doom-time time-frame) + (extra-time time-frame) + (doom-counter uint8) + (faded uint8) + (movie-played? symbol) + ) + ) + + +(define *precura-continue-sphere* (new 'static 'sphere :x 684753.7 :y 2241180.5 :z -334490.84 :r 122880.0)) + +(define *precura-continue2-sphere* (new 'static 'sphere :x 733905.7 :y 2241180.5 :z -334490.84 :r 40960.0)) + +(defmethod taskman-event-handler ((this task-manager-precura) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('extra-time) + (let* ((v1-1 (-> arg3 param 0)) + (v0-0 (the-as object (+ (-> this extra-time) (the-as time-frame v1-1)))) + ) + (set! (-> this extra-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(define *pca-sph1* (new 'static 'sphere :x 261120.0 :y 2199552.0 :z -181452.8 :r 31129.6)) + +(define *pca-sph2* (new 'static 'sphere :x 261120.0 :y 2199552.0 :z 115916.8 :r 31129.6)) + +(defmethod task-manager-method-26 ((this task-manager-precura)) + (when *target* + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (target-pos 0) quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when (and (>= (-> s4-0 z) (-> *pca-sph1* z)) (>= (-> *pca-sph2* z) (-> s4-0 z))) + (set! (-> s3-0 quad) (-> *pca-sph1* quad)) + (set! (-> s4-0 z) 0.0) + (set! (-> s3-0 z) 0.0) + (when (< (vector-vector-distance s4-0 s3-0) (-> *pca-sph1* r)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) s3-0 s4-0))) + (set! (-> s5-1 y) 0.0) + (set! (-> s5-1 z) 0.0) + (set! (-> s5-1 x) (sign (-> s5-1 x))) + (send-event + *target* + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'shock-no-interrupt) + (vector s5-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (* 0.0033333334 (the float (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (if (and (not (logtest? (-> this info mask) (task-manager-mask time-limit))) + (-> this movie-played?) + (not (movie?)) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + ) + (if (and (movie?) (not (-> this movie-played?))) + (set! (-> this movie-played?) #t) + ) + (let ((f0-14 (vector-vector-distance-squared (target-pos 0) *precura-continue2-sphere*)) + (f1-5 (-> *precura-continue2-sphere* r)) + ) + (if (and (< f0-14 (* f1-5 f1-5)) (not (task-node-closed? (game-task-node precursor-destroy-ship-escape)))) + (task-node-close! (game-task-node precursor-destroy-ship-escape) 'event) + ) + ) + (when (and (not (time-elapsed? (-> this start-time) (seconds 1))) + (< (seconds 150) (-> this time-limit)) + (let ((f0-15 (vector-vector-distance-squared (target-pos 0) *precura-continue-sphere*)) + (f1-8 (-> *precura-continue-sphere* r)) + ) + (< f0-15 (* f1-8 f1-8)) + ) + ) + (set! (-> this time-limit) (seconds 150)) + (send-event (process-by-name "dp-bipedal-104" *active-pool*) 'die-fast) + (send-event (process-by-name "dp-bipedal-105" *active-pool*) 'die-fast) + (send-event (process-by-name "dp-bipedal-106" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-9" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-10" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-11" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-15" *active-pool*) 'die-fast) + ) + 0 + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod hud-timer-handler ((this task-manager-precura)) + (with-pp + (when (or (> (-> this extra-time) 0) (and *target* (focus-test? *target* dead))) + (let ((v1-7 (- (current-time) (-> pp clock old-frame-counter)))) + (if (and (> (-> this extra-time) 0) (< (-> this extra-time) v1-7)) + (set! v1-7 (-> this extra-time)) + ) + (if (> (-> this extra-time) 0) + (set! (-> this extra-time) (- (-> this extra-time) v1-7)) + ) + (+! (-> this time-limit) v1-7) + ) + ) + (let ((v1-10 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (cond + ((and (>= (seconds 0.015) v1-10) (not (-> this movie-played?)) (not (movie?))) + (process-spawn scene-player :init scene-player-init "precursor-destroy-ship-lose" #t #f :name "scene-player") + (logclear! (-> this info mask) (task-manager-mask time-limit)) + ) + ((not (movie?)) + (call-parent-method this) + ) + ) + ) + (none) + ) + ) + +(defmethod relocate ((this task-manager-precura) (offset int)) + (if (nonzero? (-> this part-doom)) + (&+! (-> this part-doom) offset) + ) + (call-parent-method this offset) + ) + +(defmethod task-manager-method-25 ((this task-manager-precura)) + (if (nonzero? (-> this part-doom)) + (kill-particles (-> this part-doom)) + ) + (disable *screen-filter*) + (call-parent-method this) + (none) + ) + +(defmethod init! ((this task-manager-precura)) + (set! (-> this part-doom) (create-launch-control (-> *part-group-id-table* 1327) this)) + (set-time! (-> this doom-time)) + (set! (-> this doom-counter) (the-as uint 0)) + (set! (-> this faded) (the-as uint 0)) + (set! (-> this movie-played?) #f) + (set! (-> this extra-time) 0) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defun process-drawable-shock-wave-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 vector) + (arg5 int) + (arg6 float) + ) + (local-vars + (sv-624 (pointer lightning-tracker)) + (sv-640 float) + (sv-656 matrix) + (sv-672 collide-query) + (sv-688 symbol) + (sv-704 vector) + (sv-720 int) + (sv-736 process) + ) + (set! sv-640 arg6) + (let ((s5-0 *lightning-probe-vars*)) + (set! sv-656 (new 'stack-no-clear 'matrix)) + (set! sv-672 (new 'stack-no-clear 'collide-query)) + (set! sv-688 (the-as symbol #f)) + (set! (-> sv-672 start-pos quad) (-> arg4 quad)) + (set! sv-704 (-> sv-672 move-dist)) + (set! (-> sv-704 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 w) 1.0) + (matrix-rotate-zyx! sv-656 (-> sv-672 move-dist)) + (set! sv-720 6) + (while (nonzero? sv-720) + (set! sv-720 (+ sv-720 -1)) + (vector-rotate*! (-> sv-672 move-dist) (-> s5-0 probe-dirs sv-720) sv-656) + (vector-normalize! (-> sv-672 move-dist) sv-640) + (let ((v1-18 sv-672)) + (set! (-> v1-18 radius) 409.6) + (set! (-> v1-18 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-18 ignore-process0) arg0) + (set! (-> v1-18 ignore-process1) #f) + (set! (-> v1-18 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-18 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* sv-672) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> s5-0 end-pos quad) (-> sv-672 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-672 start-pos))) + (set! sv-688 #t) + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (when sv-688 + (set! sv-736 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-624 + (the-as + (pointer lightning-tracker) + (when sv-736 + (let ((t9-9 (method-of-type lightning-tracker activate))) + (t9-9 (the-as lightning-tracker sv-736) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-736 lightning-tracker-init arg1 arg5 arg2 arg0 arg4 (-> s5-0 end-pos)) + (-> sv-736 ppointer) + ) + ) + ) + (when sv-624 + (set! (-> sv-624 0 user-time 0) 0) + (when arg3 + (let ((v1-46 (get-field-spec-by-id arg3 (sp-field-id spt-timer)))) + (if v1-46 + (set! (-> v1-46 initial-valuef) (the-as float (-> sv-624 0 duration))) + ) + ) + (let ((t9-12 sp-launch-particles-var) + (a0-26 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s5-0 end-pos quad)) + (t9-12 a0-26 arg3 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + ) + +(defpartgroup group-placeholder-single-shockwave + :id 1328 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4457 :flags (sp7))) + ) + +(defpart 4457 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.005)) + (:flags ()) + ) + ) + +(defskelgroup skel-precur-spot-ring gun gun-dark-2-ring-lod0-jg gun-dark-2-ring-idle-ja + ((gun-dark-2-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0.5 84) + :longest-edge (meters 80) + :shadow gun-dark-2-ring-shadow-mg + ) + +(deftype precur-spot-shadow-effect (process-drawable) + ((focal-length float) + (near-clip float) + (far-clip float) + (color rgba) + (pre-flicker-pos vector :inline) + (jmod-outer joint-mod-add-local :inline) + (jmod-inner joint-mod-add-local :inline) + ) + (:state-methods + idle + inactive + ) + (:methods + (set-inner-jmod-scale (_type_ vector) none) + (set-outer-jmod-scale (_type_ vector) none) + ) + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod set-inner-jmod-scale ((this precur-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-inner transform scale quad) (-> arg0 quad)) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod set-outer-jmod-scale ((this precur-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-outer transform scale quad) (-> arg0 quad)) + (none) + ) + +(defbehavior precur-spot-shadow-effect-init-by-other precur-spot-shadow-effect ((arg0 vector) (arg1 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion arg1)) + (set! (-> self pre-flicker-pos quad) (-> self root trans quad)) + (set! (-> self level) (-> *level* level-default)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-spot-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init (-> self jmod-inner) self (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> self jmod-outer) self (the-as uint 3) (joint-mod-base-flags attached scale)) + (set! (-> self focal-length) 409600.0) + (set! (-> self near-clip) 0.0) + (set! (-> self far-clip) 122880.0) + (set! (-> self color) (new 'static 'rgba :r #xf0 :g #xf0 :a #x80)) + (cond + ((-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + 0.0 + 0.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf02 shdf03 shdf04 disable-draw) + 245760.0 + ) + ) + (set! (-> self draw shadow-ctrl settings shadow-type) 1) + (set! (-> self draw shadow-ctrl settings flags) (shadow-flags disable-fade shdf03 shdf04 shdf07)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (else + (go process-drawable-art-error "Shadow error (no self draw shadow)") + ) + ) + (go-virtual idle) + ) + +(defbehavior precur-spot-shadow-effect-handler precur-spot-shadow-effect ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('on) + (go-virtual idle) + ) + (('off) + (go-virtual inactive) + ) + ) + ) + +(defstate idle (precur-spot-shadow-effect) + :virtual #t + :event precur-spot-shadow-effect-handler + :enter (behavior () + (setup-masks (-> self draw) 0 1) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + (shadow-control-method-14 + (-> self draw shadow-ctrl) + (-> self root trans) + (vector-negate! (new 'stack-no-clear 'vector) (-> self node-list data 3 bone transform uvec)) + (-> self focal-length) + (-> self near-clip) + (-> self far-clip) + ) + (persist-with-delay + *setting-control* + 'spotlight-color + (seconds 0.1) + 'spotlight-color + #f + 0.0 + (the-as int (-> self color)) + ) + ) + :code sleep-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 x) (+ -1024.0 (* 4096.0 (* 0.5 (rand-vu))))) + (set! (-> gp-0 y) 0.0) + (set! (-> gp-0 z) (+ -1024.0 (* 4096.0 (* 0.5 (rand-vu))))) + (set! (-> gp-0 w) 1.0) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (+! (-> self root trans y) -8192.0) + (ja-post) + ) + ) + +(defstate inactive (precur-spot-shadow-effect) + :virtual #t + :event precur-spot-shadow-effect-handler + :enter (behavior () + (setup-masks (-> self draw) 0 1) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logior! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +(deftype precur-path (process-drawable) + ((pathb path-control) + (last-attack-time uint32) + (attack-id uint32) + (bolt lightning-bolt) + (shock-part-time uint32) + (shock-shadow-handle handle) + ) + (:state-methods + idle + dormant + ) + (:methods + (probe-for-player-collision (_type_ vector vector) none) + (draw-lightning (_type_ vector vector) none) + ) + ) + + +;; WARN: Return type mismatch time-frame vs none. +(defmethod probe-for-player-collision ((this precur-path) (arg0 vector) (arg1 vector)) + (local-vars (sv-576 collide-query) (sv-580 vector) (sv-584 float)) + (set! sv-576 (new 'stack-no-clear 'collide-query)) + (set! sv-580 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (set! sv-584 (vector-vector-distance arg0 arg1)) + (set! (-> sv-576 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> sv-576 move-dist) sv-580 sv-584) + (let ((v1-5 sv-576)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec jak enemy player-list)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* sv-576)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (when (and (>= f30-0 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (elec-mech s5-1 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (none) + ) + +(set! (-> *lightning-spec-id-table* 39) (new 'static 'lightning-spec + :name "lightning-shock-wave" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 819.2 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(if (or (zero? *precur-tour-lightning*) (!= loading-level global)) + (set! *precur-tour-lightning* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *precur-tour-lightning* base-alpha) 1.0) + +(set! (-> *precur-tour-lightning* tex-id) (the-as uint #x403f00)) + +(set! (-> *precur-tour-lightning* blend-mode) (the-as uint 1)) + +(set! (-> *precur-tour-lightning* alpha-1-curve) *curve-linear-down*) + +(set! (-> *precur-tour-lightning* alpha-1-mode) (the-as uint 0)) + +(set! (-> *precur-tour-lightning* alpha-1-repeat-dist) 262144.0) + +(set! (-> *precur-tour-lightning* alpha-2-curve) #f) + +(set! (-> *precur-tour-lightning* alpha-2-mode) (the-as uint 3)) + +(set! (-> *precur-tour-lightning* alpha-2-repeat-dist) 4096.0) + +(set! (-> *precur-tour-lightning* width-curve) *curve-linear-down*) + +(set! (-> *precur-tour-lightning* width-mode) (the-as uint 3)) + +(set! (-> *precur-tour-lightning* width-repeat-dist) 4096.0) + +(set! (-> *precur-tour-lightning* uv-repeat-dist) 28672.0) + +(set! (-> *precur-tour-lightning* regenerate-time-start) (seconds 0.085)) + +(set! (-> *precur-tour-lightning* regenerate-time-end) (seconds 0.167)) + +(set! (-> *precur-tour-lightning* width-range-start) 4096.0) + +(set! (-> *precur-tour-lightning* width-range-end) 4096.0) + +(set! (-> *precur-tour-lightning* fade-time) (seconds 0.3)) + +(set! (-> *precur-tour-lightning* uv-shift?) #t) + +(set! (-> *precur-tour-lightning* uv-shift-speed) (seconds -0.5)) + +(set! (-> *precur-tour-lightning* use-sprite-bucket?) #t) + +(set! (-> *precur-tour-lightning* use-accurate-interp?) #t) + +(defmethod draw-lightning ((this precur-path) (arg0 vector) (arg1 vector)) + (let ((gp-0 (-> this bolt))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + 0.0 + (when arg0 + (let ((f0-1 (vector-vector-distance arg0 arg1))) + (vector+! s3-0 arg0 arg1) + (vector-float*! s3-0 s3-0 0.5) + (when (handle->process (-> this shock-shadow-handle)) + (let ((a0-8 (the-as precur-spot-shadow-effect (-> this shock-shadow-handle process 0))) + (a1-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-8 root trans quad) (-> s3-0 quad)) + (set-vector! a1-6 (* 0.0001319679 f0-1) 0.4 0.4 1.0) + (set-outer-jmod-scale a0-8 a1-6) + ) + ) + ) + ) + ) + (set! (-> gp-0 inner-point-travel-time) (seconds 0.25)) + (set! (-> gp-0 snap-inner-points?) #t) + (set! (-> gp-0 fractal-reduction) 0.6) + (set! (-> gp-0 generate-mode) (the-as uint 1)) + (set! (-> gp-0 appearance) *precur-tour-lightning*) + (set! (-> gp-0 num-active-spans) 2) + (set! (-> gp-0 spans-internal data 0 num-inner-points) 30) + (set! (-> gp-0 spans data 0 inner-random-offset-size) 10240.0) + (set! (-> gp-0 spans data 1 inner-random-offset-size) 10240.0) + (when arg0 + (set! (-> gp-0 span-pts-start data 0 quad) (-> arg0 quad)) + (+! (-> gp-0 span-pts-start data 0 y) 4096.0) + ) + (when arg1 + (set! (-> gp-0 span-pts-start data 1 quad) (-> arg1 quad)) + (+! (-> gp-0 span-pts-start data 1 y) 4096.0) + ) + (set! (-> gp-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 gp-0) + (lightning-bolt-method-12 gp-0) + ) + (none) + ) + +(defstate idle (precur-path) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (lightning-bolt-method-13 (-> self bolt) 1) + ) + :exit (behavior () + (set-precura-laser-light! 0.0 (* 8.0 (seconds-per-frame)) 0) + (set-precura-laser-light! 0.0 (* 8.0 (seconds-per-frame)) 1) + ) + :trans (behavior () + (when *target* + (if (focus-test? *target* grabbed) + (go-virtual dormant) + ) + ) + (if (nonzero? (-> self path)) + (debug-draw (-> self path)) + ) + (if (nonzero? (-> self pathb)) + (debug-draw (-> self pathb)) + ) + (let ((f30-0 (* 0.0006666667 (the float (- (current-time) (-> self state-time))))) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (if (< 0.9 f30-0) + (go-virtual dormant) + ) + (set-precura-laser-light! (- 1.0 f30-0) 0.0 0) + (set-precura-laser-light! f30-0 0.0 1) + (get-point-at-percent-along-path! (-> self path) s5-0 f30-0 'interp) + (get-point-at-percent-along-path! (-> self pathb) gp-0 f30-0 'interp) + (probe-for-player-collision self s5-0 gp-0) + (draw-lightning self s5-0 gp-0) + (process-drawable-shock-wave-effect + self + (-> *lightning-spec-id-table* 39) + lightning-probe-callback + (-> *part-id-table* 160) + s5-0 + 0 + 40960.0 + ) + (process-drawable-shock-wave-effect + self + (-> *lightning-spec-id-table* 39) + lightning-probe-callback + (-> *part-id-table* 160) + gp-0 + 0 + 40960.0 + ) + (when (>= (the-as uint (- (current-time) (the-as int (-> self shock-part-time)))) 0) + (spawn (-> self part) s5-0) + (spawn (-> self part) gp-0) + (set! (-> self shock-part-time) (the-as uint (current-time))) + ) + ) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go-virtual dormant) + ) + ) + :code sleep-code + ) + +(defstate dormant (precur-path) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (lightning-bolt-method-13 (-> self bolt) 2) + ) + :trans (behavior () + (draw-lightning self (the-as vector #f) (the-as vector #f)) + (when *target* + (if (and (time-elapsed? (-> self state-time) (seconds 3)) + (not (logtest? (-> *target* focus-status) (focus-status grabbed))) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +(defmethod relocate ((this precur-path) (offset int)) + (if (nonzero? (-> this pathb)) + (&+! (-> this pathb) offset) + ) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-from-entity! ((this precur-path) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (when (res-lump-data arg0 'patha pointer) + (set! (-> this path) (new 'process 'curve-control this 'patha -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (when (res-lump-data arg0 'pathb pointer) + (set! (-> this pathb) (new 'process 'curve-control this 'pathb -1000000000.0)) + (logior! (-> this pathb flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (set! (-> this last-attack-time) (the-as uint 0)) + (set! (-> this shock-part-time) (the-as uint 0)) + (let* ((v1-13 *game-info*) + (a0-10 (+ (-> v1-13 attack-id) 1)) + ) + (set! (-> v1-13 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (set! (-> this bolt) (new 'process 'lightning-bolt)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1316) this)) + (init! (-> this bolt) 2 32 *precur-tour-lightning*) + (new 'stack-no-clear 'vector) + (let ((v1-22 (process-spawn + precur-spot-shadow-effect + (-> this root trans) + (-> this root quat) + :name "precur-spot-shadow-effect" + :to this + ) + ) + ) + (when v1-22 + (set! (-> this shock-shadow-handle) (ppointer->handle v1-22)) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 far-clip) 2867.2) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 near-clip) 0.4096) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 color) + (new 'static 'rgba :r #x90 :g #x90 :b #xff :a #x80) + ) + (set-inner-jmod-scale + (the-as precur-spot-shadow-effect (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0)) + (new 'static 'vector :x 0.0001 :y 0.0001 :z 0.0001 :w 1.0) + ) + ) + ) + (go (method-of-object this idle)) + ) + +(defskelgroup skel-precur-door-b precur-door-b precur-door-b-lod0-jg precur-door-b-idle-ja + ((precur-door-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(deftype precur-door-b (com-airlock) + ((pad uint8 4) + ) + ) + + +(defmethod init-from-entity! ((this precur-door-b) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 5) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this open-test) (the-as pair ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not #f)) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +(defstate open (precur-door-b) + :virtual #t + :enter (behavior ((arg0 symbol)) + (let ((gp-0 sound-play-by-name) + (a0-3 (make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f642d63657270))) + ) + (gp-0 (the-as sound-name a0-3) (new-sound-id) 1024 0 0 (sound-group) #t) + (let ((t9-2 (-> (method-of-type com-airlock open) enter))) + (if t9-2 + (t9-2 (the-as symbol a0-3)) + ) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precura-part.gc b/goal_src/jak3/levels/precursor/precura-part.gc index d3d2bd2afb..eaf6deca1e 100644 --- a/goal_src/jak3/levels/precursor/precura-part.gc +++ b/goal_src/jak3/levels/precursor/precura-part.gc @@ -7,3 +7,748 @@ ;; DECOMP BEGINS +(defpartgroup group-precura-generator-explode + :id 1313 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4411 :period (seconds 10) :length (seconds 6)) + (sp-item 4412 :period (seconds 10) :length (seconds 2)) + (sp-item 4413 :period (seconds 15) :length (seconds 0.035)) + (sp-item 4414 :flags (sp3)) + ) + ) + +(defpart 4411 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.2125 -0.2125) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 4415) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4415 + :init-specs ((:accel-x (meters -0.0033333334) 1 (meters 0.006666667)) + (:accel-y (meters -0.0033333334) 1 (meters 0.006666667)) + (:accel-z (meters -0.0033333334) 1 (meters 0.006666667)) + (:next-time (seconds 0.067) (seconds 0.03)) + (:next-launcher 4415) + ) + ) + +(defpart 4412 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -8) (degrees 16)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4413 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.08888889) + (:fade-g -0.033333335) + (:fade-a -0.14222223 -0.14222223) + (:friction 0.999) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4414 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 40.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-platform-effect + :id 1314 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4417 :flags (sp7) :period (seconds 20) :length (seconds 2)) + (sp-item 4418 :flags (sp3 sp7) :binding 4416) + (sp-item 4419 :flags (sp3 sp7) :binding 4416) + (sp-item 4420 :flags (sp3 sp7) :binding 4416) + (sp-item 4421 :flags (sp3 sp7) :binding 4416) + (sp-item 4422 :flags (sp3 sp7) :binding 4416) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + ) + ) + +(defpart 4417 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 2.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 450)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 1)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64 -0.64) + (:friction 0.6 0.05) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + (:func 'spt-func-relative-pos) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun sparticle-track-joint-xz ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (the int (-> arg1 user-float))) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 launchrot x) (-> v1-3 x)) + (set! (-> arg2 launchrot z) (-> v1-3 z)) + ) + 0 + (none) + ) + +(defpart 4418 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +(defpart 4419 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -1)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +(defpart 4420 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +(defpart 4421 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -3)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +(defpart 4422 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +(defpart 4416 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:z (meters 4.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.026666667) 1 (meters 0.053333335)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64 -0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +(defpart 4423 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.5) + (:scale-x (meters 15) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 60.0) + (:fade-a -0.2 -0.2) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 4424 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 255.0) + (:a 60.0 10.0) + (:fade-a -0.36571428 -0.36571428) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 4425 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 20.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.9) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4426 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters -0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.36571428 -0.36571428) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +(defpartgroup group-bomb-spawner + :id 1315 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4427) (sp-item 4428)) + ) + +(defpart 4427 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.5)) + (:scale-y (meters 1.7)) + (:r 0.0 50.0) + (:g 50.0 32.0) + (:b 0.0 64.0) + (:a 32.0 64.0) + (:scalevel-y (meters 0.21333334)) + (:fade-a -1.6) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4428 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0.4)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 6)) + (:r 40.0 10.0) + (:g 70.0 10.0) + (:b 20.0 10.0) + (:a 70.0 5.0) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-shock-wave + :id 1316 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4429) (sp-item 4430)) + ) + +(defpart 4429 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5) (meters 3)) + (:scale-y :copy scale-x) + (:r 84.0) + (:g 84.0) + (:b 255.0) + (:a 30.0 10.0) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4430 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-gem-d-smoke + :id 1317 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4431 :flags (sp7))) + ) + +(defpart 4432 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20.4) (meters 1.4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 30.0) + (:a 128.0 55.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4431 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 34.0) + (:g 34.0) + (:b 64.0 34.0) + (:a 64.0 10.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-b -0.64) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-gem-explosion + :id 1318 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6 sp7) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :scale (1.5 1.5 1.5) + :parts ((sp-item 4433 :flags (sp3)) + (sp-item 4434 :flags (sp3)) + (sp-item 4435 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4436 :flags (sp3)) + ) + ) + +(defpart 4437 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4433 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4434 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4435 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -1) 2.0 (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 200.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4436 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -1) 2.0 (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 255.0) + (:vel-y (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.013333334)) + (:fade-r -1.7) + (:fade-g -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 4438) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4438 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.6666667) + (:friction 0.99) + ) + ) + +(defpartgroup group-precura-bulb-green-glow + :id 1319 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4439 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4439 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precura-bulb-green-glow-long + :id 1320 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4440 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4440 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precura-green-steam + :id 1321 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 4441 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 4441 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.04) + (:z (meters 0) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 80.0) + (:a 0.0) + (:vel-y (meters 0.005925926)) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.000033333334) (meters 0.00006666667)) + (:accel-y (meters 0.00033333333) (meters 0.000033333334)) + (:accel-z (meters -0.000033333334) (meters 0.00006666667)) + (:friction 0.94) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 4442) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4442 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +(defpartgroup group-precura-green-glow-small + :id 1322 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4443 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4443 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precura-rtableb + :id 1323 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4444 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4444 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 90.0) + (:b 80.0) + (:a 70.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precurc-mood.gc b/goal_src/jak3/levels/precursor/precurc-mood.gc index bba7e5007f..c2c1ad0a15 100644 --- a/goal_src/jak3/levels/precursor/precurc-mood.gc +++ b/goal_src/jak3/levels/precursor/precurc-mood.gc @@ -7,3 +7,80 @@ ;; DECOMP BEGINS +(deftype precurc-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +(defun init-mood-precurc ((arg0 mood-context)) + (let ((v1-0 (the-as object (-> arg0 state)))) + (set! (-> (the-as precurc-states v1-0) pulse brightness) 1.0) + (set! (-> (the-as precurc-states v1-0) pulse target-brightness) 1.0) + (set! (-> (the-as precurc-states v1-0) pulse speed) 1.0) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-precurc-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a0-1 (-> v1-0 0))) + (set! (-> a0-1 dir0 direction x) 0.0) + (set! (-> a0-1 dir0 direction y) 1.0) + (set! (-> a0-1 dir0 direction z) 0.0) + (set! (-> a0-1 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.5 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.25 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + (none) + ) + +(defbehavior update-mood-precurc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precurc-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-9 (-> *display* part-clock frame-counter)) + (f0-5 (* 218.45334 (the float (mod v1-9 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-5)))) + ) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +(defun precurc-activate ((arg0 level)) + (persist-with-delay + *setting-control* + 'precur-activate + (the-as time-frame (the-as uint #xb2d05e00)) + 'sky-type + 'star-field + 0.0 + 0 + ) + (none) + ) + +(defun precur-deactivate ((arg0 level)) + (persist-with-delay *setting-control* 'precur-activate 0 'sky-type #f 0.0 0) + (none) + ) diff --git a/goal_src/jak3/levels/precursor/precurc-obs.gc b/goal_src/jak3/levels/precursor/precurc-obs.gc index 55417a039e..ca2a3e2cdf 100644 --- a/goal_src/jak3/levels/precursor/precurc-obs.gc +++ b/goal_src/jak3/levels/precursor/precurc-obs.gc @@ -7,3 +7,423 @@ ;; DECOMP BEGINS +(deftype precur-elevator (elevator) + () + ) + + +(defskelgroup skel-precur-elevator precur-elevator precur-elevator-lod0-jg precur-elevator-idle-ja + ((precur-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 16) + ) + +(defmethod get-art-group ((this precur-elevator)) + (art-group-get-by-name *level* "skel-precur-elevator" (the-as (pointer level) #f)) + ) + +(defmethod elevator-method-47 ((this precur-elevator)) + (if *target* + (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) + (* 0.4 (-> this root root-prim prim-core world-sphere w)) + ) + #f + ) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this precur-elevator)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 65536.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 65536.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-18 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this precur-elevator)) + (set! (-> this sound-running-loop) (static-sound-spec "prec-elev-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "prec-elev-stop" :group 0)) + (none) + ) + +(defskelgroup skel-precur-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +(deftype precur-door-a (process-drawable) + ((open-test pair) + (open-started time-frame) + (do-camera? symbol) + (open-frame float) + ) + (:state-methods + open + close + ) + (:methods + (precur-door-a-method-22 () none) + ) + ) + + +(defmethod init-from-entity! ((this precur-door-a) (arg0 entity-actor)) + (set! (-> this open-started) 0) + (set! (-> this open-frame) 45.0) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-14 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this open-test) + (the-as + pair + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this do-camera?) + (the-as + symbol + (and (res-lump-struct (-> this entity) 'camera-name structure) + (and (not (script-eval (-> this open-test))) (task-node-closed? (game-task-node precursor-tour-resolution))) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this close)) + ) + +(defstate close (precur-door-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (if (script-eval (-> self open-test)) + (go-virtual open) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +(defstate open (precur-door-a) + :virtual #t + :enter (behavior () + (cond + ((and (time-elapsed? (-> self state-time) (seconds 0.5)) (-> self do-camera?) (zero? (-> self open-started))) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 900 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let* ((v1-14 (-> *game-info* sub-task-list (game-task-node precursor-destroy-ship-escape))) + (v1-16 (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-16 + (send-event (handle->process v1-16) 'extra-time 900) + ) + ) + (set-time! (-> self open-started)) + ) + (else + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= 0.0 (ja-frame-num 0)) + (sound-play "prec-door-open") + ) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0) 0.5)) + ) + (transform-post) + ) + ) + +(defskelgroup skel-precur-swingpole-pop precur-swingpole-pop precur-swingpole-pop-lod0-jg precur-swingpole-pop-idle-ja + ((precur-swingpole-pop-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 6 8) + ) + +(deftype precur-swingpole-pop (swingpole) + ((root collide-shape :override) + (moving? symbol) + (player-grabbed? symbol) + (halfway? symbol) + (stopped-time time-frame) + (movedist float) + (tt float) + (paused-time time-frame) + (direction uint8) + ) + ) + + +(defmethod swingpole-method-22 ((this precur-swingpole-pop)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (-> this moving?) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> this node-list data 3))) + 0.0 + (cond + ((zero? (-> this paused-time)) + (+! (-> this tt) (* 0.5 (seconds-per-frame))) + (when (< 1.0 (-> this tt)) + (let ((f0-4 (-> this tt))) + (set! (-> this tt) (- f0-4 (* (the float (the int (/ f0-4 1.0))) 1.0))) + ) + (set-time! (-> this paused-time)) + ) + ) + (else + (when (time-elapsed? (-> this paused-time) (seconds 1)) + (set! (-> this paused-time) 0) + (sound-play "spike-retract") + (set! (-> this halfway?) #f) + ) + ) + ) + (when (and (not (-> this halfway?)) (< 0.5 (-> this tt))) + (set! (-> this halfway?) #t) + (sound-play "spike-reveal") + ) + (let ((f0-9 (cos (* 65536.0 (-> this tt))))) + (set! (-> this movedist) (* 20480.0 (+ -1.0 f0-9))) + ) + (set! (-> s5-0 quad) (-> this entity extra trans quad)) + (vector-normalize-copy! (-> this dir) (-> s4-0 bone transform fvec) 1.0) + ) + (let ((a1-3 s5-0)) + (let ((v1-30 s5-0)) + (let ((a0-12 (-> this dir))) + (let ((a2-3 (-> this movedist))) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-30 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-3 quad) vf6) + ) + (move-to-point! (-> this root) s5-0) + ) + (when (and (-> this moving?) + (< (fabs (-> this movedist)) 1228.8) + (< 122880.0 (vector-vector-distance (target-pos 0) (-> this entity extra trans))) + ) + (set! (-> this moving?) #f) + (set! (-> this player-grabbed?) #f) + (set-time! (-> this stopped-time)) + ) + ) + (when (-> this player-grabbed?) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this entity extra trans quad)) + (seek! (-> this movedist) 0.0 (* 36864.0 (seconds-per-frame))) + (let ((a1-7 s5-2)) + (let ((v1-48 s5-2)) + (let ((a0-21 (-> this dir))) + (let ((a2-5 (-> this movedist))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-21 quad)) + ) + (.lvf vf4 (&-> v1-48 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-7 quad) vf6) + ) + (move-to-point! (-> this root) s5-2) + ) + ) + (when (and (not (-> this moving?)) (and (not (-> this player-grabbed?)) + (time-elapsed? (-> this stopped-time) (seconds 0.5)) + (< (vector-vector-distance (target-pos 0) (-> this root trans)) 122880.0) + ) + ) + (set! (-> this moving?) #t) + (set! (-> this player-grabbed?) #f) + (set-time! (-> this stopped-time)) + ) + (call-parent-method this) + (none) + ) + ) + +(defstate idle (precur-swingpole-pop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (when (send-event proc 'pole-grab (-> block param 0)) + (go-virtual active (process->handle proc)) + (set! (-> self moving?) #f) + (set! (-> self player-grabbed?) #t) + (set-time! (-> self stopped-time)) + ) + #f + ) + ) + ) + :enter (behavior () + (set! (-> self player-grabbed?) #f) + (set! (-> self tt) 0.0) + (set! (-> self direction) (the-as uint 0)) + 0 + ) + :code (behavior () + (if (nonzero? (-> self draw)) + (ja-post) + ) + (update-transforms (-> self root)) + (until #f + (swingpole-method-22 self) + (suspend) + ) + #f + ) + ) + +(defmethod init-collision! ((this precur-swingpole-pop)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 24576.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 24576.0 32768.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 24576.0 12288.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-12 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod init-from-entity! ((this precur-swingpole-pop) (arg0 entity-actor)) + (call-parent-method this arg0) + (set! (-> this player-grabbed?) #f) + (set! (-> this moving?) #f) + (set-time! (-> this stopped-time)) + (set! (-> this halfway?) #f) + #f + ) + +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this precur-swingpole-pop)) + (the-as vector (-> this root root-prim prim-core)) + ) diff --git a/goal_src/jak3/levels/precursor/precurc-part.gc b/goal_src/jak3/levels/precursor/precurc-part.gc index eeac3040bc..7761d257ce 100644 --- a/goal_src/jak3/levels/precursor/precurc-part.gc +++ b/goal_src/jak3/levels/precursor/precurc-part.gc @@ -7,3 +7,137 @@ ;; DECOMP BEGINS +(defpartgroup group-precurc-bulb-green-glow + :id 1329 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4458 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4458 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precurc-bulb-green-glow-long + :id 1330 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4459 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4459 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precurc-green-steam + :id 1331 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 4460 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 4460 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.04) + (:z (meters 0) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 80.0) + (:a 0.0) + (:vel-y (meters 0.005925926)) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.000033333334) (meters 0.00006666667)) + (:accel-y (meters 0.00033333333) (meters 0.000033333334)) + (:accel-z (meters -0.000033333334) (meters 0.00006666667)) + (:friction 0.94) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 4461) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4461 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +(defpartgroup group-precurc-green-glow-small + :id 1332 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4462 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4462 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precurc-purple-glow-small + :id 1333 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4463 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4463 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.5)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 90.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precurd-obs.gc b/goal_src/jak3/levels/precursor/precurd-obs.gc index 488b739705..d9adcd1696 100644 --- a/goal_src/jak3/levels/precursor/precurd-obs.gc +++ b/goal_src/jak3/levels/precursor/precurd-obs.gc @@ -7,3 +7,2356 @@ ;; DECOMP BEGINS +(defskelgroup skel-pre-tformer terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :origin-joint-index 3 + ) + +(defskelgroup skel-pre-tformer-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja + ((terraformer-leg-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 38 0 50) + :origin-joint-index 3 + ) + +(defskelgroup skel-pre-tformer-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja + ((terraformer-leg-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 61 0 68) + :origin-joint-index 4 + ) + +(defskelgroup skel-pre-tformer-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja + ((terraformer-leg-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 25 0 75) + :origin-joint-index 5 + ) + +(defskelgroup skel-pre-tformer-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja + ((terraformer-spike-lod0-mg (meters 20)) + (terraformer-spike-lod1-mg (meters 40)) + (terraformer-spike-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 40 20 35) + :origin-joint-index 3 + ) + +(deftype pre-tformer (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (pre-tformer) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-a process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-b process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-c process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-spike process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +(defmethod init-from-entity! ((this pre-tformer) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-pre-tformer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (pre-tformer-spawn-leg-a) + (pre-tformer-spawn-leg-b) + (pre-tformer-spawn-leg-c) + (pre-tformer-spawn-spike) + (go (method-of-object this idle)) + ) + +(deftype wall-window-big (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wall-window-big precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja + ((precur-wall-window-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + ) + +(define *precurd-obs-shake-time* (the-as time-frame 0)) + +(defstate idle (wall-window-big) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this wall-window-big) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw lod-set lod 0 dist) 2048000.0) + (go (method-of-object this idle)) + ) + +(defbehavior wall-window-big-init-by-other wall-window-big ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +(defskelgroup skel-precurd-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +(deftype precurd-door-a (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this precurd-door-a) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precurd-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +(define *precur-blocks-trigger-points* (new 'static 'boxed-array :type float + 525926.4 + 880640.0 + 974028.8 + 1155891.2 + 1220198.4 + 1295564.8 + 1335296.0 + 1444249.6 + 1433190.4 + 1637990.4 + 1682227.2 + 1721958.4 + 1800601.6 + 1850982.4 + 1890713.6 + 1921843.2 + ) + ) + +(define *precur-path-trigger-points* + (new 'static 'boxed-array :type float 532480.0 920780.8 1162854.4 1438924.8 1640038.4 1838284.8) + ) + +(define *precur-path-2nd-trigger-points* + (new 'static 'boxed-array :type float 866713.6 1123123.2 1401241.6 1626112.0 1807155.2 2109849.5) + ) + +(define *precur-trigger-idx* 0) + +(defun precur-bridge-reset () + #f + ) + +(defun precur-bridge-path-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-path-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2048000.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +(defun precur-bridge-path-2nd-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-path-2nd-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2129920.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +(defun precur-bridge-blocks-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-blocks-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2048000.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +(defun precur-trigger-update () + 0 + (none) + ) + +(defskelgroup skel-precur-bridge-path-break precur-bridge-path-break precur-bridge-path-break-lod0-jg precur-bridge-path-break-idle-ja + ((precur-bridge-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.5381 1.3474 -23.1812 89.6366) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-a-path-break precur-bridge-a-path-break precur-bridge-a-path-break-lod0-jg precur-bridge-a-path-break-idle-ja + ((precur-bridge-a-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.2239 0 0.6457 39.9771) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-b-path-break precur-bridge-b-path-break precur-bridge-b-path-break-lod0-jg precur-bridge-b-path-break-idle-ja + ((precur-bridge-b-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0.5849 0 -0.1007 37.7788) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-c-path-break precur-bridge-c-path-break precur-bridge-c-path-break-lod0-jg precur-bridge-c-path-break-idle-ja + ((precur-bridge-c-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4207 0 1.3753 39.7237) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-d-path-break precur-bridge-d-path-break precur-bridge-d-path-break-lod0-jg precur-bridge-d-path-break-idle-ja + ((precur-bridge-d-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4207 0 1.3753 37.9194) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-e-path-break precur-bridge-e-path-break precur-bridge-e-path-break-lod0-jg precur-bridge-e-path-break-idle-ja + ((precur-bridge-e-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -0.0382 -0.0803 -0.1898 52.5007) + :origin-joint-index 3 + ) + +(deftype precur-bridge-path-break (process-drawable) + ((root collide-shape :override) + (triggered? symbol) + (idx uint8) + (l-origin matrix :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (anim-1-time time-frame) + (delay-time time-frame) + (debris-handle handle) + ) + (:state-methods + idle + ) + (:methods + (precur-bridge-path-break-method-21 (_type_) none) + (init-collision! (_type_) none) + (get-skel (_type_) art-group) + (set-idx-by-name (_type_) none) + (precur-bridge-path-break-method-25 (_type_ vector) none) + (precur-bridge-path-break-method-26 (_type_) none) + (precur-bridge-path-break-method-27 (_type_) none) + ) + ) + + +(defmethod precur-bridge-path-break-method-27 ((this precur-bridge-path-break)) + 0 + (none) + ) + +;; WARN: Return type mismatch matrix vs none. +(defmethod precur-bridge-path-break-method-26 ((this precur-bridge-path-break)) + (let ((v1-1 (-> this node-list data 3))) + (matrix-4x4-inverse! (-> this l-origin) (-> v1-1 bone transform)) + ) + (none) + ) + +(defmethod precur-bridge-path-break-method-25 ((this precur-bridge-path-break) (arg0 vector)) + (let ((s4-0 (-> this node-list data 3))) + (vector<-cspace! (new 'stack-no-clear 'vector) s4-0) + (matrix*! (the-as matrix arg0) (-> s4-0 bone transform) (-> this l-origin)) + ) + 0 + (none) + ) + +(defmethod set-idx-by-name ((this precur-bridge-path-break)) + (let ((s5-0 (-> this name))) + (cond + ((string= s5-0 "precur-bridge-path-break-1") + (set! (-> this idx) (the-as uint 0)) + 0 + ) + ((string= s5-0 "precur-bridge-path-break-2") + (set! (-> this idx) (the-as uint 1)) + ) + ((string= s5-0 "precur-bridge-path-break-3") + (set! (-> this idx) (the-as uint 2)) + ) + ((string= s5-0 "precur-bridge-path-break-4") + (set! (-> this idx) (the-as uint 3)) + ) + ((string= s5-0 "precur-bridge-path-break-5") + (set! (-> this idx) (the-as uint 4)) + ) + ((string= s5-0 "precur-bridge-path-break-6") + (set! (-> this idx) (the-as uint 5)) + ) + ) + ) + (none) + ) + +(defmethod get-skel ((this precur-bridge-path-break)) + (let* ((v1-1 (-> this idx)) + (v0-0 (cond + ((zero? v1-1) + (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 1) + (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 2) + (art-group-get-by-name *level* "skel-precur-bridge-b-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 3) + (art-group-get-by-name *level* "skel-precur-bridge-c-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 4) + (art-group-get-by-name *level* "skel-precur-bridge-d-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 5) + (art-group-get-by-name *level* "skel-precur-bridge-e-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + +(defmethod init-collision! ((this precur-bridge-path-break)) + (set! (-> this root) #f) + (let ((v1-0 (-> this idx))) + (cond + ((zero? v1-0) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 9) 0))) + (set! (-> s5-0 total-prims) (the-as uint 10)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 14492.058 5518.95 -94950.195 367151.5) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -3893.6577 286.3104 0.0 139815.73) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-14 transform-index) 4) + (set-vector! (-> v1-14 local-sphere) 0.0 79.4624 -1256.6528 98625.945) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-16 transform-index) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 1306.624 96.256 95901.29) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-18 transform-index) 6) + (set-vector! (-> v1-18 local-sphere) 2593.5872 -20.0704 0.0 104466.02) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-20 transform-index) 7) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 83188.53) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-22 transform-index) 8) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 127257.4) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-24 transform-index) 9) + (set-vector! (-> v1-24 local-sphere) -343.6544 47.104 928.9728 117174.27) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-26 transform-index) 10) + (set-vector! (-> v1-26 local-sphere) 0.0 -462.4384 0.0 70856.3) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-28 transform-index) 11) + (set-vector! (-> v1-28 local-sphere) 499.3024 366.1824 0.0 164432.69) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-31 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-31 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-31 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((= v1-0 1) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 1) 0))) + (set! (-> s5-1 total-prims) (the-as uint 2)) + (set! (-> s4-1 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) -5013.094 0.0 2644.787 163746.2) + (set! (-> s5-1 root-prim) s4-1) + ) + (pusher-init s5-1) + (let ((v1-44 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-44 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-44 transform-index) 3) + (set-vector! (-> v1-44 local-sphere) 0.0 0.0 1480.704 135834.83) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-47 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-47 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-47 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((= v1-0 2) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 1) 0))) + (set! (-> s5-2 total-prims) (the-as uint 2)) + (set! (-> s4-2 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 2395.7505 0.0 -412.4672 154741.97) + (set! (-> s5-2 root-prim) s4-2) + ) + (pusher-init s5-2) + (let ((v1-60 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-60 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-60 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-60 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-60 transform-index) 3) + (set-vector! (-> v1-60 local-sphere) 0.0 0.0 344.8832 153374.72) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-63 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-63 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-63 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((= v1-0 3) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 1) 0))) + (set! (-> s5-3 total-prims) (the-as uint 2)) + (set! (-> s4-3 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) -5819.187 0.0 5633.229 162708.28) + (set! (-> s5-3 root-prim) s4-3) + ) + (pusher-init s5-3) + (let ((v1-76 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-76 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-76 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-76 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-76 transform-index) 3) + (set-vector! (-> v1-76 local-sphere) 0.0 0.0 254.3616 131729.4) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-79 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-79 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-79 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((= v1-0 4) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 1) 0))) + (set! (-> s5-4 total-prims) (the-as uint 2)) + (set! (-> s4-4 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) -5819.187 0.0 5633.229 155317.86) + (set! (-> s5-4 root-prim) s4-4) + ) + (pusher-init s5-4) + (let ((v1-92 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-92 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-92 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-92 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-92 transform-index) 3) + (set-vector! (-> v1-92 local-sphere) 1553.2032 0.0 -466.944 123079.48) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-95 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-95 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-95 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((= v1-0 5) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0))) + (set! (-> s5-6 total-prims) (the-as uint 2)) + (set! (-> s4-5 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) -156.4672 -328.9088 -777.4208 215042.88) + (set! (-> s5-6 root-prim) s4-5) + ) + (pusher-init s5-6) + (let ((v1-108 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-108 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-108 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-108 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-108 transform-index) 3) + (set-vector! (-> v1-108 local-sphere) 1206.272 4508.4673 -5612.749 189132.39) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-111 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-111 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-111 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ) + ) + (when (not (-> this root)) + (let ((s5-7 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-mesh s5-7 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-6 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-6 transform-index) 0) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 4096000.0) + (set! (-> s5-7 total-prims) (the-as uint 1)) + (set! (-> s5-7 root-prim) s4-6) + ) + (pusher-init s5-7) + (set! (-> s5-7 nav-radius) (* 0.75 (-> s5-7 root-prim local-sphere w))) + (let ((v1-126 (-> s5-7 root-prim))) + (set! (-> s5-7 backup-collide-as) (-> v1-126 prim-core collide-as)) + (set! (-> s5-7 backup-collide-with) (-> v1-126 prim-core collide-with)) + ) + (set! (-> this root) s5-7) + ) + ) + 0 + (none) + ) + +(defstate idle (precur-bridge-path-break) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :trans (behavior () + (rider-trans) + ) + :code sleep-code + :post (behavior () + (cond + ((task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + (if (not (handle->process (-> self debris-handle))) + (set! (-> self debris-handle) (process->handle (process-by-name "precurd-debris-part-1" *active-pool*))) + ) + (send-event (handle->process (-> self debris-handle)) 'start) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) -1000.0) + ) + (else + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (precur-bridge-path-break-method-25 self gp-0) + (dotimes (s5-0 (-> self actor-group-count)) + (let ((s4-0 (-> self actor-group s5-0))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'xform) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-5 send-event-function) + (v1-33 (-> s4-0 data s3-0 actor)) + ) + (t9-5 + (if v1-33 + (-> v1-33 extra process) + ) + a1-5 + ) + ) + ) + ) + ) + ) + ) + (when (precur-bridge-reset) + (ja :num-func num-func-identity :frame-num 0.0) + (set! (-> self triggered?) #f) + ) + (when *debug-segment* + (if (zero? (-> self idx)) + (precur-trigger-update) + ) + ) + (when (and (-> self triggered?) (ja-done? 0) (zero? (-> self anim-1-time))) + (ja :group! precur-bridge-path-break-idle2-ja :num! min) + (set-time! (-> self anim-1-time)) + (set! (-> self triggered?) #f) + ) + (when (and (not (-> self triggered?)) + (nonzero? (-> self anim-1-time)) + (or (precur-bridge-path-2nd-trigger (the-as int (-> self idx))) + (time-elapsed? (-> self anim-1-time) (-> self delay-time)) + ) + ) + (sound-play "plat-fall") + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 1) (seconds 2)))) + (set! (-> self triggered?) #t) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (when (and (precur-bridge-path-trigger (the-as int (-> self idx))) + (zero? (-> self anim-1-time)) + (not (-> self triggered?)) + ) + (sound-play "plat-separate") + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 2) (seconds 3)))) + (set! (-> self triggered?) #t) + ) + (when (and (< *precurd-obs-shake-time* (current-time)) (precur-bridge-path-trigger 0)) + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 3) (seconds 4)))) + ) + (if (-> self triggered?) + (ja :num! (seek!)) + ) + (if (not (-> self triggered?)) + (ja :num-func num-func-identity :frame-num 0.0) + ) + (rider-post) + (if (= (-> self l-origin trans x) 0.0) + (precur-bridge-path-break-method-26 self) + ) + ) + ) + +(define *precur-path-delay-time* (new 'static 'boxed-array :type float 6.7 4.9 5.25 3.0 2.7 4.5)) + +(define *precurd-blow-snd-id* (new 'static 'sound-id)) + +(defun precur-play-blow-sound () + (when (and (zero? *precurd-blow-snd-id*) + (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + ) + (set! *precurd-blow-snd-id* (new-sound-id)) + (sound-play "prec-blow-amb" :id *precurd-blow-snd-id* :pitch 1 :position (target-pos 0)) + ) + 0 + (none) + ) + +(defun precur-stop-blow-sound () + (when (nonzero? *precurd-blow-snd-id*) + (sound-stop *precurd-blow-snd-id*) + (set! *precurd-blow-snd-id* (new 'static 'sound-id)) + 0 + ) + (none) + ) + +(defmethod init-from-entity! ((this precur-bridge-path-break) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set-idx-by-name this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this anim-1-time) 0) + (set! (-> this delay-time) + (the-as time-frame (the int (* 300.0 (-> *precur-path-delay-time* (-> this idx))))) + ) + (set! (-> this debris-handle) (the-as handle #f)) + (precur-bridge-reset) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-13 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (set! (-> this draw lod-set lod 1 dist) 14336000.0) + (set! (-> this draw lod-set lod 2 dist) 14336000.0) + (set! (-> this triggered?) #f) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-16 param 0) 1.0) + (set! (-> a0-16 frame-num) 0.0) + (joint-control-channel-group! + a0-16 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (precur-stop-blow-sound) + (go (method-of-object this idle)) + ) + +(defskelgroup skel-precur-bridge-a-blocks-break precur-bridge-a-blocks-break precur-bridge-a-blocks-break-lod0-jg precur-bridge-a-blocks-break-idle-ja + ((precur-bridge-a-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 9.0334 0.2107 -3.8519 494.66) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-b-blocks-break precur-bridge-b-blocks-break precur-bridge-b-blocks-break-lod0-jg precur-bridge-b-blocks-break-idle-ja + ((precur-bridge-b-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.4472 -1.3478 -0.911 304.626) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-c-blocks-break precur-bridge-c-blocks-break precur-bridge-c-blocks-break-lod0-jg precur-bridge-c-blocks-break-idle-ja + ((precur-bridge-c-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 9.998 -0.1649 -1.0795 294.914) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-d-blocks-break precur-bridge-d-blocks-break precur-bridge-d-blocks-break-lod0-jg precur-bridge-d-blocks-break-idle-ja + ((precur-bridge-d-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 1.386 -0.0346 -10.9652 321.94598) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-e-blocks-break precur-bridge-e-blocks-break precur-bridge-e-blocks-break-lod0-jg precur-bridge-e-blocks-break-idle-ja + ((precur-bridge-e-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 1.0517 -0.4516 -13.2966 452.576) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-f-blocks-break precur-bridge-f-blocks-break precur-bridge-f-blocks-break-lod0-jg precur-bridge-f-blocks-break-idle-ja + ((precur-bridge-f-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.9763 -0.4431 -3.0526 228.36398) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-g-blocks-break precur-bridge-g-blocks-break precur-bridge-g-blocks-break-lod0-jg precur-bridge-g-blocks-break-idle-ja + ((precur-bridge-g-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 86.51) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-h-blocks-break precur-bridge-h-blocks-break precur-bridge-h-blocks-break-lod0-jg precur-bridge-h-blocks-break-idle-ja + ((precur-bridge-h-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.1676 0.2012 -9.3751 356.966) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-i-blocks-break precur-bridge-i-blocks-break precur-bridge-i-blocks-break-lod0-jg precur-bridge-i-blocks-break-idle-ja + ((precur-bridge-i-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 6.7898 0.0443 0.6402 296.336) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-j-blocks-break precur-bridge-j-blocks-break precur-bridge-j-blocks-break-lod0-jg precur-bridge-j-blocks-break-idle-ja + ((precur-bridge-j-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4829 0.4836 -4.9468 330.75598) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-k-blocks-break precur-bridge-k-blocks-break precur-bridge-k-blocks-break-lod0-jg precur-bridge-k-blocks-break-idle-ja + ((precur-bridge-k-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0.576 0.5238 -9.0496 389.09198) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-l-blocks-break precur-bridge-l-blocks-break precur-bridge-l-blocks-break-lod0-jg precur-bridge-l-blocks-break-idle-ja + ((precur-bridge-l-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 2.2279 0.4542 -7.9808 363.432) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-m-blocks-break precur-bridge-m-blocks-break precur-bridge-m-blocks-break-lod0-jg precur-bridge-m-blocks-break-idle-ja + ((precur-bridge-m-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -3.1801 0.1337 -7.183 346.85797) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-n-blocks-break precur-bridge-n-blocks-break precur-bridge-n-blocks-break-lod0-jg precur-bridge-n-blocks-break-idle-ja + ((precur-bridge-n-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -3.7999 0.003 -5.6982 302.406) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-o-blocks-break precur-bridge-o-blocks-break precur-bridge-o-blocks-break-lod0-jg precur-bridge-o-blocks-break-idle-ja + ((precur-bridge-o-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.0848 0.5307 -13.0752 387.26398) + :origin-joint-index 3 + ) + +(defskelgroup skel-precur-bridge-p-blocks-break precur-bridge-p-blocks-break precur-bridge-p-blocks-break-lod0-jg precur-bridge-p-blocks-break-idle-ja + ((precur-bridge-p-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.2394 0.174 -3.3591 299.408) + :origin-joint-index 3 + ) + +(deftype precur-bridge-blocks-break (process-drawable) + ((root collide-shape :override) + (triggered? symbol) + (idx uint8) + (snds sound-id 5) + (toe-up? symbol 5) + ) + (:state-methods + idle + ) + (:methods + (precur-bridge-blocks-break-method-21 (_type_) none) + (init-collision! (_type_) none) + (init-collision2! (_type_) none) + (get-skel (_type_) art-group) + (set-idx-by-name (_type_) none) + ) + ) + + +(defmethod set-idx-by-name ((this precur-bridge-blocks-break)) + (let ((s5-0 (-> this name))) + (cond + ((string= s5-0 "precur-bridge-blocks-break-1") + (set! (-> this idx) (the-as uint 0)) + 0 + ) + ((string= s5-0 "precur-bridge-blocks-break-2") + (set! (-> this idx) (the-as uint 1)) + ) + ((string= s5-0 "precur-bridge-blocks-break-3") + (set! (-> this idx) (the-as uint 2)) + ) + ((string= s5-0 "precur-bridge-blocks-break-4") + (set! (-> this idx) (the-as uint 3)) + ) + ((string= s5-0 "precur-bridge-blocks-break-5") + (set! (-> this idx) (the-as uint 4)) + ) + ((string= s5-0 "precur-bridge-blocks-break-6") + (set! (-> this idx) (the-as uint 5)) + ) + ((string= s5-0 "precur-bridge-blocks-break-7") + (set! (-> this idx) (the-as uint 6)) + ) + ((string= s5-0 "precur-bridge-blocks-break-8") + (set! (-> this idx) (the-as uint 7)) + ) + ((string= s5-0 "precur-bridge-blocks-break-9") + (set! (-> this idx) (the-as uint 8)) + ) + ((string= s5-0 "precur-bridge-blocks-break-10") + (set! (-> this idx) (the-as uint 9)) + ) + ((string= s5-0 "precur-bridge-blocks-break-11") + (set! (-> this idx) (the-as uint 10)) + ) + ((string= s5-0 "precur-bridge-blocks-break-12") + (set! (-> this idx) (the-as uint 11)) + ) + ((string= s5-0 "precur-bridge-blocks-break-13") + (set! (-> this idx) (the-as uint 12)) + ) + ((string= s5-0 "precur-bridge-blocks-break-14") + (set! (-> this idx) (the-as uint 13)) + ) + ((string= s5-0 "precur-bridge-blocks-break-15") + (set! (-> this idx) (the-as uint 14)) + ) + ((string= s5-0 "precur-bridge-blocks-break-16") + (set! (-> this idx) (the-as uint 15)) + ) + ) + ) + (none) + ) + +(defmethod get-skel ((this precur-bridge-blocks-break)) + (let* ((v1-1 (-> this idx)) + (v0-0 (cond + ((zero? v1-1) + (art-group-get-by-name *level* "skel-precur-bridge-a-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 1) + (art-group-get-by-name *level* "skel-precur-bridge-b-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 2) + (art-group-get-by-name *level* "skel-precur-bridge-c-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 3) + (art-group-get-by-name *level* "skel-precur-bridge-d-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 4) + (art-group-get-by-name *level* "skel-precur-bridge-e-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 5) + (art-group-get-by-name *level* "skel-precur-bridge-f-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 6) + (art-group-get-by-name *level* "skel-precur-bridge-g-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 7) + (art-group-get-by-name *level* "skel-precur-bridge-h-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 8) + (art-group-get-by-name *level* "skel-precur-bridge-i-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 9) + (art-group-get-by-name *level* "skel-precur-bridge-j-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 10) + (art-group-get-by-name *level* "skel-precur-bridge-k-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 11) + (art-group-get-by-name *level* "skel-precur-bridge-l-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 12) + (art-group-get-by-name *level* "skel-precur-bridge-m-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 13) + (art-group-get-by-name *level* "skel-precur-bridge-n-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 14) + (art-group-get-by-name *level* "skel-precur-bridge-o-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 15) + (art-group-get-by-name *level* "skel-precur-bridge-p-blocks-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + +(defmethod init-collision2! ((this precur-bridge-blocks-break)) + (set! (-> this root) #f) + (case (-> this idx) + ((8) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 27811.021 181.4528 2622.2593 60689.613) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid deadly)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -4582.605 0.0 0.0 17555.047) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 2863.923 0.0 131.072 32398.951) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 3861.2993 0.0 0.0 20425.523) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-17 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((9) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0))) + (set! (-> s5-1 total-prims) (the-as uint 4)) + (set! (-> s4-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid deadly)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) -6073.9585 1980.8256 -20262.094 67738.83) + (set! (-> s5-1 root-prim) s4-1) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 1085.8496 31956.992) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 -3903.8977 18616.73) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 5) + (set-vector! (-> v1-32 local-sphere) -4066.9185 0.0 0.0 18914.1) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-35 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((10) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0))) + (set! (-> s5-2 total-prims) (the-as uint 4)) + (set! (-> s4-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid deadly)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 2359.296 2145.4849 -37067.16 79686.04) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid deadly)) + (set! (-> v1-46 transform-index) 3) + (set-vector! (-> v1-46 local-sphere) 3346.8416 0.0 3758.4895 21093.172) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid deadly)) + (set! (-> v1-48 transform-index) 4) + (set-vector! (-> v1-48 local-sphere) 0.0 0.0 -3421.389 22275.277) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid deadly)) + (set! (-> v1-50 transform-index) 5) + (set-vector! (-> v1-50 local-sphere) 3240.3457 0.0 2986.3936 32168.756) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-53 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((11) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 3) 0))) + (set! (-> s5-3 total-prims) (the-as uint 4)) + (set! (-> s4-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid deadly)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) 9125.479 1860.4032 -32689.357 74430.875) + (set! (-> s5-3 root-prim) s4-3) + ) + (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-64 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-64 prim-core action) (collide-action solid deadly)) + (set! (-> v1-64 transform-index) 3) + (set-vector! (-> v1-64 local-sphere) -2207.3345 0.0 4195.5327 31714.51) + ) + (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-66 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-66 prim-core action) (collide-action solid deadly)) + (set! (-> v1-66 transform-index) 4) + (set-vector! (-> v1-66 local-sphere) 0.0 0.0 442.368 17464.934) + ) + (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-68 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-68 prim-core action) (collide-action solid deadly)) + (set! (-> v1-68 transform-index) 5) + (set-vector! (-> v1-68 local-sphere) 0.0 0.0 396.0832 30894.898) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-71 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-71 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-71 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((12) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0))) + (set! (-> s5-4 total-prims) (the-as uint 4)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid deadly)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) -13025.689 547.6352 -29421.568 71036.516) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-82 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-82 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-82 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-82 prim-core action) (collide-action solid deadly)) + (set! (-> v1-82 transform-index) 3) + (set-vector! (-> v1-82 local-sphere) 0.0 0.0 1914.0608 20204.34) + ) + (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-84 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-84 prim-core action) (collide-action solid deadly)) + (set! (-> v1-84 transform-index) 4) + (set-vector! (-> v1-84 local-sphere) 0.0 0.0 278.528 35575.4) + ) + (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-86 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-86 prim-core action) (collide-action solid deadly)) + (set! (-> v1-86 transform-index) 5) + (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -3116.6465 29947.904) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-89 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-89 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-89 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((13) + (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0))) + (set! (-> s5-5 total-prims) (the-as uint 4)) + (set! (-> s4-5 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid deadly)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) -15564.391 12.288 -23339.828 61932.75) + (set! (-> s5-5 root-prim) s4-5) + ) + (let ((v1-100 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-100 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-100 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-100 prim-core action) (collide-action solid deadly)) + (set! (-> v1-100 transform-index) 3) + (set-vector! (-> v1-100 local-sphere) 0.0 0.0 4241.8174 19154.535) + ) + (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-102 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-102 prim-core action) (collide-action solid deadly)) + (set! (-> v1-102 transform-index) 4) + (set-vector! (-> v1-102 local-sphere) 0.0 0.0 762.2656 34124.188) + ) + (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-104 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-104 prim-core action) (collide-action solid deadly)) + (set! (-> v1-104 transform-index) 5) + (set-vector! (-> v1-104 local-sphere) 0.0 0.0 0.0 21233.664) + ) + (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w))) + (let ((v1-107 (-> s5-5 root-prim))) + (set! (-> s5-5 backup-collide-as) (-> v1-107 prim-core collide-as)) + (set! (-> s5-5 backup-collide-with) (-> v1-107 prim-core collide-with)) + ) + (set! (-> this root) s5-5) + ) + ) + ((14) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 4) 0))) + (set! (-> s5-6 total-prims) (the-as uint 5)) + (set! (-> s4-6 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid deadly)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 12635.341 2173.7473 -53556.02 79311.664) + (set! (-> s5-6 root-prim) s4-6) + ) + (let ((v1-118 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-118 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-118 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-118 prim-core action) (collide-action solid deadly)) + (set! (-> v1-118 transform-index) 3) + (set-vector! (-> v1-118 local-sphere) -2649.7024 0.0 0.0 17005.773) + ) + (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-120 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-120 prim-core action) (collide-action solid deadly)) + (set! (-> v1-120 transform-index) 4) + (set-vector! (-> v1-120 local-sphere) -2694.3489 0.0 -2862.285 16540.057) + ) + (let ((v1-122 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-122 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-122 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-122 prim-core action) (collide-action solid deadly)) + (set! (-> v1-122 transform-index) 5) + (set-vector! (-> v1-122 local-sphere) -5552.128 0.0 -3180.544 30642.586) + ) + (let ((v1-124 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-124 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-124 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-124 prim-core action) (collide-action solid deadly)) + (set! (-> v1-124 transform-index) 6) + (set-vector! (-> v1-124 local-sphere) 0.0 0.0 -3341.5168 31176.703) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-127 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-127 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-127 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ((15) + (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 2) 0))) + (set! (-> s5-8 total-prims) (the-as uint 3)) + (set! (-> s4-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-7 prim-core action) (collide-action solid deadly)) + (set! (-> s4-7 transform-index) 3) + (set-vector! (-> s4-7 local-sphere) 13268.582 712.704 -13758.874 61318.758) + (set! (-> s5-8 root-prim) s4-7) + ) + (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-138 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-138 prim-core action) (collide-action solid deadly)) + (set! (-> v1-138 transform-index) 3) + (set-vector! (-> v1-138 local-sphere) -3382.8865 0.0 1936.1792 32668.057) + ) + (let ((v1-140 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-140 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-140 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-140 prim-core action) (collide-action solid deadly)) + (set! (-> v1-140 transform-index) 4) + (set-vector! (-> v1-140 local-sphere) 3927.2449 0.0 4255.744 35694.594) + ) + (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w))) + (let ((v1-143 (-> s5-8 root-prim))) + (set! (-> s5-8 backup-collide-as) (-> v1-143 prim-core collide-as)) + (set! (-> s5-8 backup-collide-with) (-> v1-143 prim-core collide-with)) + ) + (set! (-> this root) s5-8) + ) + ) + ) + (when (not (-> this root)) + (format 0 "Unknown entity ~S found in precurd-obs~%" (-> this name)) + (let ((s5-9 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-149 (new 'process 'collide-shape-prim-mesh s5-9 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-149 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-149 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-149 prim-core action) (collide-action solid deadly)) + (set! (-> v1-149 transform-index) 0) + (set-vector! (-> v1-149 local-sphere) 0.0 0.0 0.0 4096000.0) + (set! (-> s5-9 total-prims) (the-as uint 1)) + (set! (-> s5-9 root-prim) v1-149) + ) + (set! (-> s5-9 nav-radius) (* 0.75 (-> s5-9 root-prim local-sphere w))) + (let ((v1-152 (-> s5-9 root-prim))) + (set! (-> s5-9 backup-collide-as) (-> v1-152 prim-core collide-as)) + (set! (-> s5-9 backup-collide-with) (-> v1-152 prim-core collide-with)) + ) + (set! (-> this root) s5-9) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this precur-bridge-blocks-break)) + (set! (-> this root) #f) + (let ((v1-0 (-> this idx))) + (cond + ((zero? v1-0) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 37000.805 863.0272 -15777.383 101306.37) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid deadly)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -1275.904 -155.2384 -2952.3967 31805.85) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) -1967.3088 0.0 -330.5472 33507.33) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 20190.004) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-17 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((= v1-0 1) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0))) + (set! (-> s5-1 total-prims) (the-as uint 4)) + (set! (-> s4-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid deadly)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) 14119.731 -5520.589 -3731.456 62387.406) + (set! (-> s5-1 root-prim) s4-1) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) -3164.5696 0.0 1624.4736 28662.17) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 625.4592 0.0 2129.92 30461.133) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 5) + (set-vector! (-> v1-32 local-sphere) -2308.9153 0.0 989.184 18648.27) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-35 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((= v1-0 2) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0))) + (set! (-> s5-2 total-prims) (the-as uint 4)) + (set! (-> s4-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid deadly)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 40951.81 -675.4304 -4421.632 60398.387) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid deadly)) + (set! (-> v1-46 transform-index) 3) + (set-vector! (-> v1-46 local-sphere) 0.0 0.0 3322.2656 19020.596) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid deadly)) + (set! (-> v1-48 transform-index) 4) + (set-vector! (-> v1-48 local-sphere) -5020.0576 0.0 3517.6448 19905.332) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid deadly)) + (set! (-> v1-50 transform-index) 5) + (set-vector! (-> v1-50 local-sphere) 0.0 0.0 1477.4272 31325.799) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-53 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((= v1-0 3) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 4) 0))) + (set! (-> s5-3 total-prims) (the-as uint 5)) + (set! (-> s4-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid deadly)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) 5677.056 -141.7216 -44913.46 65934.54) + (set! (-> s5-3 root-prim) s4-3) + ) + (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-64 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-64 prim-core action) (collide-action solid deadly)) + (set! (-> v1-64 transform-index) 3) + (set-vector! (-> v1-64 local-sphere) 0.0 0.0 888.0128 17994.137) + ) + (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-66 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-66 prim-core action) (collide-action solid deadly)) + (set! (-> v1-66 transform-index) 4) + (set-vector! (-> v1-66 local-sphere) 0.0 0.0 -607.4368 28441.395) + ) + (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-68 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-68 prim-core action) (collide-action solid deadly)) + (set! (-> v1-68 transform-index) 5) + (set-vector! (-> v1-68 local-sphere) 0.0 0.0 91.3408 16444.621) + ) + (let ((v1-70 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-70 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-70 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-70 prim-core action) (collide-action solid deadly)) + (set! (-> v1-70 transform-index) 6) + (set-vector! (-> v1-70 local-sphere) 0.0 0.0 3636.4287 17122.1) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-73 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-73 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-73 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((= v1-0 4) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0))) + (set! (-> s5-4 total-prims) (the-as uint 4)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid deadly)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) 4307.763 -1849.7535 -54462.875 92687.56) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-84 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-84 prim-core action) (collide-action solid deadly)) + (set! (-> v1-84 transform-index) 3) + (set-vector! (-> v1-84 local-sphere) 3515.5967 0.0 -4386.4062 28917.35) + ) + (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-86 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-86 prim-core action) (collide-action solid deadly)) + (set! (-> v1-86 transform-index) 4) + (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -358.4 21415.527) + ) + (let ((v1-88 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-88 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-88 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-88 prim-core action) (collide-action solid deadly)) + (set! (-> v1-88 transform-index) 5) + (set-vector! (-> v1-88 local-sphere) 2953.216 0.0 -1265.2544 30869.914) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-91 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-91 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-91 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((= v1-0 5) + (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0))) + (set! (-> s5-5 total-prims) (the-as uint 4)) + (set! (-> s4-5 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid deadly)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) 16286.925 -1814.9376 -12503.449 46768.945) + (set! (-> s5-5 root-prim) s4-5) + ) + (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-102 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-102 prim-core action) (collide-action solid deadly)) + (set! (-> v1-102 transform-index) 3) + (set-vector! (-> v1-102 local-sphere) 0.0 0.0 3398.4512 18284.545) + ) + (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-104 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-104 prim-core action) (collide-action solid deadly)) + (set! (-> v1-104 transform-index) 4) + (set-vector! (-> v1-104 local-sphere) 3489.792 0.0 -1718.6816 18917.377) + ) + (let ((v1-106 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-106 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-106 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-106 prim-core action) (collide-action solid deadly)) + (set! (-> v1-106 transform-index) 5) + (set-vector! (-> v1-106 local-sphere) 0.0 0.0 1899.7249 32303.514) + ) + (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w))) + (let ((v1-109 (-> s5-5 root-prim))) + (set! (-> s5-5 backup-collide-as) (-> v1-109 prim-core collide-as)) + (set! (-> s5-5 backup-collide-with) (-> v1-109 prim-core collide-with)) + ) + (set! (-> this root) s5-5) + ) + ) + ((= v1-0 6) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0))) + (set! (-> s5-6 total-prims) (the-as uint 2)) + (set! (-> s4-6 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid deadly)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 17717.248) + (set! (-> s5-6 root-prim) s4-6) + ) + (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-120 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-120 prim-core action) (collide-action solid deadly)) + (set! (-> v1-120 transform-index) 3) + (set-vector! (-> v1-120 local-sphere) 0.0 0.0 0.0 17717.248) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-123 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-123 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-123 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ((= v1-0 7) + (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 3) 0))) + (set! (-> s5-8 total-prims) (the-as uint 4)) + (set! (-> s4-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-7 prim-core action) (collide-action solid deadly)) + (set! (-> s4-7 transform-index) 3) + (set-vector! (-> s4-7 local-sphere) -4782.4897 824.1152 -38400.41 73106.64) + (set! (-> s5-8 root-prim) s4-7) + ) + (let ((v1-134 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-134 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-134 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-134 prim-core action) (collide-action solid deadly)) + (set! (-> v1-134 transform-index) 3) + (set-vector! (-> v1-134 local-sphere) 2784.4607 0.0 1649.4592 22121.678) + ) + (let ((v1-136 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-136 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-136 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-136 prim-core action) (collide-action solid deadly)) + (set! (-> v1-136 transform-index) 4) + (set-vector! (-> v1-136 local-sphere) 3878.912 0.0 542.72 33871.87) + ) + (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-138 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-138 prim-core action) (collide-action solid deadly)) + (set! (-> v1-138 transform-index) 5) + (set-vector! (-> v1-138 local-sphere) 0.0 0.0 -4243.8657 22156.492) + ) + (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w))) + (let ((v1-141 (-> s5-8 root-prim))) + (set! (-> s5-8 backup-collide-as) (-> v1-141 prim-core collide-as)) + (set! (-> s5-8 backup-collide-with) (-> v1-141 prim-core collide-with)) + ) + (set! (-> this root) s5-8) + ) + ) + ) + ) + (if (not (-> this root)) + (init-collision2! this) + ) + 0 + (none) + ) + +(define *precurd-panel-tear-off-time* (the-as time-frame 0)) + +(defstate idle (precur-bridge-blocks-break) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (if (not (-> *setting-control* user-current freeze-screen)) + (send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 30)) + (shove-up (meters 5)) + ) + ) + ) + ) + #f + ) + (('xform) + (let ((v1-9 (-> block param 0))) + (when (not (-> self triggered?)) + (set! (-> self root trans quad) (-> self entity extra trans quad)) + (vector+! (-> self root trans) (-> self root trans) (the-as vector (+ v1-9 48))) + ) + ) + ) + (('exit) + #t + ) + ) + ) + :enter (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :trans (behavior () + (if (-> *setting-control* user-current freeze-screen) + (rider-trans) + ) + ) + :code (behavior () + (until #f + (until (ja-max? 0) + (suspend) + ) + (dotimes (gp-0 5) + (sound-stop (-> self snds gp-0)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + #f + ) + :post (behavior () + (when (precur-bridge-reset) + (ja :num-func num-func-identity :frame-num 0.0) + (set! (-> self triggered?) #f) + ) + (if (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (when (and (precur-bridge-blocks-trigger (the-as int (-> self idx))) (not (ja-max? 0))) + (let* ((a0-8 (-> self root root-prim)) + (gp-0 a0-8) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (when (= (-> a0-8 type) collide-shape-prim-group) + (dotimes (s4-0 (the-as int (-> gp-0 specific 0))) + (set! (-> (new 'stack-no-clear 'vector) quad) + (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere quad) + ) + (set! (-> s5-0 quad) (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere quad)) + (when (and (not (-> self toe-up? s4-0)) (< 831488.0 (-> s5-0 y))) + (set! (-> self toe-up? s4-0) #t) + (when (time-elapsed? *precurd-panel-tear-off-time* (seconds 1)) + (set! *precurd-panel-tear-off-time* (current-time)) + (sound-play "panel-tear-off" :position s5-0) + ) + 0 + ) + (when (and (< (- (-> s5-0 z) (-> (target-pos 0) z)) 8192.0) (< s4-0 5)) + (when (and (< s4-0 5) (zero? (-> self snds s4-0))) + (set! (-> self snds s4-0) (new-sound-id)) + (sound-play "passby-whoosh" :id (-> self snds s4-0) :position s5-0) + 0 + ) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) s5-0 (-> s5-0 w) *color-blue*) + ) + ) + (when (not (-> self triggered?)) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! (-> self triggered?) #t) + (precur-play-blow-sound) + ) + ) + ) + ) + (if (-> self triggered?) + (ja :num! (seek!)) + ) + (transform-post) + ) + ) + +(defmethod init-from-entity! ((this precur-bridge-blocks-break) (arg0 entity-actor)) + (set-idx-by-name this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (if (string-suffix= (-> this name) "-1") + (set-setting! 'extra-bank '((precur1 precur4) (precur3 precur5)) 0.0 0) + ) + (dotimes (v1-10 5) + (set! (-> this snds v1-10) (new 'static 'sound-id)) + (set! (-> this toe-up? v1-10) #f) + ) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (set! (-> this draw lod-set lod 1 dist) 14336000.0) + (set! (-> this draw lod-set lod 2 dist) 14336000.0) + (set! (-> this triggered?) #f) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-13 (-> this skel root-channel 0))) + (set! (-> a0-13 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-13 param 0) 0.6) + (set! (-> a0-13 frame-num) 0.0) + (joint-control-channel-group! + a0-13 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/precursor/precurd-part.gc b/goal_src/jak3/levels/precursor/precurd-part.gc index bdf13c2a13..467213c7aa 100644 --- a/goal_src/jak3/levels/precursor/precurd-part.gc +++ b/goal_src/jak3/levels/precursor/precurd-part.gc @@ -7,3 +7,184 @@ ;; DECOMP BEGINS +(defpartgroup group-precur-debris-wind + :id 1309 + :flags (sp0 sp4 sp10) + :bounds (static-bspherem 0 0 0 500) + :parts ((sp-item 4401 :flags (is-3d sp7)) (sp-item 4402 :flags (sp7)) (sp-item 4403 :flags (sp7))) + ) + +(defpart 4401 + :init-specs ((:texture (crate-wood-01-splinter level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 0) (meters 50)) + (:z (meters -300)) + (:scale-x (meters 0.5) (meters 10)) + (:scale-y (meters 0.5) (meters 10)) + (:r 20.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-z (meters 0.6) (meters 0.06666667)) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:timer (seconds 2.5)) + (:flags (launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x400600 -743440384 -743440128 -743439872)) + (:next-time (seconds 0.335)) + (:next-launcher 4404) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4404 + :init-specs ((:r 20.0 50.0) + (:g :copy r) + (:b :copy r) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-y (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.017) (seconds 0.997)) + (:next-launcher 4405) + ) + ) + +(defpart 4405 + :init-specs ((:r 255.0) + (:g :copy r) + (:b :copy r) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:next-time (seconds 0.017)) + (:next-launcher 4404) + ) + ) + +(defpart 4402 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 50)) + (:z (meters -300)) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.6) (meters 0.06666667)) + (:fade-a 0.06 0.06) + (:timer (seconds 2.5)) + (:flags ()) + (:next-time (seconds 0.335)) + (:next-launcher 4406) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4406 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 4403 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters 40) (meters 40)) + (:z (meters -300)) + (:scale-x (meters 20) (meters 40)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.6666667) (meters 0.06666667)) + (:fade-a 0.08 0.08) + (:timer (seconds 2.5)) + (:flags ()) + (:next-time (seconds 0.335)) + (:next-launcher 4406) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-precurd-bulb-green-glow-small + :id 1310 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4407 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4407 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precurd-bulb-green-glow-long + :id 1311 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4408 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4409 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-precurd-bulb-ceiling-glow + :id 1312 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4410 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4410 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 22) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) diff --git a/goal_src/jak3/levels/precursor/precurd-scenes.gc b/goal_src/jak3/levels/precursor/precurd-scenes.gc index fa168d6ffe..b0698aeee2 100644 --- a/goal_src/jak3/levels/precursor/precurd-scenes.gc +++ b/goal_src/jak3/levels/precursor/precurd-scenes.gc @@ -5,5 +5,2510 @@ ;; name in dgo: precurd-scenes ;; dgos: PRECA, PRECD +(define-extern *range-precursor-explo-color* curve-color-fast) +(define-extern *range-precursor-explo-alpha* curve2d-fast) +(define-extern *range-precursor-explo-scale-x* curve2d-fast) +(define-extern *range-precursor-explo-scale-y* curve2d-fast) +(define-extern *curve-precursor-explo-alpha* curve2d-fast) +(define-extern *curve-precursor-explo-scale-x* curve2d-fast) +(define-extern *curve-precursor-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(define *beam-appearance-1* (new 'static 'prim-beam-settings + :width 16384.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00500 + :num-tiles 4.0 + ) + ) + +(define *beam-appearance-2* (new 'static 'prim-beam-settings + :width 16384.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00600 + :num-tiles 4.0 + ) + ) + +(define *beam-appearance-3* (new 'static 'prim-beam-settings + :width 32768.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +(define *beam-appearance-4* (new 'static 'prim-beam-settings + :width 32768.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +(define *beam-appearance-5* (new 'static 'prim-beam-settings + :width 4096.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +(define *beam-appearance-6* (new 'static 'prim-beam-settings + :width 81920.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +(deftype precurd-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +(defun init-mood-precurd ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +(defbehavior update-mood-precurd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let ((v1-0 (-> arg0 current-fog))) + (set! (-> v1-0 fog-color x) 41.0) + (set! (-> v1-0 fog-color y) 54.7998) + (set! (-> v1-0 fog-color z) 61.5998) + (set! (-> v1-0 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 131072.0 819200.0 255.0 158.0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (set! (-> arg0 times 3 w) 1.0) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-precur-wall-window-big-fma precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja + ((precur-wall-window-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 4 + ) + +(defskelgroup skel-precur-planet-fma precur-planet precur-planet-lod0-jg precur-planet-idle-ja + ((precur-planet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +(defskelgroup skel-dm-ship-break-precurd dm-ship-break dm-ship-break-lod0-jg dm-ship-break-idle-ja + ((dm-ship-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-dm-ship-tent-brk-precurd dm-ship-tent-brk dm-ship-tent-brk-lod0-jg dm-ship-tent-brk-idle-ja + ((dm-ship-tent-brk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-head-precurd terraformer-head terraformer-head-lod0-jg terraformer-head-idle-ja + ((terraformer-head-lod0-mg (meters 20)) + (terraformer-head-lod0-mg (meters 40)) + (terraformer-head-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 150) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-rail-gun-dark-precurd rail-gun-dark rail-gun-dark-lod0-jg rail-gun-dark-idle-ja + ((rail-gun-dark-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +(defskelgroup skel-rail-gun-light-precurd rail-gun-light 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +(defskelgroup skel-terraformer-precurd terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 20)) (terraformer-lod0-mg (meters 40)) (terraformer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-precurd-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja + ((terraformer-leg-a-lod0-mg (meters 20)) + (terraformer-leg-a-lod0-mg (meters 40)) + (terraformer-leg-a-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 38 0 50) + :shadow terraformer-leg-a-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-precurd-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja + ((terraformer-leg-b-lod0-mg (meters 20)) + (terraformer-leg-b-lod0-mg (meters 40)) + (terraformer-leg-b-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 61 0 68) + :shadow terraformer-leg-b-shadow-mg + :origin-joint-index 4 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-precurd-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja + ((terraformer-leg-c-lod0-mg (meters 20)) + (terraformer-leg-c-lod0-mg (meters 40)) + (terraformer-leg-c-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 25 0 75) + :shadow terraformer-leg-c-shadow-mg + :origin-joint-index 5 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-precurd-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja + ((terraformer-spike-lod0-mg (meters 20)) + (terraformer-spike-lod0-mg (meters 40)) + (terraformer-spike-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 40 20 35) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-jakc-wings-precur jakc-wings jakc-wings-lod0-jg jakc-wings-idle-ja + ((jakc-wings-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defbehavior precurd-lightjak-do-effect process-drawable () + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (fmin 1.0 (-> self clock clock-ratio))) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 623) (sp-field-id spt-a)) initial-valuef) 16.0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 3)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 4)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 5)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 6)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 8)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 13)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 17)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 14)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 18)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 15)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 19)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 25)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 26)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 32)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 27)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 33)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 28)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 34)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 31)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 37)) :rate f30-0) + ) + (none) + ) + +;; WARN: Return type mismatch draw-control-global-effect vs none. +(defbehavior precurd-lightjak-stop-effect process-drawable () + (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures)) + (none) + ) + +(load-scene + (new 'static 'scene + :name "precursor-destroy-ship-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-201" + :art-group "scenecamera" + :anim "precursor-destroy-ship-res" + :parts 37 + :command-list '((0 + (kill "wall-window-big-1") + (send-event *time-of-day* 'change 'ratio (float (new 'static 'bfloat))) + (send-event *time-of-day* 'change 'hour (int 23) (int 37)) + (send-event + "precur-planet-fma" + 'trans-hook + ,(lambda :behavior scene-player + () + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (none) + ) + ) + (apply + ,(lambda :behavior scene-player + () + (set-railx-light-brightness! 0 1.0 100000.0) + (set-railx-light-brightness! 1 1.0 100000.0) + (set-railx-light-brightness! 2 1.0 100000.0) + (set-railx-light-brightness! 3 0.0 100000.0) + (none) + ) + ) + ) + (816 + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 816 858) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 816 858) + ) + ) + (891) + (892 + (part-tracker + "group-dark-eco-gun-charge" + entity + "particleman" + joint + "particleZ" + track + #t + duration + (frame-range 892 1057) + ) + ) + (895 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (* 0.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (921 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (want-display 'precurd 'special) + (want-display 'railx 'display) + (send-event self 'change-entity "scene-stage-194") + (kill "rail-gun-dark-2") + (kill "rail-gun-light-2") + (kill "rail-warp-gate-2") + ) + (967 + (part-tracker + "group-light-eco-gun-charge" + entity + "particleman" + joint + "particleY" + track + #t + duration + (frame-range 967 1057) + ) + ) + (997 + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleG" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-3* + ) + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleY" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-2* + ) + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleZ" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-1* + ) + (part-tracker + "group-beam-combine-flash" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 997 1057) + ) + ) + (998 (kill "rail-gun-dark-2") (kill "rail-gun-dark-3")) + (1058 + (want-display 'railx 'special) + (setting-reset borrow mode '((railx 0 lcitysml display))) + (setting-reset borrow mode '((railx 0 lcitysml display))) + (send-event self 'change-entity "scene-stage-202") + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1084 + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleH" + joint2 + "particleL" + duration + (frame-range 1084 1132) + beam-type + '*beam-appearance-4* + ) + (part-tracker + "group-final-beam-rise-mist" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-range 1083 1105) + ) + ) + (1133 + (want-display 'precurd 'display) + (setting-reset borrow mode '((railx 0 lcitysml special))) + (setting-unset sky-type) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1163 (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleB" + joint2 + "particleC" + duration + (frame-range 1163 1200) + beam-type + '*beam-appearance-5* + ) + ) + (1165 (part-tracker + "group-precursor-ship-beam-hit" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 1165 1185) + ) + ) + (1201 + (want-display 'precurd 'display) + (send-event self 'change-entity "scene-stage-201") + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleI" + joint2 + "particleM" + duration + (frame-range 1201 1261) + beam-type + '*beam-appearance-6* + ) + (part-tracker + "group-final-beam-cut-sparks" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 1201 1261) + ) + ) + (1262 + (part-tracker + "group-airlock-sucking" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-range 1262 1598) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1262 1402) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1262 1402) + ) + ) + (1361) + (1501 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect)) + (1502 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect)) + (1577 + (part-tracker + "group-fma-lightjak-get-off" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 1577 1582) + ) + (send-event "jakc-highres" 'trans-hook precurd-lightjak-stop-effect) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (send-event *time-of-day* 'change 'ratio (float 1)) + (want-display 'precurd 'display) + (want-display 'railx #f) + (setting-reset borrow mode '((railx 0 lcitysml #f))) + (task-close! "precursor-destroy-ship-escape-continue") + ) + ) + :cut-list '(402 506 687 732 761 782 829 891 967 1058 1133 1201 1262 1361 1501 1562) + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'precurd + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'precurd + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((230 506) (620 829) (1501 1640)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(512 605 761 777 778 891 (1550 max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'precurd + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((230 506) (506 687) (732 782) (829 921) (1262 1501) (620 761) (829 921) (1262 1361) (1501 1640)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "errol" + :level 'precurd + :art-group "skel-errol" + :prefix "" + :draw-frames '((506 687) (732 921) (1262 1501)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "precur-wall-window-big-fma" + :level 'precurd + :art-group "skel-precur-wall-window-big-fma" + :prefix "" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '((782 max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "precur-planet-fma" + :level 'precurd + :art-group "skel-precur-planet-fma" + :prefix "" + :draw-frames '((1133 1201) (1361 1501)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-wings-precur" + :level 'precurd + :art-group "skel-jakc-wings-precur" + :prefix "" + :draw-frames '((min 1577)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd" + :level 'precurd + :art-group "skel-terraformer-precurd" + :prefix "" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lm-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lr-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rm-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rr-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-head-precurd" + :level 'precurd + :art-group "skel-terraformer-head-precurd" + :prefix "" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'precurd + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((1133 1201)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'precurd + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((1133 1201)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-precurd" + :level 'railx + :art-group "skel-rail-gun-dark-precurd" + :prefix "" + :draw-frames '((921 1058)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-precurd" + :level 'railx + :art-group "skel-rail-gun-dark-precurd" + :prefix "b-" + :draw-frames '((921 1058)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-start" + :end-point "precurd-escape" + :borrow '((railx 0 lcitysml special)) + :sfx-volume -1.0 + :ambient-volume 0.5 + :music-delay 1500.0 + :scene-task #x108 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-final-boss-intro-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-221" + :art-group "scenecamera" + :anim "desert-final-boss-intro-a" + :parts 1 + :command-list '((10000 (apply ,(lambda :behavior scene-player + () + (if (-> self aborted?) + (task-close! "desert-final-boss-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'precurd + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'precurd + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-escape" + :end-point "desertb-final-boss-start" + :borrow '() + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "storm-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "precursor-destroy-ship-exp-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-201" + :art-group "scenecamera" + :anim "precursor-destroy-ship-exp-res" + :parts 1 + :command-list '((0 (want-display 'precurd 'special) (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (80) + (85 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 85 200) + ) + ) + (99 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 99 200) + ) + ) + (138 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 138 200) + ) + ) + (152 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 152 200) + ) + ) + (155 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 1.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (10000 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (* 10000.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (if (-> self aborted?) + (task-close! "desert-final-boss-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'precurd + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'precurd + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'precurd + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-escape" + :end-point "desertb-final-boss-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "precursor-destroy-ship-lose" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "precura-door-a-1" + :art-group "scenecamera" + :anim "precursor-destroy-ship-lose" + :parts 2 + :command-list '((0 + (want-display 'precura 'special) + (setting-reset borrow mode '((precura 0 lprenme display))) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (85 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 85 200) + ) + ) + (99 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 99 200) + ) + ) + (138 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 138 200) + ) + ) + (152 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 152 200) + ) + ) + (155 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 1.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (* 10000.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'lprenme + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'lprenme + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'lprenme + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precura-start" + :end-point #f + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-precursor-ship-explosion + :id 1299 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4365 :flags (sp3)) + (sp-item 4366 :flags (sp3)) + (sp-item 4367 :flags (sp3)) + (sp-item 4368 :flags (sp3)) + (sp-item 4369 :period (seconds 20) :length (seconds 0.335)) + (sp-item 4370 :period (seconds 20) :length (seconds 0.5)) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + ) + ) + +(defpart 4365 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4366 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 100.0 100.0) + (:scale-x (meters 0.3) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 1 128.0) + (:g :copy r) + (:b :copy r) + (:a 255.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.16666667) (meters 0.6666667)) + (:fade-g -0.26666668) + (:fade-b -1.7) + (:fade-a -0.56666666 -0.56666666) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4367 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.2)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85 -0.85) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4369 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 1.3333334) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4370 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:x (meters -10) (meters 20)) + (:y (meters 0) (meters 10)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.1)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-14)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 20) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-precursor-explo-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-precursor-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 128.0 :y 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-precursor-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-precursor-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-precursor-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-precursor-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-precursor-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-precursor-ship-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.5) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4370 init-specs 16 initial-valuef) + (the-as float *part-precursor-ship-explosion-texture-curve-settings*) + ) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* color-start) *range-precursor-explo-color*) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* alpha-start) *range-precursor-explo-alpha*) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-start) + *range-precursor-explo-scale-x* + ) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-start) + *range-precursor-explo-scale-y* + ) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* a-scalar) *curve-precursor-explo-alpha*) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-scalar) + *curve-precursor-explo-scale-x* + ) + +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-scalar) + *curve-precursor-explo-scale-y* + ) + +(defpart 4368 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -1.6666666)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4371 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 10)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.16666667)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4364 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00012207031) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 50.0 30.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-beam-combine-flash + :id 1300 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4372 :flags (sp7)) (sp-item 4373)) + ) + +(defpart 4372 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.26666668) (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 4373 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-final-beam-rise-mist + :id 1301 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4374 :period (seconds 10) :length (seconds 0.167))) + ) + +(defpart 4374 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 50)) + (:y (meters 80)) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 100.0) + (:b 255.0) + (:a 32.0) + (:vel-y (meters 2.6666667)) + (:scalevel-x (meters 0.33333334) (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7 0.25) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-final-beam-cut-sparks + :id 1302 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4375)) + ) + +(defpart 4375 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 3.0) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 150.0 50.0) + (:b 100.0) + (:a 255.0) + (:vel-y (meters 1.6666666) (meters 1.6666666)) + (:scalevel-x (meters -0.033333335) (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-precursor-ship-beam-hit + :id 1303 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4376 :flags (sp3)) + (sp-item 4377 :flags (sp3)) + (sp-item 4378 :flags (sp3)) + (sp-item 4379 :flags (sp3)) + (sp-item 4380 :period (seconds 20) :length (seconds 0.335)) + ) + ) + +(defpart 4376 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4377 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 1 128.0) + (:g :copy r) + (:b :copy r) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:fade-g -0.26666668) + (:fade-b -1.7) + (:fade-a -0.56666666 -0.56666666) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4378 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85 -0.85) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4380 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4379 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -1.6666666)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-light-eco-gun-charge + :id 1304 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4381 :flags (sp7)) + (sp-item 4382 :flags (sp7)) + (sp-item 4383 :flags (sp6)) + (sp-item 4384 :flags (sp6)) + ) + ) + +(defpart 4381 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 10)) + (:scale-x (meters 25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.4) + (:fade-a 0.07111111) + (:accel-x (meters -0.0013333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 4382 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 25) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 80.0 80.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 4385) + ) + ) + +(defpart 4385 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 4383 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4384 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 80.0) + (:b 255.0) + (:a 5.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpartgroup group-dark-eco-gun-charge + :id 1305 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4386 :flags (sp6)) (sp-item 4387 :flags (sp6)) (sp-item 4388) (sp-item 4389)) + ) + +(defpart 4386 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4387 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0 20.0) + (:g 64.0) + (:b 255.0) + (:a 60.0 10.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4388 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 20.0) + (:scale-x (meters 1) (meters 3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 5) (meters 2.5)) + (:r 50.0 100.0) + (:g 60.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 4390) + ) + ) + +(defpart 4389 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 5.0) + (:scale-x (meters 5) (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 5) (meters 2.5)) + (:r 50.0 100.0) + (:g 60.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:next-time (seconds 0.035)) + (:next-launcher 4390) + ) + ) + +(defpart 4390 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -2.0) (:fade-g -0.8) (:fade-a -4.0)) + ) + +(defpartgroup group-fma-lightjak-get-off + :id 1306 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4391 :period (seconds 5) :length (seconds 0.017)) + (sp-item 4392 :period (seconds 5) :length (seconds 0.017)) + (sp-item 4393 :period (seconds 5) :length (seconds 0.085)) + ) + ) + +(defpart 4391 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 12)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:fade-b -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4392 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-b -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4393 + :init-specs ((:texture (middot level-default-sprite)) + (:num 60.0) + (:y (meters -1.5) (meters 3)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g :copy r) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters 0.00016666666) (meters 0.00066666666)) + (:friction 0.95 0.05) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.5)) + (:next-launcher 4394) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4394 + :init-specs ((:scalevel-x (meters -0.00016666666) (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.425 -0.425) + (:friction 0.99) + (:next-time (seconds 0.017)) + (:next-launcher 4395) + ) + ) + +(defpart 4395 + :init-specs ((:accel-x (meters -0.0013333333) (meters 0.0026666666)) + (:accel-z (meters -0.0013333333) (meters 0.0026666666)) + (:next-time (seconds 0.085) (seconds 0.08)) + (:next-launcher 4395) + ) + ) + +(defpartgroup group-errol-jetpack + :id 1307 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4396 :flags (is-3d sp7)) (sp-item 4397 :flags (sp6 sp7))) + ) + +(defpart 4396 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 10.0) + (:y (meters 0.3)) + (:z (meters 0.3)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 40)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 16.0 16.0) + (:fade-a -0.6) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4397 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:z (meters 0.2)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 20.0 2.0) + (:fade-a -0.12) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-airlock-sucking + :id 1308 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 4398 :flags (sp7))) + ) + +(defpart 4398 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:x (meters 130) (meters 10)) + (:scale-x (meters 5) (meters 15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0.225) (degrees 0.225)) + (:vel-x (meters -0.033333335)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:friction 1.34) + (:timer (seconds 2) (seconds 0.665)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 4399) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4399 + :init-specs ((:fade-a -0.013333334 -0.013333334) + (:accel-y (meters -0.006666667)) + (:friction 0.98) + (:next-time (seconds 0.5)) + (:next-launcher 4400) + ) + ) + +(defpart 4400 + :init-specs ((:fade-a -0.026666667 -0.026666667) (:friction 0.99)) + ) diff --git a/goal_src/jak3/levels/precursor/prim-beam.gc b/goal_src/jak3/levels/precursor/prim-beam.gc index 9024faee9c..e0a9003124 100644 --- a/goal_src/jak3/levels/precursor/prim-beam.gc +++ b/goal_src/jak3/levels/precursor/prim-beam.gc @@ -7,3 +7,211 @@ ;; DECOMP BEGINS +(define *default-prim-beam-appearance* (new 'static 'prim-beam-settings + :width 4096.0 + :color (new 'static 'rgba :r #xff :g #xff :a #x80) + :alpha 0.5 + :tex-id #x100300 + :num-tiles 1.0 + ) + ) + +(deftype prim-beam (process-drawable) + ((strip prim-strip) + (pos0 vector :inline) + (pos1 vector :inline) + (appearance prim-beam-settings :inline) + (duration time-frame :offset 272) + ) + (:state-methods + active + hidden + ) + (:methods + (prim-beam-method-22 (_type_) none) + (prim-beam-method-23 (_type_) none) + (prim-beam-method-24 (_type_) none) + (init-strip! (_type_) none) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod prim-beam-method-22 ((this prim-beam)) + (set! (-> this strip) + (new 'process 'prim-strip 4 (the-as texture-id (-> this appearance tex-id)) (the-as string #f)) + ) + (set! (-> this strip bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip sink) (the-as uint 65)) + (set! (-> this root) (new 'process 'trsqv)) + (go (method-of-object this active)) + (none) + ) + +(defstate active (prim-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hide) + (go-virtual hidden) + ) + (('die) + (go empty-state) + ) + ) + ) + :enter (behavior () + (init-strip! self) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (prim-beam-method-24 self) + (if (and (> (-> self duration) 0) (time-elapsed? (-> self state-time) (-> self duration))) + (go empty-state) + ) + ) + :code sleep-code + ) + +(defstate hidden (prim-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (go-virtual active) + ) + (('die) + (go empty-state) + ) + ) + ) + :enter (behavior () + (set! (-> self strip num-verts) (the-as uint 0)) + 0 + ) + :code sleep-code + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod prim-beam-method-24 ((this prim-beam)) + (let ((s3-0 (-> this strip data)) + (s5-0 (new 'stack-no-clear 'vector)) + (v1-1 (camera-pos)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 (-> this appearance width)) + ) + (set! (-> s5-0 quad) (-> this pos0 quad)) + (vector-! s1-0 (-> this pos1) (-> this pos0)) + (vector-! s2-0 v1-1 s5-0) + (set! (-> s2-0 quad) (-> (math-camera-matrix) fvec quad)) + (vector-cross! s4-0 s2-0 s1-0) + (vector-normalize! s4-0 1.0) + (vector+float*! s5-0 (-> this pos0) s4-0 f30-0) + (set! (-> s3-0 0 pos quad) (-> s5-0 quad)) + (set! (-> s3-0 0 stq z) 0.0) + (set! (-> s3-0 0 stq x) 0.0) + (set! (-> s3-0 0 stq y) 0.0) + (let ((v1-9 (-> s3-0 1))) + (vector+float*! s5-0 (-> this pos0) s4-0 (- f30-0)) + (set! (-> v1-9 pos quad) (-> s5-0 quad)) + (set! (-> v1-9 stq z) 0.0) + (set! (-> v1-9 stq x) 1.0) + (set! (-> v1-9 stq y) 0.0) + (let ((v1-10 (&+ v1-9 32))) + (vector+float*! s5-0 (-> this pos1) s4-0 f30-0) + (set! (-> v1-10 pos quad) (-> s5-0 quad)) + (set! (-> v1-10 stq z) 0.0) + (set! (-> v1-10 stq x) 0.0) + (set! (-> v1-10 stq y) (-> this appearance num-tiles)) + (let ((v1-11 (&+ v1-10 32))) + (vector+float*! s5-0 (-> this pos1) s4-0 (- f30-0)) + (set! (-> v1-11 pos quad) (-> s5-0 quad)) + (set! (-> v1-11 stq z) 0.0) + (set! (-> v1-11 stq x) 1.0) + (set! (-> v1-11 stq y) (-> this appearance num-tiles)) + (&+ v1-11 32) + ) + ) + ) + ) + (let ((v1-14 (the-as object (-> this strip data)))) + (dotimes (a0-19 4) + (set! (-> (the-as prim-vertex v1-14) col) (-> this appearance color)) + (set! (-> (the-as prim-vertex v1-14) col a) (the int (* 128.0 (-> this appearance alpha)))) + (set! v1-14 (&+ (the-as prim-vertex v1-14) 32)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod init-strip! ((this prim-beam)) + (set! (-> this strip clamp) (new 'static 'gs-clamp)) + (set! (-> this strip num-verts) (the-as uint 4)) + (set! (-> this strip alpha) *simple-prim-additive*) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (none) + ) + +(defmethod relocate ((this prim-beam) (offset int)) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (call-parent-method this offset) + ) + +(deftype prim-beam-tracker (prim-beam) + ((track-obj1 handle) + (track-obj2 handle) + (track-joint1 int32) + (track-joint2 int32) + ) + ) + + +(defmethod prim-beam-method-24 ((this prim-beam-tracker)) + (let ((v1-1 (the-as process-drawable (handle->process (-> this track-obj1))))) + (if v1-1 + (vector<-cspace! (-> this pos0) (-> v1-1 node-list data (-> this track-joint1))) + ) + ) + (let ((v1-5 (the-as process-drawable (handle->process (-> this track-obj2))))) + (if v1-5 + (vector<-cspace! (-> this pos1) (-> v1-5 node-list data (-> this track-joint2))) + ) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior prim-beam-tracker-init-by-other prim-beam-tracker ((arg0 prim-beam-tracker-params)) + (set! (-> self track-obj1) (-> arg0 track-obj1)) + (set! (-> self track-obj2) (-> arg0 track-obj2)) + (set! (-> self track-joint1) (-> arg0 track-joint1)) + (set! (-> self track-joint2) (-> arg0 track-joint2)) + (if (-> arg0 pos0) + (set! (-> self pos0 quad) (-> arg0 pos0 quad)) + ) + (if (-> arg0 pos1) + (set! (-> self pos1 quad) (-> arg0 pos1 quad)) + ) + (set! (-> self duration) (-> arg0 duration)) + (mem-copy! (the-as pointer (-> self appearance)) (the-as pointer (-> arg0 appearance)) 20) + (prim-beam-method-22 self) + ) + +;; WARN: Return type mismatch int vs handle. +(defun spawn-prim-beam-tracker ((arg0 prim-beam-tracker-params) (arg1 symbol) (arg2 process)) + (if (not arg1) + (set! arg1 '*default-prim-beam-appearance*) + ) + (set! (-> arg0 appearance) (the-as prim-beam-settings (-> arg1 value))) + (the-as handle (ppointer->handle (process-spawn prim-beam-tracker arg0 :name "prim-beam-tracker" :to arg2))) + ) diff --git a/goal_src/jak3/levels/wascity/wastrail-graph.gc b/goal_src/jak3/levels/wascity/wastrail-graph.gc index c93f7d7240..06380a709c 100644 --- a/goal_src/jak3/levels/wascity/wastrail-graph.gc +++ b/goal_src/jak3/levels/wascity/wastrail-graph.gc @@ -7,3 +7,4141 @@ ;; DECOMP BEGINS +(define *trail-graph* + (new 'static 'trail-graph + :over-under-above-too-low -32768.0 + :over-under-below-too-high 32768.0 + :pov-node-count #x27 + :node-count #xed + :conn-count #x1ac + :blocker-count #x4a + :node (new 'static 'inline-array trail-node 237 + (new 'static 'trail-node :x #x8d8 :y 32 :z #xfc :flags (trail-node-flag tnf2) :conn-count #x7) + (new 'static 'trail-node + :x #x8a3 + :y 19 + :z #x704 + :first-conn #x7 + :flags (trail-node-flag tnf2) + :conn-count #x7 + ) + (new 'static 'trail-node + :x #x8c9 + :y 19 + :z #x8c8 + :first-conn #xe + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x795 + :y 19 + :z #x91f + :first-conn #x18 + :flags (trail-node-flag tnf2) + :conn-count #x6 + ) + (new 'static 'trail-node + :x #x63e + :y 22 + :z #x7a1 + :first-conn #x1e + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xbd8 + :y 27 + :z #xf26 + :first-conn #x28 + :flags (trail-node-flag tnf2) + :conn-count #x4 + ) + (new 'static 'trail-node + :x #x83b + :y 56 + :z #x24c + :first-conn #x2c + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x793 + :y 43 + :z #x248 + :first-conn #x34 + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x93a + :y 34 + :z #x2d0 + :first-conn #x3c + :flags (trail-node-flag tnf2) + :conn-count #x6 + ) + (new 'static 'trail-node + :x #xd34 + :y 74 + :z #x838 + :first-conn #x42 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x9f5 + :y 57 + :z #x37d + :first-conn #x4e + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #x5bd + :y 56 + :z #x2d5 + :first-conn #x5c + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x4f0 + :y 78 + :z #x35c + :first-conn #x64 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x927 + :y 44 + :z #x457 + :first-conn #x6f + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x5bd + :y 57 + :z #x424 + :first-conn #x78 + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x8ef + :y 58 + :z #x59c + :first-conn #x80 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xa34 + :y 55 + :z #x7d0 + :first-conn #x89 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xaa5 + :y 66 + :z #x8a4 + :first-conn #x93 + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #x95b + :y 28 + :z #x9dd + :first-conn #xa1 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x8a8 + :y 47 + :z #xab9 + :first-conn #xac + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x7e3 + :y 41 + :z #xa44 + :first-conn #xb6 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x5dd + :y 62 + :z #x898 + :first-conn #xc0 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x5e3 + :y 52 + :z #x557 + :first-conn #xcc + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x7f7 + :y 19 + :z #xb7f + :first-conn #xd5 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x80b + :y 88 + :z #xe9f + :first-conn #xe0 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xb1d + :y 46 + :z #xc3c + :first-conn #xe9 + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #xb83 + :y 18 + :z #xd5c + :first-conn #xf7 + :flags (trail-node-flag tnf2) + :conn-count #x5 + ) + (new 'static 'trail-node + :x #xcb0 + :y 32 + :z #xc14 + :first-conn #xfc + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #xe2b + :y 52 + :z #x8f8 + :first-conn #x10a + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xbdd + :y 54 + :z #x8bb + :first-conn #x113 + :flags (trail-node-flag tnf2) + :conn-count #xd + ) + (new 'static 'trail-node + :x #xd03 + :y 66 + :z #x9cf + :first-conn #x120 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x97 + :y 66 + :z #x32c + :first-conn #x129 + :flags (trail-node-flag tnf2) + :conn-count #x3 + ) + (new 'static 'trail-node + :x #x12e + :y 96 + :z #x253 + :first-conn #x12c + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x2e3 + :y 75 + :z #x391 + :first-conn #x136 + :flags (trail-node-flag tnf2) + :conn-count #xd + ) + (new 'static 'trail-node + :x #x1e3 + :y 38 + :z #x4de + :first-conn #x143 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x90 + :y 27 + :z #x45a + :first-conn #x14f + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x3ed + :y 81 + :z #xc5a + :first-conn #x158 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x22c + :y #x6b + :z #x8fc + :first-conn #x161 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xeaf + :y 23 + :z #xaee + :first-conn #x16b + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node :x #x8d9 :y 32 :z #xdd :first-conn #x174 :conn-count #x2) + (new 'static 'trail-node :x #x89d :y 36 :z #xd1 :first-conn #x176 :conn-count #x1) + (new 'static 'trail-node :x #x8da :y 22 :z 72 :first-conn #x177 :conn-count #x2) + (new 'static 'trail-node :x #x66f :y 41 :z -241 :first-conn #x179 :conn-count #x4) + (new 'static 'trail-node :x #x8c5 :y 10 :z -30 :first-conn #x17d :conn-count #x4) + (new 'static 'trail-node :x #x8df :y 5 :z -120 :first-conn #x181 :conn-count #x4) + (new 'static 'trail-node :x #x8ce :y 5 :z -146 :first-conn #x185 :conn-count #x4) + (new 'static 'trail-node :x #x8df :y 5 :z -185 :first-conn #x189 :conn-count #x3) + (new 'static 'trail-node :x #x8d4 :y 6 :z -204 :first-conn #x18c :conn-count #x4) + (new 'static 'trail-node :x #x8e5 :y 9 :z -238 :first-conn #x190 :conn-count #x6) + (new 'static 'trail-node :x #x917 :y 11 :z -276 :first-conn #x196 :conn-count #x4) + (new 'static 'trail-node :x #x916 :y 51 :z -336 :first-conn #x19a :conn-count #x1) + (new 'static 'trail-node :x #x90d :y 9 :z -220 :first-conn #x19b :conn-count #x4) + (new 'static 'trail-node :x #x906 :y 7 :z -188 :first-conn #x19f :conn-count #x3) + (new 'static 'trail-node :x #x913 :y 6 :z -169 :first-conn #x1a2 :conn-count #x4) + (new 'static 'trail-node :x #x935 :y 9 :z -234 :first-conn #x1a6 :conn-count #x5) + (new 'static 'trail-node :x #x94f :y 11 :z -202 :first-conn #x1ab :conn-count #x3) + (new 'static 'trail-node :x #x990 :y 21 :z -196 :first-conn #x1ae :conn-count #x4) + (new 'static 'trail-node :x #x9b8 :y 25 :z -153 :first-conn #x1b2 :conn-count #x2) + (new 'static 'trail-node :x #x99a :y 20 :z -80 :first-conn #x1b4 :conn-count #x2) + (new 'static 'trail-node :x #x975 :y 18 :z -81 :first-conn #x1b6 :conn-count #x5) + (new 'static 'trail-node :x #x5de :y 21 :z -410 :first-conn #x1bb :conn-count #x2) + (new 'static 'trail-node :x #x5c5 :y 34 :z -374 :first-conn #x1bd :conn-count #x2) + (new 'static 'trail-node :x #x5a6 :y 23 :z -491 :first-conn #x1bf :conn-count #x2) + (new 'static 'trail-node :x #x63f :y 21 :z -416 :first-conn #x1c1 :conn-count #x4) + (new 'static 'trail-node :x #x94b :y 13 :z -171 :first-conn #x1c5 :conn-count #x5) + (new 'static 'trail-node :x #x872 :y 20 :z -231 :first-conn #x1ca :conn-count #x4) + (new 'static 'trail-node :x #x886 :y 17 :z -194 :first-conn #x1ce :conn-count #x3) + (new 'static 'trail-node :x #x8aa :y 9 :z -144 :first-conn #x1d1 :conn-count #x4) + (new 'static 'trail-node :x #x85d :y 24 :z -253 :first-conn #x1d5 :conn-count #x2) + (new 'static 'trail-node :x #x80a :y 30 :z -337 :first-conn #x1d7 :conn-count #x2) + (new 'static 'trail-node :x #x7f1 :y 35 :z -351 :first-conn #x1d9 :conn-count #x3) + (new 'static 'trail-node :x #x7cb :y 38 :z -382 :first-conn #x1dc :conn-count #x3) + (new 'static 'trail-node :x #x7c5 :y 37 :z -329 :first-conn #x1df :conn-count #x3) + (new 'static 'trail-node :x #x7c0 :y 36 :z -290 :first-conn #x1e2 :conn-count #x2) + (new 'static 'trail-node :x #x79e :y 33 :z -263 :first-conn #x1e4 :conn-count #x2) + (new 'static 'trail-node :x #x787 :y 32 :z -263 :first-conn #x1e6 :conn-count #x2) + (new 'static 'trail-node :x #x76b :y 31 :z -274 :first-conn #x1e8 :conn-count #x2) + (new 'static 'trail-node :x #x734 :y 29 :z -313 :first-conn #x1ea :conn-count #x5) + (new 'static 'trail-node :x #x698 :y 43 :z -269 :first-conn #x1ef :conn-count #x4) + (new 'static 'trail-node :x #x712 :y 28 :z -422 :first-conn #x1f3 :conn-count #x5) + (new 'static 'trail-node :x #x736 :y 20 :z -522 :first-conn #x1f8 :conn-count #x1) + (new 'static 'trail-node :x #x720 :y 28 :z -483 :first-conn #x1f9 :conn-count #x2) + (new 'static 'trail-node :x #x68e :y 30 :z -315 :first-conn #x1fb :conn-count #x3) + (new 'static 'trail-node :x #x681 :y 28 :z -364 :first-conn #x1fe :conn-count #x6) + (new 'static 'trail-node :x #x640 :y 28 :z -385 :first-conn #x204 :conn-count #x2) + (new 'static 'trail-node :x #x60a :y 25 :z -388 :first-conn #x206 :conn-count #x3) + (new 'static 'trail-node :x #x5ea :y 28 :z -358 :first-conn #x209 :conn-count #x2) + (new 'static 'trail-node :x #x646 :y 35 :z -458 :first-conn #x20b :conn-count #x1) + (new 'static 'trail-node :x #x5ea :y 33 :z -308 :first-conn #x20c :conn-count #x4) + (new 'static 'trail-node :x #x62e :y 40 :z -259 :first-conn #x210 :conn-count #x3) + (new 'static 'trail-node :x #x611 :y 48 :z -213 :first-conn #x213 :conn-count #x3) + (new 'static 'trail-node :x #x627 :y 61 :z -159 :first-conn #x216 :conn-count #x2) + (new 'static 'trail-node :x #x64c :y 66 :z -144 :first-conn #x218 :conn-count #x2) + (new 'static 'trail-node :x #x66d :y 54 :z -174 :first-conn #x21a :conn-count #x2) + (new 'static 'trail-node :x #x656 :y 39 :z -262 :first-conn #x21c :conn-count #x4) + (new 'static 'trail-node :x #x685 :y 34 :z -288 :first-conn #x220 :conn-count #x4) + (new 'static 'trail-node :x #x6e0 :y 44 :z -230 :first-conn #x224 :conn-count #x5) + (new 'static 'trail-node :x #x6e5 :y 84 :z -113 :first-conn #x229 :conn-count #x1) + (new 'static 'trail-node :x #x7c7 :y 36 :z -451 :first-conn #x22a :conn-count #x2) + (new 'static 'trail-node :x #x7cc :y #xf3 :z -454 :first-conn #x22c :conn-count #x2) + (new 'static 'trail-node :x #x7d1 :y #xf5 :z -431 :first-conn #x22e :conn-count #x1) + (new 'static 'trail-node :x #x8b8 :y 19 :z #x8bc :first-conn #x22f :conn-count #x2) + (new 'static 'trail-node :x #x834 :y -2 :z #x876 :first-conn #x231 :conn-count #x2) + (new 'static 'trail-node :x #x823 :y -10 :z #x854 :first-conn #x233 :conn-count #x2) + (new 'static 'trail-node :x #x821 :y -23 :z #x7d3 :first-conn #x235 :conn-count #x2) + (new 'static 'trail-node :x #x805 :y -27 :z #x792 :first-conn #x237 :conn-count #x2) + (new 'static 'trail-node :x #x755 :y -34 :z #x761 :first-conn #x239 :conn-count #x2) + (new 'static 'trail-node :x #x729 :y -37 :z #x733 :first-conn #x23b :conn-count #x2) + (new 'static 'trail-node :x #x71d :y -41 :z #x6f2 :first-conn #x23d :conn-count #x2) + (new 'static 'trail-node :x #x74b :y -55 :z #x643 :first-conn #x23f :conn-count #x2) + (new 'static 'trail-node :x #x739 :y -57 :z #x626 :first-conn #x241 :conn-count #x2) + (new 'static 'trail-node :x #x70c :y -59 :z #x5fc :first-conn #x243 :conn-count #x2) + (new 'static 'trail-node :x #x6fe :y -89 :z #x4f7 :first-conn #x245 :conn-count #x2) + (new 'static 'trail-node :x #x70d :y -86 :z #x4c4 :first-conn #x247 :conn-count #x2) + (new 'static 'trail-node :x #x701 :y -86 :z #x464 :first-conn #x249 :conn-count #x2) + (new 'static 'trail-node :x #x6d0 :y -86 :z #x42a :first-conn #x24b :conn-count #x2) + (new 'static 'trail-node :x #x69b :y -91 :z #x40e :first-conn #x24d :conn-count #x2) + (new 'static 'trail-node :x #x639 :y -112 :z #x435 :first-conn #x24f :conn-count #x2) + (new 'static 'trail-node :x #x5fb :y -108 :z #x41f :first-conn #x251 :conn-count #x2) + (new 'static 'trail-node :x #x5d3 :y -98 :z #x3a9 :first-conn #x253 :conn-count #x2) + (new 'static 'trail-node :x #x5fc :y -89 :z #x342 :first-conn #x255 :conn-count #x2) + (new 'static 'trail-node :x #x67a :y -86 :z #x2f3 :first-conn #x257 :conn-count #x2) + (new 'static 'trail-node :x #x6a6 :y -84 :z #x2c5 :first-conn #x259 :conn-count #x2) + (new 'static 'trail-node :x #x69f :y -86 :z #x2a6 :first-conn #x25b :conn-count #x2) + (new 'static 'trail-node :x #x655 :y -93 :z #x258 :first-conn #x25d :conn-count #x4) + (new 'static 'trail-node :x #x512 :y -76 :z #x19d :first-conn #x261 :conn-count #x1) + (new 'static 'trail-node :x #x532 :y -99 :z #x23c :first-conn #x262 :conn-count #x4) + (new 'static 'trail-node :x #x537 :y -100 :z #x1b0 :first-conn #x266 :conn-count #x2) + (new 'static 'trail-node :x #x532 :y -103 :z #x269 :first-conn #x268 :conn-count #x3) + (new 'static 'trail-node :x #x52b :y -112 :z #x28d :first-conn #x26b :conn-count #x1) + (new 'static 'trail-node :x #x571 :y -111 :z #x2b0 :first-conn #x26c :conn-count #x2) + (new 'static 'trail-node :x #x5dc :y -109 :z #x285 :first-conn #x26e :conn-count #x1) + (new 'static 'trail-node :x #x666 :y -99 :z #x23c :first-conn #x26f :conn-count #x1) + (new 'static 'trail-node :x #x6d4 :y -89 :z #x1ca :first-conn #x270 :conn-count #x2) + (new 'static 'trail-node :x #x6d6 :y -87 :z #x176 :first-conn #x272 :conn-count #x2) + (new 'static 'trail-node :x #x68c :y -91 :z #x13a :first-conn #x274 :conn-count #x2) + (new 'static 'trail-node :x #x618 :y -94 :z #x12a :first-conn #x276 :conn-count #x2) + (new 'static 'trail-node :x #x567 :y -69 :z #x112 :first-conn #x278 :conn-count #x2) + (new 'static 'trail-node :x #x4ef :y -92 :z #x26f :first-conn #x27a :conn-count #x2) + (new 'static 'trail-node :x #x4ab :y -92 :z #x26e :first-conn #x27c :conn-count #x2) + (new 'static 'trail-node :x #x497 :y -108 :z #x2e0 :first-conn #x27e :conn-count #x2) + (new 'static 'trail-node :x #x482 :y -110 :z #x2fc :first-conn #x280 :conn-count #x2) + (new 'static 'trail-node :x #x45e :y -107 :z #x2f4 :first-conn #x282 :conn-count #x2) + (new 'static 'trail-node :x #x432 :y -109 :z #x2d9 :first-conn #x284 :conn-count #x3) + (new 'static 'trail-node :x #x493 :y -94 :z #x283 :first-conn #x287 :conn-count #x2) + (new 'static 'trail-node :x #x429 :y -108 :z #x204 :first-conn #x289 :conn-count #x1) + (new 'static 'trail-node :x #x425 :y -107 :z #x1c5 :first-conn #x28a :conn-count #x1) + (new 'static 'trail-node :x #x435 :y -108 :z #x187 :first-conn #x28b :conn-count #x1) + (new 'static 'trail-node :x #x436 :y -101 :z #x159 :first-conn #x28c :conn-count #x1) + (new 'static 'trail-node :x #x29a :y -69 :z #x1e3 :first-conn #x28d :conn-count #x2) + (new 'static 'trail-node :x #x30b :y -107 :z #x205 :first-conn #x28f :conn-count #x2) + (new 'static 'trail-node :x #x425 :y -105 :z #x1ab :first-conn #x291 :conn-count #x4) + (new 'static 'trail-node :x #x467 :y -77 :z #x191 :first-conn #x295 :conn-count #x2) + (new 'static 'trail-node :x #x4a4 :y -79 :z #x162 :first-conn #x297 :conn-count #x2) + (new 'static 'trail-node :x #x4a9 :y -75 :z #x13a :first-conn #x299 :conn-count #x2) + (new 'static 'trail-node :x #x4c2 :y -77 :z #x127 :first-conn #x29b :conn-count #x2) + (new 'static 'trail-node :x #x4d9 :y -80 :z #x12d :first-conn #x29d :conn-count #x2) + (new 'static 'trail-node :x #x4ee :y -90 :z #x16a :first-conn #x29f :conn-count #x3) + (new 'static 'trail-node :x #x50f :y -86 :z #x17e :first-conn #x2a2 :conn-count #x4) + (new 'static 'trail-node :x #x33f :y -107 :z #x248 :first-conn #x2a6 :conn-count #x3) + (new 'static 'trail-node :x #x8d9 :y 32 :z #x8f :first-conn #x2a9 :conn-count #x2) + (new 'static 'trail-node :x #x917 :y 36 :z #xc2 :first-conn #x2ab :conn-count #x1) + (new 'static 'trail-node :x #x67e :y 22 :z #x7a3 :first-conn #x2ac :conn-count #x2) + (new 'static 'trail-node :x #x6b8 :y 24 :z #x7b9 :first-conn #x2ae :conn-count #x2) + (new 'static 'trail-node :x #x707 :y 26 :z #x7da :first-conn #x2b0 :conn-count #x2) + (new 'static 'trail-node :x #x7a5 :y 23 :z #x8aa :first-conn #x2b2 :conn-count #x2) + (new 'static 'trail-node :x #x7c7 :y 25 :z #x83b :first-conn #x2b4 :conn-count #x2) + (new 'static 'trail-node :x #x7c0 :y 23 :z #x7fc :first-conn #x2b6 :conn-count #x2) + (new 'static 'trail-node :x #x742 :y 25 :z #x7b6 :first-conn #x2b8 :conn-count #x3) + (new 'static 'trail-node :x #x793 :y 22 :z #x7b6 :first-conn #x2bb :conn-count #x3) + (new 'static 'trail-node :x #x77a :y 23 :z #x773 :first-conn #x2be :conn-count #x3) + (new 'static 'trail-node :x #x7a3 :y 28 :z #x712 :first-conn #x2c1 :conn-count #x2) + (new 'static 'trail-node :x #x7f7 :y 24 :z #x6ef :first-conn #x2c3 :conn-count #x2) + (new 'static 'trail-node :x #x879 :y 19 :z #x702 :first-conn #x2c5 :conn-count #x2) + (new 'static 'trail-node :x #x652 :y 22 :z #x7a1 :first-conn #x2c7 :conn-count #x2) + (new 'static 'trail-node :x #x79a :y 19 :z #x90b :first-conn #x2c9 :conn-count #x2) + (new 'static 'trail-node :x #x528 :y -83 :z #x168 :first-conn #x2cb :conn-count #x1) + (new 'static 'trail-node :x #x51e :y -78 :z #x1b8 :first-conn #x2cc :conn-count #x2) + (new 'static 'trail-node :x #x51d :y -89 :z #x220 :first-conn #x2ce :conn-count #x1) + (new 'static 'trail-node :x #x542 :y -85 :z #x17b :first-conn #x2cf :conn-count #x2) + (new 'static 'trail-node :x #x4f8 :y -106 :z #x241 :first-conn #x2d1 :conn-count #x2) + (new 'static 'trail-node :x #x4e3 :y -100 :z #x213 :first-conn #x2d3 :conn-count #x2) + (new 'static 'trail-node :x #x4e6 :y -90 :z #x1e7 :first-conn #x2d5 :conn-count #x2) + (new 'static 'trail-node :x #x4e9 :y -89 :z #x1a5 :first-conn #x2d7 :conn-count #x3) + (new 'static 'trail-node :x #x5d8 :y -103 :z #x3e7 :first-conn #x2da :conn-count #x2) + (new 'static 'trail-node :x #x671 :y -113 :z #x427 :first-conn #x2dc :conn-count #x2) + (new 'static 'trail-node :x #x374 :y -94 :z #x236 :first-conn #x2de :conn-count #x3) + (new 'static 'trail-node :x #x3c6 :y -98 :z #x2d8 :first-conn #x2e1 :conn-count #x3) + (new 'static 'trail-node :x #x3c5 :y -102 :z #x28e :first-conn #x2e4 :conn-count #x3) + (new 'static 'trail-node :x #x395 :y -96 :z #x265 :first-conn #x2e7 :conn-count #x3) + (new 'static 'trail-node :x #x309 :y -93 :z #x187 :first-conn #x2ea :conn-count #x3) + (new 'static 'trail-node :x #x38c :y -92 :z #x1a4 :first-conn #x2ed :conn-count #x5) + (new 'static 'trail-node :x #x3fb :y -104 :z #x143 :first-conn #x2f2 :conn-count #x2) + (new 'static 'trail-node :x #x306 :y -68 :z #x280 :first-conn #x2f4 :conn-count #x2) + (new 'static 'trail-node :x #x2b5 :y -77 :z #x192 :first-conn #x2f6 :conn-count #x2) + (new 'static 'trail-node :x #x3c0 :y -101 :z #x15a :first-conn #x2f8 :conn-count #x4) + (new 'static 'trail-node :x #x375 :y -81 :z #x2d1 :first-conn #x2fc :conn-count #x2) + (new 'static 'trail-node :x #x5e7 :y -93 :z #x366 :first-conn #x2fe :conn-count #x2) + (new 'static 'trail-node :x #x8a1 :y 18 :z #x8a4 :first-conn #x300 :conn-count #x2) + (new 'static 'trail-node :x #x29f :y -75 :z #x222 :first-conn #x302 :conn-count #x2) + (new 'static 'trail-node :x #x315 :y -86 :z #x13b :first-conn #x304 :conn-count #x2) + (new 'static 'trail-node :x #x371 :y -95 :z #x12e :first-conn #x306 :conn-count #x4) + (new 'static 'trail-node :x #xc09 :y 27 :z #xf35 :first-conn #x30a :conn-count #x2) + (new 'static 'trail-node :x #xc4b :y 27 :z #xf3a :first-conn #x30c :conn-count #x2) + (new 'static 'trail-node :x #xd47 :y 40 :z #xfa8 :first-conn #x30e :conn-count #x2) + (new 'static 'trail-node :x #xe5a :y 33 :z #xefc :first-conn #x310 :conn-count #x2) + (new 'static 'trail-node :x #xed7 :y 26 :z #xef0 :first-conn #x312 :conn-count #x2) + (new 'static 'trail-node :x #xfb9 :y 19 :z #xf12 :first-conn #x314 :conn-count #x2) + (new 'static 'trail-node :x #x1032 :y 18 :z #xef8 :first-conn #x316 :conn-count #x2) + (new 'static 'trail-node :x #x1097 :y 18 :z #xf02 :first-conn #x318 :conn-count #x2) + (new 'static 'trail-node :x #x10dc :y 22 :z #xf3b :first-conn #x31a :conn-count #x2) + (new 'static 'trail-node :x #x89b :y 11 :z -165 :first-conn #x31c :conn-count #x3) + (new 'static 'trail-node :x #x89d :y 10 :z -195 :first-conn #x31f :conn-count #x4) + (new 'static 'trail-node :x #x6b2 :y 38 :z -271 :first-conn #x323 :conn-count #x4) + (new 'static 'trail-node :x #x6ae :y 33 :z -304 :first-conn #x327 :conn-count #x4) + (new 'static 'trail-node :x #x6bf :y 36 :z -276 :first-conn #x32b :conn-count #x5) + (new 'static 'trail-node :x #x672 :y 86 :z -110 :first-conn #x330 :conn-count #x1) + (new 'static 'trail-node :x #x68d :y 74 :z -150 :first-conn #x331 :conn-count #x1) + (new 'static 'trail-node :x #x8e0 :y 8 :z -73 :first-conn #x332 :conn-count #x4) + (new 'static 'trail-node :x #x8fb :y 4 :z -115 :first-conn #x336 :conn-count #x5) + (new 'static 'trail-node :x #x102c :y #x7a :z #x1047 :first-conn #x33b :conn-count #x2) + (new 'static 'trail-node :x #x106f :y #x78 :z #x1005 :first-conn #x33d :conn-count #x1) + (new 'static 'trail-node :x #x1008 :y #x78 :z #x106b :first-conn #x33e :conn-count #x2) + (new 'static 'trail-node :x #x1003 :y #x78 :z #x10af :first-conn #x340 :conn-count #x2) + (new 'static 'trail-node :x #x1034 :y #x75 :z #x10c7 :first-conn #x342 :conn-count #x2) + (new 'static 'trail-node :x #x108b :y #x65 :z #x10b0 :first-conn #x344 :conn-count #x2) + (new 'static 'trail-node :x #x10db :y 68 :z #x1061 :first-conn #x346 :conn-count #x2) + (new 'static 'trail-node :x #x10e7 :y 46 :z #xffe :first-conn #x348 :conn-count #x2) + (new 'static 'trail-node :x #x10d2 :y 32 :z #xf9b :first-conn #x34a :conn-count #x2) + (new 'static 'trail-node :x #x8d8 :y 33 :z #xee :first-conn #x34c :conn-count #x2) + (new 'static 'trail-node :x #x4e0 :y -81 :z #x138 :first-conn #x34e :conn-count #x2) + (new 'static 'trail-node :x #x4e6 :y -86 :z #x151 :first-conn #x350 :conn-count #x2) + (new 'static 'trail-node :x #x799 :y 50 :z #x206 :first-conn #x352 :conn-count #x1) + (new 'static 'trail-node :x #x72e :y 54 :z #x82 :first-conn #x353 :conn-count #x2) + (new 'static 'trail-node :x #x4da :y 42 :z #xcc :first-conn #x355 :conn-count #x1) + (new 'static 'trail-node :x #x8f4 :y 33 :z #x100 :first-conn #x356 :conn-count #x1) + (new 'static 'trail-node :x #xa31 :y 29 :z 96 :first-conn #x357 :conn-count #x1) + ) + :conn (new 'static 'inline-array trail-conn 428 + (new 'static 'trail-conn :head-id #x3 :tail-id #xaf :cost #xa5) + (new 'static 'trail-conn :head-id #x27 :tail-id #xa0 :cost #x271) + (new 'static 'trail-conn :head-id #x28 :tail-id #xa1 :visgroup-id #x1 :cost #x3d8) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2b :cost #x342) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5d :cost #x219) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5f :visgroup-id #x2 :cost #x1a0) + (new 'static 'trail-conn :head-id #x2b :tail-id #x43 :visgroup-id #x3 :cost #x3aa) + (new 'static 'trail-conn :head-id #x2b :tail-id #x2d :visgroup-id #x3 :cost #x3a3) + (new 'static 'trail-conn :head-id #x2b :tail-id #xda :visgroup-id #x3 :cost #x197) + (new 'static 'trail-conn :head-id #x2c :tail-id #x2d :visgroup-id #x3 :cost #xf9) + (new 'static 'trail-conn :head-id #x2c :tail-id #x43 :visgroup-id #x3 :cost #x1d2) + (new 'static 'trail-conn :head-id #x2d :tail-id #x2e :cost #x155) + (new 'static 'trail-conn :head-id #x2d :tail-id #x43 :visgroup-id #x3 :cost #x121) + (new 'static 'trail-conn :head-id #x2e :tail-id #x2f :cost #xb0) + (new 'static 'trail-conn :head-id #x2f :tail-id #x30 :visgroup-id #x4 :cost #x131) + (new 'static 'trail-conn :head-id #x2f :tail-id #x41 :visgroup-id #x4 :cost #x32e) + (new 'static 'trail-conn :head-id #x30 :tail-id #x31 :visgroup-id #x5 :cost #x1f7) + (new 'static 'trail-conn :head-id #x30 :tail-id #x41 :visgroup-id #x4 :cost #x39a) + (new 'static 'trail-conn :head-id #x30 :tail-id #x36 :visgroup-id #x5 :cost #x281) + (new 'static 'trail-conn :head-id #x31 :tail-id #x32 :cost #x1e1) + (new 'static 'trail-conn :head-id #x31 :tail-id #x36 :visgroup-id #x5 :cost #x19d) + (new 'static 'trail-conn :head-id #x31 :tail-id #x33 :visgroup-id #x5 :cost #x1c8) + (new 'static 'trail-conn :head-id #x33 :tail-id #x34 :cost #x107) + (new 'static 'trail-conn :head-id #x30 :tail-id #x33 :visgroup-id #x5 :cost #x15f) + (new 'static 'trail-conn :head-id #x2e :tail-id #x34 :cost #x139) + (new 'static 'trail-conn :head-id #x34 :tail-id #x35 :cost #xb9) + (new 'static 'trail-conn :head-id #x35 :tail-id #x40 :visgroup-id #x6 :cost #x1c1) + (new 'static 'trail-conn :head-id #x35 :tail-id #x3b :visgroup-id #x7 :cost #x41e) + (new 'static 'trail-conn :head-id #x35 :tail-id #xdb :visgroup-id #x6 :cost #x1d9) + (new 'static 'trail-conn :head-id #x36 :tail-id #x37 :visgroup-id #x8 :cost #x14a) + (new 'static 'trail-conn :head-id #x33 :tail-id #x36 :visgroup-id #x5 :cost #x154) + (new 'static 'trail-conn :head-id #x37 :tail-id #x38 :visgroup-id #x8 :cost #x20b) + (new 'static 'trail-conn :head-id #x38 :tail-id #x39 :cost #x1d6) + (new 'static 'trail-conn :head-id #x36 :tail-id #x38 :visgroup-id #x8 :cost #x315) + (new 'static 'trail-conn :head-id #x38 :tail-id #x40 :visgroup-id #x8 :cost #x24c) + (new 'static 'trail-conn :head-id #x39 :tail-id #x3a :cost #x278) + (new 'static 'trail-conn :head-id #x3a :tail-id #x3b :cost #x129) + (new 'static 'trail-conn :head-id #x3b :tail-id #xda :visgroup-id #x9 :cost #x4aa) + (new 'static 'trail-conn :head-id #x3b :tail-id #xdb :visgroup-id #x7 :cost #x3f6) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3f :visgroup-id #xa :cost #x30a) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3e :visgroup-id #xb :cost #x314) + (new 'static 'trail-conn :head-id #x3d :tail-id #x3e :visgroup-id #xc :cost #x3c9) + (new 'static 'trail-conn :head-id #x3f :tail-id #x55 :visgroup-id #xd :cost #x1e0) + (new 'static 'trail-conn :head-id #x3f :tail-id #x53 :visgroup-id #xe :cost #x2a1) + (new 'static 'trail-conn :head-id #x37 :tail-id #x40 :visgroup-id #x8 :cost #xfb) + (new 'static 'trail-conn :head-id #x3b :tail-id #x40 :visgroup-id #x7 :cost #x31b) + (new 'static 'trail-conn :head-id #x40 :tail-id #xdb :visgroup-id #x7 :cost #x30e) + (new 'static 'trail-conn :head-id #x41 :tail-id #x42 :visgroup-id #x4 :cost #x151) + (new 'static 'trail-conn :head-id #x44 :tail-id #x45 :cost #x3b1) + (new 'static 'trail-conn :head-id #x41 :tail-id #x44 :visgroup-id #xf :cost #xf4) + (new 'static 'trail-conn :head-id #x45 :tail-id #x46 :cost #xe6) + (new 'static 'trail-conn :head-id #x46 :tail-id #x47 :visgroup-id #x10 :cost #x189) + (new 'static 'trail-conn :head-id #x46 :tail-id #x48 :visgroup-id #x10 :cost #x18a) + (new 'static 'trail-conn :head-id #x47 :tail-id #x62 :cost #x229) + (new 'static 'trail-conn :head-id #x48 :tail-id #x49 :cost #x13b) + (new 'static 'trail-conn :head-id #x47 :tail-id #x48 :visgroup-id #x10 :cost #x1ab) + (new 'static 'trail-conn :head-id #x49 :tail-id #x4a :cost #x15c) + (new 'static 'trail-conn :head-id #x4a :tail-id #x4b :cost #xb9) + (new 'static 'trail-conn :head-id #x4b :tail-id #x4c :cost #xf1) + (new 'static 'trail-conn :head-id #x4c :tail-id #x4d :cost #x21c) + (new 'static 'trail-conn :head-id #x4d :tail-id #xd7 :visgroup-id #x11 :cost #x3d6) + (new 'static 'trail-conn :head-id #x2a :tail-id #x4e :visgroup-id #x2 :cost #x18e) + (new 'static 'trail-conn :head-id #x4f :tail-id #x60 :visgroup-id #x11 :cost #x634) + (new 'static 'trail-conn :head-id #x4d :tail-id #x4f :visgroup-id #x11 :cost #x392) + (new 'static 'trail-conn :head-id #x4f :tail-id #x51 :cost #x1f5) + (new 'static 'trail-conn :head-id #x50 :tail-id #x51 :cost #x167) + (new 'static 'trail-conn :head-id #x52 :tail-id #x53 :visgroup-id #x11 :cost #x196) + (new 'static 'trail-conn :head-id #x52 :tail-id #xd6 :visgroup-id #x11 :cost #x10f) + (new 'static 'trail-conn :head-id #x4f :tail-id #x53 :visgroup-id #x11 :cost #x4e2) + (new 'static 'trail-conn :head-id #x53 :tail-id #x54 :visgroup-id #xe :cost #x223) + (new 'static 'trail-conn :head-id #x4d :tail-id #x53 :visgroup-id #x11 :cost #x5d1) + (new 'static 'trail-conn :head-id #x54 :tail-id #x55 :visgroup-id #xe :cost #x1b1) + (new 'static 'trail-conn :head-id #x55 :tail-id #x56 :visgroup-id #x12 :cost #x15f) + (new 'static 'trail-conn :head-id #x56 :tail-id #x58 :visgroup-id #xb :cost #x191) + (new 'static 'trail-conn :head-id #x3f :tail-id #x57 :cost #x155) + (new 'static 'trail-conn :head-id #x58 :tail-id #x5a :visgroup-id #x13 :cost #x336) + (new 'static 'trail-conn :head-id #x3d :tail-id #x58 :visgroup-id #xb :cost #x25e) + (new 'static 'trail-conn :head-id #x58 :tail-id #x59 :visgroup-id #x13 :cost #x29f) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5a :visgroup-id #x13 :cost #x1b4) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5e :cost #x141) + (new 'static 'trail-conn :head-id #x5a :tail-id #x5b :cost #x1d3) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5c :cost #x140) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5d :cost #x165) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5e :visgroup-id #x2 :cost #x106) + (new 'static 'trail-conn :head-id #x5e :tail-id #x5f :visgroup-id #x2 :cost #x1ae) + (new 'static 'trail-conn :head-id #x4e :tail-id #x5e :visgroup-id #x2 :cost #x213) + (new 'static 'trail-conn :head-id #x4e :tail-id #x5f :visgroup-id #x2 :cost #xd7) + (new 'static 'trail-conn :head-id #x52 :tail-id #x5f :cost #xe4) + (new 'static 'trail-conn :head-id #x4d :tail-id #x60 :visgroup-id #x11 :cost #x3b1) + (new 'static 'trail-conn :head-id #x60 :tail-id #xd5 :visgroup-id #x11 :cost #x1ed) + (new 'static 'trail-conn :head-id #x60 :tail-id #x61 :cost #x3a9) + (new 'static 'trail-conn :head-id #x60 :tail-id #xd7 :visgroup-id #x11 :cost #x1c5) + (new 'static 'trail-conn :head-id #x62 :tail-id #x63 :cost #x2f) + (new 'static 'trail-conn :head-id #x63 :tail-id #x64 :cost #xbd) + (new 'static 'trail-conn :head-id #x65 :tail-id #xc6 :cost #x10a) + (new 'static 'trail-conn :head-id #x2 :tail-id #x65 :cost #xa7) + (new 'static 'trail-conn :head-id #x66 :tail-id #x67 :cost #x131) + (new 'static 'trail-conn :head-id #x67 :tail-id #x68 :cost #x409) + (new 'static 'trail-conn :head-id #x68 :tail-id #x69 :cost #x237) + (new 'static 'trail-conn :head-id #x69 :tail-id #x6a :cost #x5b6) + (new 'static 'trail-conn :head-id #x6a :tail-id #x6b :cost #x1fe) + (new 'static 'trail-conn :head-id #x6b :tail-id #x6c :cost #x211) + (new 'static 'trail-conn :head-id #x6c :tail-id #x6d :cost #x5a8) + (new 'static 'trail-conn :head-id #x6d :tail-id #x6e :cost #x112) + (new 'static 'trail-conn :head-id #x6e :tail-id #x6f :cost #x1ed) + (new 'static 'trail-conn :head-id #x6f :tail-id #x70 :cost #x82c) + (new 'static 'trail-conn :head-id #x70 :tail-id #x71 :cost #x1aa) + (new 'static 'trail-conn :head-id #x71 :tail-id #x72 :cost #x306) + (new 'static 'trail-conn :head-id #x72 :tail-id #x73 :cost #x260) + (new 'static 'trail-conn :head-id #x73 :tail-id #x74 :cost #x1e0) + (new 'static 'trail-conn :head-id #x75 :tail-id #x76 :cost #x20f) + (new 'static 'trail-conn :head-id #x76 :tail-id #xb8 :cost #x211) + (new 'static 'trail-conn :head-id #x77 :tail-id #xc5 :cost #x230) + (new 'static 'trail-conn :head-id #x78 :tail-id #x79 :cost #x4a6) + (new 'static 'trail-conn :head-id #x79 :tail-id #x7a :cost #x1fe) + (new 'static 'trail-conn :head-id #x7a :tail-id #x7b :cost #xff) + (new 'static 'trail-conn :head-id #x7b :tail-id #x7c :cost #x35d) + (new 'static 'trail-conn :head-id #x7c :tail-id #x7e :visgroup-id #x14 :cost #x923) + (new 'static 'trail-conn :head-id #x7e :tail-id #x7f :visgroup-id #x14 :cost #x461) + (new 'static 'trail-conn :head-id #x7e :tail-id #xb4 :cost #x1d2) + (new 'static 'trail-conn :head-id #x7f :tail-id #x9e :visgroup-id #x14 :cost #x201) + (new 'static 'trail-conn :head-id #x7e :tail-id #x80 :visgroup-id #x14 :cost #x169) + (new 'static 'trail-conn :head-id #x7c :tail-id #x80 :visgroup-id #x14 :cost #x91c) + (new 'static 'trail-conn :head-id #x80 :tail-id #x8a :cost #x21b) + (new 'static 'trail-conn :head-id #x81 :tail-id #x82 :visgroup-id #x14 :cost #x273) + (new 'static 'trail-conn :head-id #x82 :tail-id #x83 :visgroup-id #x14 :cost #x39b) + (new 'static 'trail-conn :head-id #x84 :tail-id #x85 :visgroup-id #x14 :cost #x4f4) + (new 'static 'trail-conn :head-id #x85 :tail-id #x86 :visgroup-id #x14 :cost #x2a1) + (new 'static 'trail-conn :head-id #x86 :tail-id #x87 :visgroup-id #x14 :cost #x2fb) + (new 'static 'trail-conn :head-id #x87 :tail-id #x88 :visgroup-id #x14 :cost #x3a9) + (new 'static 'trail-conn :head-id #x88 :tail-id #x89 :visgroup-id #x14 :cost #x595) + (new 'static 'trail-conn :head-id #x8a :tail-id #x8b :cost #x221) + (new 'static 'trail-conn :head-id #x8b :tail-id #x90 :cost #x100) + (new 'static 'trail-conn :head-id #x8c :tail-id #x8d :cost #x119) + (new 'static 'trail-conn :head-id #x8d :tail-id #x8e :cost #x128) + (new 'static 'trail-conn :head-id #x8e :tail-id #x8f :cost #x19d) + (new 'static 'trail-conn :head-id #x8c :tail-id #x90 :cost #x2e9) + (new 'static 'trail-conn :head-id #x91 :tail-id #x92 :visgroup-id #x15 :cost #x1fa) + (new 'static 'trail-conn :head-id #x93 :tail-id #x94 :visgroup-id #x15 :cost #x171) + (new 'static 'trail-conn :head-id #x95 :tail-id #xc7 :cost #x1fa) + (new 'static 'trail-conn :head-id #x95 :tail-id #xc2 :cost #x2ac) + (new 'static 'trail-conn :head-id #x96 :tail-id #xbe :cost #x3f1) + (new 'static 'trail-conn :head-id #x97 :tail-id #x98 :cost #x238) + (new 'static 'trail-conn :head-id #x97 :tail-id #xbf :visgroup-id #x15 :cost #x4ca) + (new 'static 'trail-conn :head-id #x97 :tail-id #xc0 :visgroup-id #x15 :cost #x382) + (new 'static 'trail-conn :head-id #x98 :tail-id #x99 :cost #x269) + (new 'static 'trail-conn :head-id #x99 :tail-id #x9a :cost #x143) + (new 'static 'trail-conn :head-id #x9a :tail-id #x9b :cost #xfc) + (new 'static 'trail-conn :head-id #x9b :tail-id #x9c :cost #xbf) + (new 'static 'trail-conn :head-id #x9c :tail-id #xe6 :flags (conn-flag cf0) :cost #x69) + (new 'static 'trail-conn :head-id #x9d :tail-id #x9e :flags (conn-flag cf0) :cost #x135) + (new 'static 'trail-conn :head-id #x9d :tail-id #xb7 :flags (conn-flag cf0) :cost #x1da) + (new 'static 'trail-conn :head-id #x9e :tail-id #xb7 :cost #x1b4) + (new 'static 'trail-conn :head-id #x96 :tail-id #x9f :cost #x2a7) + (new 'static 'trail-conn :head-id #x9f :tail-id #xbd :visgroup-id #x16 :cost #x2d7) + (new 'static 'trail-conn :head-id #x29 :tail-id #xa0 :cost #x239) + (new 'static 'trail-conn :head-id #xa2 :tail-id #xae :cost #x161) + (new 'static 'trail-conn :head-id #xa3 :tail-id #xa4 :cost #x2ad) + (new 'static 'trail-conn :head-id #xa2 :tail-id #xa3 :cost #x1f1) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xaf :cost #x30d) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xa6 :cost #x3a1) + (new 'static 'trail-conn :head-id #xa6 :tail-id #xa7 :cost #x1fc) + (new 'static 'trail-conn :head-id #xa4 :tail-id #xa8 :cost #x229) + (new 'static 'trail-conn :head-id #xa8 :tail-id #xaa :visgroup-id #x17 :cost #x2bb) + (new 'static 'trail-conn :head-id #xa7 :tail-id #xa9 :cost #x29a) + (new 'static 'trail-conn :head-id #xa8 :tail-id #xa9 :visgroup-id #x17 :cost #x289) + (new 'static 'trail-conn :head-id #xa9 :tail-id #xaa :visgroup-id #x17 :cost #x23d) + (new 'static 'trail-conn :head-id #xaa :tail-id #xab :cost #x34b) + (new 'static 'trail-conn :head-id #xab :tail-id #xac :cost #x2d9) + (new 'static 'trail-conn :head-id #xac :tail-id #xad :cost #x41c) + (new 'static 'trail-conn :head-id #x1 :tail-id #xad :cost #x151) + (new 'static 'trail-conn :head-id #x4 :tail-id #xae :cost #xa1) + (new 'static 'trail-conn :head-id #x89 :tail-id #xb0 :visgroup-id #x14 :cost #x355) + (new 'static 'trail-conn :head-id #x7d :tail-id #xb1 :visgroup-id #x14 :cost #xed) + (new 'static 'trail-conn :head-id #xb1 :tail-id #xb2 :visgroup-id #x14 :cost #x341) + (new 'static 'trail-conn :head-id #x7c :tail-id #xb3 :visgroup-id #x14 :cost #xb07) + (new 'static 'trail-conn :head-id #x9e :tail-id #xb3 :visgroup-id #x14 :cost #x199) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb4 :flags (conn-flag cf0) :cost #x195) + (new 'static 'trail-conn :head-id #xb6 :tail-id #xb5 :flags (conn-flag cf0) :cost #x161) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb6 :flags (conn-flag cf0) :cost #x211) + (new 'static 'trail-conn :head-id #x77 :tail-id #xb8 :cost #x1f2) + (new 'static 'trail-conn :head-id #x75 :tail-id #xb9 :cost #x1ce) + (new 'static 'trail-conn :head-id #x74 :tail-id #xb9 :cost #x188) + (new 'static 'trail-conn :head-id #x9f :tail-id #xba :visgroup-id #x16 :cost #x1c0) + (new 'static 'trail-conn :head-id #xba :tail-id #xbf :cost #x4a0) + (new 'static 'trail-conn :head-id #x8f :tail-id #xbb :visgroup-id #x18 :cost #x361) + (new 'static 'trail-conn :head-id #xbb :tail-id #xc4 :cost #x28b) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbc :visgroup-id #x18 :cost #x251) + (new 'static 'trail-conn :head-id #x8f :tail-id #xbc :visgroup-id #x18 :cost #x423) + (new 'static 'trail-conn :head-id #xbc :tail-id #xbd :cost #x1fa) + (new 'static 'trail-conn :head-id #xba :tail-id #xbd :visgroup-id #x16 :cost #x1cc) + (new 'static 'trail-conn :head-id #xbe :tail-id #xbf :visgroup-id #x19 :cost #x432) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc9 :visgroup-id #x1a :cost #x3c9) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc3 :visgroup-id #x1b :cost #x2d4) + (new 'static 'trail-conn :head-id #xc0 :tail-id #xc3 :visgroup-id #x15 :cost #x1fb) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc4 :cost #x44c) + (new 'static 'trail-conn :head-id #xc2 :tail-id #xc8 :cost #x40d) + (new 'static 'trail-conn :head-id #x97 :tail-id #xc3 :visgroup-id #x15 :cost #x40c) + (new 'static 'trail-conn :head-id #xc3 :tail-id #xc9 :visgroup-id #x1c :cost #x2d4) + (new 'static 'trail-conn :head-id #x78 :tail-id #xc5 :cost #x14e) + (new 'static 'trail-conn :head-id #x66 :tail-id #xc6 :cost #x3b3) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc7 :cost #x45c) + (new 'static 'trail-conn :head-id #xbe :tail-id #xc9 :visgroup-id #x19 :cost #x448) + (new 'static 'trail-conn :head-id #xc8 :tail-id #xc9 :cost #x2e8) + (new 'static 'trail-conn :head-id #x5 :tail-id #xca :cost #x19a) + (new 'static 'trail-conn :head-id #xca :tail-id #xcb :cost #x212) + (new 'static 'trail-conn :head-id #xcb :tail-id #xcc :cost #x898) + (new 'static 'trail-conn :head-id #xcc :tail-id #xcd :cost #xa23) + (new 'static 'trail-conn :head-id #xcd :tail-id #xce :cost #x3ed) + (new 'static 'trail-conn :head-id #xce :tail-id #xcf :cost #x725) + (new 'static 'trail-conn :head-id #xcf :tail-id #xd0 :cost #x3df) + (new 'static 'trail-conn :head-id #xd0 :tail-id #xd1 :cost #x32c) + (new 'static 'trail-conn :head-id #xd1 :tail-id #xd2 :cost #x2cc) + (new 'static 'trail-conn :head-id #x42 :tail-id #xd3 :visgroup-id #x1d :cost #x11f) + (new 'static 'trail-conn :head-id #x43 :tail-id #xd3 :cost #xcf) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd4 :visgroup-id #x1d :cost #xf1) + (new 'static 'trail-conn :head-id #x2f :tail-id #xd4 :visgroup-id #x4 :cost #x1be) + (new 'static 'trail-conn :head-id #x30 :tail-id #xd4 :visgroup-id #x4 :cost #x29f) + (new 'static 'trail-conn :head-id #x42 :tail-id #xd4 :visgroup-id #x1e :cost #xb9) + (new 'static 'trail-conn :head-id #x4e :tail-id #xd5 :cost #xd1) + (new 'static 'trail-conn :head-id #xd5 :tail-id #xd6 :visgroup-id #x11 :cost #x10a) + (new 'static 'trail-conn :head-id #x53 :tail-id #xd6 :visgroup-id #x11 :cost #x259) + (new 'static 'trail-conn :head-id #xd5 :tail-id #xd7 :visgroup-id #x11 :cost #x70) + (new 'static 'trail-conn :head-id #xd6 :tail-id #xd7 :visgroup-id #x11 :cost #x107) + (new 'static 'trail-conn :head-id #x4f :tail-id #xd7 :visgroup-id #x11 :cost #x540) + (new 'static 'trail-conn :head-id #xd8 :tail-id #xd9 :visgroup-id #x1f :cost #x183) + (new 'static 'trail-conn :head-id #x2c :tail-id #xda :visgroup-id #x20 :cost #x179) + (new 'static 'trail-conn :head-id #x2c :tail-id #xdb :visgroup-id #x21 :cost #xe4) + (new 'static 'trail-conn :head-id #xda :tail-id #xdb :visgroup-id #x9 :cost #x190) + (new 'static 'trail-conn :head-id #xdc :tail-id #xdd :cost #x2f1) + (new 'static 'trail-conn :head-id #xdc :tail-id #xde :cost #x198) + (new 'static 'trail-conn :head-id #xde :tail-id #xdf :cost #x222) + (new 'static 'trail-conn :head-id #xdf :tail-id #xe0 :cost #x1b5) + (new 'static 'trail-conn :head-id #xe0 :tail-id #xe1 :cost #x2d0) + (new 'static 'trail-conn :head-id #xe1 :tail-id #xe2 :cost #x384) + (new 'static 'trail-conn :head-id #xe2 :tail-id #xe3 :cost #x31e) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe4 :cost #x32a) + (new 'static 'trail-conn :head-id #xd2 :tail-id #xe4 :cost #x305) + (new 'static 'trail-conn :head-id #x27 :tail-id #xe5 :cost #x89) + (new 'static 'trail-conn :tail-id #xe5 :cost #x71) + (new 'static 'trail-conn :head-id #xe6 :tail-id #xe7 :flags (conn-flag cf0) :cost #xce) + (new 'static 'trail-conn :head-id #x9d :tail-id #xe7 :cost #xd2) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xe9 :visgroup-id #x22 :cost #xc94) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xea :visgroup-id #x22 :cost #x12c5) + (new 'static 'trail-conn :head-id #xeb :tail-id #xec :visgroup-id #x23 :cost #xb19) + (new 'static 'trail-conn :tail-id #x6 :cost #xb97) + (new 'static 'trail-conn :tail-id #x8 :cost #xef2) + (new 'static 'trail-conn :tail-id #x9 :cost #x4393) + (new 'static 'trail-conn :tail-id #xa :cost #x15ed) + (new 'static 'trail-conn :tail-id #x1c :cost #x4cc7) + (new 'static 'trail-conn :tail-id #x1d :cost #x4283) + (new 'static 'trail-conn :head-id #x1 :tail-id #x9 :cost #x25c8) + (new 'static 'trail-conn :head-id #x1 :tail-id #xa :cost #x1e22) + (new 'static 'trail-conn :head-id #x1 :tail-id #xd :cost #x15cd) + (new 'static 'trail-conn :head-id #x1 :tail-id #xf :cost #xb80) + (new 'static 'trail-conn :head-id #x1 :tail-id #x10 :cost #xe10) + (new 'static 'trail-conn :head-id #x1 :tail-id #x1d :cost #x1d3c) + (new 'static 'trail-conn :head-id #x2 :tail-id #x9 :cost #x23a2) + (new 'static 'trail-conn :head-id #x2 :tail-id #x11 :cost #xeeb) + (new 'static 'trail-conn :head-id #x2 :tail-id #x12 :cost #x9c9) + (new 'static 'trail-conn :head-id #x2 :tail-id #x19 :cost #x2152) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1a :cost #x2aa1) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1b :cost #x28df) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1d :cost #x18a1) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1e :cost #x22cd) + (new 'static 'trail-conn :head-id #x2 :tail-id #x26 :cost #x3239) + (new 'static 'trail-conn :head-id #x3 :tail-id #x14 :cost #x97a) + (new 'static 'trail-conn :head-id #x3 :tail-id #x15 :cost #xe62) + (new 'static 'trail-conn :head-id #x3 :tail-id #x17 :cost #x133f) + (new 'static 'trail-conn :head-id #x3 :tail-id #x18 :cost #x2c28) + (new 'static 'trail-conn :head-id #x3 :tail-id #x24 :cost #x2709) + (new 'static 'trail-conn :head-id #x4 :tail-id #xc :cost #x23b8) + (new 'static 'trail-conn :head-id #x4 :tail-id #xe :cost #x1c33) + (new 'static 'trail-conn :head-id #x4 :tail-id #x15 :cost #x84b) + (new 'static 'trail-conn :head-id #x4 :tail-id #x16 :cost #x1289) + (new 'static 'trail-conn :head-id #x4 :tail-id #x21 :cost #x2a28) + (new 'static 'trail-conn :head-id #x4 :tail-id #x22 :cost #x2943) + (new 'static 'trail-conn :head-id #x4 :tail-id #x23 :cost #x3476) + (new 'static 'trail-conn :head-id #x4 :tail-id #x24 :cost #x2a15) + (new 'static 'trail-conn :head-id #x4 :tail-id #x25 :cost #x2253) + (new 'static 'trail-conn :head-id #x5 :tail-id #x18 :cost #x1eb3) + (new 'static 'trail-conn :head-id #x5 :tail-id #x19 :cost #x1809) + (new 'static 'trail-conn :head-id #x5 :tail-id #x1a :cost #xe8f) + (new 'static 'trail-conn :head-id #x6 :tail-id #x7 :cost #x541) + (new 'static 'trail-conn :head-id #x6 :tail-id #x8 :cost #x8fa) + (new 'static 'trail-conn :head-id #x6 :tail-id #xa :cost #x10c9) + (new 'static 'trail-conn :head-id #x6 :tail-id #xb :cost #x1465) + (new 'static 'trail-conn :head-id #x6 :tail-id #xc :cost #x1baf) + (new 'static 'trail-conn :head-id #x6 :tail-id #x20 :cost #x3869) + (new 'static 'trail-conn :head-id #x6 :tail-id #x21 :cost #x2bf1) + (new 'static 'trail-conn :head-id #x7 :tail-id #x8 :cost #xde3) + (new 'static 'trail-conn :head-id #x7 :tail-id #xa :cost #x155f) + (new 'static 'trail-conn :head-id #x7 :tail-id #xb :cost #xf56) + (new 'static 'trail-conn :head-id #x7 :tail-id #xc :cost #x16ca) + (new 'static 'trail-conn :head-id #x7 :tail-id #x20 :cost #x3329) + (new 'static 'trail-conn :head-id #x7 :tail-id #x21 :cost #x26e3) + (new 'static 'trail-conn :head-id #x7 :tail-id #x22 :cost #x31fc) + (new 'static 'trail-conn :head-id #x8 :tail-id #xa :cost #x7f7) + (new 'static 'trail-conn :head-id #x8 :tail-id #xb :cost #x1be9) + (new 'static 'trail-conn :head-id #x8 :tail-id #x20 :cost #x407f) + (new 'static 'trail-conn :head-id #x9 :tail-id #xa :cost #x2de6) + (new 'static 'trail-conn :head-id #x9 :tail-id #xd :cost #x2cdf) + (new 'static 'trail-conn :head-id #x9 :tail-id #xf :cost #x2808) + (new 'static 'trail-conn :head-id #x9 :tail-id #x10 :cost #x1839) + (new 'static 'trail-conn :head-id #x9 :tail-id #x11 :cost #x14bf) + (new 'static 'trail-conn :head-id #x9 :tail-id #x12 :cost #x217a) + (new 'static 'trail-conn :head-id #x9 :tail-id #x1c :cost #x9c7) + (new 'static 'trail-conn :head-id #x9 :tail-id #x1d :cost #xb7a) + (new 'static 'trail-conn :head-id #x9 :tail-id #x24 :cost #x5140) + (new 'static 'trail-conn :head-id #xa :tail-id #xd :cost #x960) + (new 'static 'trail-conn :head-id #xa :tail-id #xf :cost #x12d8) + (new 'static 'trail-conn :head-id #xa :tail-id #x10 :cost #x22a7) + (new 'static 'trail-conn :head-id #xa :tail-id #x11 :cost #x2996) + (new 'static 'trail-conn :head-id #xa :tail-id #x19 :cost #x4694) + (new 'static 'trail-conn :head-id #xa :tail-id #x1b :cost #x481c) + (new 'static 'trail-conn :head-id #xa :tail-id #x1c :cost #x374b) + (new 'static 'trail-conn :head-id #xa :tail-id #x1d :cost #x2ca0) + (new 'static 'trail-conn :head-id #xb :tail-id #xc :cost #x7ac) + (new 'static 'trail-conn :head-id #xb :tail-id #x20 :cost #x24b2) + (new 'static 'trail-conn :head-id #xb :tail-id #x21 :cost #x178f) + (new 'static 'trail-conn :head-id #xb :tail-id #x22 :cost #x22da) + (new 'static 'trail-conn :head-id #xb :tail-id #x25 :cost #x38e4) + (new 'static 'trail-conn :head-id #xc :tail-id #xe :cost #x8f4) + (new 'static 'trail-conn :head-id #xc :tail-id #x15 :cost #x2a87) + (new 'static 'trail-conn :head-id #xc :tail-id #x16 :cost #x1192) + (new 'static 'trail-conn :head-id #xc :tail-id #x20 :cost #x1f2f) + (new 'static 'trail-conn :head-id #xc :tail-id #x21 :cost #x107e) + (new 'static 'trail-conn :head-id #xc :tail-id #x22 :cost #x1b3a) + (new 'static 'trail-conn :head-id #xc :tail-id #x25 :cost #x3226) + (new 'static 'trail-conn :head-id #xd :tail-id #xf :cost #xa4f) + (new 'static 'trail-conn :head-id #xd :tail-id #x10 :cost #x1d07) + (new 'static 'trail-conn :head-id #xd :tail-id #x11 :cost #x246c) + (new 'static 'trail-conn :head-id #xd :tail-id #x1b :cost #x4410) + (new 'static 'trail-conn :head-id #xd :tail-id #x1c :cost #x369a) + (new 'static 'trail-conn :head-id #xd :tail-id #x1d :cost #x2948) + (new 'static 'trail-conn :head-id #xe :tail-id #x15 :cost #x23a4) + (new 'static 'trail-conn :head-id #xe :tail-id #x16 :cost #x9ab) + (new 'static 'trail-conn :head-id #xe :tail-id #x20 :cost #x2742) + (new 'static 'trail-conn :head-id #xe :tail-id #x21 :cost #x1746) + (new 'static 'trail-conn :head-id #xe :tail-id #x22 :cost #x1f5c) + (new 'static 'trail-conn :head-id #xe :tail-id #x25 :cost #x301f) + (new 'static 'trail-conn :head-id #xf :tail-id #x10 :cost #x1458) + (new 'static 'trail-conn :head-id #xf :tail-id #x11 :cost #x1bd9) + (new 'static 'trail-conn :head-id #xf :tail-id #x1b :cost #x3bd6) + (new 'static 'trail-conn :head-id #xf :tail-id #x1c :cost #x31c2) + (new 'static 'trail-conn :head-id #xf :tail-id #x1d :cost #x223f) + (new 'static 'trail-conn :head-id #x10 :tail-id #x11 :cost #x782) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1b :cost #x277e) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1d :cost #xf2e) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1e :cost #x1b91) + (new 'static 'trail-conn :head-id #x10 :tail-id #x26 :cost #x2bab) + (new 'static 'trail-conn :head-id #x11 :tail-id #x12 :cost #xe37) + (new 'static 'trail-conn :head-id #x11 :tail-id #x13 :cost #x1709) + (new 'static 'trail-conn :head-id #x11 :tail-id #x17 :cost #x1f54) + (new 'static 'trail-conn :head-id #x11 :tail-id #x19 :cost #x1cff) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1b :cost #x1ffe) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1d :cost #x9c7) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1e :cost #x151e) + (new 'static 'trail-conn :head-id #x11 :tail-id #x26 :cost #x2525) + (new 'static 'trail-conn :head-id #x12 :tail-id #x13 :cost #x8dd) + (new 'static 'trail-conn :head-id #x12 :tail-id #x17 :cost #x1129) + (new 'static 'trail-conn :head-id #x12 :tail-id #x19 :cost #x179d) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1a :cost #x20dd) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1b :cost #x2003) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1d :cost #x1604) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1e :cost #x1d41) + (new 'static 'trail-conn :head-id #x12 :tail-id #x26 :cost #x2b79) + (new 'static 'trail-conn :head-id #x13 :tail-id #x14 :cost #x729) + (new 'static 'trail-conn :head-id #x13 :tail-id #x17 :cost #x84d) + (new 'static 'trail-conn :head-id #x13 :tail-id #x19 :cost #x1715) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1b :cost #x2207) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1d :cost #x1e35) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1e :cost #x239b) + (new 'static 'trail-conn :head-id #x13 :tail-id #x24 :cost #x2807) + (new 'static 'trail-conn :head-id #x13 :tail-id #x26 :cost #x3040) + (new 'static 'trail-conn :head-id #x14 :tail-id #x15 :cost #x1500) + (new 'static 'trail-conn :head-id #x14 :tail-id #x17 :cost #x9de) + (new 'static 'trail-conn :head-id #x14 :tail-id #x18 :cost #x22de) + (new 'static 'trail-conn :head-id #x14 :tail-id #x19 :cost #x1e3d) + (new 'static 'trail-conn :head-id #x14 :tail-id #x1b :cost #x290e) + (new 'static 'trail-conn :head-id #x14 :tail-id #x22 :cost #x4092) + (new 'static 'trail-conn :head-id #x14 :tail-id #x23 :cost #x4b50) + (new 'static 'trail-conn :head-id #x14 :tail-id #x24 :cost #x23d1) + (new 'static 'trail-conn :head-id #x15 :tail-id #x16 :cost #x1a09) + (new 'static 'trail-conn :head-id #x15 :tail-id #x17 :cost #x1cab) + (new 'static 'trail-conn :head-id #x15 :tail-id #x18 :cost #x3347) + (new 'static 'trail-conn :head-id #x15 :tail-id #x21 :cost #x2ebe) + (new 'static 'trail-conn :head-id #x15 :tail-id #x22 :cost #x2b9a) + (new 'static 'trail-conn :head-id #x15 :tail-id #x23 :cost #x3651) + (new 'static 'trail-conn :head-id #x15 :tail-id #x24 :cost #x21d3) + (new 'static 'trail-conn :head-id #x16 :tail-id #x20 :cost #x2cb9) + (new 'static 'trail-conn :head-id #x16 :tail-id #x21 :cost #x1be2) + (new 'static 'trail-conn :head-id #x16 :tail-id #x22 :cost #x2039) + (new 'static 'trail-conn :head-id #x16 :tail-id #x23 :cost #x2b53) + (new 'static 'trail-conn :head-id #x16 :tail-id #x25 :cost #x29a2) + (new 'static 'trail-conn :head-id #x17 :tail-id #x18 :cost #x1902) + (new 'static 'trail-conn :head-id #x17 :tail-id #x21 :cost #x4b55) + (new 'static 'trail-conn :head-id #x17 :tail-id #x22 :cost #x47f4) + (new 'static 'trail-conn :head-id #x17 :tail-id #x23 :cost #x524e) + (new 'static 'trail-conn :head-id #x17 :tail-id #x24 :cost #x2108) + (new 'static 'trail-conn :head-id #x18 :tail-id #x19 :cost #x1f1d) + (new 'static 'trail-conn :head-id #x18 :tail-id #x1a :cost #x1d88) + (new 'static 'trail-conn :head-id #x18 :tail-id #x21 :cost #x6196) + (new 'static 'trail-conn :head-id #x18 :tail-id #x24 :cost #x259d) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1a :cost #x98d) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1b :cost #xca8) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1c :cost #x23c6) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1d :cost #x1cab) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1e :cost #x18a5) + (new 'static 'trail-conn :head-id #x19 :tail-id #x26 :cost #x1e69) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1c :cost #x1b8d) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1d :cost #x1b95) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1e :cost #x1258) + (new 'static 'trail-conn :head-id #x1b :tail-id #x26 :cost #x126d) + (new 'static 'trail-conn :head-id #x1c :tail-id #x1e :cost #xb6f) + (new 'static 'trail-conn :head-id #x1c :tail-id #x26 :cost #x1039) + (new 'static 'trail-conn :head-id #x1e :tail-id #x26 :cost #x101b) + (new 'static 'trail-conn :head-id #x1f :tail-id #x20 :cost #x843) + (new 'static 'trail-conn :head-id #x1f :tail-id #x23 :cost #x971) + (new 'static 'trail-conn :head-id #x1f :tail-id #x25 :cost #x3032) + (new 'static 'trail-conn :head-id #x20 :tail-id #x21 :cost #x10e4) + (new 'static 'trail-conn :head-id #x20 :tail-id #x23 :cost #x10f5) + (new 'static 'trail-conn :head-id #x21 :tail-id #x22 :cost #xd21) + (new 'static 'trail-conn :head-id #x21 :tail-id #x25 :cost #x2bb9) + (new 'static 'trail-conn :head-id #x22 :tail-id #x23 :cost #xb5f) + (new 'static 'trail-conn :head-id #x22 :tail-id #x25 :cost #x2105) + (new 'static 'trail-conn :head-id #x23 :tail-id #x25 :cost #x273d) + (new 'static 'trail-conn :head-id #x24 :tail-id #x25 :cost #x1e60) + ) + :blocker (new 'static 'inline-array trail-blocker 74 + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1125 :z 0.9936 :w -4731696.0) + :center (new 'static 'vector :x 9146428.0 :y 371370.4 :z 3725948.0 :w 682040000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8689 :z 0.4948 :w -9125051.0) + :center (new 'static 'vector :x 8072478.0 :y 308327.62 :z 4264420.0 :w 263339340000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7402 :z 0.6723 :w 2653051.5) + :center (new 'static 'vector :x 7562956.0 :y 295042.25 :z 4380726.5 :w 232228680000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1638 :z 0.9864 :w -2783623.0) + :center (new 'static 'vector :x 6592654.0 :y 377521.78 :z 3916902.0 :w 430130600000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9965 :z 0.0827 :w 5610316.5) + :center (new 'static 'vector :x 5933055.0 :y 435638.7 :z 3652691.2 :w 24886516000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9667 :z 0.2558 :w 5830362.0) + :center (new 'static 'vector :x 9140181.0 :y 233274.16 :z 11750152.0 :w 51376620000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.5915 :z -0.8062 :w 7346245.0) + :center (new 'static 'vector :x 7568014.0 :y 453685.66 :z 3559071.0 :w 153248600000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.089 :z -0.996 :w 2612675.8) + :center (new 'static 'vector :x 8695089.0 :y 299778.47 :z 3400314.5 :w 664896500000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3289 :z -0.9443 :w 152054.5) + :center (new 'static 'vector :x 9736743.0 :y 285960.6 :z 3552960.0 :w 59461657000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6253 :z 0.7803 :w -6935198.0) + :center (new 'static 'vector :x 8501451.0 :y 284317.7 :z 2074840.6 :w 76535380000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9983 :z 0.058 :w 8141383.5) + :center (new 'static 'vector :x 8247192.5 :y 461892.8 :z 1582481.0 :w 444395000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8965 :z -0.4429 :w 9169087.0) + :center (new 'static 'vector :x 7778713.0 :y 327165.94 :z 4955687.5 :w 59618050000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7231 :z -0.6906 :w 9120963.0) + :center (new 'static 'vector :x 7208877.5 :y 433763.94 :z 5657845.0 :w 447749900000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9857 :z -0.1679 :w 7682724.0) + :center (new 'static 'vector :x 6669045.0 :y 446891.62 :z 6599044.0 :w 215842800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9462 :z 0.3235 :w 3953419.5) + :center (new 'static 'vector :x 6761184.5 :y 342837.25 :z 7554108.0 :w 276852900000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9134 :z -0.4069 :w 9608156.0) + :center (new 'static 'vector :x 6766713.5 :y 383021.06 :z 8420965.0 :w 163856100000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.3476 :z 0.9376 :w -5946326.0) + :center (new 'static 'vector :x 7657183.5 :y 433771.3 :z 9181592.0 :w 1267121700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9934 :z -0.1142 :w 9749108.0) + :center (new 'static 'vector :x 8655665.0 :y 361256.16 :z 10064587.0 :w 245418380000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.3237 :z 0.9461 :w -7203847.0) + :center (new 'static 'vector :x 8848382.0 :y 322531.3 :z 10641631.0 :w 69633410000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9256 :z 0.3784 :w -12480410.0) + :center (new 'static 'vector :x 9197853.0 :y 264560.62 :z 10481867.0 :w 70310510000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5643 :z -0.8255 :w 3202868.0) + :center (new 'static 'vector :x 8907303.0 :y 298152.75 :z 9969662.0 :w 224428830000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9791 :z 0.2031 :w -10310371.0) + :center (new 'static 'vector :x 8618617.0 :y 415728.03 :z 9210755.0 :w 252659700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.2572 :z 0.9663 :w -10668968.0) + :center (new 'static 'vector :x 8958155.0 :y 417275.5 :z 8655768.0 :w 60598080000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2142 :z 0.9767 :w -6423298.5) + :center (new 'static 'vector :x 9721977.0 :y 292871.78 :z 8707971.0 :w 290793800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1361 :z 0.9906 :w -7346493.0) + :center (new 'static 'vector :x 10568231.0 :y 279102.66 :z 8867347.0 :w 104543780000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3249 :z -0.9457 :w 4889772.5) + :center (new 'static 'vector :x 10507733.0 :y 330863.0 :z 8780593.0 :w 162129460000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1462 :z -0.9892 :w 7075907.0) + :center (new 'static 'vector :x 9526885.0 :y 379341.22 :z 8561130.0 :w 368895200000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8367 :z -0.5476 :w -2829163.5) + :center (new 'static 'vector :x 8703486.0 :y 463851.12 :z 8131705.5 :w 166099400000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9971 :z -0.0759 :w -7864684.0) + :center (new 'static 'vector :x 8421231.0 :y 572663.4 :z 7012187.5 :w 610769240000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6425 :z -0.7662 :w -596989.0) + :center (new 'static 'vector :x 7901920.5 :y 645105.25 :z 5847551.0 :w 360939700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8939 :z 0.4481 :w -9100370.0) + :center (new 'static 'vector :x 7630314.5 :y 455814.34 :z 5085879.0 :w 177138430000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9746 :z -0.2235 :w 11419790.0) + :center (new 'static 'vector :x 8954981.0 :y 143055.25 :z 12038326.0 :w 58901720000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.6489 :z 0.7607 :w -3561754.0) + :center (new 'static 'vector :x 9146100.0 :y 183096.53 :z 12483725.0 :w 104213960000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9531 :z -0.3023 :w 12789708.0) + :center (new 'static 'vector :x 9155091.0 :y 326885.78 :z 13437888.0 :w 611381000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8439 :z -0.5363 :w 15134314.0) + :center (new 'static 'vector :x 8691936.0 :y 404147.0 :z 14539794.0 :w 179249680000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9858 :z -0.1678 :w -5844506.0) + :center (new 'static 'vector :x 8459426.0 :y 405548.25 :z 14863583.0 :w 1161817500.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.807 :z 0.5905 :w -15579990.0) + :center (new 'static 'vector :x 9119988.0 :y 285951.6 :z 13919906.0 :w 1273738400000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.0444 :z 0.999 :w -13431201.0) + :center (new 'static 'vector :x 10405824.0 :y 206093.11 :z 12981881.0 :w 385196920000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9634 :z -0.2678 :w -7152425.0) + :center (new 'static 'vector :x 10972997.0 :y 346034.6 :z 12765694.0 :w 38497243000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.2778 :z -0.9606 :w 9047115.0) + :center (new 'static 'vector :x 10292570.0 :y 420488.4 :z 12395395.0 :w 427892300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.87 :z -0.493 :w -2386249.0) + :center (new 'static 'vector :x 9521519.0 :y 294565.88 :z 11961280.0 :w 84442750000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.245 :z -0.9695 :w 13650130.0) + :center (new 'static 'vector :x 9193798.0 :y 178708.08 :z 11755497.0 :w 36429517000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9904 :z 0.1381 :w 10164303.0) + :center (new 'static 'vector :x 12121332.0 :y 184091.44 :z 13329591.0 :w 83171150000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.0538 :z 0.9985 :w -12940374.0) + :center (new 'static 'vector :x 13611436.0 :y 76338.38 :z 13693008.0 :w 2110766000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9586 :z -0.2844 :w -10522729.0) + :center (new 'static 'vector :x 14919739.0 :y 8266.957 :z 13292481.0 :w 249754170000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2552 :z -0.9668 :w 15696236.0) + :center (new 'static 'vector :x 12365085.0 :y 261430.89 :z 12969511.0 :w 86229880000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9522 :z -0.3054 :w 15175665.0) + :center (new 'static 'vector :x 12950608.0 :y 318203.5 :z 9311046.0 :w 73021280000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1237 :z 0.9923 :w -7902563.5) + :center (new 'static 'vector :x 13464861.0 :y 346127.97 :z 9642352.0 :w 362033300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9652 :z 0.2613 :w -16112085.0) + :center (new 'static 'vector :x 14135765.0 :y 369306.4 :z 9442508.0 :w 80945430000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.0965 :z -0.9953 :w 7753678.0) + :center (new 'static 'vector :x 13621513.0 :y 341381.53 :z 9111202.0 :w 350066250000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7864 :z -0.6177 :w 2959799.5) + :center (new 'static 'vector :x 1168740.0 :y 301132.6 :z 3303644.2 :w 162430630000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9527 :z 0.3036 :w -222696.88) + :center (new 'static 'vector :x 1058277.0 :y 483592.2 :z 4054023.2 :w 207628700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.0397 :z 0.9992 :w -4436617.0) + :center (new 'static 'vector :x 1563199.1 :y 583908.94 :z 4502383.5 :w 134971200000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8191 :z 0.5735 :w -4171633.0) + :center (new 'static 'vector :x 2212196.0 :y 529444.44 :z 4113777.8 :w 242680300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5576 :z -0.83 :w 1689084.5) + :center (new 'static 'vector :x 1955974.8 :y 442061.62 :z 3348796.5 :w 421429800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6226 :z -0.7825 :w 4009395.2) + :center (new 'static 'vector :x 5081066.5 :y 400086.22 :z 9166559.0 :w 90156840000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2752 :z -0.9613 :w 9967075.0) + :center (new 'static 'vector :x 3988847.8 :y 375567.97 :z 9225439.0 :w 796480240000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8919 :z 0.452 :w -1488531.8) + :center (new 'static 'vector :x 3478787.8 :y 372856.44 :z 10156706.0 :w 591571100000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9996 :z -0.0255 :w 4101710.2) + :center (new 'static 'vector :x 3808919.2 :y 388330.7 :z 11523623.0 :w 464929360000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.5725 :z 0.8198 :w -7835852.0) + :center (new 'static 'vector :x 3970758.2 :y 445811.1 :z 12330002.0 :w 47964635000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8873 :z 0.461 :w -9425125.0) + :center (new 'static 'vector :x 4267376.0 :y 490456.7 :z 12229220.0 :w 65036440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9995 :z 0.0296 :w -4738159.0) + :center (new 'static 'vector :x 4414503.5 :y 482651.75 :z 10999151.0 :w 1009992000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5929 :z 0.8052 :w -10683513.0) + :center (new 'static 'vector :x 4879973.0 :y 447050.12 :z 9674136.0 :w 293270650000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7624 :z -0.647 :w 13522696.0) + :center (new 'static 'vector :x 8616344.0 :y 271181.4 :z 10745772.0 :w 14854555000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1436 :z -0.9896 :w 2709579.5) + :center (new 'static 'vector :x 6739987.5 :y 500817.5 :z 3715988.8 :w 268838500000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9041 :z -0.4271 :w -4074751.5) + :center (new 'static 'vector :x 6153563.5 :y 479135.34 :z 3485588.8 :w 29910442000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7209 :z -0.6929 :w 6690756.5) + :center (new 'static 'vector :x 5999943.0 :y 470525.53 :z 3412737.2 :w 13394435000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3076 :z 0.9515 :w -6551099.5) + :center (new 'static 'vector :x 10048142.0 :y 320423.94 :z 3636592.2 :w 22177810000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.4929 :z 0.87 :w -12538429.0) + :center (new 'static 'vector :x 10428455.0 :y 282332.78 :z 8502271.0 :w 69275480000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2338 :z 0.9722 :w -9959851.0) + :center (new 'static 'vector :x 12002097.0 :y 243238.1 :z 13129951.0 :w 13565368000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9997 :z -0.0219 :w -8673147.0) + :center (new 'static 'vector :x 8707029.0 :y 266254.34 :z 1447136.9 :w 207467990000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9282 :z 0.3719 :w -18483212.0) + :center (new 'static 'vector :x 14931639.0 :y 20171.98 :z 12429556.0 :w 171646440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8493 :z -0.5278 :w 19170898.0) + :center (new 'static 'vector :x 14617537.0 :y 28237.004 :z 12798421.0 :w 786893440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.4009 :z -0.9161 :w 6741929.5) + :center (new 'static 'vector :x 13399058.0 :y 165914.22 :z 13223074.0 :w 671702840000.0) + ) + ) + :conn-ids (new 'static 'array uint16 856 + #xef + #xf5 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #xaa + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #x5f + #x101 + #x102 + #x103 + #x104 + #x105 + #x106 + #x107 + #x108 + #x109 + #x0 + #x10a + #x10b + #x10c + #x10d + #x10e + #xab + #x10f + #x110 + #x111 + #x112 + #x113 + #x114 + #x115 + #x116 + #x117 + #xcc + #x118 + #x119 + #x11a + #xf5 + #x11b + #x11c + #x11d + #x11e + #x11f + #x120 + #x121 + #x11b + #x122 + #x123 + #x124 + #x125 + #x126 + #x127 + #x128 + #xf6 + #x11c + #x122 + #x129 + #x12a + #x12b + #xf7 + #xfb + #x101 + #x12c + #x12d + #x12e + #x12f + #x130 + #x131 + #x132 + #x133 + #x134 + #xf8 + #xfc + #x11d + #x123 + #x129 + #x12c + #x135 + #x136 + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #x11e + #x124 + #x12a + #x13d + #x13e + #x13f + #x140 + #x141 + #x10f + #x11f + #x125 + #x13d + #x142 + #x143 + #x144 + #x145 + #x146 + #x147 + #x148 + #xfd + #x12d + #x135 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #x110 + #x142 + #x14f + #x150 + #x151 + #x152 + #x153 + #x154 + #xfe + #x12e + #x136 + #x149 + #x155 + #x156 + #x157 + #x158 + #x159 + #xff + #x12f + #x137 + #x14a + #x155 + #x15a + #x15b + #x15c + #x15d + #x15e + #x102 + #x130 + #x138 + #x14b + #x156 + #x15a + #x15f + #x160 + #x161 + #x162 + #x163 + #x164 + #x165 + #x166 + #x103 + #x131 + #x15f + #x167 + #x168 + #x169 + #x16a + #x16b + #x16c + #x16d + #x16e + #x160 + #x167 + #x16f + #x170 + #x171 + #x172 + #x173 + #x174 + #x175 + #x176 + #x10a + #x16f + #x177 + #x178 + #x179 + #x17a + #x17b + #x17c + #x17d + #x17e + #x10b + #x111 + #x143 + #x14f + #x177 + #x17f + #x180 + #x181 + #x182 + #x183 + #x184 + #x185 + #x112 + #x144 + #x150 + #x17f + #x186 + #x187 + #x188 + #x189 + #x18a + #x10c + #x161 + #x168 + #x170 + #x178 + #x180 + #x18b + #x18c + #x18d + #x18e + #x18f + #x10d + #x118 + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x104 + #x119 + #x139 + #x162 + #x169 + #x171 + #x17a + #x190 + #x194 + #x195 + #x196 + #x197 + #x198 + #x199 + #x105 + #x11a + #x16a + #x191 + #x194 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x195 + #x19a + #x19b + #x19c + #x19d + #xf9 + #x132 + #x13b + #x14d + #x158 + #x196 + #x19a + #x19e + #x19f + #xfa + #x100 + #x107 + #x133 + #x13c + #x14e + #x159 + #x15c + #x164 + #x16c + #x173 + #x197 + #x19b + #x108 + #x15d + #x165 + #x16d + #x174 + #x198 + #x19c + #x19e + #x1a0 + #x1a1 + #x1a2 + #x1a3 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x1a1 + #x1a4 + #x1a5 + #x113 + #x121 + #x127 + #x13f + #x146 + #x152 + #x182 + #x187 + #x18c + #x192 + #x1a4 + #x1a6 + #x1a7 + #x114 + #x128 + #x140 + #x147 + #x153 + #x17c + #x183 + #x188 + #x18d + #x1a6 + #x1a8 + #x1a9 + #x115 + #x17d + #x184 + #x189 + #x18e + #x1a2 + #x1a5 + #x1a8 + #x1aa + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x1ab + #x117 + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x1ab + #x109 + #x15e + #x166 + #x16e + #x176 + #x199 + #x19d + #x19f + #x1a0 + #x1 + #xee + #x2 + #x3 + #x9b + #x4 + #x5 + #x3d + #x53 + #x3 + #x6 + #x7 + #x8 + #x9 + #xa + #xe2 + #xe3 + #x7 + #x9 + #xb + #xc + #xb + #xd + #x18 + #xd + #xe + #xf + #xd8 + #xe + #x10 + #x11 + #x12 + #x17 + #xd9 + #x10 + #x13 + #x14 + #x15 + #x13 + #x15 + #x16 + #x17 + #x1e + #x16 + #x18 + #x19 + #x19 + #x1a + #x1b + #x1c + #x12 + #x14 + #x1d + #x1e + #x21 + #x1d + #x1f + #x2c + #x1f + #x20 + #x21 + #x22 + #x20 + #x23 + #x23 + #x24 + #x1b + #x24 + #x25 + #x26 + #x2d + #x27 + #x28 + #x29 + #x4c + #x28 + #x29 + #x27 + #x2a + #x2b + #x4a + #x1a + #x22 + #x2c + #x2d + #x2e + #xf + #x11 + #x2f + #x31 + #x2f + #xd5 + #xda + #x6 + #xa + #xc + #xd6 + #x30 + #x31 + #x30 + #x32 + #x32 + #x33 + #x34 + #x33 + #x35 + #x37 + #x34 + #x36 + #x37 + #x36 + #x38 + #x38 + #x39 + #x39 + #x3a + #x3a + #x3b + #x3b + #x3c + #x3f + #x46 + #x58 + #x3d + #x55 + #x56 + #xdb + #x3e + #x3f + #x40 + #x44 + #xe0 + #x41 + #x40 + #x41 + #x42 + #x43 + #x57 + #x2b + #x42 + #x44 + #x45 + #x46 + #xdd + #x45 + #x47 + #x2a + #x47 + #x48 + #x48 + #x49 + #x4a + #x49 + #x4b + #x4c + #x4d + #x4d + #x4e + #x4f + #x4b + #x4e + #x50 + #x50 + #x51 + #x51 + #x52 + #x4 + #x52 + #x4f + #x53 + #x54 + #x55 + #x5 + #x54 + #x56 + #x57 + #x3e + #x58 + #x59 + #x5a + #x5b + #x5a + #x35 + #x5c + #x5c + #x5d + #x5d + #x5e + #x5f + #x60 + #xc8 + #x60 + #x61 + #x61 + #x62 + #x62 + #x63 + #x63 + #x64 + #x64 + #x65 + #x65 + #x66 + #x66 + #x67 + #x67 + #x68 + #x68 + #x69 + #x69 + #x6a + #x6a + #x6b + #x6b + #x6c + #x6c + #x6d + #x6d + #xb6 + #x6e + #xb5 + #x6e + #x6f + #x70 + #xb4 + #x71 + #xc7 + #x71 + #x72 + #x72 + #x73 + #x73 + #x74 + #x74 + #x75 + #x7a + #xaf + #xad + #x75 + #x76 + #x77 + #x79 + #x76 + #x78 + #x79 + #x7a + #x7b + #x7c + #x7c + #x7d + #x7d + #x7e + #x7e + #x7f + #x7f + #x80 + #x80 + #x81 + #x81 + #x82 + #x82 + #xac + #x7b + #x83 + #x83 + #x84 + #x85 + #x88 + #x85 + #x86 + #x86 + #x87 + #x87 + #xb9 + #xbc + #x84 + #x88 + #x89 + #x89 + #x8a + #x8a + #x8b + #x8c + #x8d + #x99 + #x8e + #x8f + #x90 + #xc5 + #x8e + #x91 + #x91 + #x92 + #x92 + #x93 + #x93 + #x94 + #x94 + #x95 + #x96 + #x97 + #xf1 + #x78 + #x96 + #x98 + #xb0 + #x99 + #x9a + #xb7 + #x1 + #x9b + #x2 + #x9c + #x9e + #x9d + #x9e + #x9d + #xa2 + #x9f + #xa0 + #xa0 + #xa1 + #xa1 + #xa4 + #xa2 + #xa3 + #xa5 + #xa4 + #xa5 + #xa6 + #xa3 + #xa6 + #xa7 + #xa7 + #xa8 + #xa8 + #xa9 + #xa9 + #xaa + #x9c + #xab + #x0 + #x9f + #xac + #xad + #xae + #xae + #xaf + #xb0 + #x77 + #xb1 + #xb1 + #xb2 + #xb2 + #xb3 + #x97 + #x98 + #xb3 + #x6f + #xb4 + #xb5 + #xb6 + #xb7 + #xb8 + #xbe + #xb9 + #xba + #xbb + #xbb + #xbc + #xbd + #x9a + #xbd + #xbe + #x8d + #xbf + #xca + #x8f + #xb8 + #xbf + #xc0 + #xc1 + #x90 + #xc2 + #xc3 + #xc9 + #x8c + #xc4 + #xc1 + #xc2 + #xc5 + #xc6 + #xba + #xc3 + #x70 + #xc7 + #x5e + #xc8 + #x8b + #xc9 + #xc4 + #xcb + #xc0 + #xc6 + #xca + #xcb + #xcc + #xcd + #xcd + #xce + #xce + #xcf + #xcf + #xd0 + #xd0 + #xd1 + #xd1 + #xd2 + #xd2 + #xd3 + #xd3 + #xd4 + #xd4 + #xed + #xd5 + #xd6 + #xd7 + #xd7 + #xd8 + #xd9 + #xda + #x59 + #xdb + #xdc + #xde + #x43 + #xdc + #xdd + #xdf + #x3c + #x5b + #xde + #xdf + #xe0 + #xe1 + #xe1 + #x8 + #x25 + #xe2 + #xe4 + #x1c + #x26 + #x2e + #xe3 + #xe4 + #xe5 + #xe6 + #xe5 + #xe6 + #xe7 + #xe7 + #xe8 + #xe8 + #xe9 + #xe9 + #xea + #xea + #xeb + #xeb + #xec + #xec + #xed + #xee + #xef + #x95 + #xf0 + #xf0 + #xf1 + #xf2 + #xf2 + #xf3 + #xf3 + #xf4 + #xf4 + ) + :visgroup (new 'static 'inline-array trail-conn-hash-cell 24 + (new 'static 'trail-conn-hash-cell :conn-count #x2 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x6 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #xb :conn-count #x5 :first-pov #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x14 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x18 :conn-count #x5 :first-pov #x1d) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x21 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x27 :conn-count #x7 :first-pov #x2e) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x33 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x39 :conn-count #x6 :first-pov #x3f) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x43 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x48 :conn-count #x3 :first-pov #x4b) + (new 'static 'trail-conn-hash-cell :first-conn #x8 :conn-count #x53 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x58 :conn-count #x3 :first-pov #x5b) + (new 'static 'trail-conn-hash-cell :first-conn #x6 :conn-count #x61 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x65 :conn-count #x3 :first-pov #x68) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x6b :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x6e :conn-count #x3 :first-pov #x71) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x76 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x7c :conn-count #x3 :first-pov #x7f) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x82 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x88 :conn-count #x2 :first-pov #x8a) + (new 'static 'trail-conn-hash-cell :first-conn #x7 :conn-count #x91 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x95 :conn-count #x2 :first-pov #x97) + (new 'static 'trail-conn-hash-cell :first-conn #x1) + ) + :visnode-ids (new 'static 'array uint16 152 + #x27 + #xa0 + #x2a + #x4e + #x5e + #x5f + #x2b + #x2c + #x2d + #x43 + #xda + #x2f + #x30 + #x41 + #x42 + #xd4 + #x30 + #x31 + #x33 + #x36 + #x35 + #x3b + #x40 + #xdb + #x35 + #x3b + #x40 + #xda + #xdb + #x36 + #x37 + #x38 + #x40 + #x2c + #x35 + #x3b + #x40 + #xda + #xdb + #x3c + #x3d + #x3f + #x53 + #x54 + #x55 + #x56 + #x3c + #x3d + #x3e + #x56 + #x58 + #x3c + #x3d + #x3e + #x55 + #x56 + #x58 + #x3c + #x3d + #x3f + #x53 + #x54 + #x55 + #x3f + #x53 + #x54 + #x55 + #x2f + #x41 + #x42 + #x44 + #xd4 + #x46 + #x47 + #x48 + #x4d + #x4f + #x52 + #x53 + #x60 + #xd5 + #xd6 + #xd7 + #x3c + #x3d + #x3e + #x55 + #x56 + #x58 + #x59 + #x5a + #x7c + #x7e + #x7f + #x80 + #x9e + #xb3 + #x97 + #xbf + #xc0 + #xc3 + #x9f + #xba + #xbd + #xa8 + #xa9 + #xaa + #x8f + #xbb + #xbc + #xbe + #xbf + #xc9 + #x97 + #xbe + #xbf + #xc3 + #xc9 + #x97 + #xbe + #xbf + #xc0 + #xc3 + #xc9 + #xbf + #xc3 + #xc9 + #x42 + #xd3 + #xd4 + #x2f + #x30 + #x41 + #x42 + #xd3 + #xd4 + #x5c + #x5d + #x2b + #x2c + #x2d + #x3b + #x43 + #xda + #xdb + #x2c + #x3b + #xda + #xdb + #x7 + #x20 + #x0 + ) + :conn-hash (new 'static 'trail-conn-hash + :cell-width (meters 301.0936) + :origin (new 'static 'vector :x -709628.75 :z -2139132.0 :w 1.0) + :cell (new 'static 'inline-array trail-conn-hash-cell 256 + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell :conn-count #x12) + (new 'static 'trail-conn-hash-cell :first-conn #x12 :conn-count #x20) + (new 'static 'trail-conn-hash-cell :first-conn #x32 :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x41 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x52 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x56 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x61 :conn-count #x26) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x88 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x91 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x9f :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #xa5 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #xaa :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #xac :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #xb8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #xc3 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #xce :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #xe3 :conn-count #x1f) + (new 'static 'trail-conn-hash-cell :first-conn #x102 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x10f :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x11e :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x12e :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x136 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x13c :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x142 :conn-count #x17) + (new 'static 'trail-conn-hash-cell :first-conn #x159 :conn-count #x1a) + (new 'static 'trail-conn-hash-cell :first-conn #x173 :conn-count #x14) + (new 'static 'trail-conn-hash-cell :first-conn #x187 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x191 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x194 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x1a2 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x1bd :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x1cc :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x1d8 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x1e6 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x1f7 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x1fe) + (new 'static 'trail-conn-hash-cell :first-conn #x1fe :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x209 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x213 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x21b :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x225 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x231 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x23b :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x248 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x24b) + (new 'static 'trail-conn-hash-cell :first-conn #x24b :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x25c :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x267 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x26d :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x270 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x275 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x281 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x28e :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x298 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x29d :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x2a7 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x2b5 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x2c6 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x2d0 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x2d7 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x2df :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x2e5 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x2ee :conn-count #x16) + (new 'static 'trail-conn-hash-cell :first-conn #x304 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x30e :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x318 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x31a :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #x32f :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x33e :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x34e :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x35d :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x35e :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x35f :conn-count #x13) + (new 'static 'trail-conn-hash-cell :first-conn #x372 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x379 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x384 :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x394 :conn-count #x1a) + (new 'static 'trail-conn-hash-cell :first-conn #x3ae :conn-count #x1b) + (new 'static 'trail-conn-hash-cell :first-conn #x3c9 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x3d2 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x3dc :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x3dd :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x3df :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x3e6 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x3f1 :conn-count #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x40a :conn-count #x18) + (new 'static 'trail-conn-hash-cell :first-conn #x422 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x42f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x43d :conn-count #x12) + (new 'static 'trail-conn-hash-cell :first-conn #x44f :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x458 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x45d :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x463 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x469 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x472 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x480 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x484 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x48f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x49d :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x4ac :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x4b1 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x4c3 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x4cb :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4cd :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4cf :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x4d2 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x4d3 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x4da :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x4ea :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x4f9 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x4fc :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x504 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x506 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x507 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x516 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x517 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x518 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x51d :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x520 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x522 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x525 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x52b) + (new 'static 'trail-conn-hash-cell :first-conn #x52b) + (new 'static 'trail-conn-hash-cell :first-conn #x52b :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x534) + ) + :conn-ids (new 'static 'array uint16 1336 + #x27 + #x28 + #x29 + #x2a + #x2b + #x45 + #x47 + #x48 + #x49 + #x4a + #x4b + #x4c + #x4d + #x4e + #x4f + #x53 + #x54 + #x55 + #x4 + #x5 + #x2b + #x39 + #x3a + #x3b + #x3c + #x3d + #x3e + #x3f + #x40 + #x41 + #x42 + #x43 + #x44 + #x45 + #x46 + #x53 + #x54 + #x55 + #x56 + #x57 + #x58 + #x59 + #x5a + #x5b + #xdb + #xdc + #xdd + #xde + #xdf + #xe0 + #xf + #x11 + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x39 + #x5c + #x5d + #xe + #x10 + #x11 + #x12 + #x13 + #x14 + #x15 + #x17 + #x1d + #x1e + #x21 + #xd9 + #x4b + #x4e + #x50 + #x51 + #x52 + #x4 + #x52 + #x5a + #xe1 + #x6 + #xa + #xc + #xf + #x2f + #xd5 + #xd6 + #xd7 + #xd8 + #xd9 + #xda + #x3 + #x6 + #x7 + #x8 + #x9 + #xa + #xb + #xc + #xd + #xe + #xf + #x15 + #x16 + #x17 + #x18 + #x19 + #x1a + #x1b + #x1c + #x1d + #x1e + #x1f + #x20 + #x21 + #x22 + #x23 + #x24 + #x25 + #x26 + #x2c + #x2d + #x2e + #x9b + #xd8 + #xd9 + #xe2 + #xe3 + #xe4 + #xc4 + #x90 + #xc0 + #xc1 + #xc2 + #xc4 + #xc5 + #xc6 + #xca + #xcb + #x8a + #x90 + #x91 + #x92 + #x93 + #x94 + #x95 + #x96 + #x97 + #xac + #xb0 + #xf0 + #xf1 + #xf3 + #x81 + #x82 + #xac + #xaf + #xb0 + #xf3 + #x7f + #x80 + #x81 + #xf2 + #xf3 + #x2 + #xf5 + #x1 + #x2 + #x9b + #xee + #xef + #xf4 + #xf5 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #xf4 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x1a1 + #x1a4 + #x1a5 + #x8b + #x8c + #xc4 + #xc9 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x8d + #x8f + #x99 + #x9a + #xb7 + #xb8 + #xbb + #xbc + #xbd + #xbe + #xbf + #xc0 + #xc1 + #xc3 + #xc5 + #xc9 + #xca + #x120 + #x126 + #x12b + #x13e + #x75 + #x76 + #x77 + #x78 + #x79 + #x7a + #x7b + #x7c + #x83 + #x84 + #x88 + #x89 + #x8a + #x8e + #x8f + #x90 + #x91 + #x96 + #x97 + #x98 + #xad + #xae + #xb0 + #xb1 + #xb2 + #xb3 + #xc5 + #x120 + #x126 + #x12b + #x13e + #x74 + #x75 + #x76 + #x78 + #x7a + #x7c + #x7d + #xaf + #x120 + #x124 + #x126 + #x127 + #x12b + #x73 + #x74 + #x7e + #x7f + #xf2 + #x11e + #x11f + #x120 + #x121 + #x124 + #x125 + #x126 + #x127 + #x128 + #x12b + #xf2 + #xf5 + #x11b + #x11c + #x11d + #x11e + #x11f + #x120 + #x121 + #x122 + #x123 + #x124 + #x125 + #x126 + #x127 + #x128 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #x11c + #x11d + #x122 + #xf9 + #x1a1 + #x1a2 + #x1a3 + #x1a4 + #x1a5 + #x145 + #x151 + #x186 + #x1a4 + #x1a6 + #x1a7 + #xb9 + #xba + #xbb + #xbc + #xc3 + #x113 + #x121 + #x127 + #x13f + #x140 + #x145 + #x146 + #x147 + #x151 + #x152 + #x182 + #x186 + #x187 + #x18c + #x192 + #x1a4 + #x1a6 + #x1a7 + #x85 + #x86 + #x87 + #x88 + #xb9 + #xbc + #x10f + #x11f + #x121 + #x125 + #x127 + #x128 + #x13d + #x13e + #x13f + #x140 + #x141 + #x142 + #x143 + #x144 + #x145 + #x146 + #x147 + #x148 + #x151 + #x152 + #x70 + #x71 + #x7c + #x7d + #xb4 + #xc7 + #x11e + #x11f + #x121 + #x124 + #x125 + #x127 + #x128 + #x12a + #x13d + #x13e + #x13f + #x140 + #x141 + #x142 + #x71 + #x72 + #x73 + #x11e + #x11f + #x121 + #x125 + #x128 + #x12a + #x12b + #x123 + #x12a + #x12b + #xf6 + #xf7 + #xf8 + #xfa + #xfc + #x11c + #x11d + #x122 + #x123 + #x129 + #x12a + #x12b + #x135 + #x136 + #xf7 + #xf8 + #xf9 + #xfa + #xfc + #x11d + #x123 + #x129 + #x12c + #x135 + #x136 + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #x115 + #x17d + #x184 + #x189 + #x18e + #x1a2 + #x1a3 + #x1a5 + #x1a8 + #x1aa + #x114 + #x115 + #x128 + #x140 + #x147 + #x153 + #x17c + #x183 + #x188 + #x189 + #x18d + #x1a6 + #x1a7 + #x1a8 + #x1a9 + #x113 + #x128 + #x140 + #x147 + #x153 + #x182 + #x186 + #x187 + #x188 + #x189 + #x18c + #x192 + #x10f + #x113 + #x128 + #x141 + #x143 + #x144 + #x148 + #x151 + #x152 + #x153 + #x154 + #x186 + #x187 + #x189 + #x6e + #x6f + #xb4 + #xb5 + #x10f + #x110 + #x142 + #x143 + #x144 + #x14f + #x150 + #x151 + #x152 + #x153 + #x154 + #x186 + #x187 + #x69 + #x6a + #x6b + #x6c + #x6d + #xb5 + #xb6 + #xfc + #xfd + #x12d + #x135 + #x136 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #xf7 + #xf9 + #xfa + #x12c + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #xf7 + #xf9 + #x13b + #x17d + #x184 + #x18e + #x1a3 + #x1aa + #x114 + #x115 + #x17c + #x17d + #x183 + #x184 + #x18d + #x18e + #x1a7 + #x1a9 + #x114 + #x115 + #x141 + #x148 + #x17c + #x182 + #x183 + #x184 + #x188 + #x18c + #x18d + #x192 + #x113 + #x141 + #x148 + #x154 + #x182 + #x188 + #x189 + #x18a + #x18c + #x192 + #x10f + #x110 + #x112 + #x143 + #x144 + #x14f + #x150 + #x17f + #x186 + #x187 + #x188 + #x189 + #x18a + #x67 + #x68 + #x69 + #xfc + #xfd + #xfe + #x12d + #x12e + #x136 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #x155 + #x156 + #x157 + #x158 + #x159 + #xfa + #x12c + #x12d + #x137 + #x138 + #x139 + #x13a + #x13c + #x14c + #x14d + #x14e + #xf7 + #xf9 + #x12c + #x12d + #x13b + #x14d + #xf9 + #x1a3 + #x1aa + #x17d + #x18e + #x1a3 + #x1a7 + #x1a9 + #x114 + #x115 + #x141 + #x148 + #x154 + #x17c + #x17d + #x183 + #x184 + #x18a + #x18d + #x18e + #x113 + #x114 + #x115 + #x154 + #x17c + #x17d + #x182 + #x183 + #x184 + #x18a + #x18c + #x18d + #x192 + #x10f + #x110 + #x112 + #x113 + #x114 + #x115 + #x143 + #x14f + #x17f + #x18c + #x64 + #x65 + #x66 + #x67 + #xa7 + #xa7 + #xa8 + #xa9 + #xaa + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #x12e + #x14a + #x14b + #x155 + #x156 + #x157 + #x158 + #x159 + #xfa + #xfb + #x12e + #x137 + #x138 + #x139 + #x13a + #x13c + #x14a + #x14b + #x14c + #x14e + #x155 + #x156 + #x157 + #x158 + #x159 + #xf7 + #xfa + #x12c + #x12d + #x12e + #x13a + #x13b + #x13c + #x14d + #x158 + #xf7 + #xf9 + #x12c + #x12d + #x13b + #x14d + #x1aa + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x117 + #x141 + #x148 + #x154 + #x18a + #x18e + #x117 + #x17c + #x17d + #x182 + #x183 + #x184 + #x18d + #x18e + #x192 + #x9c + #xab + #x10f + #x110 + #x111 + #x112 + #x113 + #x114 + #x115 + #x116 + #x117 + #x143 + #x14f + #x17c + #x17d + #x17f + #x182 + #x183 + #x184 + #x18c + #x18d + #x192 + #x63 + #x64 + #x9c + #x9d + #x9e + #xa2 + #xa3 + #xa5 + #xa6 + #xa7 + #x60 + #x61 + #x62 + #x63 + #xa0 + #xa1 + #xa4 + #xa5 + #xa6 + #xc8 + #xff + #x100 + #xfb + #xff + #x100 + #x101 + #x12f + #x137 + #x138 + #x139 + #x14a + #x14b + #x14c + #x14e + #x155 + #x156 + #x157 + #x159 + #x15a + #x15b + #x15c + #x15d + #x15e + #xfa + #xfb + #x100 + #x101 + #x12e + #x12f + #x130 + #x13a + #x13c + #x14e + #x158 + #x159 + #x15c + #x15d + #x15e + #xf7 + #xf9 + #xfb + #x101 + #x12c + #x12d + #x12e + #x12f + #x130 + #x131 + #x132 + #x133 + #x134 + #x13b + #x14d + #x158 + #xf9 + #x132 + #x13b + #x14d + #x158 + #x117 + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x1ab + #x117 + #x18e + #x10b + #x111 + #x116 + #x143 + #x14f + #x177 + #x17c + #x17d + #x17f + #x180 + #x181 + #x182 + #x183 + #x184 + #x185 + #x18c + #x18d + #x18e + #x192 + #x10b + #x10e + #x177 + #x17c + #x17d + #x180 + #x18c + #x0 + #x5e + #x5f + #x9f + #xa0 + #xc8 + #x10a + #x10b + #x10c + #x10d + #x10e + #x5f + #x101 + #x102 + #x103 + #x104 + #x105 + #x106 + #x107 + #x108 + #x109 + #x131 + #x134 + #x15f + #x160 + #x161 + #x16c + #x101 + #x102 + #x107 + #x108 + #x109 + #x130 + #x131 + #x134 + #x138 + #x139 + #x14b + #x14c + #x156 + #x157 + #x15a + #x15b + #x15f + #x160 + #x161 + #x162 + #x163 + #x164 + #x165 + #x166 + #x16c + #x173 + #xfa + #x100 + #x107 + #x108 + #x109 + #x130 + #x131 + #x133 + #x134 + #x13a + #x13c + #x14c + #x14e + #x157 + #x159 + #x15b + #x15c + #x15d + #x15e + #x163 + #x164 + #x165 + #x166 + #x16c + #x173 + #x197 + #x19b + #x108 + #x131 + #x133 + #x134 + #x15d + #x15e + #x165 + #x166 + #x19e + #xf9 + #x132 + #x13b + #x14d + #x158 + #x196 + #x19a + #x19e + #x19f + #x1ab + #x1ab + #x116 + #x185 + #x10e + #x116 + #x181 + #x185 + #x18d + #x18e + #x192 + #x10e + #x134 + #x177 + #x17c + #x17d + #x17e + #x180 + #x181 + #x18c + #x18d + #x18e + #x10a + #x10c + #x10d + #x134 + #x160 + #x161 + #x167 + #x168 + #x16f + #x170 + #x171 + #x172 + #x173 + #x174 + #x175 + #x176 + #x177 + #x178 + #x179 + #x17a + #x17b + #x17c + #x17d + #x17e + #x18c + #x103 + #x104 + #x105 + #x106 + #x131 + #x134 + #x15f + #x160 + #x161 + #x167 + #x168 + #x169 + #x16a + #x16b + #x16c + #x16d + #x16e + #x171 + #x172 + #x173 + #x174 + #x176 + #x17a + #x17b + #x104 + #x105 + #x106 + #x139 + #x162 + #x169 + #x16a + #x16b + #x16d + #x16e + #x173 + #x174 + #x176 + #x106 + #x109 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16d + #x16e + #x174 + #x176 + #x197 + #x198 + #x19b + #x108 + #x109 + #x13a + #x15d + #x15e + #x165 + #x166 + #x16d + #x16e + #x174 + #x176 + #x196 + #x198 + #x19a + #x19b + #x19c + #x19e + #x1a0 + #x109 + #x15e + #x166 + #x16e + #x176 + #x196 + #x19a + #x19f + #x1a0 + #x15e + #x166 + #x19f + #x1a0 + #x1ab + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x10e + #x134 + #x175 + #x17e + #x18f + #x192 + #x134 + #x175 + #x17e + #x180 + #x181 + #x18d + #x18e + #x18f + #x192 + #x10c + #x10d + #x161 + #x168 + #x170 + #x175 + #x178 + #x179 + #x180 + #x18b + #x18c + #x18d + #x18e + #x18f + #x171 + #x172 + #x17a + #x17b + #x104 + #x105 + #x139 + #x162 + #x169 + #x16a + #x16b + #x171 + #x172 + #x17a + #x17b + #x106 + #x139 + #x14c + #x157 + #x15b + #x162 + #x163 + #x16b + #x172 + #x17b + #x196 + #x197 + #x198 + #x199 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x196 + #x199 + #x19a + #x19b + #x19c + #x19d + #x109 + #x16e + #x176 + #x199 + #x19d + #x109 + #x15e + #x166 + #x16e + #x176 + #x199 + #x19d + #x19f + #x1a0 + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x1ab + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x18f + #x193 + #x181 + #x192 + #x10d + #x179 + #x18b + #x190 + #x104 + #x105 + #x169 + #x16a + #x171 + #x17a + #x190 + #x104 + #x105 + #x119 + #x139 + #x162 + #x169 + #x16a + #x171 + #x17a + #x190 + #x194 + #x195 + #x196 + #x197 + #x198 + #x199 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x195 + #x19a + #x19b + #x19c + #x19d + #x193 + #x181 + #x192 + #x193 + #x10d + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x190 + #x191 + #x191 + #x105 + #x119 + #x11a + #x16a + #x191 + #x194 + #x10d + #x118 + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x118 + #x118 + #xcc + #xcd + #x118 + #x119 + #x11a + #xcd + #xce + #xcf + #xcf + #xd0 + #xd0 + #xd1 + #xd2 + #xd2 + #xd3 + #xd4 + #xed + #xce + #xcf + #xe5 + #xe6 + #xe7 + #xe8 + #xe9 + #xea + #xeb + #xec + #xed + #x0 + #x0 + #x0 + #x0 + ) + ) + :cell-pov-bit-arrays (new 'static 'array uint64 255 + #x2b81e05dd1 + #xb81e05dd1 + #x2b81605d91 + #x2781605c91 + #x2780605891 + #x2790201e81 + #x27b0001f81 + #x67b8001f81 + #x67ba031f41 + #x47ba031f43 + #x47b2039743 + #x43b203a743 + #x453203a743 + #x453203b7c3 + #x413a03b7c3 + #x41388fbfc3 + #x2b81e05dd1 + #xb81e05dd1 + #x2b81e05dd1 + #x2781605dd1 + #x2781605d91 + #x2780605881 + #x2790001f81 + #x67b8001fc1 + #x47ba031f41 + #x47ba038743 + #x453203a743 + #x453203b7c3 + #x473203bfc3 + #x473a03bfc3 + #x433a0fbfc3 + #x42388fbfc3 + #x2b80e05dd0 + #xb81e05dd0 + #x2b81e05dd1 + #x2781605dd1 + #x2781605dd1 + #x2780605dd1 + #x2780001dc1 + #x738001fc1 + #x433a0317c1 + #x433a03bfc3 + #x463a03bfc3 + #x463203bfc3 + #x423203bfc3 + #x423a07bfc3 + #x42388fbfc3 + #x42388fbfc3 + #x3b80e059d0 + #x2b81e059d0 + #x2781e05dd0 + #x2781e05dd0 + #x2781605dd0 + #x2700605dd0 + #x2700001dc0 + #x710001fc1 + #x433a031fc1 + #x433a03bfc3 + #x433a03bfc3 + #x433203bfc3 + #x433203bfc3 + #x433a8fafc3 + #x43388fafc3 + #x43388fafc3 + #x3d80b819d0 + #x2f80f059d0 + #x2781e059d0 + #x2701e059d0 + #x27016059d0 + #x27006059d0 + #x2700605dd0 + #x33803bfc3 + #x33a03afc3 + #x413a03afc3 + #x413a03afc3 + #x413203afc3 + #x41328fafc3 + #x41388fafc3 + #x41388fafc3 + #x417a8fafc3 + #x3d82f858d8 + #x3f80f858d0 + #x2f01f058d0 + #x2f01f058d0 + #x2f01e05890 + #x3f01605810 + #x3f7061f612 + #x7803a602 + #x3a03a623 + #x403a03a7e3 + #x403a03a7c3 + #x41328fafc3 + #x413a8fafc3 + #x41388fafc3 + #x417a8fafc3 + #x417a8fafc3 + #x3f8a7858d8 + #x3e82f858d8 + #x2e80f85898 + #x2f01f05810 + #x2f01f05810 + #x3f01605810 + #x3f7061f602 + #x7803a602 + #x7e03a622 + #x3e03a723 + #x403a8fa743 + #x40328fa7c3 + #x403a8fa7c3 + #x40788fa7c3 + #x407a8fa7c3 + #x407b8fa7c3 + #x3f8a785898 + #x3e82785818 + #x3e82f85818 + #x2e03f85818 + #x2f01f85818 + #x3f01f05010 + #x3f00605010 + #x7001a602 + #x407c03a622 + #x407e03a623 + #x403a8fa703 + #x40328fa743 + #x40388fa743 + #x407a8fa7c3 + #x407b0fa7c7 + #x407b07a7c7 + #x3f80605818 + #x3e80605818 + #x3e82785818 + #x2e82f85818 + #x3e03f85818 + #x3f03f85018 + #x3f01f05018 + #x406e07a606 + #x407e8fa626 + #x407e8fa626 + #x407a8fa607 + #x40328fa707 + #x407a8fa707 + #x507b0fa747 + #x507b0ba747 + #x507b0ba7c7 + #x3f81405810 + #x3e81405810 + #x3e80405810 + #x2e80605810 + #x3e0bf85818 + #x1e0bf85018 + #x1e0bf85018 + #x5c6fb6000c + #x506e8e0224 + #x506e8fa626 + #x507a8fa607 + #x507b0fa607 + #x405b0fa707 + #x505b0fa707 + #x505b0fa747 + #x505b0fa747 + #x3e81405810 + #x3e81405810 + #x3e81405800 + #x3e80000000 + #x5049f85018 + #x5e4bf85018 + #x5e6bfc5218 + #x5e6bbe0208 + #x5c7ebe0224 + #x507e9fa624 + #x507b0fa405 + #x507b0fa405 + #x407b0fa605 + #x405b0fa705 + #x405a0ea707 + #x405a0fa767 + #x3e81405820 + #x3e81405800 + #x3e81805800 + #x3ec1b80018 + #x5061f85218 + #x5261fc5218 + #x5e61fe5218 + #x5e6bbe0208 + #x5e7ebe0004 + #x407f1f0424 + #x407f1fa424 + #x407b1fa405 + #x407b1fa405 + #x405a0f2725 + #x405a0fa727 + #x40520ea727 + #x3ec1c85820 + #x3e81d85820 + #x3ea1981228 + #x3ee1bc0238 + #x38e1fe5238 + #x1221fe5218 + #x1621fe5018 + #x5e0fbe1028 + #x5e5fa00020 + #x407f1e0424 + #x407f1f2424 + #x407f1fa425 + #x407f1fa425 + #x4055030225 + #x4055072727 + #x4055072727 + #x3ee1d85a20 + #x3ea19c5a28 + #x3ea1bc0238 + #x3ea1fe0238 + #x3ca1fe5038 + #x1021fe5038 + #x1205fe5038 + #x525fb81028 + #x407f000020 + #x77060424 + #x27060424 + #x7040024 + #x4015000020 + #x4015000020 + #x4055030621 + #x4055032725 + #x3ea19c5a28 + #x3ea19c1a28 + #x3ea5be0038 + #x3ea5fe0038 + #x3c85fe5038 + #x3807fe5038 + #x1257fc5038 + #x1257b81028 + #x1277000020 + #x1067020420 + #x1007060424 + #x7040024 + #x4005040020 + #x4015000020 + #x4055000020 + #x4055010621 + #x3ea59c1a28 + #x3ea5be1038 + #x3ea5be0038 + #x3e85fe4038 + #x3c87fe4038 + #x38d7fc5038 + #x3057f85038 + #x1257b81028 + #x1277200020 + #x1027020420 + #x1007060424 + #x1007040024 + #x5007040024 + #x4015000020 + #x4015000020 + ) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc index 7c98cf8378..653a5c7adc 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc @@ -1209,11 +1209,11 @@ ) (target-eco-process) (target-color-effect-process) - (if (logtest? (-> self target-effect) 7) + (if (logtest? (-> self target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> self target-effect) 56) + (if (logtest? (-> self target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) @@ -1303,7 +1303,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc index c96e862662..3ebf792bb6 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc @@ -65,7 +65,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (alpha gs-alpha) (bucket bucket-id) (sink uint32) - (level basic) + (level level) (texture-index uint32) (data prim-vertex :inline :dynamic) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc index e1deabe7c1..e132019138 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc @@ -70,8 +70,245 @@ ) ;; definition for method 9 of type prim-strip -;; INFO: function output is handled by mips2c -(defmethod-mips2c "(method 9 prim-strip)" 9 prim-strip) +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod generate-dma! ((this prim-strip) (arg0 matrix)) + "Generate DMA for prim rendering." + (local-vars + (a3-6 uint128) + (a3-13 uint128) + (a3-14 uint128) + (t0-13 uint128) + (t0-14 uint128) + (t1-4 uint128) + (t1-5 uint128) + (t2-0 uint128) + (t2-1 uint128) + ) + (rlet ((vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (let ((v1-5 (-> *display* frames (-> *display* on-screen) global-buf)) + (a0-4 (/ (+ (-> this num-verts) 79) (the-as uint 80))) + ) + (cond + ((< (the-as uint (+ (* (the-as uint 144) (-> this num-verts)) (* a0-4 128))) + (the-as uint (&- (-> v1-5 end) (the-as uint (-> v1-5 base)))) + ) + (let* ((a1-5 (lookup-texture-by-id (-> this tex-id))) + (s3-0 *prim-work*) + (s2-0 (-> s3-0 sinks (-> this sink))) + (s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-0 (-> s4-0 base)) + ) + (set! (-> s3-0 in-verts) (the-as int (-> this num-verts))) + (set! (-> s3-0 vert-ptr) (-> this data)) + (let ((v1-20 (if (logtest? (-> this flags) (prim-flags alpha-blend-enable)) + 1 + 0 + ) + ) + (a0-11 (if (logtest? (-> this flags) (prim-flags texture-enable)) + 1 + 0 + ) + ) + (a2-3 (if (logtest? (-> this flags) (prim-flags fog-enable)) + 1 + 0 + ) + ) + ) + (set! (-> s3-0 giftag fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe v1-20 :tme a0-11 :fge a2-3) + ) + ) + (set! (-> s3-0 giftag str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :abe v1-20 :tme a0-11 :fge a2-3) + ) + ) + ) + (when a1-5 + (let ((v1-28 (-> this level))) + (-> this texture-index) + (let ((a0-17 (+ (-> this texture-index) 12))) + (dotimes (a2-7 3) + (let ((a3-5 (-> v1-28 texture-mask a0-17 mask quad)) + (t0-9 (-> a1-5 masks data a2-7 mask quad)) + ) + (.por a3-6 a3-5 t0-9) + ) + (set! (-> v1-28 texture-mask a0-17 mask quad) a3-6) + ) + ) + ) + (adgif-shader<-texture-simple! (-> s3-0 shader) a1-5) + (set! (-> s3-0 shader clamp) (-> this clamp)) + (set! (-> s3-0 shader clamp-reg) (gs-reg64 clamp-1)) + (set! (-> s3-0 shader alpha) (the-as gs-miptbp (-> this alpha))) + (set! (-> s3-0 shader reg-4) (gs-reg alpha-1)) + (.lvf vf1 (&-> arg0 rvec quad)) + (.lvf vf2 (&-> arg0 uvec quad)) + (.lvf vf3 (&-> arg0 fvec quad)) + (.lvf vf4 (&-> arg0 trans quad)) + (.lvf vf5 (&-> s3-0 shader quad 0 quad)) + (.lvf vf6 (&-> s3-0 shader quad 1 quad)) + (.lvf vf7 (&-> s3-0 shader quad 2 quad)) + (.lvf vf8 (&-> s3-0 shader quad 3 quad)) + (.lvf vf9 (&-> s3-0 shader quad 4 quad)) + (.lvf vf10 (&-> s3-0 giftag qword quad)) + (.lvf vf11 (&-> this adnops 0 quad)) + (.lvf vf12 (&-> this adnops 1 quad)) + (while (< 2 (-> s3-0 in-verts)) + (set! (-> s3-0 num-verts) (min 80 (-> s3-0 in-verts))) + (let* ((a0-20 (-> s3-0 control-tmpl (logand (-> s2-0 control-count) 1))) + (v1-41 (-> s4-0 base)) + (a0-21 (-> a0-20 quad)) + (a1-6 (the-as object (&+ v1-41 16))) + (v1-42 (-> s3-0 num-verts)) + ) + (set! (-> (the-as (pointer uint128) a1-6) -1) a0-21) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 0 stq quad) vf1) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 0 pos quad) vf2) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 1 stq quad) vf3) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 1 pos quad) vf4) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 2 stq quad) vf10) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 2 pos quad) vf11) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 3 stq quad) vf12) + (set! (-> (the-as (inline-array prim-vertex) a1-6) 2 pos w) (the-as float v1-42)) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 3 pos quad) vf5) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 4 stq quad) vf6) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 4 pos quad) vf7) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 5 stq quad) vf8) + (.svf (&-> (the-as (inline-array prim-vertex) a1-6) 5 pos quad) vf9) + (set! (-> (the-as (inline-array prim-vertex) a1-6) 4 col) (the-as rgba (logior v1-42 #x8000))) + (set! (-> s4-0 base) (the-as pointer (-> (the-as (inline-array prim-vertex) a1-6) 6))) + (let ((a0-28 (-> s3-0 vertex-tmpl (mod (-> s2-0 vertex-count) (the-as uint 3))))) + (let ((a1-9 (* 3 v1-42))) + (set! (-> a0-28 dma qwc) a1-9) + (set! (-> a0-28 vif1 num) a1-9) + ) + (let ((a2-13 (the-as object (-> s4-0 base))) + (a3-11 (-> a0-28 quad)) + (a0-29 (-> s3-0 mask quad)) + (a1-13 (-> s3-0 vert-ptr)) + ) + (nop!) + (set! (-> (the-as (inline-array prim-vertex) a2-13) 0 stq quad) a3-11) + (let ((a2-14 (the-as (object object) (-> (the-as (inline-array prim-vertex) a2-13) 0 pos)))) + (set! (-> s4-0 base) (the-as pointer a2-14)) + (nop!) + (label cfg-16) + (nop!) + (let ((t0-12 (the-as uint128 (-> a1-13 0 stq w)))) + (nop!) + (let ((a3-12 (the-as uint128 (-> a1-13 1 stq w)))) + (.pextlb t0-13 0 t0-12) + (.lvf vf15 (&-> a1-13 0 stq quad)) + (.pextlh t0-14 0 t0-13) + (.lvf vf16 (&-> a1-13 1 stq quad)) + (.pextlb a3-13 0 a3-12) + ) + ) + (.lvf vf13 (&-> a1-13 0 pos quad)) + (.pextlh a3-14 0 a3-13) + (.lvf vf14 (&-> a1-13 1 pos quad)) + (vftoi12.xyzw vf15 vf15) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 0 pos quad) t0-14) + (vftoi12.xyzw vf16 vf16) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 2 stq quad) a3-14) + (nop!) + (let ((t0-15 (the-as number (-> a1-13 0 stq z)))) + (nop!) + (let ((a3-15 (the-as number (-> a1-13 1 stq z)))) + (set! a1-13 (the-as (inline-array prim-vertex) (-> a1-13 2))) + (.mov t2-0 vf15) + (+! v1-42 -2) + (.mov t1-4 vf16) + (.pand t2-1 t2-0 a0-29) + (.svf (&-> (the-as (inline-array prim-vertex) a2-14) 1 stq quad) vf13) + (.pand t1-5 t1-4 a0-29) + (.svf (&-> (the-as (inline-array prim-vertex) a2-14) 2 pos quad) vf14) + (let ((t0-16 (logior (the-as int t2-1) (the-as int t0-15)))) + (nop!) + (let ((a3-16 (logior (the-as int t1-5) (the-as int a3-15)))) + (nop!) + (set! (-> (the-as (inline-array prim-vertex) a2-14) 0 stq quad) (the-as uint128 t0-16)) + (set! a2-14 (the-as (object object) (-> (the-as (inline-array prim-vertex) a2-14) 3))) + (b! (> v1-42 0) cfg-16 :delay (set! (-> (the-as (pointer uint128) a2-14) -3) (the-as uint128 a3-16))) + ) + ) + ) + ) + ) + ) + ) + ) + (&+! (-> s4-0 base) (* 48 (-> s3-0 num-verts))) + (set! (-> (the-as (pointer uint128) (-> s4-0 base))) (-> s3-0 call-scissor quad)) + (&+! (-> s4-0 base) 16) + (+! (-> s3-0 in-verts) -78) + (set! (-> s3-0 vert-ptr) (the-as (inline-array prim-vertex) (-> s3-0 vert-ptr 78))) + (+! (-> s2-0 vertex-count) 1) + (+! (-> s2-0 control-count) 1) + ) + ) + (when (not (paused?)) + (when (logtest? (-> this flags) (prim-flags pf3)) + (when (not (logtest? (-> this flags) (prim-flags pf4))) + (set! (-> this num-verts) (the-as uint 0)) + 0 + ) + (logclear! (-> this flags) (prim-flags pf4)) + ) + ) + (let ((a3-17 (-> s4-0 base))) + (when (!= s5-0 a3-17) + (let ((v1-69 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-69) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-69) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-69) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-69) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> this bucket) + s5-0 + (the-as (pointer dma-tag) a3-17) + ) + ) + ) + ) + ) + (else + (format *stdcon* "Out of DMA buffer for prim rendering~%") + ) + ) + ) + 0 + (none) + ) + ) ;; definition for method 10 of type prim-strip ;; WARN: Return type mismatch int vs none. diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc index 2fbf543184..b8fffa24bf 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc @@ -11,25 +11,25 @@ (adgif adgif-shader) (radius float) (omega float) - (vel-sxvel vector :inline) - (rot-syvel vector :inline) - (fade rgbaf :inline) - (acc vector :inline) - (rotvel3d quaternion :inline) - (vel vector3s :inline :overlay-at (-> vel-sxvel data 0)) - (accel vector3s :inline :overlay-at (-> acc data 0)) - (scalevelx float :overlay-at (-> vel-sxvel data 3)) - (scalevely float :overlay-at (-> rot-syvel data 3)) + (vel-sxvel vector :inline) + (rot-syvel vector :inline) + (fade rgbaf :inline) + (acc vector :inline) + (rotvel3d quaternion :inline) + (vel vector3s :inline :overlay-at (-> vel-sxvel data 0)) + (accel vector3s :inline :overlay-at (-> acc data 0)) + (scalevelx float :overlay-at (-> vel-sxvel data 3)) + (scalevely float :overlay-at (-> rot-syvel data 3)) (friction float) (timer int32) (flags sp-cpuinfo-flag) - (flags-s32 int32 :overlay-at flags) + (flags-s32 sp-cpuinfo-flag-s32 :overlay-at flags) (user-int32 int32) - (user-uint32 uint32 :overlay-at user-int32) - (user-float float :overlay-at user-int32) - (user-pntr uint32 :overlay-at user-int32) - (user-object basic :overlay-at user-int32) - (user-sprite sprite-vec-data-2d :overlay-at user-int32) + (user-uint32 uint32 :overlay-at user-int32) + (user-float float :overlay-at user-int32) + (user-pntr uint32 :overlay-at user-int32) + (user-object basic :overlay-at user-int32) + (user-sprite sprite-vec-data-2d :overlay-at user-int32) (sp-func (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none)) (next-time uint32) (next-launcher basic) @@ -39,10 +39,10 @@ (user1-int16 uint16) (key sparticle-launch-control) (binding sparticle-launch-state) - (data uint32 1 :overlay-at omega) - (datab int8 4 :overlay-at omega) - (dataf float 1 :overlay-at omega) - (datac uint8 1 :overlay-at omega) + (data uint32 1 :overlay-at omega) + (datab int8 4 :overlay-at omega) + (dataf float 1 :overlay-at omega) + (datac uint8 1 :overlay-at omega) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc index 7dc9ddd429..fbf263df3d 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc @@ -1033,10 +1033,10 @@ (let* ((a1-1 (-> arg2 flags-s32)) (v1-1 -2) (a0-1 (-> arg3 r-g-b-a x)) - (a1-2 (logand a1-1 #x4000)) + (a1-2 (logand a1-1 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14))) ) 1 - (let ((a1-3 (sar a1-2 14))) + (let ((a1-3 (sar (the-as int a1-2) 14))) (set! (-> arg3 r-g-b-a x) (the-as float (logior (logand a0-1 (the-as uint v1-1)) a1-3))) ) ) @@ -2334,9 +2334,9 @@ (.mul.vf vf1 vf1 vf2) (.mov a0-5 vf1) ) - (let ((v1-16 (logand v1-15 #x4000))) + (let ((v1-16 (logand v1-15 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)))) (.mov t7-0 vf1) - (let ((v1-17 (sar v1-16 14))) + (let ((v1-17 (sar (the-as int v1-16) 14))) (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-0 (the-as uint -2)) v1-17))) ) ) @@ -2371,9 +2371,9 @@ (.mul.vf vf1 vf1 vf2) (.mov a0-11 vf1) ) - (let ((v1-30 (logand v1-29 #x4000))) + (let ((v1-30 (logand v1-29 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)))) (.mov t7-3 vf1) - (let ((v1-31 (sar v1-30 14))) + (let ((v1-31 (sar (the-as int v1-30) 14))) (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-3 (the-as uint -2)) v1-31))) ) ) @@ -3219,7 +3219,3 @@ (none) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/board/board-util_REF.gc b/test/decompiler/reference/jak3/engine/target/board/board-util_REF.gc index acc3cf82b8..ffc0a27e76 100644 --- a/test/decompiler/reference/jak3/engine/target/board/board-util_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/board-util_REF.gc @@ -52,7 +52,7 @@ ) ) (if (or (logtest? (-> v1-0 draw status) (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2)) - (or (logtest? (-> v1-0 target-effect) 1) (zero? (-> v1-0 skel active-channels))) + (or (logtest? (-> v1-0 target-effect) (target-effect te0)) (zero? (-> v1-0 skel active-channels))) ) (logior! (-> self draw status) (draw-control-status no-draw)) (logclear! (-> self draw status) (draw-control-status no-draw)) @@ -61,11 +61,11 @@ (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> v1-0 target-effect) 7) + (if (logtest? (-> v1-0 target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> v1-0 target-effect) 56) + (if (logtest? (-> v1-0 target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc index a0effd2756..a6243da91a 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc @@ -404,7 +404,7 @@ (if (or (logtest? (-> (the-as target gp-0) draw status) (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) ) - (or (logtest? (-> (the-as target gp-0) target-effect) 1) + (or (logtest? (-> (the-as target gp-0) target-effect) (target-effect te0)) (zero? (-> (the-as target gp-0) skel active-channels)) ) ) @@ -415,11 +415,11 @@ (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> (the-as target gp-0) target-effect) 7) + (if (logtest? (-> (the-as target gp-0) target-effect) (target-effect te0 te1 te2)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (if (logtest? (-> (the-as target gp-0) target-effect) 56) + (if (logtest? (-> (the-as target gp-0) target-effect) (target-effect te3 te4 te5)) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) diff --git a/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc b/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc index 24a0f17a18..f844958bbd 100644 --- a/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc @@ -414,7 +414,7 @@ (target-indax-reset) (cloth-post) (set! (-> self major-mode-exit-hook) target-indax-exit) - (set! (-> self major-mode-event-hook) (the-as (function none :behavior target) target-indax-handler)) + (set! (-> self major-mode-event-hook) target-indax-handler) (set! (-> self major-mode-exit-hook) target-indax-reset) (set! (-> self indax pad) (add-setting! 'mode-sound-bank 'modeidax 0.0 0)) (remove-exit) diff --git a/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc index 98cd3eaaab..6e47f04aee 100644 --- a/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc @@ -1834,7 +1834,7 @@ (logtest? (-> self control mod-surface flags) (surface-flag look-around)) (not (focus-test? self edge-grab pole flut tube light board pilot dark)) (-> *setting-control* user-current allow-look-around) - (time-elapsed? (the-as int (-> self no-look-around-wait)) (seconds 0.05)) + (time-elapsed? (-> self no-look-around-wait) (seconds 0.05)) (not (and (= (-> self control ground-pat material) (pat-material ice)) (< 4096.0 (-> self control ctrl-xz-vel))) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc index aee97c58f6..3ee1cc53c7 100644 --- a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc @@ -270,7 +270,7 @@ (set! (-> self anim-seed) (-> self parent 0 anim-seed)) (set! (-> self draw status) (-> self parent 0 draw status)) (cond - ((logtest? (-> self parent 0 target-effect) 1) + ((logtest? (-> self parent 0 target-effect) (target-effect te0)) (logior! (-> self draw status) (draw-control-status no-draw)) (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc index 124c47a780..e4706a25b2 100644 --- a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc @@ -976,7 +976,7 @@ ) ) ) - (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) 64) + (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) (target-effect te6)) 1.0 f30-0 ) diff --git a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc index 3db4d16e57..5799093105 100644 --- a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc @@ -187,7 +187,7 @@ ) ) ((and (logtest? (continue-flags race) (-> arg0 flags)) (!= (-> arg0 vehicle-type) 27)) - (set! (-> self mode-cache) (the-as basic 'pilot)) + (set! (-> self mode-cache) 'pilot) (set! (-> self mode-param1) (the-as handle #f)) (set! (-> self mode-param2) (-> arg0 vehicle-type)) (when (= (-> arg0 vehicle-type) 28) @@ -487,7 +487,7 @@ #f ) (else - (set! (-> self mode-cache) (the-as basic (-> block param 0))) + (set! (-> self mode-cache) (the-as symbol (-> block param 0))) (set! (-> self mode-param1) (if (>= argc 2) (process->handle (the-as process (-> block param 1))) (the-as handle #f) diff --git a/test/decompiler/reference/jak3/engine/target/target-h_REF.gc b/test/decompiler/reference/jak3/engine/target/target-h_REF.gc index 5935e500f4..0b27e14ffc 100644 --- a/test/decompiler/reference/jak3/engine/target/target-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-h_REF.gc @@ -46,18 +46,18 @@ (spool-anim spool-anim) (ambient-time time-frame) (fp-hud handle) - (no-load-wait uint64) - (no-look-around-wait uint64) + (no-load-wait time-frame) + (no-look-around-wait time-frame) (burn-proc handle) (pre-joint-hook (function none :behavior target)) (notify handle) (death-resetter resetter-spec :inline) - (mode-cache basic) + (mode-cache symbol) (mode-param1 handle) (mode-param2 uint64) (mode-param3 uint64) (major-mode-exit-hook (function none :behavior target)) - (major-mode-event-hook (function none :behavior target)) + (major-mode-event-hook (function process int symbol event-message-block object :behavior target)) (sub-mode-exit-hook (function none :behavior target)) (ext-geo-control external-art-buffer) (pending-ext-geo target-geo) @@ -68,8 +68,8 @@ (tobot-state state) (tobot? symbol) (tobot-recorder basic) - (target-effect uint64) - (color-effect basic) + (target-effect target-effect) + (color-effect symbol) (color-effect-start-time time-frame) (color-effect-duration time-frame) (racer racer-info) diff --git a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc index 7fbcaab61c..9f70a681a0 100644 --- a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc @@ -894,7 +894,7 @@ (target-powerup-effect (the-as symbol (-> arg3 param 0))) ) (('color-effect) - (set! (-> self color-effect) (the-as basic (-> arg3 param 0))) + (set! (-> self color-effect) (the-as symbol (-> arg3 param 0))) (set-time! (-> self color-effect-start-time)) (set! v0-0 (-> arg3 param 1)) (set! (-> self color-effect-duration) (the-as time-frame v0-0)) @@ -1113,11 +1113,11 @@ ) (('no-load-wait) (set! v0-0 (+ (current-time) (the-as time-frame (-> arg3 param 0)))) - (set! (-> self no-load-wait) (the-as uint v0-0)) + (set! (-> self no-load-wait) (the-as time-frame v0-0)) v0-0 ) (('no-look-around) - (set! (-> self no-look-around-wait) (the-as uint (+ (current-time) (the-as time-frame (-> arg3 param 0))))) + (set! (-> self no-look-around-wait) (+ (current-time) (the-as time-frame (-> arg3 param 0)))) (if (and (-> self next-state) (= (-> self next-state name) 'target-look-around)) (send-event self 'end-mode 'in-head) ) @@ -1267,7 +1267,7 @@ ) (or (logtest? (-> self target-flags) (target-flags tf1)) (focus-test? self dead dangerous hit grabbed in-head edge-grab pole flut tube board pilot mech) - (>= (the-as time-frame (-> self no-load-wait)) (current-time)) + (>= (-> self no-load-wait) (current-time)) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc index 737ba34a34..5209f515c3 100644 --- a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc @@ -219,18 +219,18 @@ (-> self invisible-interp) ) (set! (-> self draw shadow-ctrl settings shadow-dir w) (-> self invisible-shadow-dir-backup w)) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) (if (= (-> self invisible-interp) 1.0) - (logior! (-> self target-effect) 1) + (logior! (-> self target-effect) (target-effect te0)) ) (if (and (time-elapsed? (-> self invisible-start-time) (+ (-> self invisible-duration) (seconds -2))) (< (mod (- (current-time) (-> self invisible-start-time)) 60) 30) ) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) ) ) ((!= (-> self invisible-interp) 0.0) - (logand! (-> self target-effect) -2) + (logclear! (-> self target-effect) (target-effect te0)) (seek! (-> self invisible-interp) 0.0 (* 0.5 (seconds-per-frame))) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc index 4df19f6ed2..94543b7082 100644 --- a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc @@ -1166,8 +1166,8 @@ (let ((f30-0 (-> self lightjak-interp))) (cond ((< 0.0 f30-0) - (logior! (-> self target-effect) 2) - (logior! (-> self target-effect) 16) + (logior! (-> self target-effect) (target-effect te1)) + (logior! (-> self target-effect) (target-effect te4)) (sound-play-by-name (static-sound-name "ltjak-chill") (the-as sound-id (-> self lightjak tone)) @@ -1179,7 +1179,7 @@ ) ) (else - (when (logtest? (-> self target-effect) 2) + (when (logtest? (-> self target-effect) (target-effect te1)) (let ((v1-14 (get-status *gui-control* (the-as sound-id (-> self lightjak on-off))))) (cond ((= v1-14 (gui-status ready)) @@ -1248,8 +1248,8 @@ (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 176) :target self :mat-joint 6) ) ) - (logand! (-> self target-effect) -3) - (logand! (-> self target-effect) -17) + (logclear! (-> self target-effect) (target-effect te1)) + (logclear! (-> self target-effect) (target-effect te4)) ) ) (when (and (< 0.0 f30-0) (and (not (focus-test? self in-head)) diff --git a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc index 23a59c2a26..416bbaf17b 100644 --- a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc @@ -506,7 +506,7 @@ ) ) ((-> self major-mode-event-hook) - ((-> self major-mode-event-hook)) + ((-> self major-mode-event-hook) proc argc message block) ) (else (target-generic-event-handler proc argc message block) diff --git a/test/decompiler/reference/jak3/engine/target/target2_REF.gc b/test/decompiler/reference/jak3/engine/target/target2_REF.gc index 373eddded2..dcbc86a151 100644 --- a/test/decompiler/reference/jak3/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target2_REF.gc @@ -1229,7 +1229,7 @@ (defstate target-eco-powerup (target) :event target-standard-event-handler :exit (behavior () - (logand! (-> self target-effect) -101) + (logclear! (-> self target-effect) (target-effect te2 te5 te6)) (target-exit) ) :trans (behavior () @@ -1238,10 +1238,10 @@ :code (behavior ((arg0 int) (arg1 float)) (case arg0 ((8) - (logior! (-> self target-effect) 36) + (logior! (-> self target-effect) (target-effect te2 te5)) ) ((7) - (logior! (-> self target-effect) 64) + (logior! (-> self target-effect) (target-effect te6)) ) ) (set! (-> self neck flex-blend) 0.0) diff --git a/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc index 2bd56aa9c3..6f6b3dc530 100644 --- a/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc @@ -1738,13 +1738,7 @@ ) ) (when s3-0 - (let* ((s2-2 s5-0) - (s1-0 (method-of-object s2-2 trail-graph-method-29)) - ) - (target-pos 0) - (-> s4-0 cached-info) - (s1-0 s2-2) - ) + (trail-graph-method-29 s5-0 (target-pos 0) s3-0 (-> s4-0 cached-info)) (set! (-> s4-0 search-id) (-> s5-0 search-id)) ) ) @@ -1754,15 +1748,9 @@ (countdown (v1-33 6) (let ((s4-1 (-> this trail v1-33))) (when (and (= (-> s4-1 search-id) (-> s5-0 search-id)) (-> s4-1 used-by)) - (let* ((a0-29 s5-0) - (t9-5 (method-of-object a0-29 trail-graph-method-21)) - ) - (-> s4-1 node-id) - 64 - (&-> s4-1 goal-node-id) - (&-> s4-1 node-path-dist) - (set! (-> s4-1 node-count) (the-as int (t9-5 a0-29))) - ) + (set! (-> s4-1 node-count) + (trail-graph-method-21 s5-0 (-> s4-1 node-id) 64 (&-> s4-1 goal-node-id) (&-> s4-1 node-path-dist)) + ) (set! (-> s4-1 last-updated) (the-as uint (current-time))) (goto cfg-64) ) @@ -3997,7 +3985,3 @@ ) #t ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc b/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc index 1f9533116a..b4135227d8 100644 --- a/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc @@ -4012,7 +4012,6 @@ ;; definition for function bombbot-init-by-other ;; INFO: Used lq/sq -;; WARN: Return type mismatch object vs none. (defbehavior bombbot-init-by-other bombbot ((arg0 bombbot-spawn-params)) (stack-size-set! (-> self main-thread) 512) (set! (-> self city-path) (-> arg0 path)) @@ -4034,7 +4033,6 @@ (set! (-> self shoot-duration) 1.0) (set! (-> self draw light-index) (the-as uint 10)) (go-virtual hostile) - (none) ) ;; definition for method 84 of type bombbot diff --git a/test/decompiler/reference/jak3/levels/city/common/trail-graph_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail-graph_REF.gc new file mode 100644 index 0000000000..66e077179a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/trail-graph_REF.gc @@ -0,0 +1,2125 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *trail-graph*, type trail-graph +(define *trail-graph* + (new 'static 'trail-graph + :over-under-thresh -204800000.0 + :over-under-above-too-low -409600000.0 + :over-under-below-too-high 409600000.0 + :node-count #x100 + :conn-count #x12e + :node (new 'static 'inline-array trail-node 256 + (new 'static 'trail-node :x #x41d :y 18 :z #x7f :conn-count #x4) + (new 'static 'trail-node :x #x404 :y 18 :z #x8e :first-conn #x4 :conn-count #x4) + (new 'static 'trail-node :x #x405 :y 18 :z #xbc :first-conn #x8 :conn-count #x4) + (new 'static 'trail-node :x #x413 :y 18 :z #xbc :first-conn #xc :conn-count #x5) + (new 'static 'trail-node :x #x443 :y 18 :z #xb2 :first-conn #x11 :conn-count #x4) + (new 'static 'trail-node :x #x445 :y 18 :z #x8b :first-conn #x15 :conn-count #x2) + (new 'static 'trail-node :x #x42d :y 18 :z #xbc :first-conn #x17 :conn-count #x4) + (new 'static 'trail-node :x #x44f :y 18 :z #xc0 :first-conn #x1b :conn-count #x5) + (new 'static 'trail-node :x #x472 :y 18 :z #xeb :first-conn #x20 :conn-count #x3) + (new 'static 'trail-node :x #x472 :y 18 :z #xb7 :first-conn #x23 :conn-count #x3) + (new 'static 'trail-node :x #x473 :y 18 :z #x96 :first-conn #x26 :conn-count #x1) + (new 'static 'trail-node :x #x473 :y 18 :z #x114 :first-conn #x27 :conn-count #x2) + (new 'static 'trail-node :x #x46e :y 18 :z #x126 :first-conn #x29 :conn-count #x3) + (new 'static 'trail-node :x #x444 :y 18 :z #x167 :first-conn #x2c :conn-count #x3) + (new 'static 'trail-node :x #x422 :y 17 :z #x149 :first-conn #x2f :conn-count #x3) + (new 'static 'trail-node :x #x3ec :y 18 :z #x15d :first-conn #x32 :conn-count #x2) + (new 'static 'trail-node :x #x391 :y 18 :z #x15d :first-conn #x34 :conn-count #x3) + (new 'static 'trail-node :x #x37f :y 18 :z #x148 :first-conn #x37 :conn-count #x3) + (new 'static 'trail-node :x #x38a :y 18 :z #x12c :first-conn #x3a :conn-count #x2) + (new 'static 'trail-node :x #x3d5 :y 18 :z #x127 :first-conn #x3c :conn-count #x2) + (new 'static 'trail-node :x #x3e3 :y 18 :z #x119 :first-conn #x3e :conn-count #x3) + (new 'static 'trail-node :x #x3df :y 18 :z #xf8 :first-conn #x41 :conn-count #x4) + (new 'static 'trail-node :x #x416 :y 18 :z #xee :first-conn #x45 :conn-count #x3) + (new 'static 'trail-node :x #x424 :y 18 :z #xe0 :first-conn #x48 :conn-count #x5) + (new 'static 'trail-node :x #x374 :y 17 :z #x162 :first-conn #x4d :conn-count #x3) + (new 'static 'trail-node :x #x359 :y 18 :z #x15e :first-conn #x50 :conn-count #x3) + (new 'static 'trail-node :x #x344 :y 18 :z #x140 :first-conn #x53 :conn-count #x3) + (new 'static 'trail-node :x #x34d :y 18 :z #x11f :first-conn #x56 :conn-count #x3) + (new 'static 'trail-node :x #x384 :y 18 :z #xe8 :first-conn #x59 :conn-count #x3) + (new 'static 'trail-node :x #x3a9 :y 18 :z #xee :first-conn #x5c :conn-count #x2) + (new 'static 'trail-node :x #x3cd :y 18 :z #xf4 :first-conn #x5e :conn-count #x3) + (new 'static 'trail-node :x #x3d9 :y 18 :z #xd8 :first-conn #x61 :conn-count #x5) + (new 'static 'trail-node :x #x3e5 :y 18 :z #xc1 :first-conn #x66 :conn-count #x4) + (new 'static 'trail-node :x #x32c :y 17 :z #x15b :first-conn #x6a :conn-count #x3) + (new 'static 'trail-node :x #x314 :y 18 :z #x15a :first-conn #x6d :conn-count #x2) + (new 'static 'trail-node :x #x331 :y 18 :z #xc2 :first-conn #x6f :conn-count #x2) + (new 'static 'trail-node :x #x355 :y 18 :z #xd4 :first-conn #x71 :conn-count #x3) + (new 'static 'trail-node :x #x316 :y 18 :z #xca :first-conn #x74 :conn-count #x2) + (new 'static 'trail-node :x #x3d2 :y 18 :z #x95 :first-conn #x76 :conn-count #x4) + (new 'static 'trail-node :x #x3a7 :y 18 :z #x9b :first-conn #x7a :conn-count #x4) + (new 'static 'trail-node :x #x368 :y 18 :z #x75 :first-conn #x7e :conn-count #x2) + (new 'static 'trail-node :x #x326 :y 18 :z 12 :first-conn #x80 :conn-count #x2) + (new 'static 'trail-node :x #x335 :y 18 :z 58 :first-conn #x82 :conn-count #x2) + (new 'static 'trail-node :x #x31a :y 18 :z -25 :first-conn #x84 :conn-count #x2) + (new 'static 'trail-node :x #x2e7 :y 18 :z -74 :first-conn #x86 :conn-count #x2) + (new 'static 'trail-node :x #x41c :y 18 :z #x1b2 :first-conn #x88 :conn-count #x2) + (new 'static 'trail-node :x #x448 :y 18 :z #x1af :first-conn #x8a :conn-count #x3) + (new 'static 'trail-node :x #x3e1 :y 18 :z #x1bb :first-conn #x8d :conn-count #x4) + (new 'static 'trail-node :x #x3c7 :y 18 :z #x1d9 :first-conn #x91 :conn-count #x3) + (new 'static 'trail-node :x #x38f :y 18 :z #x1e2 :first-conn #x94 :conn-count #x4) + (new 'static 'trail-node :x #x387 :y 18 :z #x1a2 :first-conn #x98 :conn-count #x2) + (new 'static 'trail-node :x #x38f :y 18 :z #x223 :first-conn #x9a :conn-count #x2) + (new 'static 'trail-node :x #x39b :y 18 :z #x234 :first-conn #x9c :conn-count #x2) + (new 'static 'trail-node :x #x3b6 :y 18 :z #x239 :first-conn #x9e :conn-count #x4) + (new 'static 'trail-node :x #x3d0 :y 18 :z #x1f7 :first-conn #xa2 :conn-count #x4) + (new 'static 'trail-node :x #x410 :y 18 :z #x200 :first-conn #xa6 :conn-count #x3) + (new 'static 'trail-node :x #x425 :y 18 :z #x23a :first-conn #xa9 :conn-count #x4) + (new 'static 'trail-node :x #x453 :y 18 :z #x23e :first-conn #xad :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x24f :first-conn #xaf :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x290 :first-conn #xb1 :conn-count #x2) + (new 'static 'trail-node :x #x463 :y 18 :z #x2be :first-conn #xb3 :conn-count #x2) + (new 'static 'trail-node :x #x435 :y 17 :z #x2be :first-conn #xb5 :conn-count #x2) + (new 'static 'trail-node :x #x449 :y 18 :z #x29d :first-conn #xb7 :conn-count #x2) + (new 'static 'trail-node :x #x42e :y 18 :z #x28c :first-conn #xb9 :conn-count #x2) + (new 'static 'trail-node :x #x41a :y 17 :z #x279 :first-conn #xbb :conn-count #x2) + (new 'static 'trail-node :x #x363 :y 17 :z #x27e :first-conn #xbd :conn-count #x3) + (new 'static 'trail-node :x #x35b :y 18 :z #x2dd :first-conn #xc0 :conn-count #x3) + (new 'static 'trail-node :x #x312 :y 18 :z #x2d5 :first-conn #xc3 :conn-count #x2) + (new 'static 'trail-node :x #x312 :y 18 :z #x27d :first-conn #xc5 :conn-count #x2) + (new 'static 'trail-node :x #x39c :y 18 :z #x351 :first-conn #xc7 :conn-count #x2) + (new 'static 'trail-node :x #x365 :y 18 :z #x34c :first-conn #xc9 :conn-count #x2) + (new 'static 'trail-node :x #x360 :y 18 :z #x328 :first-conn #xcb :conn-count #x2) + (new 'static 'trail-node :x #x3bc :y 18 :z #x369 :first-conn #xcd :conn-count #x3) + (new 'static 'trail-node :x #x3db :y 18 :z #x384 :first-conn #xd0 :conn-count #x3) + (new 'static 'trail-node :x #x3be :y 18 :z #x3a7 :first-conn #xd3 :conn-count #x3) + (new 'static 'trail-node :x #x1a3 :y 18 :z -700 :first-conn #xd6 :conn-count #x2) + (new 'static 'trail-node :x #x3bd :y 18 :z #x41a :first-conn #xd8 :conn-count #x3) + (new 'static 'trail-node :x #x3be :y 17 :z #x3dd :first-conn #xdb :conn-count #x2) + (new 'static 'trail-node :x #x1b3 :y 18 :z -613 :first-conn #xdd :conn-count #x2) + (new 'static 'trail-node :x #x1a3 :y 18 :z -630 :first-conn #xdf :conn-count #x2) + (new 'static 'trail-node :x #x332 :y 18 :z #x488 :first-conn #xe1 :conn-count #x2) + (new 'static 'trail-node :x #x3f8 :y 18 :z #x384 :first-conn #xe3 :conn-count #x2) + (new 'static 'trail-node :x #x410 :y 18 :z #x39b :first-conn #xe5 :conn-count #x2) + (new 'static 'trail-node :x #x417 :y 18 :z #x3fd :first-conn #xe7 :conn-count #x2) + (new 'static 'trail-node :x #x456 :y 18 :z #x3fd :first-conn #xe9 :conn-count #x3) + (new 'static 'trail-node :x #x417 :y 18 :z #x469 :first-conn #xec :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x425 :first-conn #xee :conn-count #x2) + (new 'static 'trail-node :x #x469 :y 18 :z #x414 :first-conn #xf0 :conn-count #x2) + (new 'static 'trail-node :x #x2f1 :y 18 :z #x4cd :first-conn #xf2 :conn-count #x2) + (new 'static 'trail-node :x #x2eb :y 18 :z #x537 :first-conn #xf4 :conn-count #x2) + (new 'static 'trail-node :x #x2d4 :y 17 :z #x56a :first-conn #xf6 :conn-count #x2) + (new 'static 'trail-node :x #x25a :y 18 :z #x5b8 :first-conn #xf8 :conn-count #x3) + (new 'static 'trail-node :x #x257 :y 18 :z #x5e6 :first-conn #xfb :conn-count #x3) + (new 'static 'trail-node :x #x26c :y 18 :z #x796 :first-conn #xfe :conn-count #x1) + (new 'static 'trail-node :x #x231 :y 18 :z #x5b3 :first-conn #xff :conn-count #x5) + (new 'static 'trail-node :x #xda :y 18 :z #x556 :first-conn #x104 :conn-count #x4) + (new 'static 'trail-node :x #xc0 :y 18 :z #x53c :first-conn #x108 :conn-count #x3) + (new 'static 'trail-node :x #xa8 :y 18 :z #x555 :first-conn #x10b :conn-count #x4) + (new 'static 'trail-node :x -62 :y 17 :z #x53e :first-conn #x10f :conn-count #x2) + (new 'static 'trail-node :x -169 :y 18 :z #x5ad :first-conn #x111 :conn-count #x5) + (new 'static 'trail-node :x -224 :y 18 :z #x5b9 :first-conn #x116 :conn-count #x3) + (new 'static 'trail-node :x -212 :y 18 :z #x5ec :first-conn #x119 :conn-count #x3) + (new 'static 'trail-node :x -230 :y 18 :z #x794 :first-conn #x11c :conn-count #x1) + (new 'static 'trail-node :x -340 :y 18 :z #x56b :first-conn #x11d :conn-count #x2) + (new 'static 'trail-node :x -364 :y 17 :z #x546 :first-conn #x11f :conn-count #x2) + (new 'static 'trail-node :x -368 :y 18 :z #x4e4 :first-conn #x121 :conn-count #x2) + (new 'static 'trail-node :x #x200 :y 18 :z -606 :first-conn #x123 :conn-count #x4) + (new 'static 'trail-node :x #x266 :y 18 :z -607 :first-conn #x127 :conn-count #x4) + (new 'static 'trail-node :x #x1b1 :y 18 :z -501 :first-conn #x12b :conn-count #x1) + (new 'static 'trail-node :x #x193 :y 18 :z -461 :first-conn #x12c :conn-count #x2) + (new 'static 'trail-node :x #x198 :y 18 :z -341 :first-conn #x12e :conn-count #x2) + (new 'static 'trail-node :x #x1b0 :y 18 :z -318 :first-conn #x130 :conn-count #x1) + (new 'static 'trail-node :x #x2af :y 18 :z -638 :first-conn #x131 :conn-count #x3) + (new 'static 'trail-node :x #x294 :y 18 :z -613 :first-conn #x134 :conn-count #x3) + (new 'static 'trail-node :x #x2bd :y 18 :z -615 :first-conn #x137 :conn-count #x3) + (new 'static 'trail-node :x #x2d0 :y 18 :z -589 :first-conn #x13a :conn-count #x2) + (new 'static 'trail-node :x #x2cf :y 18 :z -471 :first-conn #x13c :conn-count #x2) + (new 'static 'trail-node :x #x2bb :y 18 :z -448 :first-conn #x13e :conn-count #x2) + (new 'static 'trail-node :x #x18c :y 18 :z -47 :first-conn #x140 :conn-count #x3) + (new 'static 'trail-node :x #x27d :y 18 :z -450 :first-conn #x143 :conn-count #x2) + (new 'static 'trail-node :x #x262 :y 18 :z -490 :first-conn #x145 :conn-count #x4) + (new 'static 'trail-node :x #x200 :y 18 :z -496 :first-conn #x149 :conn-count #x4) + (new 'static 'trail-node :x #x1d3 :y 18 :z -496 :first-conn #x14d :conn-count #x2) + (new 'static 'trail-node :x #x1b5 :y 18 :z -173 :first-conn #x14f :conn-count #x2) + (new 'static 'trail-node :x #x1a8 :y 18 :z -163 :first-conn #x151 :conn-count #x2) + (new 'static 'trail-node :x #x1bc :y 18 :z -47 :first-conn #x153 :conn-count #x3) + (new 'static 'trail-node :x #x1a7 :y 18 :z -69 :first-conn #x156 :conn-count #x3) + (new 'static 'trail-node :x #x1ea :y 18 :z -46 :first-conn #x159 :conn-count #x2) + (new 'static 'trail-node :x #x1af :y 18 :z -458 :first-conn #x15b :conn-count #x2) + (new 'static 'trail-node :x #x1b4 :y 18 :z -360 :first-conn #x15d :conn-count #x2) + (new 'static 'trail-node :x #x20a :y 18 :z -74 :first-conn #x15f :conn-count #x2) + (new 'static 'trail-node :x #x20c :y 18 :z -168 :first-conn #x161 :conn-count #x3) + (new 'static 'trail-node :x #x1c9 :y 18 :z -175 :first-conn #x164 :conn-count #x3) + (new 'static 'trail-node :x #x161 :y 18 :z -119 :first-conn #x167 :conn-count #x2) + (new 'static 'trail-node :x #x11c :y 18 :z -123 :first-conn #x169 :conn-count #x2) + (new 'static 'trail-node :x #x10e :y 18 :z -112 :first-conn #x16b :conn-count #x2) + (new 'static 'trail-node :x #x100 :y 18 :z -90 :first-conn #x16d :conn-count #x2) + (new 'static 'trail-node :x #xe4 :y 18 :z -71 :first-conn #x16f :conn-count #x2) + (new 'static 'trail-node :x #x414 :y 18 :z #x1b2 :first-conn #x171 :conn-count #x2) + (new 'static 'trail-node :x #x2d1 :y 18 :z #x4f9 :first-conn #x173 :conn-count #x1) + (new 'static 'trail-node :x #x2ff :y 18 :z #x4f8 :first-conn #x174 :conn-count #x1) + (new 'static 'trail-node :x #x2fe :y 18 :z #x507 :first-conn #x175 :conn-count #x1) + (new 'static 'trail-node :x #x2d1 :y 18 :z #x507 :first-conn #x176 :conn-count #x1) + (new 'static 'trail-node :x #x2ef :y 18 :z #x4f8 :first-conn #x177 :conn-count #x2) + (new 'static 'trail-node :x #x2ef :y 18 :z #x506 :first-conn #x179 :conn-count #x2) + (new 'static 'trail-node :x #x17e :y 18 :z -24 :first-conn #x17b :conn-count #x1) + (new 'static 'trail-node :x #x18c :y 18 :z -65 :first-conn #x17c :conn-count #x1) + (new 'static 'trail-node :x #x17e :y 18 :z -66 :first-conn #x17d :conn-count #x1) + (new 'static 'trail-node :x #x190 :y 18 :z -618 :first-conn #x17e :conn-count #x1) + (new 'static 'trail-node :x #x190 :y 18 :z -601 :first-conn #x17f :conn-count #x2) + (new 'static 'trail-node :x #x1a4 :y 18 :z -601 :first-conn #x181 :conn-count #x1) + (new 'static 'trail-node :x #x2ac :y 18 :z -701 :first-conn #x182 :conn-count #x2) + (new 'static 'trail-node :x #x299 :y 18 :z -718 :first-conn #x184 :conn-count #x2) + (new 'static 'trail-node :x #x1b2 :y 18 :z -718 :first-conn #x186 :conn-count #x2) + (new 'static 'trail-node :x #x43a :y 18 :z #x3d2 :first-conn #x188 :conn-count #x1) + (new 'static 'trail-node :x #x47b :y 18 :z #x3d3 :first-conn #x189 :conn-count #x2) + (new 'static 'trail-node :x #xbe :y 18 :z #x4bd :first-conn #x18b :conn-count #x1) + (new 'static 'trail-node :x #x21a :y 18 :z -210 :first-conn #x18c :conn-count #x3) + (new 'static 'trail-node :x #x414 :y 17 :z #x3c1 :first-conn #x18f :conn-count #x3) + (new 'static 'trail-node :x #x477 :y 18 :z #x3f8 :first-conn #x192 :conn-count #x1) + (new 'static 'trail-node :x #x1a7 :y 18 :z #x52c :first-conn #x193 :conn-count #x2) + (new 'static 'trail-node :x #x380 :y 18 :z #x368 :first-conn #x195 :conn-count #x1) + (new 'static 'trail-node :x #x37f :y 18 :z #x32f :first-conn #x196 :conn-count #x1) + (new 'static 'trail-node :x #x378 :y 18 :z #x368 :first-conn #x197 :conn-count #x1) + (new 'static 'trail-node :x #x376 :y 18 :z #x32f :first-conn #x198 :conn-count #x1) + (new 'static 'trail-node :x #x380 :y 18 :z #x34f :first-conn #x199 :conn-count #x2) + (new 'static 'trail-node :x #x377 :y 18 :z #x34f :first-conn #x19b :conn-count #x2) + (new 'static 'trail-node :x #x413 :y 18 :z #x191 :first-conn #x19d :conn-count #x1) + (new 'static 'trail-node :x #x414 :y 18 :z #x1ce :first-conn #x19e :conn-count #x1) + (new 'static 'trail-node :x #x41c :y 18 :z #x191 :first-conn #x19f :conn-count #x1) + (new 'static 'trail-node :x #x18b :y 18 :z -24 :first-conn #x1a0 :conn-count #x1) + (new 'static 'trail-node :x #x165 :y 18 :z -453 :first-conn #x1a1 :conn-count #x1) + (new 'static 'trail-node :x #x16d :y 18 :z -399 :first-conn #x1a2 :conn-count #x2) + (new 'static 'trail-node :x #x17e :y 18 :z -47 :first-conn #x1a4 :conn-count #x2) + (new 'static 'trail-node :x #x41d :y 18 :z #x1ce :first-conn #x1a6 :conn-count #x1) + (new 'static 'trail-node :x #x1cc :y 18 :z -338 :first-conn #x1a7 :conn-count #x2) + (new 'static 'trail-node :x #x233 :y 18 :z -304 :first-conn #x1a9 :conn-count #x1) + (new 'static 'trail-node :x #x21a :y 18 :z -336 :first-conn #x1aa :conn-count #x3) + (new 'static 'trail-node :x #x234 :y 18 :z -349 :first-conn #x1ad :conn-count #x3) + (new 'static 'trail-node :x #x24b :y 18 :z -373 :first-conn #x1b0 :conn-count #x2) + (new 'static 'trail-node :x #x2bf :y 18 :z -375 :first-conn #x1b2 :conn-count #x2) + (new 'static 'trail-node :x #x2d0 :y 18 :z -355 :first-conn #x1b4 :conn-count #x3) + (new 'static 'trail-node :x #x2f6 :y 18 :z -290 :first-conn #x1b7 :conn-count #x2) + (new 'static 'trail-node :x #x249 :y 18 :z -260 :first-conn #x1b9 :conn-count #x3) + (new 'static 'trail-node :x #x2c5 :y 18 :z -263 :first-conn #x1bc :conn-count #x4) + (new 'static 'trail-node :x #x232 :y 18 :z -304 :first-conn #x1c0 :conn-count #x3) + (new 'static 'trail-node :x #x22c :y 18 :z -219 :first-conn #x1c3 :conn-count #x3) + (new 'static 'trail-node :x #x262 :y 18 :z -221 :first-conn #x1c6 :conn-count #x4) + (new 'static 'trail-node :x #x2a6 :y 18 :z -234 :first-conn #x1ca :conn-count #x3) + (new 'static 'trail-node :x #x282 :y 18 :z -195 :first-conn #x1cd :conn-count #x3) + (new 'static 'trail-node :x #x287 :y 18 :z -42 :first-conn #x1d0 :conn-count #x2) + (new 'static 'trail-node :x #x295 :y 18 :z -22 :first-conn #x1d2 :conn-count #x2) + (new 'static 'trail-node :x #x2c0 :y 18 :z -22 :first-conn #x1d4 :conn-count #x2) + (new 'static 'trail-node :x #x2cd :y 18 :z -34 :first-conn #x1d6 :conn-count #x2) + (new 'static 'trail-node :x #x2d2 :y 18 :z -74 :first-conn #x1d8 :conn-count #x2) + (new 'static 'trail-node :x #x432 :y 18 :z #x7b :first-conn #x1da :conn-count #x2) + (new 'static 'trail-node :x #x307 :y 18 :z #x14b :first-conn #x1dc :conn-count #x2) + (new 'static 'trail-node :x #x468 :y 18 :z #x2a0 :first-conn #x1de :conn-count #x1) + (new 'static 'trail-node :x #x42f :y 18 :z #x2a2 :first-conn #x1df :conn-count #x1) + (new 'static 'trail-node :x #x46e :y 18 :z #x1f4 :first-conn #x1e0 :conn-count #x1) + (new 'static 'trail-node :x #x467 :y 18 :z #x1bd :first-conn #x1e1 :conn-count #x2) + (new 'static 'trail-node :x #x322 :y 18 :z #x459 :first-conn #x1e3 :conn-count #x1) + (new 'static 'trail-node :x -337 :y 18 :z 82 :first-conn #x1e4 :conn-count #x1) + (new 'static 'trail-node :x -337 :y 18 :z 71 :first-conn #x1e5 :conn-count #x2) + (new 'static 'trail-node :x -347 :y 18 :z 72 :first-conn #x1e7 :conn-count #x1) + (new 'static 'trail-node :x -338 :y 18 :z 82 :first-conn #x1e8 :conn-count #x1) + (new 'static 'trail-node :x -349 :y 18 :z 89 :first-conn #x1e9 :conn-count #x2) + (new 'static 'trail-node :x -337 :y 18 :z 90 :first-conn #x1eb :conn-count #x1) + (new 'static 'trail-node :x #x38f :y 18 :z #x437 :first-conn #x1ec :conn-count #x1) + (new 'static 'trail-node :x #x30d :y 18 :z #x437 :first-conn #x1ed :conn-count #x2) + (new 'static 'trail-node :x #x30d :y 18 :z #x458 :first-conn #x1ef :conn-count #x2) + (new 'static 'trail-node :x #x32a :y 18 :z #x45d :first-conn #x1f1 :conn-count #x2) + (new 'static 'trail-node :x #x3f2 :y 17 :z #x468 :first-conn #x1f3 :conn-count #x3) + (new 'static 'trail-node :x #x3d1 :y 18 :z #x450 :first-conn #x1f6 :conn-count #x2) + (new 'static 'trail-node :x #x3a0 :y 18 :z #x437 :first-conn #x1f8 :conn-count #x2) + (new 'static 'trail-node :x #x33d :y 18 :z #x45d :first-conn #x1fa :conn-count #x4) + (new 'static 'trail-node :x #x334 :y 18 :z #x471 :first-conn #x1fe :conn-count #x3) + (new 'static 'trail-node :x #x3f9 :y 18 :z #x1b3 :first-conn #x201 :conn-count #x2) + (new 'static 'trail-node :x #x178 :y 18 :z -329 :first-conn #x203 :conn-count #x2) + (new 'static 'trail-node :x #x164 :y 18 :z -356 :first-conn #x205 :conn-count #x3) + (new 'static 'trail-node :x #x156 :y 18 :z -281 :first-conn #x208 :conn-count #x3) + (new 'static 'trail-node :x #xbe :y 18 :z -300 :first-conn #x20b :conn-count #x3) + (new 'static 'trail-node :x #x84 :y 18 :z -160 :first-conn #x20e :conn-count #x3) + (new 'static 'trail-node :x #x13c :y 18 :z -255 :first-conn #x211 :conn-count #x2) + (new 'static 'trail-node :x #xfd :y 18 :z -247 :first-conn #x213 :conn-count #x3) + (new 'static 'trail-node :x #x8c :y 18 :z -209 :first-conn #x216 :conn-count #x3) + (new 'static 'trail-node :x #xbf :y 18 :z -230 :first-conn #x219 :conn-count #x4) + (new 'static 'trail-node :x #x79 :y 18 :z -98 :first-conn #x21d :conn-count #x3) + (new 'static 'trail-node :x #xb8 :y 18 :z -154 :first-conn #x220 :conn-count #x3) + (new 'static 'trail-node :x #xb4 :y 17 :z -102 :first-conn #x223 :conn-count #x3) + (new 'static 'trail-node :x #xc4 :y 18 :z -73 :first-conn #x226 :conn-count #x3) + (new 'static 'trail-node :x -373 :y 18 :z #x466 :first-conn #x229 :conn-count #x2) + (new 'static 'trail-node :x -322 :y 18 :z #x42e :first-conn #x22b :conn-count #x3) + (new 'static 'trail-node :x -261 :y 18 :z #x3f6 :first-conn #x22e :conn-count #x3) + (new 'static 'trail-node :x -246 :y 18 :z #x3d6 :first-conn #x231 :conn-count #x2) + (new 'static 'trail-node :x -261 :y 18 :z #x3b0 :first-conn #x233 :conn-count #x2) + (new 'static 'trail-node :x -342 :y 18 :z #x399 :first-conn #x235 :conn-count #x2) + (new 'static 'trail-node :x -465 :y 18 :z #x3a5 :first-conn #x237 :conn-count #x1) + (new 'static 'trail-node :x -249 :y 18 :z #x454 :first-conn #x238 :conn-count #x3) + (new 'static 'trail-node :x -179 :y 18 :z #x484 :first-conn #x23b :conn-count #x2) + (new 'static 'trail-node :x -43 :y 18 :z #x447 :first-conn #x23d :conn-count #x2) + (new 'static 'trail-node :x 3 :y 18 :z #x3e9 :first-conn #x23f :conn-count #x2) + (new 'static 'trail-node :x -3 :y 18 :z #x3a8 :first-conn #x241 :conn-count #x2) + (new 'static 'trail-node :x -55 :y 18 :z #x390 :first-conn #x243 :conn-count #x2) + (new 'static 'trail-node :x -126 :y 18 :z #x3a2 :first-conn #x245 :conn-count #x2) + (new 'static 'trail-node :x -177 :y 18 :z #x38f :first-conn #x247 :conn-count #x2) + (new 'static 'trail-node :x -187 :y 18 :z #x35c :first-conn #x249 :conn-count #x2) + (new 'static 'trail-node :x -98 :y 18 :z #x2f8 :first-conn #x24b :conn-count #x2) + (new 'static 'trail-node :x -95 :y 18 :z #x2bb :first-conn #x24d :conn-count #x2) + (new 'static 'trail-node :x -132 :y 18 :z #x29a :first-conn #x24f :conn-count #x2) + (new 'static 'trail-node :x -178 :y 18 :z #x2a0 :first-conn #x251 :conn-count #x2) + (new 'static 'trail-node :x -268 :y 18 :z #x30a :first-conn #x253 :conn-count #x2) + (new 'static 'trail-node :x -304 :y 18 :z #x31e :first-conn #x255 :conn-count #x2) + (new 'static 'trail-node :x -348 :y 18 :z #x30f :first-conn #x257 :conn-count #x2) + (new 'static 'trail-node :x -359 :y 18 :z #x2d9 :first-conn #x259 :conn-count #x2) + (new 'static 'trail-node :x -313 :y 18 :z #x25a :first-conn #x25b :conn-count #x1) + ) + :conn (new 'static 'inline-array trail-conn 302 + (new 'static 'trail-conn :tail-id #x1 :visgroup-id #x1 :cost #xea) + (new 'static 'trail-conn :tail-id #x2 :visgroup-id #x1 :cost #x20d) + (new 'static 'trail-conn :tail-id #x3 :visgroup-id #x1 :cost #x1ef) + (new 'static 'trail-conn :head-id #x1 :tail-id #x2 :visgroup-id #x1 :cost #x171) + (new 'static 'trail-conn :head-id #x1 :tail-id #x3 :visgroup-id #x1 :cost #x184) + (new 'static 'trail-conn :head-id #x1 :tail-id #x26 :cost #x194) + (new 'static 'trail-conn :head-id #x2 :tail-id #x3 :visgroup-id #x1 :cost #x71) + (new 'static 'trail-conn :head-id #x3 :tail-id #x6 :cost #xd1) + (new 'static 'trail-conn :head-id #x4 :tail-id #x5 :cost #x139) + (new 'static 'trail-conn :head-id #x4 :tail-id #x7 :visgroup-id #x2 :cost #x94) + (new 'static 'trail-conn :head-id #x4 :tail-id #x6 :visgroup-id #x2 :cost #xc2) + (new 'static 'trail-conn :head-id #x6 :tail-id #x7 :visgroup-id #x2 :cost #x112) + (new 'static 'trail-conn :head-id #x7 :tail-id #x8 :visgroup-id #x3 :cost #x1bc) + (new 'static 'trail-conn :head-id #x8 :tail-id #xb :cost #x149) + (new 'static 'trail-conn :head-id #x8 :tail-id #x9 :visgroup-id #x3 :cost #x1a1) + (new 'static 'trail-conn :head-id #x7 :tail-id #x9 :visgroup-id #x3 :cost #x122) + (new 'static 'trail-conn :head-id #x9 :tail-id #xa :cost #x109) + (new 'static 'trail-conn :head-id #xb :tail-id #xc :cost #x96) + (new 'static 'trail-conn :head-id #xc :tail-id #xd :visgroup-id #x4 :cost #x26c) + (new 'static 'trail-conn :head-id #xc :tail-id #xe :visgroup-id #x4 :cost #x29e) + (new 'static 'trail-conn :head-id #xd :tail-id #xe :visgroup-id #x4 :cost #x16b) + (new 'static 'trail-conn :head-id #xd :tail-id #x2e :cost #x241) + (new 'static 'trail-conn :head-id #xe :tail-id #xf :cost #x1cd) + (new 'static 'trail-conn :head-id #xf :tail-id #x10 :cost #x2d9) + (new 'static 'trail-conn :head-id #x10 :tail-id #x11 :cost #xde) + (new 'static 'trail-conn :head-id #x10 :tail-id #x18 :cost #xec) + (new 'static 'trail-conn :head-id #x11 :tail-id #x12 :cost #xf1) + (new 'static 'trail-conn :head-id #x11 :tail-id #x18 :cost #xe2) + (new 'static 'trail-conn :head-id #x12 :tail-id #x13 :cost #x25a) + (new 'static 'trail-conn :head-id #x13 :tail-id #x14 :cost #x9f) + (new 'static 'trail-conn :head-id #x14 :tail-id #x15 :visgroup-id #x5 :cost #x10a) + (new 'static 'trail-conn :head-id #x15 :tail-id #x16 :visgroup-id #x5 :cost #x1c0) + (new 'static 'trail-conn :head-id #x15 :tail-id #x1e :cost #x94) + (new 'static 'trail-conn :head-id #x15 :tail-id #x1f :cost #x105) + (new 'static 'trail-conn :head-id #x16 :tail-id #x17 :cost #x9f) + (new 'static 'trail-conn :head-id #x14 :tail-id #x16 :visgroup-id #x5 :cost #x216) + (new 'static 'trail-conn :head-id #x3 :tail-id #x17 :cost #x13f) + (new 'static 'trail-conn :head-id #x4 :tail-id #x17 :visgroup-id #x2 :cost #x1bc) + (new 'static 'trail-conn :head-id #x6 :tail-id #x17 :visgroup-id #x6 :cost #x129) + (new 'static 'trail-conn :head-id #x7 :tail-id #x17 :visgroup-id #x2 :cost #x1ad) + (new 'static 'trail-conn :head-id #x18 :tail-id #x19 :cost #xdb) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1a :cost #x125) + (new 'static 'trail-conn :head-id #x19 :tail-id #x21 :cost #x169) + (new 'static 'trail-conn :head-id #x1a :tail-id #x1b :cost #x112) + (new 'static 'trail-conn :head-id #x1a :tail-id #x21 :cost #x121) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1c :visgroup-id #x7 :cost #x26f) + (new 'static 'trail-conn :head-id #x1c :tail-id #x1d :cost #x12c) + (new 'static 'trail-conn :head-id #x1d :tail-id #x1e :cost #x124) + (new 'static 'trail-conn :head-id #x1f :tail-id #x20 :visgroup-id #x8 :cost #xd0) + (new 'static 'trail-conn :head-id #x1f :tail-id #x26 :visgroup-id #x8 :cost #x21b) + (new 'static 'trail-conn :head-id #x1f :tail-id #x27 :visgroup-id #x8 :cost #x277) + (new 'static 'trail-conn :head-id #x1e :tail-id #x1f :cost #xf4) + (new 'static 'trail-conn :head-id #x2 :tail-id #x20 :cost #x104) + (new 'static 'trail-conn :head-id #x20 :tail-id #x26 :visgroup-id #x8 :cost #x180) + (new 'static 'trail-conn :head-id #x20 :tail-id #x27 :visgroup-id #x8 :cost #x246) + (new 'static 'trail-conn :head-id #x21 :tail-id #x22 :cost #xc1) + (new 'static 'trail-conn :head-id #x22 :tail-id #xc4 :cost #x9f) + (new 'static 'trail-conn :head-id #x23 :tail-id #x24 :cost #x142) + (new 'static 'trail-conn :head-id #x1b :tail-id #x24 :visgroup-id #x7 :cost #x25c) + (new 'static 'trail-conn :head-id #x1c :tail-id #x24 :visgroup-id #x7 :cost #x199) + (new 'static 'trail-conn :head-id #x23 :tail-id #x25 :cost #xe2) + (new 'static 'trail-conn :head-id #x26 :tail-id #x27 :visgroup-id #x8 :cost #x15c) + (new 'static 'trail-conn :head-id #x27 :tail-id #x28 :cost #x24d) + (new 'static 'trail-conn :head-id #x28 :tail-id #x2a :cost #x270) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2a :cost #x184) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2b :cost #x138) + (new 'static 'trail-conn :head-id #x2b :tail-id #x2c :cost #x236) + (new 'static 'trail-conn :head-id #x2c :tail-id #xc2 :cost #xa9) + (new 'static 'trail-conn :head-id #x2d :tail-id #x8a :flags (conn-flag cf4) :cost #x41) + (new 'static 'trail-conn :head-id #x2d :tail-id #x2e :cost #x161) + (new 'static 'trail-conn :head-id #x2f :tail-id #x30 :visgroup-id #x9 :cost #x13e) + (new 'static 'trail-conn :head-id #x30 :tail-id #x31 :visgroup-id #x9 :cost #x1c6) + (new 'static 'trail-conn :head-id #x30 :tail-id #x36 :cost #xfb) + (new 'static 'trail-conn :head-id #x2f :tail-id #x31 :visgroup-id #x9 :cost #x2d7) + (new 'static 'trail-conn :head-id #x31 :tail-id #x33 :cost #x209) + (new 'static 'trail-conn :head-id #x2f :tail-id #x32 :visgroup-id #x9 :cost #x2ec) + (new 'static 'trail-conn :head-id #x31 :tail-id #x32 :visgroup-id #x9 :cost #x204) + (new 'static 'trail-conn :head-id #x33 :tail-id #x34 :visgroup-id #xa :cost #xa7) + (new 'static 'trail-conn :head-id #x34 :tail-id #x35 :cost #xdc) + (new 'static 'trail-conn :head-id #x35 :tail-id #x36 :visgroup-id #xb :cost #x238) + (new 'static 'trail-conn :head-id #x35 :tail-id #x37 :visgroup-id #xb :cost #x355) + (new 'static 'trail-conn :head-id #x35 :tail-id #x38 :visgroup-id #xb :cost #x379) + (new 'static 'trail-conn :head-id #x36 :tail-id #x37 :visgroup-id #xb :cost #x206) + (new 'static 'trail-conn :head-id #x36 :tail-id #x38 :visgroup-id #xb :cost #x362) + (new 'static 'trail-conn :head-id #x37 :tail-id #x38 :visgroup-id #xb :cost #x1ee) + (new 'static 'trail-conn :head-id #x38 :tail-id #x39 :cost #x172) + (new 'static 'trail-conn :head-id #x39 :tail-id #x3a :cost #xd9) + (new 'static 'trail-conn :head-id #x3a :tail-id #x3b :cost #x209) + (new 'static 'trail-conn :head-id #x3b :tail-id #x3e :cost #x10d) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3d :visgroup-id #xc :cost #x171) + (new 'static 'trail-conn :head-id #x3c :tail-id #xc5 :visgroup-id #xd :cost #xf4) + (new 'static 'trail-conn :head-id #x3d :tail-id #xc6 :visgroup-id #xe :cost #xe6) + (new 'static 'trail-conn :head-id #x3e :tail-id #x3f :cost #x100) + (new 'static 'trail-conn :head-id #x3f :tail-id #x40 :cost #xdd) + (new 'static 'trail-conn :head-id #x41 :tail-id #x42 :visgroup-id #xf :cost #x2fb) + (new 'static 'trail-conn :head-id #x40 :tail-id #x41 :cost #x5b9) + (new 'static 'trail-conn :head-id #x42 :tail-id #x43 :visgroup-id #xf :cost #x24c) + (new 'static 'trail-conn :head-id #x43 :tail-id #x44 :visgroup-id #xf :cost #x2c1) + (new 'static 'trail-conn :head-id #x41 :tail-id #x44 :visgroup-id #xf :cost #x289) + (new 'static 'trail-conn :head-id #x45 :tail-id #x48 :cost #x141) + (new 'static 'trail-conn :head-id #x46 :tail-id #xa6 :visgroup-id #x10 :cost #x92) + (new 'static 'trail-conn :head-id #x46 :tail-id #x47 :visgroup-id #x10 :cost #x123) + (new 'static 'trail-conn :head-id #x42 :tail-id #x47 :visgroup-id #x11 :cost #x25a) + (new 'static 'trail-conn :head-id #x48 :tail-id #x49 :visgroup-id #x12 :cost #x149) + (new 'static 'trail-conn :head-id #x48 :tail-id #x4a :visgroup-id #x12 :cost #x1f1) + (new 'static 'trail-conn :head-id #x49 :tail-id #x4a :visgroup-id #x12 :cost #x16c) + (new 'static 'trail-conn :head-id #x49 :tail-id #x51 :cost #xe9) + (new 'static 'trail-conn :head-id #x4b :tail-id #x99 :cost #xbc) + (new 'static 'trail-conn :head-id #x4c :tail-id #x4d :cost #x1e9) + (new 'static 'trail-conn :head-id #x4a :tail-id #x4d :cost #x1b1) + (new 'static 'trail-conn :head-id #x4e :tail-id #x4f :cost #xbb) + (new 'static 'trail-conn :head-id #x4b :tail-id #x4f :cost #x231) + (new 'static 'trail-conn :head-id #x50 :tail-id #xd8 :cost #xb9) + (new 'static 'trail-conn :head-id #x51 :tail-id #x52 :visgroup-id #x13 :cost #x10a) + (new 'static 'trail-conn :head-id #x52 :tail-id #x9e :cost #x132) + (new 'static 'trail-conn :head-id #x53 :tail-id #x54 :visgroup-id #x14 :cost #x1f9) + (new 'static 'trail-conn :head-id #x55 :tail-id #xd4 :cost #x129) + (new 'static 'trail-conn :head-id #x55 :tail-id #x56 :cost #x34f) + (new 'static 'trail-conn :head-id #x56 :tail-id #x57 :cost #x89) + (new 'static 'trail-conn :head-id #x54 :tail-id #x57 :visgroup-id #x15 :cost #xef) + (new 'static 'trail-conn :head-id #x50 :tail-id #x58 :cost #x2f7) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5a :cost #x1c0) + (new 'static 'trail-conn :head-id #x5a :tail-id #x5b :cost #x487) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5c :visgroup-id #x16 :cost #x171) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5e :visgroup-id #x16 :cost #x14b) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5e :visgroup-id #x17 :cost #x1fd) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5d :visgroup-id #x17 :cost #xd85) + (new 'static 'trail-conn :head-id #x5e :tail-id #xa0 :visgroup-id #x17 :cost #x609) + (new 'static 'trail-conn :head-id #x5f :tail-id #x61 :visgroup-id #x17 :cost #x191) + (new 'static 'trail-conn :head-id #x5f :tail-id #x60 :visgroup-id #x18 :cost #x127) + (new 'static 'trail-conn :head-id #x5e :tail-id #x5f :visgroup-id #x17 :cost #xb1c) + (new 'static 'trail-conn :head-id #x60 :tail-id #x61 :visgroup-id #x18 :cost #x116) + (new 'static 'trail-conn :head-id #x61 :tail-id #x62 :visgroup-id #x17 :cost #x73a) + (new 'static 'trail-conn :head-id #x5e :tail-id #x63 :visgroup-id #x17 :cost #x16d1) + (new 'static 'trail-conn :head-id #x63 :tail-id #x64 :visgroup-id #x19 :cost #x1c3) + (new 'static 'trail-conn :head-id #x61 :tail-id #x63 :visgroup-id #x17 :cost #xae3) + (new 'static 'trail-conn :head-id #x62 :tail-id #x63 :visgroup-id #x17 :cost #x4d2) + (new 'static 'trail-conn :head-id #x64 :tail-id #x65 :visgroup-id #x19 :cost #x1a4) + (new 'static 'trail-conn :head-id #x63 :tail-id #x65 :visgroup-id #x17 :cost #x263) + (new 'static 'trail-conn :head-id #x65 :tail-id #x66 :visgroup-id #x17 :cost #xd44) + (new 'static 'trail-conn :head-id #x64 :tail-id #x67 :cost #x45f) + (new 'static 'trail-conn :head-id #x67 :tail-id #x68 :cost #x161) + (new 'static 'trail-conn :head-id #x68 :tail-id #x69 :cost #x311) + (new 'static 'trail-conn :head-id #x69 :tail-id #xe7 :cost #x3f1) + (new 'static 'trail-conn :head-id #x4e :tail-id #x6a :cost #x26b) + (new 'static 'trail-conn :head-id #x6a :tail-id #x78 :visgroup-id #x1a :cost #x4bf) + (new 'static 'trail-conn :head-id #x6a :tail-id #x79 :visgroup-id #x1a :cost #x371) + (new 'static 'trail-conn :head-id #x6b :tail-id #x71 :cost #x174) + (new 'static 'trail-conn :head-id #x6a :tail-id #x6b :visgroup-id #x1a :cost #x331) + (new 'static 'trail-conn :head-id #x6c :tail-id #x6d :visgroup-id #x1b :cost #x191) + (new 'static 'trail-conn :head-id #x6d :tail-id #x6e :visgroup-id #x1c :cost #x3c1) + (new 'static 'trail-conn :head-id #x6e :tail-id #x6f :visgroup-id #x1d :cost #x10a) + (new 'static 'trail-conn :head-id #x70 :tail-id #x72 :visgroup-id #x1e :cost #xd8) + (new 'static 'trail-conn :head-id #x70 :tail-id #x71 :visgroup-id #x1e :cost #x127) + (new 'static 'trail-conn :head-id #x71 :tail-id #x72 :visgroup-id #x1e :cost #x149) + (new 'static 'trail-conn :head-id #x72 :tail-id #x73 :cost #x102) + (new 'static 'trail-conn :head-id #x73 :tail-id #x74 :cost #x3b1) + (new 'static 'trail-conn :head-id #x74 :tail-id #x75 :cost #xf4) + (new 'static 'trail-conn :head-id #x76 :tail-id #x7d :visgroup-id #x1f :cost #x181) + (new 'static 'trail-conn :head-id #x76 :tail-id #xad :flags (conn-flag cf5) :cost #x71) + (new 'static 'trail-conn :head-id #x75 :tail-id #x77 :cost #x1f1) + (new 'static 'trail-conn :head-id #x78 :tail-id #x79 :visgroup-id #x1a :cost #x312) + (new 'static 'trail-conn :head-id #x6b :tail-id #x78 :visgroup-id #x1a :cost #x3a9) + (new 'static 'trail-conn :head-id #x77 :tail-id #x78 :cost #x183) + (new 'static 'trail-conn :head-id #x6b :tail-id #x79 :visgroup-id #x1a :cost #x4b6) + (new 'static 'trail-conn :head-id #x79 :tail-id #x7a :cost #x169) + (new 'static 'trail-conn :head-id #x7b :tail-id #x84 :cost #xa1) + (new 'static 'trail-conn :head-id #x7b :tail-id #x7c :cost #x84) + (new 'static 'trail-conn :head-id #x7d :tail-id #x7e :visgroup-id #x1f :cost #xf4) + (new 'static 'trail-conn :head-id #x7d :tail-id #x7f :cost #x171) + (new 'static 'trail-conn :head-id #x7c :tail-id #x7e :cost #x2f1) + (new 'static 'trail-conn :head-id #x76 :tail-id #x7e :visgroup-id #x1f :cost #x117) + (new 'static 'trail-conn :head-id #x7a :tail-id #x80 :cost #x1a3) + (new 'static 'trail-conn :head-id #x80 :tail-id #x81 :cost #x312) + (new 'static 'trail-conn :head-id #x7f :tail-id #x82 :cost #x155) + (new 'static 'trail-conn :head-id #x82 :tail-id #x83 :cost #x2f1) + (new 'static 'trail-conn :head-id #x83 :tail-id #x84 :visgroup-id #x20 :cost #x21b) + (new 'static 'trail-conn :head-id #x83 :tail-id #x9d :visgroup-id #x20 :cost #x163) + (new 'static 'trail-conn :head-id #x84 :tail-id #x9d :visgroup-id #x20 :cost #x2c2) + (new 'static 'trail-conn :head-id #x85 :tail-id #xad :cost #x26d) + (new 'static 'trail-conn :head-id #x85 :tail-id #x86 :cost #x229) + (new 'static 'trail-conn :head-id #x86 :tail-id #x87 :cost #x8f) + (new 'static 'trail-conn :head-id #x87 :tail-id #x88 :cost #xd1) + (new 'static 'trail-conn :head-id #x88 :tail-id #x89 :cost #x10f) + (new 'static 'trail-conn :head-id #x89 :tail-id #xe6 :cost #x101) + (new 'static 'trail-conn :head-id #x8a :tail-id #xd9 :cost #xd9) + (new 'static 'trail-conn :head-id #x8b :tail-id #x8c :visgroup-id #x21 :cost #x171) + (new 'static 'trail-conn :head-id #x8d :tail-id #x8e :visgroup-id #x22 :cost #x169) + (new 'static 'trail-conn :head-id #x58 :tail-id #x8f :cost #x159) + (new 'static 'trail-conn :head-id #x59 :tail-id #x90 :cost #x18a) + (new 'static 'trail-conn :head-id #x8f :tail-id #x90 :flags (conn-flag cf2) :cost #x71) + (new 'static 'trail-conn :head-id #x91 :tail-id #x93 :visgroup-id #x23 :cost #x151) + (new 'static 'trail-conn :head-id #x94 :tail-id #x95 :visgroup-id #x24 :cost #x89) + (new 'static 'trail-conn :head-id #x95 :tail-id #x96 :visgroup-id #x24 :cost #xa1) + (new 'static 'trail-conn :head-id #x70 :tail-id #x97 :cost #x1f9) + (new 'static 'trail-conn :head-id #x97 :tail-id #x98 :cost #xcc) + (new 'static 'trail-conn :head-id #x98 :tail-id #x99 :cost #x739) + (new 'static 'trail-conn :head-id #x9a :tail-id #x9b :visgroup-id #x14 :cost #x209) + (new 'static 'trail-conn :head-id #x60 :tail-id #x9c :cost #x3f9) + (new 'static 'trail-conn :head-id #x9d :tail-id #xba :cost #xa1) + (new 'static 'trail-conn :head-id #x54 :tail-id #x9e :visgroup-id #x14 :cost #x2ca) + (new 'static 'trail-conn :head-id #x53 :tail-id #x9e :visgroup-id #x14 :cost #x1e1) + (new 'static 'trail-conn :head-id #x9b :tail-id #x9f :visgroup-id #x14 :cost #x12a) + (new 'static 'trail-conn :head-id #x5f :tail-id #xa0 :visgroup-id #x17 :cost #x68b) + (new 'static 'trail-conn :head-id #xa1 :tail-id #xa2 :visgroup-id #x25 :cost #x1c9) + (new 'static 'trail-conn :head-id #xa3 :tail-id #xa4 :visgroup-id #x10 :cost #x1c9) + (new 'static 'trail-conn :head-id #x45 :tail-id #xa5 :cost #xe1) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xa6 :flags (conn-flag cf3) :cost #x49) + (new 'static 'trail-conn :head-id #xa7 :tail-id #xa8 :visgroup-id #x26 :cost #x1e9) + (new 'static 'trail-conn :head-id #x92 :tail-id #xaa :visgroup-id #x1f :cost #x149) + (new 'static 'trail-conn :head-id #xab :tail-id #xac :cost #x1b5) + (new 'static 'trail-conn :head-id #xa9 :tail-id #xae :visgroup-id #x27 :cost #x1e9) + (new 'static 'trail-conn :head-id #x81 :tail-id #xaf :cost #x105) + (new 'static 'trail-conn :head-id #xb0 :tail-id #xb1 :visgroup-id #x28 :cost #x145) + (new 'static 'trail-conn :head-id #xaf :tail-id #xb1 :cost #x271) + (new 'static 'trail-conn :head-id #xb1 :tail-id #xb2 :visgroup-id #x28 :cost #xe9) + (new 'static 'trail-conn :head-id #xb2 :tail-id #xb9 :visgroup-id #x28 :cost #x169) + (new 'static 'trail-conn :head-id #xb2 :tail-id #xb3 :cost #x10a) + (new 'static 'trail-conn :head-id #xb3 :tail-id #xb4 :cost #x3a1) + (new 'static 'trail-conn :head-id #xb4 :tail-id #xb5 :cost #xd2) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb6 :visgroup-id #x29 :cost #x25b) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xbb :visgroup-id #x2a :cost #x173) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb9 :visgroup-id #x2b :cost #x18e) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb8 :visgroup-id #x29 :cost #x2e6) + (new 'static 'trail-conn :head-id #xb6 :tail-id #xb8 :visgroup-id #x29 :cost #x1c0) + (new 'static 'trail-conn :head-id #xb8 :tail-id #xbc :visgroup-id #x2c :cost #x154) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb8 :visgroup-id #x2c :cost #x3e1) + (new 'static 'trail-conn :head-id #xb9 :tail-id #xba :visgroup-id #x2b :cost #x2aa) + (new 'static 'trail-conn :head-id #xba :tail-id #xbb :visgroup-id #x2b :cost #x1b1) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbd :visgroup-id #x2d :cost #x14a) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbc :visgroup-id #x2c :cost #x22a) + (new 'static 'trail-conn :head-id #xbc :tail-id #xbd :visgroup-id #x2c :cost #x1a9) + (new 'static 'trail-conn :head-id #xbd :tail-id #xbe :cost #x4c9) + (new 'static 'trail-conn :head-id #xbe :tail-id #xbf :cost #xc4) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc0 :cost #x159) + (new 'static 'trail-conn :head-id #xc0 :tail-id #xc1 :cost #x8e) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc2 :cost #x143) + (new 'static 'trail-conn :head-id #x5 :tail-id #xc3 :cost #xc7) + (new 'static 'trail-conn :tail-id #xc3 :cost #xac) + (new 'static 'trail-conn :head-id #x25 :tail-id #xc4 :cost #x40f) + (new 'static 'trail-conn :head-id #xc7 :tail-id #xc8 :cost #x1bc) + (new 'static 'trail-conn :head-id #x2e :tail-id #xc8 :cost #x111) + (new 'static 'trail-conn :head-id #xca :tail-id #xcb :cost #x59) + (new 'static 'trail-conn :head-id #xcb :tail-id #xcc :cost #x51) + (new 'static 'trail-conn :head-id #xcd :tail-id #xce :cost #x69) + (new 'static 'trail-conn :head-id #xce :tail-id #xcf :cost #x61) + (new 'static 'trail-conn :head-id #xd0 :tail-id #xd1 :visgroup-id #x2e :cost #x411) + (new 'static 'trail-conn :head-id #xc9 :tail-id #xd2 :visgroup-id #x2e :cost #xa9) + (new 'static 'trail-conn :head-id #xd1 :tail-id #xd2 :visgroup-id #x2e :cost #x109) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd8 :visgroup-id #x2f :cost #xb3) + (new 'static 'trail-conn :head-id #xd4 :tail-id #xd7 :visgroup-id #x2e :cost #x5ab) + (new 'static 'trail-conn :head-id #xd4 :tail-id #xd5 :visgroup-id #x2e :cost #x147) + (new 'static 'trail-conn :head-id #x4c :tail-id #xd5 :visgroup-id #x2e :cost #x1cd) + (new 'static 'trail-conn :head-id #x4c :tail-id #xd6 :visgroup-id #x2e :cost #x149) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd7 :visgroup-id #x30 :cost #x99) + (new 'static 'trail-conn :head-id #xd6 :tail-id #xd7 :visgroup-id #x2e :cost #x351) + (new 'static 'trail-conn :head-id #xd7 :tail-id #xd8 :visgroup-id #x2f :cost #xb0) + (new 'static 'trail-conn :head-id #x2f :tail-id #xd9 :cost #xcb) + (new 'static 'trail-conn :head-id #xda :tail-id #xdb :visgroup-id #x31 :cost #x10d) + (new 'static 'trail-conn :head-id #xac :tail-id #xdb :cost #x160) + (new 'static 'trail-conn :head-id #xda :tail-id #xdc :visgroup-id #x31 :cost #x1d7) + (new 'static 'trail-conn :head-id #xdb :tail-id #xdc :visgroup-id #x31 :cost #x263) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe2 :visgroup-id #x32 :cost #x231) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe1 :visgroup-id #x32 :cost #x33f) + (new 'static 'trail-conn :head-id #xde :tail-id #xe4 :cost #x1a3) + (new 'static 'trail-conn :head-id #xde :tail-id #xe3 :cost #x1f8) + (new 'static 'trail-conn :head-id #xdc :tail-id #xdf :cost #x127) + (new 'static 'trail-conn :head-id #xdd :tail-id #xe0 :visgroup-id #x32 :cost #x293) + (new 'static 'trail-conn :head-id #xdf :tail-id #xe0 :cost #x1fd) + (new 'static 'trail-conn :head-id #xde :tail-id #xe1 :cost #x18e) + (new 'static 'trail-conn :head-id #xe0 :tail-id #xe2 :visgroup-id #x32 :cost #x203) + (new 'static 'trail-conn :head-id #xe1 :tail-id #xe2 :visgroup-id #x32 :cost #x1ba) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe5 :visgroup-id #x33 :cost #x1da) + (new 'static 'trail-conn :head-id #xe2 :tail-id #xe4 :cost #x263) + (new 'static 'trail-conn :head-id #xe4 :tail-id #xe5 :cost #x1a2) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe6 :visgroup-id #x33 :cost #x279) + (new 'static 'trail-conn :head-id #xe5 :tail-id #xe6 :visgroup-id #x33 :cost #x109) + (new 'static 'trail-conn :head-id #xe7 :tail-id #xe8 :cost #x25e) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xe9 :cost #x297) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xee :cost #x293) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xea :cost #x11b) + (new 'static 'trail-conn :head-id #xea :tail-id #xeb :cost #x147) + (new 'static 'trail-conn :head-id #xeb :tail-id #xec :cost #x2a2) + (new 'static 'trail-conn :head-id #xec :tail-id #xed :cost #x3dd) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xee :cost #x2f7) + (new 'static 'trail-conn :head-id #xee :tail-id #xef :cost #x2a8) + (new 'static 'trail-conn :head-id #xef :tail-id #xf0 :cost #x4a9) + (new 'static 'trail-conn :head-id #xf0 :tail-id #xf1 :cost #x346) + (new 'static 'trail-conn :head-id #xf1 :tail-id #xf2 :cost #x20b) + (new 'static 'trail-conn :head-id #xf2 :tail-id #xf3 :cost #x1cb) + (new 'static 'trail-conn :head-id #xf3 :tail-id #xf4 :cost #x24a) + (new 'static 'trail-conn :head-id #xf4 :tail-id #xf5 :cost #x1b4) + (new 'static 'trail-conn :head-id #xf5 :tail-id #xf6 :cost #x1a0) + (new 'static 'trail-conn :head-id #xf6 :tail-id #xf7 :cost #x42f) + (new 'static 'trail-conn :head-id #xf7 :tail-id #xf8 :cost #x1e9) + (new 'static 'trail-conn :head-id #xf8 :tail-id #xf9 :cost #x18d) + (new 'static 'trail-conn :head-id #xf9 :tail-id #xfa :cost #x174) + (new 'static 'trail-conn :head-id #xfa :tail-id #xfb :cost #x459) + (new 'static 'trail-conn :head-id #xfb :tail-id #xfc :cost #x14a) + (new 'static 'trail-conn :head-id #xfc :tail-id #xfd :cost #x174) + (new 'static 'trail-conn :head-id #xfd :tail-id #xfe :cost #x1b9) + (new 'static 'trail-conn :head-id #xfe :tail-id #xff :cost #x439) + ) + :blocker #f + :conn-ids (new 'static 'array uint16 608 + #x0 + #x1 + #x2 + #xee + #x0 + #x3 + #x4 + #x5 + #x1 + #x3 + #x6 + #x34 + #x2 + #x4 + #x6 + #x7 + #x24 + #x8 + #x9 + #xa + #x25 + #x8 + #xed + #x7 + #xa + #xb + #x26 + #x9 + #xb + #xc + #xf + #x27 + #xc + #xd + #xe + #xe + #xf + #x10 + #x10 + #xd + #x11 + #x11 + #x12 + #x13 + #x12 + #x14 + #x15 + #x13 + #x14 + #x16 + #x16 + #x17 + #x17 + #x18 + #x19 + #x18 + #x1a + #x1b + #x1a + #x1c + #x1c + #x1d + #x1d + #x1e + #x23 + #x1e + #x1f + #x20 + #x21 + #x1f + #x22 + #x23 + #x22 + #x24 + #x25 + #x26 + #x27 + #x19 + #x1b + #x28 + #x28 + #x29 + #x2a + #x29 + #x2b + #x2c + #x2b + #x2d + #x3a + #x2d + #x2e + #x3b + #x2e + #x2f + #x20 + #x2f + #x33 + #x21 + #x30 + #x31 + #x32 + #x33 + #x30 + #x34 + #x35 + #x36 + #x2a + #x2c + #x37 + #x37 + #x38 + #x39 + #x3c + #x39 + #x3a + #x3b + #x3c + #xef + #x5 + #x31 + #x35 + #x3d + #x32 + #x36 + #x3d + #x3e + #x3e + #x3f + #x40 + #x41 + #x3f + #x40 + #x41 + #x42 + #x42 + #x43 + #x44 + #x45 + #x15 + #x45 + #xf1 + #x46 + #x49 + #x4b + #x101 + #x46 + #x47 + #x48 + #x47 + #x49 + #x4a + #x4c + #x4b + #x4c + #x4a + #x4d + #x4d + #x4e + #x4e + #x4f + #x50 + #x51 + #x48 + #x4f + #x52 + #x53 + #x50 + #x52 + #x54 + #x51 + #x53 + #x54 + #x55 + #x55 + #x56 + #x56 + #x57 + #x57 + #x58 + #x59 + #x5a + #x59 + #x5b + #x58 + #x5c + #x5c + #x5d + #x5d + #x5f + #x5e + #x5f + #x62 + #x5e + #x60 + #x66 + #x60 + #x61 + #x61 + #x62 + #x63 + #xce + #x64 + #x65 + #x65 + #x66 + #x63 + #x67 + #x68 + #x67 + #x69 + #x6a + #x68 + #x69 + #x6d + #x6b + #x6f + #x6c + #xfc + #xfd + #x6c + #x6d + #x6e + #x90 + #x6e + #x6f + #x70 + #x78 + #x6a + #x71 + #x71 + #x72 + #x73 + #xc9 + #x73 + #x77 + #xc8 + #x74 + #x75 + #x75 + #x76 + #x76 + #x77 + #x78 + #xbc + #x79 + #xbd + #x79 + #x7a + #x7a + #x7b + #x7c + #x7b + #x7d + #x7e + #x7e + #x7c + #x7d + #x7f + #x82 + #x85 + #x80 + #x81 + #x82 + #xcb + #x81 + #x83 + #xc6 + #x80 + #x83 + #x84 + #x87 + #x84 + #x88 + #x85 + #x86 + #x87 + #x88 + #x8a + #x86 + #x89 + #x8c + #x89 + #x8a + #x8b + #x8b + #x8c + #x8d + #x8d + #x8e + #x8e + #x8f + #x90 + #x91 + #x92 + #x94 + #x93 + #x94 + #xa2 + #xa4 + #x95 + #x95 + #x96 + #x96 + #x97 + #x97 + #x98 + #x99 + #xc2 + #x93 + #x99 + #x9a + #x98 + #x9a + #x9b + #x9b + #x9c + #x9c + #x9d + #x9d + #xa0 + #x9e + #x9f + #xab + #xa0 + #xa3 + #x91 + #xa1 + #xa2 + #xa3 + #x92 + #xa1 + #xa4 + #xa5 + #xa5 + #xac + #xa6 + #xa7 + #xa7 + #xaa + #x9e + #xa8 + #xa9 + #xa8 + #xaa + #xab + #xa9 + #xae + #xac + #xad + #xad + #xd4 + #xae + #xaf + #xaf + #xb0 + #xb1 + #xa6 + #xb0 + #xb2 + #xb3 + #xb4 + #xb4 + #xb5 + #xb5 + #xb6 + #xb6 + #xb7 + #xb7 + #xb8 + #x44 + #xb9 + #xba + #xba + #xbb + #xbb + #xbc + #xbe + #xbd + #xbe + #xbf + #xd1 + #xbf + #xc0 + #xc0 + #xc1 + #xc1 + #xc2 + #xc3 + #xc3 + #xc4 + #x6b + #xc4 + #xc5 + #xc5 + #xca + #xc6 + #xb1 + #xb2 + #xc7 + #x72 + #xc8 + #xc9 + #xca + #x7f + #xcb + #xcc + #xcc + #xcd + #xcd + #xce + #xcf + #x64 + #xcf + #xd0 + #xd0 + #xd3 + #xd1 + #xd2 + #xd2 + #x103 + #x9f + #xb3 + #xd3 + #xd4 + #xd6 + #xd5 + #xd5 + #xd6 + #xd7 + #xd7 + #xd8 + #xd9 + #xd9 + #xda + #xda + #xdb + #xdb + #xdc + #xdf + #xdc + #xe0 + #xdd + #xde + #xe2 + #xdf + #xe0 + #xe1 + #xe2 + #xd8 + #xde + #xe3 + #xc7 + #xe3 + #xe4 + #xdd + #xe4 + #xe5 + #xe6 + #xe1 + #xe6 + #xe7 + #xe5 + #xe7 + #xe8 + #xe8 + #xe9 + #xe9 + #xea + #xea + #xeb + #xeb + #xec + #x43 + #xec + #xed + #xee + #x38 + #xef + #x5a + #x5b + #xf0 + #xf0 + #xf1 + #xf7 + #xf2 + #xf2 + #xf3 + #xf3 + #xf4 + #xf4 + #xf5 + #xf5 + #xf6 + #xf6 + #xf8 + #xf7 + #xf8 + #xf9 + #xfe + #x74 + #xfa + #xfb + #xfb + #xfc + #xfd + #xff + #xfa + #xfe + #xff + #x100 + #x70 + #xf9 + #x100 + #xb9 + #x101 + #x102 + #x104 + #x102 + #x103 + #x105 + #x104 + #x105 + #x10a + #x106 + #x107 + #x10b + #x108 + #x109 + #x10d + #x10a + #x10c + #x10b + #x10c + #x10e + #x107 + #x10d + #x10f + #x106 + #x10e + #x10f + #x111 + #x109 + #x110 + #x113 + #x108 + #x111 + #x112 + #x110 + #x112 + #x114 + #xb8 + #x113 + #x114 + #x8f + #x115 + #x115 + #x116 + #x117 + #x116 + #x118 + #x11c + #x118 + #x119 + #x119 + #x11a + #x11a + #x11b + #x11b + #x117 + #x11c + #x11d + #x11d + #x11e + #x11e + #x11f + #x11f + #x120 + #x120 + #x121 + #x121 + #x122 + #x122 + #x123 + #x123 + #x124 + #x124 + #x125 + #x125 + #x126 + #x126 + #x127 + #x127 + #x128 + #x128 + #x129 + #x129 + #x12a + #x12a + #x12b + #x12b + #x12c + #x12c + #x12d + #x12d + #x0 + #x0 + #x0 + #x0 + ) + :visgroup (new 'static 'inline-array trail-conn-hash-cell 34 + (new 'static 'trail-conn-hash-cell :conn-count #x4 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x8 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #xb :conn-count #x3 :first-pov #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x11 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x16 :conn-count #x3 :first-pov #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x1d :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x21 :conn-count #x2 :first-pov #x23) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x27 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x2a :conn-count #x2 :first-pov #x2c) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x2e :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x32 :conn-count #x3 :first-pov #x35) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x37 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x3a :conn-count #x2 :first-pov #x3c) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x3f :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x41 :conn-count #x5 :first-pov #x46) + (new 'static 'trail-conn-hash-cell :first-conn #xd :conn-count #x53 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x58 :conn-count #x5 :first-pov #x5d) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x61 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x63 :conn-count #x2 :first-pov #x65) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x67 :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x6a :conn-count #x3 :first-pov #x6d) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x70 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x72 :conn-count #x2 :first-pov #x74) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x76 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x78 :conn-count #x2 :first-pov #x7a) + (new 'static 'trail-conn-hash-cell :first-conn #x2 :conn-count #x7c :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x7e :conn-count #x3 :first-pov #x81) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x84 :first-pov #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x8b :conn-count #x4 :first-pov #x8f) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x94 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x98 :conn-count #x6 :first-pov #x9e) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #xa1 :first-pov #x7) + (new 'static 'trail-conn-hash-cell :first-conn #xa8 :conn-count #x3 :first-pov #xab) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #xaf :first-pov #x3) + ) + :visnode-ids (new 'static 'array uint16 184 + #x0 + #x1 + #x2 + #x3 + #x4 + #x6 + #x7 + #x17 + #x7 + #x8 + #x9 + #xc + #xd + #xe + #x14 + #x15 + #x16 + #x3 + #x4 + #x6 + #x7 + #x17 + #x1b + #x1c + #x24 + #x1f + #x20 + #x26 + #x27 + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x3b + #x3e + #x3f + #x3b + #x3e + #x3e + #x3f + #x41 + #x42 + #x43 + #x44 + #x46 + #x47 + #xa6 + #x42 + #x47 + #x48 + #x49 + #x4a + #x51 + #x52 + #x53 + #x54 + #x9e + #x54 + #x57 + #x5b + #x5c + #x5d + #x5e + #x66 + #x5b + #x5c + #x5d + #x5e + #x5f + #x60 + #x61 + #x62 + #x63 + #x64 + #x65 + #x66 + #xa0 + #x5d + #x5f + #x60 + #x61 + #x66 + #x5d + #x63 + #x64 + #x65 + #x66 + #x6a + #x6b + #x78 + #x79 + #x7a + #x80 + #x80 + #x81 + #x81 + #xaf + #x70 + #x71 + #x72 + #x76 + #x7d + #x7e + #x83 + #x84 + #x9d + #x58 + #x8f + #x59 + #x90 + #x85 + #xad + #x4e + #x4f + #x45 + #xa5 + #x8a + #xd9 + #x2d + #x2e + #xb1 + #xb2 + #xb9 + #xb5 + #xb6 + #xb8 + #xb0 + #xb7 + #xb8 + #xba + #xbb + #xbc + #xbd + #xb7 + #xb9 + #xba + #xbb + #xb7 + #xb8 + #xbb + #xbc + #xbd + #xb7 + #xb8 + #xbb + #xbd + #x4c + #xd3 + #xd4 + #xd5 + #xd6 + #xd7 + #xd3 + #xd7 + #xd8 + #x4c + #xd3 + #xd4 + #xd5 + #xd6 + #xd7 + #xd8 + #xda + #xdb + #xdc + #xdd + #xe0 + #xe1 + #xe2 + #xe3 + #xe5 + #xe6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :conn-hash (new 'static 'trail-conn-hash + :cell-width (meters 166.2812) + :origin (new 'static 'vector :x -4051966.0 :z -2941950.2 :w 1.0) + :cell (new 'static 'inline-array trail-conn-hash-cell 256 + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x7 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x12 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x19 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x20 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x28 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b) + (new 'static 'trail-conn-hash-cell :first-conn #x2b :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x2d :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x35 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x3f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x4d :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56) + (new 'static 'trail-conn-hash-cell :first-conn #x56 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x5d :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x68 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x74 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x7f :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82) + (new 'static 'trail-conn-hash-cell :first-conn #x82 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86) + (new 'static 'trail-conn-hash-cell :first-conn #x86 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x8f :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x92 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x99 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a) + (new 'static 'trail-conn-hash-cell :first-conn #x9a :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x9d :conn-count #x16) + (new 'static 'trail-conn-hash-cell :first-conn #xb3 :conn-count #x1c) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf) + (new 'static 'trail-conn-hash-cell :first-conn #xcf :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #xd6 :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #xeb :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9) + (new 'static 'trail-conn-hash-cell :first-conn #xf9 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa) + (new 'static 'trail-conn-hash-cell :first-conn #xfa :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x107 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112) + (new 'static 'trail-conn-hash-cell :first-conn #x112 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x114 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x118 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c) + (new 'static 'trail-conn-hash-cell :first-conn #x11c :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x11f :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x124 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c) + (new 'static 'trail-conn-hash-cell :first-conn #x12c :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x130 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x137 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c) + (new 'static 'trail-conn-hash-cell :first-conn #x13c :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x149 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c) + (new 'static 'trail-conn-hash-cell :first-conn #x14c :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x14d :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x154 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157) + (new 'static 'trail-conn-hash-cell :first-conn #x157 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x159 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x160 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169) + (new 'static 'trail-conn-hash-cell :first-conn #x169 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x16c :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x16e :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x16f) + (new 'static 'trail-conn-hash-cell :first-conn #x16f :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x170) + (new 'static 'trail-conn-hash-cell :first-conn #x170) + (new 'static 'trail-conn-hash-cell :first-conn #x170 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x17c :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x17f :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183) + (new 'static 'trail-conn-hash-cell :first-conn #x183 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x186 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x188 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x18b :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x18f :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x195 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x198 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x19a :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f) + (new 'static 'trail-conn-hash-cell :first-conn #x19f :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x1a7 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x1a9 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1aa :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1ab :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x1ad :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5) + (new 'static 'trail-conn-hash-cell :first-conn #x1b5 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6) + (new 'static 'trail-conn-hash-cell :first-conn #x1b6 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7) + (new 'static 'trail-conn-hash-cell :first-conn #x1b7 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8) + (new 'static 'trail-conn-hash-cell :first-conn #x1b8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + (new 'static 'trail-conn-hash-cell :first-conn #x1b9) + ) + :conn-ids (new 'static 'array uint16 448 + #x6b + #x6e + #x6f + #x90 + #xc0 + #xc1 + #xc4 + #x90 + #x91 + #x92 + #x93 + #x94 + #x99 + #x9a + #xa2 + #xa4 + #xc3 + #xc4 + #x98 + #x99 + #x9a + #x9b + #x9c + #xc2 + #xc3 + #x95 + #x96 + #xa5 + #xac + #xad + #xd2 + #x103 + #x91 + #x92 + #xa0 + #xa1 + #xa2 + #xa3 + #xa4 + #xa5 + #x9c + #x9d + #xa0 + #x107 + #x10f + #x106 + #x107 + #x10a + #x10b + #x10c + #x10e + #x10f + #x111 + #x96 + #x97 + #xad + #xd4 + #xd6 + #x102 + #x103 + #x104 + #x105 + #x10a + #xd5 + #xd6 + #xd7 + #xd8 + #xd9 + #xda + #xdd + #xde + #xe2 + #xe3 + #xe4 + #xe5 + #xe6 + #xe7 + #xda + #xdb + #xdc + #xdf + #xe0 + #xe1 + #xe2 + #xe6 + #xe7 + #x107 + #x108 + #x109 + #x10d + #x10f + #x110 + #x113 + #xb4 + #xb5 + #xb6 + #xb7 + #xb8 + #x108 + #x110 + #x111 + #x112 + #x113 + #x114 + #xa6 + #xa7 + #xa8 + #xaa + #xab + #xae + #xb0 + #xb2 + #xb3 + #xb4 + #xbf + #xd1 + #xae + #xaf + #xb0 + #xb1 + #xb2 + #xc7 + #xe3 + #xe4 + #xe5 + #xe7 + #xe8 + #x42 + #x43 + #xec + #xf2 + #xf3 + #xf4 + #xf5 + #x9e + #x9f + #xa8 + #xa9 + #xab + #xae + #xb3 + #xbf + #xd1 + #xe8 + #xe9 + #xea + #x3f + #x40 + #x41 + #x42 + #xea + #xeb + #xec + #x3f + #x39 + #x3c + #xef + #x5 + #x1e + #x1f + #x20 + #x21 + #x23 + #x2d + #x2e + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x39 + #x3a + #x3b + #x3d + #x3e + #x3f + #x0 + #x1 + #x2 + #x3 + #x4 + #x5 + #x6 + #x7 + #x8 + #x9 + #xa + #xb + #xc + #xd + #xe + #xf + #x10 + #x11 + #x1f + #x22 + #x23 + #x24 + #x25 + #x26 + #x27 + #x34 + #xed + #xee + #x29 + #x2a + #x2b + #x2c + #x37 + #x38 + #xef + #x16 + #x17 + #x18 + #x19 + #x1a + #x1b + #x1c + #x1d + #x1e + #x23 + #x28 + #x29 + #x2a + #x2b + #x2d + #x3a + #x46 + #x49 + #x4b + #x4c + #x101 + #x11 + #x12 + #x13 + #x14 + #x15 + #x16 + #x44 + #x45 + #xb9 + #xd0 + #xd3 + #xf0 + #xf1 + #x101 + #x12d + #x46 + #x47 + #x48 + #x49 + #x4a + #x4c + #x4d + #x4e + #x4f + #x50 + #x51 + #x52 + #x53 + #x50 + #x51 + #x52 + #x53 + #x54 + #x55 + #x56 + #x57 + #xd0 + #xd3 + #xf0 + #x12c + #x12d + #x128 + #x129 + #x12a + #x12d + #x125 + #x126 + #x127 + #x128 + #x60 + #x61 + #x62 + #x5e + #x5f + #x60 + #x62 + #x66 + #x57 + #x58 + #x59 + #x5a + #x5b + #x5c + #x5d + #x5f + #x11a + #x11b + #x12b + #x12c + #x119 + #x11a + #x123 + #x124 + #x125 + #x12a + #x12b + #x120 + #x121 + #x122 + #x123 + #x125 + #x63 + #x64 + #x65 + #x66 + #x67 + #x68 + #x69 + #x6a + #x6d + #xcc + #xcd + #xce + #xcf + #x6a + #x71 + #x72 + #x115 + #x115 + #x116 + #x117 + #x118 + #x119 + #x11c + #x11d + #x11e + #x11f + #x120 + #xf6 + #xf8 + #x6c + #x6d + #xf6 + #xfb + #xfc + #xfd + #xff + #x72 + #x73 + #x75 + #x76 + #x77 + #xc5 + #xc8 + #xc9 + #xca + #x8e + #x8f + #x115 + #x11d + #x11e + #x11e + #xc6 + #x70 + #x78 + #xba + #xbc + #xbe + #xf7 + #xf8 + #xf9 + #xfa + #xfe + #xff + #x100 + #xfa + #xfb + #xff + #x74 + #x75 + #xfa + #xfb + #x8c + #x8d + #x8e + #x88 + #x8c + #x84 + #x87 + #x88 + #x80 + #x83 + #x84 + #x87 + #x80 + #x81 + #x82 + #x83 + #xc6 + #xcb + #x7f + #x82 + #xcb + #x7a + #x7f + #x79 + #x7a + #xbb + #xbd + #xbe + #x85 + #x86 + #x87 + #x88 + #x89 + #x8a + #x8b + #x8c + #x85 + #x87 + #x85 + #x85 + #x82 + #x85 + #x7a + #x7b + #x7c + #x7d + #x7e + #x7f + #x82 + #x85 + #x8b + #x7e + #x8b + #x7e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + :cell-pov-bit-arrays #f + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc index b4b240e387..93c48d9432 100644 --- a/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc @@ -18,7 +18,7 @@ :pack-me (:methods (get-dist-score (_type_ vector) uint) - (debug-draw (_type_ int) none) + (debug-draw (_type_ int) symbol) (get-position (_type_ vector) vector) ) ) @@ -230,7 +230,7 @@ ;; definition of type trail-cached-start-pov (deftype trail-cached-start-pov (structure) - ((last-updated uint64) + ((last-updated time-frame) (pov-can-see-start uint64) (next-node-id int32) (start-pos vector :inline) @@ -269,12 +269,12 @@ (conn-mask uint8) (node (inline-array trail-node)) (conn (inline-array trail-conn)) - (blocker uint32) + (blocker (inline-array trail-blocker)) (conn-ids (pointer uint16)) (visgroup (inline-array trail-conn-hash-cell)) (visnode-ids (pointer uint16)) (conn-hash trail-conn-hash) - (cell-pov-bit-arrays uint32) + (cell-pov-bit-arrays (pointer uint64)) (pov-can-see-goal uint64) (cached-start-pov trail-cached-start-pov :inline) (orig-start-pos vector :inline) @@ -287,31 +287,31 @@ (closed-bits vector16ub 2 :inline :overlay-at closed-quads) ) (:methods - (trail-graph-method-9 (_type_ int) none) - (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-9 (_type_ int) int) + (trail-graph-method-10 (_type_ int) symbol) (trail-graph-method-11 (_type_ int int) trail-node) - (trail-graph-method-12 (_type_) none) - (trail-graph-method-13 (_type_ vector vector) none) - (debug-draw (_type_) none) - (trail-graph-method-15 (_type_ int) none) - (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) - (trail-graph-method-17 (_type_) none) + (trail-graph-method-12 (_type_ trail-node vector) symbol) + (trail-graph-method-13 (_type_ vector vector) symbol) + (debug-draw (_type_) symbol) + (trail-graph-method-15 (_type_ int) symbol) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) symbol) + (trail-graph-method-17 (_type_ vector vector) int) (trail-graph-method-18 (_type_ vector) int) (trail-graph-method-19 (_type_) none) - (trail-graph-method-20 (_type_ uint vector) none) - (trail-graph-method-21 (_type_) none) - (trail-graph-method-22 (_type_) none) - (trail-graph-method-23 (_type_) none) - (trail-graph-method-24 (_type_) none) - (trail-graph-method-25 (_type_ int) none) - (trail-graph-method-26 (_type_) none) - (trail-graph-method-27 (_type_) none) - (trail-graph-method-28 (_type_) none) - (trail-graph-method-29 (_type_) none) - (trail-graph-method-30 (_type_) none) + (trail-graph-method-20 (_type_ uint vector) vector) + (trail-graph-method-21 (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) + (trail-graph-method-22 (_type_ int int) symbol) + (trail-graph-method-23 (_type_) symbol) + (trail-graph-method-24 (_type_ uint vector int int) symbol) + (trail-graph-method-25 (_type_ int) int) + (trail-graph-method-26 (_type_) int) + (trail-graph-method-27 (_type_) int) + (trail-graph-method-28 (_type_ trail-conn-search int int) symbol) + (trail-graph-method-29 (_type_ vector vector trail-cached-search-info) int) + (trail-graph-method-30 (_type_) int) (trail-graph-method-31 (_type_ int) none) - (trail-graph-method-32 (_type_) none) - (trail-graph-method-33 (_type_) none) + (trail-graph-method-32 (_type_) uint) + (trail-graph-method-33 (_type_ int) symbol) ) ) @@ -359,3 +359,7 @@ ;; definition for symbol *trail-graph*, type trail-graph (define *trail-graph* (the-as trail-graph #f)) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc new file mode 100644 index 0000000000..b239198761 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc @@ -0,0 +1,1200 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type trail-conn +;; WARN: Return type mismatch symbol vs none. +(defmethod debug-draw ((this trail-conn) (arg0 trail-graph) (arg1 int)) + (let ((a2-3 (-> arg0 node (-> this head-id))) + (v1-2 (-> arg0 node (-> this tail-id))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! + s4-0 + (* 4096.0 (the float (-> a2-3 x))) + (* 4096.0 (the float (-> a2-3 y))) + (* 4096.0 (the float (-> a2-3 z))) + 1.0 + ) + (set-vector! + s3-0 + (* 4096.0 (the float (-> v1-2 x))) + (* 4096.0 (the float (-> v1-2 y))) + (* 4096.0 (the float (-> v1-2 z))) + 1.0 + ) + (vector-lerp! s5-0 s4-0 s3-0 0.5) + (let* ((s2-0 (math-camera-pos)) + (f0-14 (vector-vector-distance-squared s4-0 s2-0)) + (f1-12 819200.0) + ) + (when (or (< f0-14 (* f1-12 f1-12)) + (let ((f0-15 (vector-vector-distance-squared s3-0 s2-0)) + (f1-15 819200.0) + ) + (< f0-15 (* f1-15 f1-15)) + ) + (let ((f0-16 (vector-vector-distance-squared s5-0 s2-0)) + (f1-18 819200.0) + ) + (< f0-16 (* f1-18 f1-18)) + ) + ) + (add-debug-line #t (bucket-id debug) s4-0 s3-0 *color-orange* #f (the-as rgba -1)) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 583) + ) + (format (clear *temp-string*) "~D" arg1) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow) (the-as vector2h #f)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type trail-node +;; INFO: Used lq/sq +(defmethod debug-draw ((this trail-node) (arg0 int)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'sphere)) + ) + (set-vector! + s5-0 + (* 4096.0 (the float (-> this x))) + (* 4096.0 (the float (-> this y))) + (* 4096.0 (the float (-> this z))) + 1.0 + ) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (set! (-> s4-0 r) 4096.0) + (let ((f0-8 (vector-vector-distance-squared s5-0 (math-camera-pos))) + (f1-6 819200.0) + ) + (when (and (< f0-8 (* f1-6 f1-6)) (sphere-in-view-frustum? s4-0)) + (add-debug-x #t (bucket-id debug) s5-0 *color-red*) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 583) + ) + (format (clear *temp-string*) "~D" arg0) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan) (the-as vector2h #f)) + ) + ) + ) + ) + ) + +;; definition for method 15 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-15 ((this trail-graph) (arg0 int)) + (local-vars (sv-80 int) (sv-96 (function _varargs_ object))) + (let* ((s5-0 (-> this conn-hash)) + (s4-0 (-> s5-0 cell arg0)) + (s3-0 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (set-vector! + (-> s3-0 0) + (+ (* (-> s5-0 cell-width) (the float (logand arg0 15))) (-> s5-0 origin x)) + 53248.0 + (+ (* (-> s5-0 cell-width) (the float (/ arg0 16))) (-> s5-0 origin z)) + 1.0 + ) + (set! (-> s3-0 1 quad) (-> s3-0 0 quad)) + (+! (-> s3-0 1 x) (-> s5-0 cell-width)) + (set! (-> s3-0 2 quad) (-> s3-0 1 quad)) + (+! (-> s3-0 2 z) (-> s5-0 cell-width)) + (set! (-> s3-0 3 quad) (-> s3-0 2 quad)) + (set! (-> s3-0 3 x) (- (-> s3-0 3 x) (-> s5-0 cell-width))) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 1) (-> s3-0 2) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 2) (-> s3-0 3) *color-white* #f (the-as rgba -1)) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 3) (-> s3-0 0) *color-white* #f (the-as rgba -1)) + (set-vector! + (-> s3-0 3) + (* 0.5 (+ (-> s3-0 0 x) (-> s3-0 2 x))) + (-> s3-0 0 y) + (* 0.5 (+ (-> s3-0 0 z) (-> s3-0 2 z))) + 1.0 + ) + (let ((s1-0 add-debug-text-3d) + (s0-0 #t) + ) + (set! sv-80 583) + (set! sv-96 format) + (let ((a0-21 (clear *temp-string*)) + (a1-5 "cell ~D (~D,~D)") + (a2-4 arg0) + (a3-4 (logand arg0 15)) + (t0-4 (/ arg0 16)) + ) + (sv-96 a0-21 a1-5 a2-4 a3-4 t0-4) + ) + (let ((a2-5 *temp-string*) + (a3-5 (-> s3-0 3)) + (t0-5 1) + (t1-4 #f) + ) + (s1-0 s0-0 (the-as bucket-id sv-80) a2-5 a3-5 (the-as font-color t0-5) (the-as vector2h t1-4)) + ) + ) + (countdown (s2-1 (-> s4-0 conn-count)) + (let ((s1-1 (-> this conn (-> s5-0 conn-ids (+ s2-1 (-> s4-0 first-conn)))))) + (get-position (-> this node (-> s1-1 head-id)) (-> s3-0 0)) + (+! (-> s3-0 0 x) -2048.0) + (+! (-> s3-0 0 z) -2048.0) + (get-position (-> this node (-> s1-1 tail-id)) (-> s3-0 1)) + ) + (+! (-> s3-0 1 x) -2048.0) + (+! (-> s3-0 1 z) -2048.0) + (add-debug-line #t (bucket-id debug) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1)) + ) + ) + #f + ) + +;; definition for method 16 of type trail-graph +;; INFO: Used lq/sq +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-16 ((this trail-graph) (arg0 int) (arg1 (pointer uint16)) (arg2 vector) (arg3 vector) (arg4 rgba) (arg5 float)) + (local-vars (sv-48 int)) + (let ((s0-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set-vector! (-> s0-0 1) (+ (-> arg2 x) arg5) (+ (-> arg2 y) arg5) (+ (-> arg2 z) arg5) 1.0) + (set! sv-48 0) + (until #f + (set! (-> s0-0 0 quad) (-> s0-0 1 quad)) + (cond + ((< sv-48 arg0) + (let ((a0-6 (-> this node (-> arg1 sv-48)))) + (set-vector! + (-> s0-0 1) + (+ (* 4096.0 (the float (-> a0-6 x))) arg5) + (+ (* 4096.0 (the float (-> a0-6 y))) arg5) + (+ (* 4096.0 (the float (-> a0-6 z))) arg5) + 1.0 + ) + ) + ) + ((= sv-48 arg0) + (set-vector! (-> s0-0 1) (+ (-> arg3 x) arg5) (+ (-> arg3 y) arg5) (+ (-> arg3 z) arg5) 1.0) + ) + (else + (return #f) + ) + ) + (add-debug-line #t (bucket-id debug) (-> s0-0 0) (-> s0-0 1) arg4 #f (the-as rgba -1)) + (set! sv-48 (+ sv-48 1)) + ) + ) + #f + ) + +;; definition for method 14 of type trail-graph +;; INFO: Used lq/sq +;; WARN: new jak 2 until loop case, check carefully +(defmethod debug-draw ((this trail-graph)) + (when (= (-> this mode) 3) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-0 1 quad) (-> this orig-goal-pos quad)) + (let ((v1-3 (-> this goal-node-id))) + (until #f + (set! (-> s5-0 0 quad) (-> s5-0 1 quad)) + (cond + ((>= v1-3 0) + (let ((s4-0 (-> this node v1-3))) + (set-vector! + (-> s5-0 1) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 x)))) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 y)))) + (+ 2048.0 (* 4096.0 (the float (-> s4-0 z)))) + 1.0 + ) + (add-debug-line #t (bucket-id debug) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1)) + (set! v1-3 (-> s4-0 parent-id)) + ) + ) + (else + (set! (-> s5-0 1 quad) (-> this orig-start-pos quad)) + (add-debug-line #t (bucket-id debug) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1)) + (goto cfg-7) + ) + ) + ) + ) + ) + #f + ) + (label cfg-7) + (case (-> this mode) + ((1 2 3) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this orig-start-pos) + (meters 1) + (new 'static 'rgba :r #xff :a #x80) + ) + (set! (-> s5-1 quad) (-> this conn-start-pos quad)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :r #xff :a #x80)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this orig-goal-pos) + (meters 1) + (new 'static 'rgba :g #xff :a #x80) + ) + (set! (-> s5-1 quad) (-> this conn-goal-pos quad)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :g #xff :a #x80)) + ) + ) + ) + (dotimes (s5-2 (the-as int (-> this conn-count))) + (debug-draw (-> this conn s5-2) this s5-2) + ) + (dotimes (s5-3 (the-as int (-> this node-count))) + (debug-draw (-> this node s5-3) s5-3) + ) + (let* ((a2-7 (target-pos 0)) + (a0-40 (-> this conn-hash)) + (v1-26 (max 0 (min 15 (the int (/ (- (-> a2-7 x) (-> a0-40 origin x)) (-> a0-40 cell-width)))))) + (a1-16 (max 0 (min 15 (the int (/ (- (-> a2-7 z) (-> a0-40 origin z)) (-> a0-40 cell-width)))))) + ) + (trail-graph-method-15 this (+ (* a1-16 16) v1-26)) + ) + ) + +;; definition for method 18 of type trail-graph +(defmethod trail-graph-method-18 ((this trail-graph) (arg0 vector)) + (let ((a0-1 (-> this conn-hash))) + (+ (max 0 (min 15 (the int (/ (- (-> arg0 x) (-> a0-1 origin x)) (-> a0-1 cell-width))))) + (* (max 0 (min 15 (the int (/ (- (-> arg0 z) (-> a0-1 origin z)) (-> a0-1 cell-width))))) 16) + ) + ) + ) + +;; definition for method 11 of type trail-node +(defmethod get-position ((this trail-node) (arg0 vector)) + (let ((v0-0 arg0)) + (set! (-> v0-0 x) (* 4096.0 (the float (-> this x)))) + (set! (-> v0-0 y) (* 4096.0 (the float (-> this y)))) + (set! (-> v0-0 z) (* 4096.0 (the float (-> this z)))) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +;; definition for method 20 of type trail-graph +(defmethod trail-graph-method-20 ((this trail-graph) (arg0 uint) (arg1 vector)) + (get-position (-> this node (the-as int arg0)) arg1) + ) + +;; definition for method 21 of type trail-graph +(defmethod trail-graph-method-21 ((this trail-graph) (arg0 (pointer uint16)) (arg1 int) (arg2 (pointer int32)) (arg3 (pointer float))) + (set! (-> arg3 0) 0.0) + (set! (-> arg2 0) (-> this goal-node-id)) + (let ((v0-0 -1)) + (when (= (-> this mode) 3) + (let ((v1-3 (-> this node)) + (a3-2 0) + ) + (let ((t1-0 (-> this goal-node-id))) + (while (>= t1-0 0) + (+! a3-2 1) + (set! t1-0 (-> v1-3 t1-0 parent-id)) + ) + ) + (let ((t1-4 (-> this goal-node-id))) + (let ((t2-1 (- a3-2 arg1))) + (cond + ((> t2-1 0) + (while (> t2-1 0) + (set! t1-4 (-> v1-3 t1-4 parent-id)) + (+! t2-1 -1) + ) + (set! v0-0 arg1) + ) + (else + (set! v0-0 a3-2) + ) + ) + ) + (countdown (a2-3 v0-0) + (set! (-> arg0 a2-3) (the-as uint t1-4)) + (set! t1-4 (-> v1-3 t1-4 parent-id)) + ) + ) + (when (> a3-2 0) + (let ((a0-3 (-> v1-3 (-> this goal-node-id))) + (v1-4 (-> v1-3 (-> arg0 0))) + ) + (set! (-> arg3 0) + (- (* 512.0 (the float (-> a0-3 cost-from-start))) (* 512.0 (the float (-> v1-4 cost-from-start)))) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 23 of type trail-graph +(defmethod trail-graph-method-23 ((this trail-graph)) + (let ((a3-0 (shr (+ (-> this node-count) 127) 7))) + (when (< 6 (the-as int a3-0)) + (format 0 "ERROR: TRAIL_NODE_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 6 a3-0) + (return #f) + ) + ) + (let ((a3-1 (shr (+ (-> this conn-count) 127) 7))) + (when (< 7 (the-as int a3-1)) + (format 0 "ERROR: TRAIL_CONN_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 7 a3-1) + (return #f) + ) + ) + (set! (-> this mode) (the-as uint 0)) + (set! (-> this goal-conn-id) -1) + (set! (-> this goal-node-id) -1) + (set! (-> this open-head-id) -1) + (let ((gp-0 *minimap*)) + (when gp-0 + (countdown (s5-0 6) + (reset (-> gp-0 trail s5-0)) + ) + ) + ) + #t + ) + +;; definition for method 26 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-26 ((this trail-graph)) + (when (nonzero? (-> this mode)) + (set! (-> this goal-node-id) -1) + (let ((a1-0 (-> this goal-conn-id))) + (when (>= a1-0 0) + (trail-graph-method-24 this (the-as uint a1-0) (-> this orig-goal-pos) 0 1) + (set! (-> this goal-conn-id) -1) + ) + ) + (set! (-> this pov-can-see-goal) (the-as uint 0)) + (set! (-> this open-head-id) -1) + (let ((v1-7 (-> this open-quads))) + (set! (-> v1-7 0 quad) (the-as uint128 0)) + (set! (-> v1-7 1 quad) (the-as uint128 0)) + (set! (-> v1-7 2 quad) (the-as uint128 0)) + (set! (-> v1-7 3 quad) (the-as uint128 0)) + (set! (-> v1-7 4 quad) (the-as uint128 0)) + (set! (-> v1-7 5 quad) (the-as uint128 0)) + ) + 0 + (let ((v1-9 (-> this closed-quads))) + (set! (-> v1-9 0 quad) (the-as uint128 0)) + (set! (-> v1-9 1 quad) (the-as uint128 0)) + (set! (-> v1-9 2 quad) (the-as uint128 0)) + (set! (-> v1-9 3 quad) (the-as uint128 0)) + (set! (-> v1-9 4 quad) (the-as uint128 0)) + (set! (-> v1-9 5 quad) (the-as uint128 0)) + ) + 0 + (set! (-> this mode) (the-as uint 0)) + 0 + ) + ) + +;; definition for method 24 of type trail-graph +(defmethod trail-graph-method-24 ((this trail-graph) (arg0 uint) (arg1 vector) (arg2 int) (arg3 int)) + (let* ((s5-0 (lognot arg3)) + (a0-2 (-> this conn arg0)) + (a1-1 (-> a0-2 visgroup-id)) + (v1-1 (-> this node)) + (s4-0 #f) + ) + (cond + ((> a1-1 0) + (let* ((a1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ a1-1 -1) 4)))) + (a0-7 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) a1-4)))) + ) + (countdown (a1-5 (-> (the-as trail-conn-hash-cell a1-4) conn-count)) + (let ((a3-4 (-> v1-1 (-> a0-7 0)))) + (if (logtest? (-> a3-4 flags) (trail-node-flag tnf2)) + (set! s4-0 #t) + (set! (-> a3-4 flags) (logior (logand (-> a3-4 flags) s5-0) arg2)) + ) + ) + (set! a0-7 (&-> a0-7 1)) + ) + ) + ) + (else + (dotimes (a1-6 2) + (let ((a3-7 (-> v1-1 (if (zero? a1-6) + (-> a0-2 head-id) + (-> a0-2 tail-id) + ) + ) + ) + ) + (if (logtest? (-> a3-7 flags) (trail-node-flag tnf2)) + (set! s4-0 #t) + (set! (-> a3-7 flags) (logior (logand (-> a3-7 flags) s5-0) arg2)) + ) + ) + ) + ) + ) + (when s4-0 + (let ((v1-11 (-> this cell-pov-bit-arrays (trail-graph-method-18 this arg1))) + (a0-10 (-> this node 0)) + ) + (while (nonzero? v1-11) + (if (logtest? v1-11 1) + (set! (-> a0-10 flags) (logior (logand (-> a0-10 flags) s5-0) arg2)) + ) + (&+! a0-10 20) + (set! v1-11 (shr v1-11 1)) + ) + ) + 0 + ) + s4-0 + ) + ) + +;; definition for method 28 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-28 ((this trail-graph) (arg0 trail-conn-search) (arg1 int) (arg2 int)) + (let* ((v1-1 (+ (* arg2 16) arg1)) + (a0-1 (/ v1-1 8)) + (a1-2 (ash 1 (logand v1-1 7))) + (a2-4 (-> arg0 cell-quads 0 byte a0-1)) + ) + (when (not (logtest? a2-4 a1-2)) + (set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2)) + (let* ((v1-3 (-> this conn-hash cell v1-1)) + (s4-0 (&-> (-> this conn-hash conn-ids) (-> v1-3 first-conn))) + ) + (countdown (s3-0 (-> v1-3 conn-count)) + (let* ((s2-0 (-> s4-0 0)) + (v1-4 (shr s2-0 3)) + (a1-8 (ash 1 (the-as int (logand s2-0 7)))) + (a2-5 (-> arg0 conn-quads 0 byte v1-4)) + ) + (when (not (logtest? a2-5 a1-8)) + (set! (-> arg0 conn-quads 0 byte v1-4) (logior a2-5 a1-8)) + (let* ((v1-7 (-> this conn s2-0)) + (a0-14 (-> v1-7 flags)) + ) + (when (= (logand (the-as conn-flag (-> this conn-mask)) a0-14) a0-14) + (let ((a3-2 (-> this node (-> v1-7 head-id))) + (v1-10 (-> this node (-> v1-7 tail-id))) + (a1-15 (new 'stack-no-clear 'vector)) + (a2-7 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! + a1-15 + (* 4096.0 (the float (-> a3-2 x))) + (* 4096.0 (the float (-> a3-2 y))) + (* 4096.0 (the float (-> a3-2 z))) + 1.0 + ) + (set-vector! + a2-7 + (* 4096.0 (the float (-> v1-10 x))) + (* 4096.0 (the float (-> v1-10 y))) + (* 4096.0 (the float (-> v1-10 z))) + 1.0 + ) + (let ((f0-14 (vector-segment-distance-point! (-> arg0 src-pos) a1-15 a2-7 s1-0))) + (when (or (< (-> arg0 best-conn-id) 0) (< f0-14 (-> arg0 best-dist))) + (when (or (and (>= (-> arg0 src-pos y) (-> this over-under-thresh)) (>= (-> s1-0 y) (-> this over-under-above-too-low))) + (and (< (-> arg0 src-pos y) (-> this over-under-thresh)) (>= (-> this over-under-below-too-high) (-> s1-0 y))) + ) + (set! (-> arg0 best-dist) f0-14) + (set! (-> arg0 best-conn-id) (the-as int s2-0)) + (set! (-> arg0 conn-pos quad) (-> s1-0 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + (set! s4-0 (&-> s4-0 1)) + ) + ) + #f + ) + ) + ) + +;; definition for method 17 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-17 ((this trail-graph) (arg0 vector) (arg1 vector)) + (let ((v1-0 (-> this conn-hash)) + (gp-0 (new 'stack-no-clear 'trail-conn-search)) + ) + (set! (-> gp-0 src-pos) arg0) + (set! (-> gp-0 conn-pos) arg1) + (set! (-> gp-0 best-conn-id) -1) + (let ((a0-2 (-> gp-0 conn-quads))) + (set! (-> a0-2 0 quad) (the-as uint128 0)) + (set! (-> a0-2 1 quad) (the-as uint128 0)) + (set! (-> a0-2 2 quad) (the-as uint128 0)) + (set! (-> a0-2 3 quad) (the-as uint128 0)) + (set! (-> a0-2 4 quad) (the-as uint128 0)) + (set! (-> a0-2 5 quad) (the-as uint128 0)) + (set! (-> a0-2 6 quad) (the-as uint128 0)) + ) + 0 + (let ((a0-4 (-> gp-0 cell-quads))) + (set! (-> a0-4 0 quad) (the-as uint128 0)) + (set! (-> a0-4 1 quad) (the-as uint128 0)) + ) + 0 + (let* ((f0-0 (-> v1-0 cell-width)) + (f1-1 (* 0.5 f0-0)) + ) + (let ((f3-0 (- (-> arg0 x) f1-1)) + (f2-2 (- (-> arg0 z) f1-1)) + ) + (set! (-> gp-0 bounds min x) (max 0 (min 15 (the int (/ (- f3-0 (-> v1-0 origin x)) f0-0))))) + (set! (-> gp-0 bounds min z) (max 0 (min 15 (the int (/ (- f2-2 (-> v1-0 origin z)) f0-0))))) + ) + (let ((f2-7 (+ (-> arg0 x) f1-1)) + (f1-2 (+ (-> arg0 z) f1-1)) + ) + (set! (-> gp-0 bounds max x) (max 0 (min 15 (the int (/ (- f2-7 (-> v1-0 origin x)) f0-0))))) + (set! (-> gp-0 bounds max z) (max 0 (min 15 (the int (/ (- f1-2 (-> v1-0 origin z)) f0-0))))) + ) + ) + (let ((s4-0 (-> gp-0 bounds min z))) + (until (< (-> gp-0 bounds max z) s4-0) + (let ((s3-0 (-> gp-0 bounds min x))) + (until (< (-> gp-0 bounds max x) s3-0) + (trail-graph-method-28 this gp-0 s3-0 s4-0) + (+! s3-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (while (< (-> gp-0 best-conn-id) 0) + (let ((v1-8 15)) + (set! (-> gp-0 bounds min x) (max 0 (+ (-> gp-0 bounds min x) -1))) + (set! (-> gp-0 bounds min z) (max 0 (+ (-> gp-0 bounds min z) -1))) + (set! (-> gp-0 bounds max x) (min (+ (-> gp-0 bounds max x) 1) v1-8)) + (set! (-> gp-0 bounds max z) (min (+ (-> gp-0 bounds max z) 1) v1-8)) + ) + (let ((s4-1 (-> gp-0 bounds min x))) + (until (< (-> gp-0 bounds max x) s4-1) + (trail-graph-method-28 this gp-0 s4-1 (-> gp-0 bounds min z)) + (trail-graph-method-28 this gp-0 s4-1 (-> gp-0 bounds max z)) + (+! s4-1 1) + ) + ) + (let ((s4-2 (-> gp-0 bounds min z))) + (until (< (-> gp-0 bounds max z) s4-2) + (trail-graph-method-28 this gp-0 (-> gp-0 bounds min x) s4-2) + (trail-graph-method-28 this gp-0 (-> gp-0 bounds max x) s4-2) + (+! s4-2 1) + ) + ) + ) + (-> gp-0 best-conn-id) + ) + ) + +;; definition for method 9 of type trail-graph +(defmethod trail-graph-method-9 ((this trail-graph) (arg0 int)) + (let ((s4-0 (-> this node arg0))) + (set! (-> s4-0 cost-from-start) (get-dist-score s4-0 (-> this orig-start-pos))) + (set! (-> s4-0 cost-to-goal) (get-dist-score s4-0 (-> this orig-goal-pos))) + ) + (trail-graph-method-11 this arg0 -1) + 0 + ) + +;; definition for method 10 of type trail-graph +(defmethod trail-graph-method-10 ((this trail-graph) (arg0 int)) + (let* ((s4-0 (-> this conn arg0)) + (v1-1 (-> s4-0 visgroup-id)) + (s5-0 #f) + ) + (cond + ((> v1-1 0) + (let* ((v1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ v1-1 -1) 4)))) + (s4-1 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) v1-4)))) + (s3-0 (-> (the-as trail-conn-hash-cell v1-4) conn-count)) + ) + (-> this visnode-ids) + (while (nonzero? s3-0) + (+! s3-0 -1) + (let ((a1-2 (-> s4-1 0))) + (if (logtest? (-> this node a1-2 flags) (trail-node-flag tnf2)) + (set! s5-0 #t) + (trail-graph-method-9 this (the-as int a1-2)) + ) + ) + (set! s4-1 (&-> s4-1 1)) + ) + ) + ) + (else + (dotimes (s3-1 2) + (let ((a1-3 (if (zero? s3-1) + (-> s4-0 head-id) + (-> s4-0 tail-id) + ) + ) + ) + (if (logtest? (-> this node a1-3 flags) (trail-node-flag tnf2)) + (set! s5-0 #t) + (trail-graph-method-9 this (the-as int a1-3)) + ) + ) + ) + ) + ) + (when s5-0 + (trail-graph-method-32 this) + (let ((s4-2 (-> this cached-start-pov pov-can-see-start)) + (s3-2 0) + ) + (while (nonzero? s4-2) + (if (logtest? s4-2 1) + (trail-graph-method-9 this s3-2) + ) + (+! s3-2 1) + (set! s4-2 (shr s4-2 1)) + ) + ) + 0 + ) + s5-0 + ) + ) + +;; definition for method 32 of type trail-graph +;; INFO: Used lq/sq +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-32 ((this trail-graph)) + (local-vars (s4-2 uint)) + (let* ((gp-0 (-> this cached-start-pov)) + (v1-1 (current-time)) + (a0-2 (- v1-1 (-> gp-0 last-updated))) + ) + (cond + ((< (seconds 1) a0-2) + (set! (-> gp-0 last-updated) v1-1) + (set! (-> gp-0 start-pos quad) (-> this orig-start-pos quad)) + (let* ((v1-7 (-> this cell-pov-bit-arrays (trail-graph-method-18 this (-> gp-0 start-pos)))) + (s3-0 (-> this node 0)) + (s2-0 1) + (s4-1 (lognot v1-7)) + ) + (countdown (s1-0 (-> this pov-node-count)) + (if (and (logtest? s4-1 s2-0) (not (trail-graph-method-12 this s3-0 (-> gp-0 start-pos)))) + (set! s4-1 (logior s4-1 s2-0)) + ) + (set! s2-0 (* s2-0 2)) + (&+! s3-0 20) + ) + (set! s4-2 (lognot s4-1)) + ) + (set! (-> gp-0 pov-can-see-start) s4-2) + s4-2 + ) + ((> a0-2 0) + (set! (-> gp-0 last-updated) v1-1) + (set! (-> gp-0 start-pos quad) (-> this orig-start-pos quad)) + (let ((s3-1 (-> this cell-pov-bit-arrays (trail-graph-method-18 this (-> gp-0 start-pos))))) + (set! s4-2 (logand (-> gp-0 pov-can-see-start) s3-1)) + (let ((s2-1 (-> gp-0 next-node-id))) + (let ((s1-1 6)) + (until #f + (let ((s0-0 (ash 1 s2-1))) + (when (logtest? s3-1 s0-0) + (if (trail-graph-method-12 this (-> this node s2-1) (-> gp-0 start-pos)) + (set! s4-2 (logior s4-2 s0-0)) + (set! s4-2 (logclear s4-2 s0-0)) + ) + (+! s1-1 -1) + (if (zero? s1-1) + (goto cfg-27) + ) + ) + ) + (set! s2-1 (mod (+ s2-1 1) (the-as int (-> this pov-node-count)))) + (if (= s2-1 (-> gp-0 next-node-id)) + (goto cfg-27) + ) + ) + ) + #f + (label cfg-27) + (set! (-> gp-0 next-node-id) s2-1) + ) + ) + (set! (-> gp-0 pov-can-see-start) s4-2) + s4-2 + ) + ) + ) + ) + +;; definition for method 13 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-13 ((this trail-graph) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 1 quad) (-> arg0 quad)) + (set! (-> gp-0 1 y) 0.0) + (set! (-> gp-0 1 w) 1.0) + (set! (-> gp-0 2 quad) (-> arg1 quad)) + (set! (-> gp-0 2 y) 0.0) + (set! (-> gp-0 2 w) 1.0) + (let ((s5-0 (-> this blocker 0))) + (countdown (s4-0 (-> this blocker-count)) + (let ((f0-5 (vector4-dot (-> gp-0 1) (the-as vector (-> s5-0 plane)))) + (f1-1 (vector4-dot (-> gp-0 2) (the-as vector (-> s5-0 plane)))) + ) + (when (< (* f0-5 f1-1) 0.0) + (vector-! (-> gp-0 0) (-> gp-0 2) (-> gp-0 1)) + (vector-float*! (-> gp-0 0) (-> gp-0 0) (/ f0-5 (- f0-5 f1-1))) + (vector+! (-> gp-0 0) (-> gp-0 0) (-> gp-0 1)) + (if (>= (-> s5-0 center w) (vector-vector-xz-distance-squared (-> gp-0 0) (-> s5-0 center))) + (return #f) + ) + ) + ) + (&+! s5-0 32) + ) + ) + ) + #t + ) + +;; definition for method 12 of type trail-graph +(defmethod trail-graph-method-12 ((this trail-graph) (arg0 trail-node) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set-vector! v1-0 (* 4096.0 (the float (-> arg0 x))) 0.0 (* 4096.0 (the float (-> arg0 z))) 1.0) + (trail-graph-method-13 this v1-0 arg1) + ) + ) + +;; definition for method 11 of type trail-graph +;; WARN: new jak 2 until loop case, check carefully +(defmethod trail-graph-method-11 ((this trail-graph) (arg0 int) (arg1 int)) + (let ((v1-0 (/ arg0 8)) + (a3-1 (ash 1 (logand arg0 7))) + ) + (logior! (-> this open-quads 0 byte v1-0) a3-1) + ) + (let* ((v1-2 (-> this node)) + (v0-0 (-> v1-2 arg0)) + ) + (set! (-> v0-0 parent-id) arg1) + (let ((a3-6 (+ (-> v0-0 cost-from-start) (-> v0-0 cost-to-goal))) + (t0-4 (-> this open-head-id)) + (a2-2 -1) + ) + (until #f + (when (< t0-4 0) + (set! (-> v0-0 next-id) -1) + (set! (-> v0-0 prev-id) a2-2) + (if (>= a2-2 0) + (set! (-> v1-2 a2-2 next-id) arg0) + (set! (-> this open-head-id) arg0) + ) + (return v0-0) + ) + (let ((t1-4 (-> v1-2 t0-4))) + (when (>= (+ (-> t1-4 cost-from-start) (-> t1-4 cost-to-goal)) a3-6) + (set! (-> v0-0 next-id) t0-4) + (set! (-> v0-0 prev-id) a2-2) + (set! (-> t1-4 prev-id) arg0) + (if (>= a2-2 0) + (set! (-> v1-2 a2-2 next-id) arg0) + (set! (-> this open-head-id) arg0) + ) + (return v0-0) + ) + (set! a2-2 t0-4) + (set! t0-4 (-> t1-4 next-id)) + ) + ) + ) + #f + v0-0 + ) + ) + +;; definition for method 25 of type trail-graph +(defmethod trail-graph-method-25 ((this trail-graph) (arg0 int)) + (let ((v1-0 (/ arg0 8)) + (a2-1 (ash 1 (logand arg0 7))) + ) + (logior! (-> this open-quads 0 byte v1-0) a2-1) + ) + (let* ((v1-2 (-> this node)) + (a2-4 (-> v1-2 arg0)) + (a1-2 (-> a2-4 prev-id)) + (a2-5 (-> a2-4 next-id)) + ) + (cond + ((>= a1-2 0) + (set! (-> v1-2 a1-2 next-id) a2-5) + (when (>= a2-5 0) + (set! (-> v1-2 a2-5 prev-id) a1-2) + a1-2 + ) + ) + (else + (set! (-> this open-head-id) a2-5) + (when (>= a2-5 0) + (let ((v0-0 -1)) + (set! (-> v1-2 a2-5 prev-id) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition for method 27 of type trail-graph +(defmethod trail-graph-method-27 ((this trail-graph)) + (let ((v0-0 (-> this open-head-id))) + (when (>= v0-0 0) + (let* ((v1-1 (-> this node)) + (a2-0 (-> v1-1 v0-0 next-id)) + ) + (set! (-> this open-head-id) a2-0) + (if (>= a2-0 0) + (set! (-> v1-1 a2-0 prev-id) -1) + ) + ) + (let ((v1-3 (/ v0-0 8)) + (a1-6 (ash 1 (logand v0-0 7))) + ) + (logior! (-> this closed-quads 0 byte v1-3) a1-6) + (logxor! (-> this open-quads 0 byte v1-3) (the-as uint a1-6)) + ) + ) + v0-0 + ) + ) + +;; definition for method 9 of type trail-node +;; WARN: Return type mismatch int vs uint. +(defmethod get-dist-score ((this trail-node) (arg0 vector)) + (let* ((f0-1 (- (-> arg0 x) (* 4096.0 (the float (-> this x))))) + (f1-3 (- (-> arg0 z) (* 4096.0 (the float (-> this z))))) + (f0-4 (sqrtf (+ (* f0-1 f0-1) (* f1-3 f1-3)))) + ) + (the uint (fmin 65535.0 (* 0.00024414062 (* 8.0 f0-4)))) + ) + ) + +;; definition for method 33 of type trail-graph +(defmethod trail-graph-method-33 ((this trail-graph) (arg0 int)) + (let ((s5-0 (-> this node arg0))) + (if (not (logtest? (-> s5-0 flags) (trail-node-flag tnf2))) + (return #t) + ) + (let ((s4-0 (ash 1 arg0))) + (if (logtest? s4-0 (-> this pov-can-see-goal)) + (return #t) + ) + (cond + ((trail-graph-method-12 this s5-0 (-> this orig-goal-pos)) + (logior! (-> this pov-can-see-goal) s4-0) + #t + ) + (else + (logclear! (-> s5-0 flags) (trail-node-flag tnf0)) + #f + ) + ) + ) + ) + ) + +;; definition for method 30 of type trail-graph +(defmethod trail-graph-method-30 ((this trail-graph)) + (let ((s5-0 (trail-graph-method-27 this))) + (if (< s5-0 0) + (return 2) + ) + (let ((s4-0 (-> this node s5-0))) + (when (and (logtest? (-> s4-0 flags) (trail-node-flag tnf0)) (trail-graph-method-33 this s5-0)) + (set! (-> this goal-node-id) s5-0) + (return 3) + ) + (let ((s3-0 (&-> (-> this conn-ids) (-> s4-0 first-conn)))) + (countdown (s2-0 (-> s4-0 conn-count)) + (let* ((a0-8 (-> this conn (-> s3-0 0))) + (v1-14 (-> a0-8 flags)) + ) + (when (= (logand (the-as conn-flag (-> this conn-mask)) v1-14) v1-14) + (let ((s1-0 (-> a0-8 tail-id))) + (if (= s1-0 s5-0) + (set! s1-0 (cond + ((logtest? v1-14 (conn-flag cf0)) + (goto cfg-27) + s1-0 + ) + (else + (-> a0-8 head-id) + ) + ) + ) + ) + (let ((s0-0 (-> this node s1-0)) + (v1-21 (min #xffff (the-as int (+ (-> a0-8 cost) (-> s4-0 cost-from-start))))) + (a0-11 (shr s1-0 3)) + (a1-9 (ash 1 (the-as int (logand s1-0 7)))) + ) + (cond + ((logtest? (-> this open-quads 0 byte a0-11) a1-9) + (when (< (the-as uint v1-21) (-> s0-0 cost-from-start)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (trail-graph-method-25 this (the-as int s1-0)) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ) + ((not (logtest? (-> this closed-quads 0 byte a0-11) a1-9)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (set! (-> s0-0 cost-to-goal) (get-dist-score s0-0 (-> this orig-goal-pos))) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ((< (the-as uint v1-21) (-> s0-0 cost-from-start)) + (set! (-> s0-0 cost-from-start) (the-as uint v1-21)) + (trail-graph-method-11 this (the-as int s1-0) s5-0) + ) + ) + ) + ) + ) + ) + (label cfg-27) + (set! s3-0 (&-> s3-0 1)) + ) + ) + ) + ) + 1 + ) + +;; definition for method 31 of type trail-graph +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod trail-graph-method-31 ((this trail-graph) (arg0 int)) + (local-vars (v1-1 int)) + (let ((v0-0 (the-as int (-> this mode)))) + 0 + (.mfc0 v1-1 Count) + (while (and (= v0-0 1) (< (the-as uint v1-1) (the-as uint arg0))) + (set! v0-0 (trail-graph-method-30 this)) + (.mfc0 v1-1 Count) + ) + (set! (-> this mode) (the-as uint v0-0)) + ) + (none) + ) + +;; definition of type trail-vis-work +(deftype trail-vis-work (structure) + ((best-count uint32) + (best-dist float) + (start-conn-id uint32) + (p0 vector :inline) + (p1 vector :inline) + (best-node-id uint16 64) + ) + ) + +;; definition for method 3 of type trail-vis-work +(defmethod inspect ((this trail-vis-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'trail-vis-work) + (format #t "~1Tbest-count: ~D~%" (-> this best-count)) + (format #t "~1Tbest-dist: ~f~%" (-> this best-dist)) + (format #t "~1Tstart-conn-id: ~D~%" (-> this start-conn-id)) + (format #t "~1Tp0: #~%" (-> this p0)) + (format #t "~1Tp1: #~%" (-> this p1)) + (format #t "~1Tbest-node-id[64] @ #x~X~%" (-> this best-node-id)) + (label cfg-4) + this + ) + +;; definition for method 22 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-22 ((this trail-graph) (arg0 int) (arg1 int)) + (local-vars (s4-1 symbol)) + (let* ((s4-0 (-> this node)) + (v1-2 (-> s4-0 arg1)) + (s5-0 (new 'stack-no-clear 'trail-vis-work)) + ) + (set! (-> s5-0 start-conn-id) (the-as uint arg0)) + (set-vector! + (-> s5-0 p0) + (* 4096.0 (the float (-> v1-2 x))) + (* 4096.0 (the float (-> v1-2 y))) + (* 4096.0 (the float (-> v1-2 z))) + 1.0 + ) + (set! (-> s5-0 p1 quad) (-> s5-0 p0 quad)) + (set! (-> s5-0 best-count) (the-as uint 0)) + (set! (-> s5-0 best-dist) -1.0) + (let ((s2-0 (&-> (-> this conn-ids) (-> v1-2 first-conn)))) + (countdown (s1-0 (-> v1-2 conn-count)) + (let* ((v1-4 (-> this conn (-> s2-0 0))) + (s0-0 (-> v1-4 tail-id)) + ) + (if (= s0-0 arg1) + (set! s0-0 (-> v1-4 head-id)) + ) + (let ((v1-8 (-> s4-0 s0-0))) + (set! (-> s5-0 p1 x) (* 4096.0 (the float (-> v1-8 x)))) + (set! (-> s5-0 p1 y) (* 4096.0 (the float (-> v1-8 y)))) + (set! (-> s5-0 p1 z) (* 4096.0 (the float (-> v1-8 z)))) + ) + (let ((f0-14 (vector-segment-distance-point! (-> this orig-goal-pos) (-> s5-0 p0) (-> s5-0 p1) (the-as vector #f))) + (f1-12 (-> s5-0 best-dist)) + ) + (cond + ((or (< f1-12 0.0) (< f0-14 f1-12)) + (set! (-> s5-0 best-dist) f0-14) + (set! (-> s5-0 best-count) (the-as uint 1)) + (set! (-> s5-0 best-node-id 0) s0-0) + ) + ((= f0-14 f1-12) + (let ((v1-15 (-> s5-0 best-count))) + (when (< v1-15 (the-as uint 64)) + (set! (-> s5-0 best-node-id v1-15) s0-0) + (set! (-> s5-0 best-count) (+ v1-15 1)) + ) + ) + ) + ) + ) + ) + (set! s2-0 (&-> s2-0 1)) + ) + ) + (trail-graph-method-24 this (-> s5-0 start-conn-id) (the-as vector #f) 2 0) + (countdown (v1-20 (-> s5-0 best-count)) + (let ((a1-16 (-> s4-0 (-> s5-0 best-node-id v1-20)))) + (when (= (logand (-> a1-16 flags) (trail-node-flag tnf0 tnf1)) (trail-node-flag tnf0 tnf1)) + (set! s4-1 #t) + (goto cfg-22) + ) + ) + ) + (set! s4-1 #f) + (label cfg-22) + (trail-graph-method-24 this (-> s5-0 start-conn-id) (the-as vector #f) 0 2) + ) + s4-1 + ) + +;; definition for method 29 of type trail-graph +;; INFO: Used lq/sq +(defmethod trail-graph-method-29 ((this trail-graph) (arg0 vector) (arg1 vector) (arg2 trail-cached-search-info)) + (local-vars (v0-6 int)) + (trail-graph-method-26 this) + (+! (-> this search-id) 1) + (set! (-> this orig-start-pos quad) (-> arg0 quad)) + (let ((s5-1 0)) + (let ((a1-1 -1)) + (when arg2 + (let ((v1-6 (-> arg2 goal-conn-id))) + (when (and (>= v1-6 0) + (= (-> arg2 orig-goal-pos x) (-> arg1 x)) + (= (-> arg2 orig-goal-pos y) (-> arg1 y)) + (= (-> arg2 orig-goal-pos z) (-> arg1 z)) + ) + (set! a1-1 v1-6) + (set! (-> this conn-goal-pos quad) (-> arg2 conn-goal-pos quad)) + ) + ) + ) + (set! (-> this orig-goal-pos quad) (-> arg1 quad)) + (when (< a1-1 0) + (set! a1-1 (trail-graph-method-17 this (-> this orig-goal-pos) (-> this conn-goal-pos))) + (when arg2 + (set! (-> arg2 goal-conn-id) a1-1) + (set! (-> arg2 orig-goal-pos quad) (-> this orig-goal-pos quad)) + (set! (-> arg2 conn-goal-pos quad) (-> this conn-goal-pos quad)) + ) + ) + (set! (-> this goal-conn-id) a1-1) + (if (trail-graph-method-24 this (the-as uint a1-1) (-> this orig-goal-pos) 1 0) + (set! s5-1 2) + ) + ) + (let ((v1-19 -1)) + (let ((a0-16 (-> *game-info* features))) + (if (not (logtest? (game-feature feature31) a0-16)) + (set! v1-19 (logand -3 v1-19)) + ) + (if (not (logtest? (game-feature feature32) a0-16)) + (set! v1-19 (logand -5 v1-19)) + ) + (if (not (logtest? (game-feature feature33) a0-16)) + (set! v1-19 (logand -9 v1-19)) + ) + (if (not (logtest? (game-feature feature34) a0-16)) + (set! v1-19 (logand -17 v1-19)) + ) + (if (not (logtest? (game-feature feature35) a0-16)) + (set! v1-19 (logand -33 v1-19)) + ) + ) + (set! (-> this conn-mask) (the-as uint v1-19)) + ) + (let ((s4-1 (trail-graph-method-17 this (-> this orig-start-pos) (-> this conn-start-pos)))) + (if (trail-graph-method-10 this s4-1) + (set! s5-1 (logior s5-1 1)) + ) + (set! (-> this mode) (the-as uint 1)) + (cond + ((zero? s5-1) + (let ((a2-5 (-> this open-head-id))) + (when (and (logtest? (-> this node a2-5 flags) (trail-node-flag tnf0)) (trail-graph-method-22 this s4-1 a2-5)) + (set! v0-6 3) + (set! (-> this mode) (the-as uint v0-6)) + v0-6 + ) + ) + ) + ((= s5-1 3) + (when (trail-graph-method-13 this (-> this orig-start-pos) (-> this orig-goal-pos)) + (set! v0-6 3) + (set! (-> this mode) (the-as uint v0-6)) + v0-6 + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(if (not (trail-graph-method-23 *trail-graph*)) + (set! *trail-graph* #f) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-cams_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-cams_REF.gc new file mode 100644 index 0000000000..2d14c362dd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-cams_REF.gc @@ -0,0 +1,56 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *assault-cams*, type (array assault-cam-info) +(define *assault-cams* (new 'static 'boxed-array :type assault-cam-info + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x -190874.02 :y 106024.96 :z 5588420.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80696344 :z 0.5906011) + :uvec (new 'static 'vector :x -0.36253208 :y 0.7894338 :z -0.49534297) + :fvec (new 'static 'vector :x -0.46624056 :y -0.61383563 :z -0.63704425) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 423746.34 :y 149545.38 :z 7161433.5 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.0033539534 :z 0.9999943) + :uvec (new 'static 'vector :x -0.8762458 :y 0.4818552 :z -0.0029389048) + :fvec (new 'static 'vector :x -0.4818526 :y -0.87625074 :z -0.0016161203) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 754367.3 :y 136453.73 :z 5612391.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.91507846 :z -0.4032754) + :uvec (new 'static 'vector :x 0.34681395 :y 0.51030624 :z -0.7869609) + :fvec (new 'static 'vector :x 0.20579405 :y -0.8599926 :z -0.46697044) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x 1701028.2 :y 180959.23 :z 5565024.5 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80724764 :z -0.59021246) + :uvec (new 'static 'vector :x 0.4939913 :y 0.54724586 :z -0.67564356) + :fvec (new 'static 'vector :x 0.32299143 :y -0.8369716 :z -0.44176307) + :trans (new 'static 'vector :w 1.0) + ) + ) + (new 'static 'assault-cam-info + :pos (new 'static 'vector :x -311586.8 :y 110921.73 :z 5417229.0 :w 1.0) + :mat (new 'static 'matrix + :rvec (new 'static 'vector :x -0.8088231 :z 0.58805186) + :uvec (new 'static 'vector :x -0.42552334 :y 0.69020355 :z -0.5852767) + :fvec (new 'static 'vector :x -0.4058755 :y -0.7236152 :z -0.5582527) + :trans (new 'static 'vector :w 1.0) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc new file mode 100644 index 0000000000..14bcb78648 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc @@ -0,0 +1,2364 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type assault-object-spawn-params +(deftype assault-object-spawn-params (traffic-object-spawn-params) + ((lev symbol) + (suck-level int32) + (flee-time time-frame) + ) + ) + +;; definition for method 3 of type assault-object-spawn-params +(defmethod inspect ((this assault-object-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-object-spawn-params) + (format #t "~1Tobject-type: ~D~%" (-> this object-type)) + (format #t "~1Tbehavior: ~D~%" (-> this behavior)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~1Tnav-branch: #~%" (-> this nav-branch)) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Trotation: #~%" (-> this rotation)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Thandle-parent: ~D~%" (-> this handle-parent)) + (format #t "~1Tguard-type: ~D~%" (-> this guard-type)) + (format #t "~1Tuser-data: ~D~%" (-> this user-data)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tproc: ~A~%" (-> this proc)) + (format #t "~1Tlev: ~A~%" (-> this lev)) + (format #t "~1Tsuck-level: ~D~%" (-> this suck-level)) + (format #t "~1Tflee-time: ~D~%" (-> this flee-time)) + (label cfg-4) + this + ) + +;; definition for function assault-enemy-init-by-other +(defbehavior assault-enemy-init-by-other citizen ((arg0 assault-object-spawn-params)) + (set! (-> self level) (level-get *level* (-> arg0 lev))) + (citizen-init-by-other arg0) + ) + +;; definition of type assault-metalhead-grunt +(deftype assault-metalhead-grunt (metalhead-grunt) + () + (:state-methods + exit-transport + ) + ) + +;; definition for method 3 of type assault-metalhead-grunt +(defmethod inspect ((this assault-metalhead-grunt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-grunt inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type assault-metalhead-flitter +(deftype assault-metalhead-flitter (metalhead-flitter) + () + (:state-methods + exit-transport + ) + ) + +;; definition for method 3 of type assault-metalhead-flitter +(defmethod inspect ((this assault-metalhead-flitter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-flitter inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type assault-metalhead-predator +(deftype assault-metalhead-predator (metalhead-predator) + () + ) + +;; definition for method 3 of type assault-metalhead-predator +(defmethod inspect ((this assault-metalhead-predator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-predator inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type assault-roboguard +(deftype assault-roboguard (roboguard-city) + ((shoot-wait-time time-frame) + ) + (:state-methods + roll-initial + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + +;; definition for method 3 of type assault-roboguard +(defmethod inspect ((this assault-roboguard)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type roboguard-city inspect))) + (t9-0 this) + ) + (format #t "~2Tshoot-wait-time: ~D~%" (-> this shoot-wait-time)) + (label cfg-4) + this + ) + +;; definition of type assault-spydroid +(deftype assault-spydroid (spydroid) + () + ) + +;; definition for method 3 of type assault-spydroid +(defmethod inspect ((this assault-spydroid)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type spydroid inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type assault-flying-turret +(deftype assault-flying-turret (flying-turret) + () + ) + +;; definition for method 3 of type assault-flying-turret +(defmethod inspect ((this assault-flying-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type flying-turret inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type assault-crimson-guard +(deftype assault-crimson-guard (crimson-guard) + ((center-pos vector :inline) + ) + (:state-methods + wait-for-enemies + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + +;; definition for method 3 of type assault-crimson-guard +(defmethod inspect ((this assault-crimson-guard)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type crimson-guard inspect))) + (t9-0 this) + ) + (format #t "~2Tcenter-pos: #~%" (-> this center-pos)) + (label cfg-4) + this + ) + +;; definition of type assault-citizen-norm +(deftype assault-citizen-norm (citizen-norm) + ((center-pos vector :inline) + (min-flee-time time-frame) + ) + (:state-methods + flee-madly + flee-to-center + ) + (:methods + (go-from-behavior (_type_ assault-object-spawn-params) object :replace) + ) + ) + +;; definition for method 3 of type assault-citizen-norm +(defmethod inspect ((this assault-citizen-norm)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type citizen-norm inspect))) + (t9-0 this) + ) + (format #t "~2Tcenter-pos: #~%" (-> this center-pos)) + (format #t "~2Tmin-flee-time: ~D~%" (-> this min-flee-time)) + (label cfg-4) + this + ) + +;; definition for method 212 of type assault-metalhead-flitter +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod go-from-behavior ((this assault-metalhead-flitter) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate exit-transport (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (logclear! (-> self root status) (collide-status on-surface touch-surface impact-surface)) + ) + :trans (behavior () + (if (logtest? (-> self root status) (collide-status on-surface touch-surface impact-surface)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data 14) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post (behavior () + (enemy-falling-post) + ) + ) + +;; definition for method 212 of type assault-metalhead-grunt +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod go-from-behavior ((this assault-metalhead-grunt) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate exit-transport (assault-metalhead-grunt) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (logclear! (-> self root status) (collide-status on-surface touch-surface impact-surface)) + ) + :trans (behavior () + (if (logtest? (-> self root status) (collide-status on-surface touch-surface impact-surface)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data 11) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post (behavior () + (enemy-falling-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (assault-citizen-norm) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + ) + :code (behavior () + (let ((v1-1 (if (zero? (-> self hit-face)) + (-> self anim-get-up-front) + (-> self anim-get-up-back) + ) + ) + ) + (start-ragdoll self (the-as art-joint-anim (-> self draw art-group data v1-1))) + ) + (ja-no-eval :num! (seek! max (* 2.0 (-> self speed-scale)))) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (cond + ((enemy-method-109 self) + (go-die self) + ) + ((< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + (else + (go-virtual flee-to-center) + ) + ) + ) + ) + +;; definition for method 209 of type assault-citizen-norm +(defmethod get-run-anim ((this assault-citizen-norm)) + (if (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'flee) (= v1-3 'flee-to-center) (= v1-3 'flee-madly)) + ) + ) + (-> this anim-panic-run) + (-> this anim-run) + ) + ) + +;; definition for method 212 of type assault-citizen-norm +;; INFO: Used lq/sq +(defmethod go-from-behavior ((this assault-citizen-norm) (arg0 assault-object-spawn-params)) + (set! (-> this root trans quad) (-> arg0 position quad)) + (set! (-> this hit-points) + (the float (the int (lerp-scale-clamp 10.0 20.0 (the float (-> arg0 suck-level)) 4.0 12.0))) + ) + (set! (-> this attacker-info max-num-attackers) (the-as uint 1)) + (set! (-> this center-pos quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (set! (-> this min-flee-time) (-> arg0 flee-time)) + (go (method-of-object this flee-madly)) + ) + +;; failed to figure out what this is: +(defstate flee-to-center (assault-citizen-norm) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let ((v1-8 (-> self nav))) + (set! (-> v1-8 target-speed) (* (-> self speed-scale) (-> self speed-run))) + ) + 0 + (let ((a0-3 (-> self nav state)) + (v1-11 (-> self center-pos)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-11 quad)) + ) + 0 + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self center-pos)) 16384.0) + (go-virtual cower-ground) + ) + ) + :code (behavior () + (citizen-travel-anim (the-as int (-> self draw art-group data (-> self anim-panic-run))) 30) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate flee-madly (assault-citizen-norm) + :virtual #t + :parent (assault-citizen-norm flee-to-center) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (-> self min-flee-time)) + (go-virtual flee-to-center) + ) + (let ((t9-1 vector-vector-xz-distance) + (a0-2 (-> self root trans)) + (a2-0 (-> self nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + (when (< (t9-1 a0-2 a1-0) 12288.0) + (let* ((gp-0 vector-rotate-around-y!) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 *x-vector*) + (f30-0 65536.0) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + (gp-1 (gp-0 s5-0 s4-0 (* f30-0 (+ -1.0 (the-as float v1-14))))) + ) + (let* ((s5-1 gp-1) + (s4-1 (-> self center-pos)) + (s3-0 gp-1) + (f30-1 8192.0) + (f28-0 40960.0) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (vector+float*! s5-1 s4-1 s3-0 (+ f30-1 (* f28-0 (+ -1.0 (the-as float v1-20))))) + ) + (let ((v1-23 (-> self nav state))) + (logclear! (-> v1-23 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-23 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-23 target-pos quad) (-> gp-1 quad)) + ) + ) + 0 + ) + ) + ) + ) + +;; definition for method 82 of type assault-citizen-norm +(defmethod event-handler ((this assault-citizen-norm) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((a0-3 (find-offending-process-focusable arg0 (the-as attack-info (-> arg3 param 1))))) + (if (!= (-> a0-3 type) target) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate cower-ground (assault-citizen-norm) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (if (enemy-method-109 self) + (go-virtual die) + ) + ) + :code (behavior () + (local-vars (v1-40 enemy-flag) (v1-42 enemy-flag) (v1-44 enemy-flag)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self info anim-cover-head-start)) + :num! (seek! max (-> self speed-scale)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed-scale))) + ) + (let ((v1-29 (-> self root root-prim))) + (set! (-> v1-29 prim-core collide-as) (collide-spec)) + (set! (-> v1-29 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self enemy-flags) (enemy-flag vulnerable)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (let ((v1-39 (-> self enemy-flags))) + (if (logtest? v1-39 (enemy-flag vulnerable-backup)) + (set! v1-40 (logior v1-39 (enemy-flag vulnerable))) + (set! v1-40 (logclear v1-39 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-40) + (let ((v1-41 (-> self enemy-flags))) + (if (logtest? v1-41 (enemy-flag attackable-backup)) + (set! v1-42 (logior v1-41 (enemy-flag attackable))) + (set! v1-42 (logclear v1-41 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-42) + (let ((v1-43 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-43) + (set! v1-44 (logior (enemy-flag trackable) v1-43)) + (set! v1-44 (logclear v1-43 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-44) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (let ((v1-50 (-> self root root-prim))) + (set! (-> v1-50 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-50 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logand! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + (until #f + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 frame-group) + (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + ) + (set! (-> gp-0 param 0) + (the float + (+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + frames + num-frames + ) + -1 + ) + ) + ) + (let* ((f30-0 0.1) + (f28-0 0.20000002) + (v1-74 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-75 (the-as number (logior #x3f800000 v1-74))) + ) + (set! (-> gp-0 param 1) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-75))))) + ) + (set! (-> gp-0 frame-num) 0.0) + (joint-control-channel-group! + gp-0 + (the-as art-joint-anim (-> self draw art-group data (-> self info anim-cover-head-loop))) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((gp-1 (-> self skel root-channel 0))) + (set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1))) + (let* ((f30-1 0.1) + (f28-1 0.20000002) + (v1-91 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-92 (the-as number (logior #x3f800000 v1-91))) + ) + (set! (-> gp-1 param 1) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-92))))) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ) + #f + ) + ) + +;; definition for method 212 of type assault-roboguard +;; INFO: Used lq/sq +(defmethod go-from-behavior ((this assault-roboguard) (arg0 assault-object-spawn-params)) + (case (-> arg0 behavior) + ((6) + (set! (-> this root trans quad) (-> arg0 position quad)) + (go (method-of-object this exit-transport)) + ) + (else + (set! (-> this move-dest quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (go (method-of-object this roll-initial)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile-stand (assault-roboguard) + :virtual #t + :trans (behavior () + (local-vars (v0-5 enemy-flag)) + (let ((v1-1 (roboguard-city-method-236 self))) + (cond + ((= v1-1 4) + (go-virtual close-attack) + ) + ((= v1-1 5) + (if (time-elapsed? (-> self shoot-wait-time) (seconds 2)) + (go-virtual shoot-attack) + ) + ) + ((= v1-1 1) + (go-virtual roll-enter) + ) + ((zero? v1-1) + (if (time-elapsed? (-> self state-time) (-> self reaction-time)) + (go-virtual hostile) + ) + ) + ) + ) + (let ((v1-23 (-> self enemy-flags))) + (if (logtest? v1-23 (enemy-flag vulnerable-backup)) + (set! v0-5 (logior v1-23 (enemy-flag vulnerable))) + (set! v0-5 (logclear v1-23 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v0-5) + ) + ) + +;; failed to figure out what this is: +(defstate shoot-attack (assault-roboguard) + :virtual #t + :exit (behavior () + (set-time! (-> self shoot-wait-time)) + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate roll-initial (assault-roboguard) + :virtual #t + :enter (behavior () + (let ((a0-0 (new 'stack-no-clear 'vector))) + (set! (-> a0-0 quad) + (-> (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)) quad) + ) + (set! (-> a0-0 y) 0.0) + (let ((a1-3 (vector-normalize! a0-0 1.0))) + (quaternion-look-at! (-> self root quat) a1-3 *up-vector*) + ) + ) + (let ((a0-2 (-> self nav state)) + (v1-5 (-> self move-dest)) + ) + (logclear! (-> a0-2 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-2 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-2 target-pos quad) (-> v1-5 quad)) + ) + 0 + (nav-enemy-method-181 self) + (logior! (-> self flags) (citizen-flag in-pursuit)) + (if (not (logtest? (-> self squad alert-state flags) (squad-alert-flag war))) + (logior! (-> self flags) (citizen-flag persistent)) + ) + (let ((v1-18 (-> self nav))) + (set! (-> v1-18 acceleration) 16384.0) + ) + 0 + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((gp-0 (-> self nav state)) + (v1-28 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (set! (-> gp-0 heading quad) (-> v1-28 quad)) + ) + 0 + (let ((f30-0 81920.0)) + (let ((s5-0 (-> self nav state)) + (gp-2 (vector-float*! + (new 'stack-no-clear 'vector) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + f30-0 + ) + ) + ) + (set! (-> s5-0 velocity quad) (-> gp-2 quad)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 target-speed) f30-0) + ) + 0 + (set! (-> self nav state speed) f30-0) + ) + 0 + (let ((v1-42 (-> self nav))) + (set! (-> v1-42 turning-acceleration) 20480.0) + ) + 0 + (logior! (-> self robo-flags) (robo-flag r2)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (or (logtest? (-> self nav flags) (nav-control-flag ncf9)) + (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 32768.0) + ) + (set-time! (-> self shoot-wait-time)) + (go-virtual roll-exit) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data 13)) + (until #f + (let ((a0-4 (-> self skel root-channel 0))) + (let ((f0-0 0.000024414063) + (a2-0 (-> self nav state)) + (v1-7 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-7 quad) (-> a2-0 velocity quad)) + (set! (-> a0-4 param 0) (* f0-0 (sqrtf (+ (* (-> v1-7 x) (-> v1-7 x)) (* (-> v1-7 z) (-> v1-7 z)))))) + ) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-loop!) + ) + (suspend) + ) + #f + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-spydroid) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-flying-turret) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-roboguard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-crimson-guard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate in-ditch (assault-metalhead-predator) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-spydroid) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-flying-turret) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-roboguard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-crimson-guard) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-metalhead-flitter) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (assault-metalhead-predator) + :virtual #t + :enter (behavior () + (go-inactive self) + ) + ) + +;; definition for function assault-type->type +(defun assault-type->type ((arg0 assault-target-type)) + (case arg0 + (((assault-target-type guard-tazer) (assault-target-type guard-rifle) (assault-target-type guard-grenade)) + assault-crimson-guard + ) + (((assault-target-type assault-citizen-norm)) + assault-citizen-norm + ) + (((assault-target-type assault-grunt)) + assault-metalhead-grunt + ) + (((assault-target-type flitter)) + assault-metalhead-flitter + ) + (((assault-target-type assault-metalhead-predator)) + assault-metalhead-predator + ) + (((assault-target-type roboguard)) + assault-roboguard + ) + (((assault-target-type roboguard-giant)) + roboguard-city + ) + (((assault-target-type turret)) + assault-flying-turret + ) + (((assault-target-type other)) + assault-spydroid + ) + (else + (the-as type #f) + ) + ) + ) + +;; definition of type assault-cleanup +(deftype assault-cleanup (process) + ((offscreen-time time-frame) + (parent-hand handle) + ) + (:state-methods + tracking + ) + ) + +;; definition for method 3 of type assault-cleanup +(defmethod inspect ((this assault-cleanup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Toffscreen-time: ~D~%" (-> this offscreen-time)) + (format #t "~2Tparent-hand: ~D~%" (-> this parent-hand)) + (label cfg-4) + this + ) + +;; definition for function assault-cleanup-init-by-other +(defbehavior assault-cleanup-init-by-other assault-cleanup ((arg0 handle)) + (set! (-> self parent-hand) arg0) + (go-virtual tracking) + ) + +;; failed to figure out what this is: +(defstate tracking (assault-cleanup) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 5)) + (suspend) + ) + ) + (set-time! (-> self offscreen-time)) + (until #f + (suspend) + (let* ((gp-1 (handle->process (-> self parent-hand))) + (v1-10 (if (type? gp-1 process-focusable) + (the-as process-focusable gp-1) + ) + ) + ) + (cond + ((and v1-10 (not (logtest? (-> v1-10 focus-status) (focus-status disable dead inactive)))) + (if (not (or (not (logtest? (-> v1-10 draw status) (draw-control-status on-screen))) + (not (sphere-in-view-frustum? (the-as sphere (-> v1-10 root root-prim prim-core)))) + ) + ) + (set-time! (-> self offscreen-time)) + ) + (if (time-elapsed? (-> self offscreen-time) (seconds 3)) + (send-event (handle->process (-> self parent-hand)) 'traffic-off-force) + ) + ) + (else + (return 0) + ) + ) + ) + ) + #f + ) + ) + +;; definition for symbol *assault-levels*, type (array symbol) +(define *assault-levels* (new 'static 'boxed-array :type symbol :length 13 :allocated-length 19 + '#f + 'lctyass + 'ctypepa + 'ctypesa + 'ctypesa + 'ctypesa + 'ctypesb + 'ctypesb + 'ctypepb + 'ctypesc + 'ctypesc + 'ctypesc + 'ctypesc + ) + ) + +;; definition for function spawn-assault-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defun spawn-assault-enemy ((arg0 assault-target-type) (arg1 process)) + (let ((s5-0 (new 'stack 'assault-object-spawn-params)) + (s4-0 (assault-type->type arg0)) + ) + (if (not s4-0) + (return (the-as handle #f)) + ) + (quaternion-identity! (-> s5-0 rotation)) + (set! (-> s5-0 position quad) (-> (target-pos 0) quad)) + (set! (-> s5-0 lev) (-> *assault-levels* arg0)) + (set! (-> s5-0 velocity quad) (the-as uint128 0)) + (set! (-> s5-0 behavior) (the-as uint 1)) + (set! (-> s5-0 flags) (traffic-spawn-flags tsf0)) + (set! (-> s5-0 nav-branch) #f) + (set! (-> s5-0 guard-type) (the-as uint 0)) + (logior! (-> s5-0 flags) (traffic-spawn-flags tsf7)) + (let ((s4-1 (get-process *default-dead-pool* s4-0 #x4000 1))) + (the-as handle (ppointer->handle (when s4-1 + (let ((t9-5 (method-of-type process activate))) + (t9-5 s4-1 arg1 "assault-enemy" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 assault-enemy-init-by-other s5-0) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + ) + +;; definition for method 212 of type assault-crimson-guard +;; INFO: Used lq/sq +(defmethod go-from-behavior ((this assault-crimson-guard) (arg0 assault-object-spawn-params)) + (set! (-> this center-pos quad) (-> (the-as vector (-> arg0 user-data)) quad)) + (call-parent-method this arg0) + ) + +;; definition for method 194 of type assault-crimson-guard +;; WARN: Return type mismatch float vs none. +(defmethod citizen-method-194 ((this assault-crimson-guard)) + (call-parent-method this) + (set! (-> this hit-points) 10.0) + (none) + ) + +;; definition for method 196 of type assault-crimson-guard +(defmethod go-inactive ((this assault-crimson-guard)) + (with-pp + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'guard-death) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node city-port-assault-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + (call-parent-method this) + (none) + ) + ) + +;; definition for method 82 of type assault-crimson-guard +(defmethod event-handler ((this assault-crimson-guard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('weaken) + (set! (-> this hit-points) (fmin 1.0 (-> this hit-points))) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 59 of type assault-crimson-guard +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this assault-crimson-guard)) + (call-parent-method this) + (when (and (or (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (< 102400.0 (vector-vector-xz-distance (-> this root trans) (-> this center-pos))) + ) + (-> this next-state) + (= (-> this next-state name) 'hostile) + ) + (nav-enemy-method-177 this) + (add-debug-sphere #t (bucket-id debug) (-> this center-pos) (meters 2) *color-red*) + (go (method-of-object this active)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (assault-crimson-guard) + :virtual #t + :enter (behavior () + (logclear! (-> self flags) (citizen-flag in-pursuit hostile)) + (set! (-> self already-shot) #f) + (set! (-> self attacker-info callback) + (lambda ((arg0 assault-crimson-guard) (arg1 city-attacker-info)) + (let* ((s5-0 (handle->process (-> arg1 proc))) + (s4-0 (if (type? s5-0 process-focusable) + (the-as process-focusable s5-0) + ) + ) + (s5-1 (new 'stack 'sphere)) + ) + (set! (-> s5-1 quad) (-> s4-0 root root-prim prim-core world-sphere quad)) + (set! (-> s5-1 r) 409.6) + (the-as + int + (and (sphere-in-view-frustum? s5-1) (< (vector-vector-xz-distance s5-1 (-> arg0 center-pos)) 98304.0)) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let ((a0-5 (-> self nav state)) + (v1-12 (-> self center-pos)) + ) + (logclear! (-> a0-5 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-5 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-5 target-pos quad) (-> v1-12 quad)) + ) + 0 + ) + :trans (behavior () + (let ((gp-0 (-> self center-pos))) + 0.0 + (if (< (vector-vector-xz-distance (-> self root trans) gp-0) 40960.0) + (go-virtual wait-for-enemies) + ) + (when #f + (let ((a0-2 (the-as process-focusable (handle->process (-> self target-status handle))))) + (when a0-2 + (if (< (vector-vector-xz-distance (get-trans a0-2 0) gp-0) 102400.0) + (go-hostile self) + ) + ) + ) + ) + ) + ) + :code (behavior () + (citizen-travel-anim (the-as int (-> self draw art-group data (-> self enemy-info run-anim))) 300) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-enemies (assault-crimson-guard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((a0-3 (the-as process-focusable (handle->process (-> self target-status handle))))) + (when a0-3 + (if (< (vector-vector-xz-distance (get-trans a0-3 0) (-> self center-pos)) 122880.0) + (go-hostile self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max (-> self speed-scale)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed-scale))) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition of type special-health +(deftype special-health (health) + () + ) + +;; definition for method 3 of type special-health +(defmethod inspect ((this special-health)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type health inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 33 of type special-health +;; WARN: Return type mismatch vector vs none. +(defmethod initialize-allocations ((this special-health)) + (call-parent-method this) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (none) + ) + +;; definition for function special-health-init-by-other +;; INFO: Used lq/sq +(defbehavior special-health-init-by-other special-health ((arg0 vector)) + (set! (-> self pickup-amount) (-> *FACT-bank* health-default-inc)) + (set! (-> self pickup-type) (pickup-type health)) + (initialize-allocations self) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-effects self (-> self pickup-type)) + (initialize-options self 0 1024.0 (the-as fact-info #f)) + (update-transforms (-> self root)) + (logior! (-> self flags) (collectable-flag fadeout no-distance-check-fadeout)) + (set! (-> self fadeout-timeout) (seconds 5)) + (go-to-initial-state self) + ) + +;; definition of type ammo-special-pickup +(deftype ammo-special-pickup (process-focusable) + ((ammo-type pickup-type) + (gun-type pickup-type) + (collect-effect sparticle-launch-group) + (ammo-effect sparticle-launch-group) + (anim-index int32) + ) + (:state-methods + wait + pickup + ) + (:methods + (init-pickup (_type_ vector pickup-type pickup-type) object) + ) + ) + +;; definition for method 3 of type ammo-special-pickup +(defmethod inspect ((this ammo-special-pickup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tammo-type: ~D~%" (-> this ammo-type)) + (format #t "~2Tgun-type: ~D~%" (-> this gun-type)) + (format #t "~2Tcollect-effect: ~A~%" (-> this collect-effect)) + (format #t "~2Tammo-effect: ~A~%" (-> this ammo-effect)) + (format #t "~2Tanim-index: ~D~%" (-> this anim-index)) + (label cfg-4) + this + ) + +;; definition for function ammo-special-pickup-init-by-other +(defbehavior ammo-special-pickup-init-by-other ammo-special-pickup ((arg0 pickup-type) (arg1 pickup-type)) + (stack-size-set! (-> self main-thread) 128) + (let ((a2-0 (gun->ammo arg1))) + (if (= a2-0 (pickup-type none)) + (set! a2-0 arg1) + ) + (init-pickup self (the-as vector arg0) a2-0 arg1) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-ammo-special-gun gun gun-lod0-jg -1 + ((gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :sort 1 + :origin-joint-index 3 + ) + +;; definition for method 30 of type ammo-special-pickup +;; INFO: Used lq/sq +(defmethod init-pickup ((this ammo-special-pickup) (arg0 vector) (arg1 pickup-type) (arg2 pickup-type)) + (with-pp + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s2-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s2-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s2-0 reaction) cshape-reaction-default) + (set! (-> s2-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-8 local-sphere) 0.0 3276.8 0.0 6553.6) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-8) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-11 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s2-0) + ) + (set! (-> this root trans quad) (-> arg0 quad)) + (set! (-> this ammo-type) arg1) + (set! (-> this gun-type) arg2) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) (rand-vu-float-range 0.0 65536.0)) + (case (-> this ammo-type) + (((pickup-type ammo-yellow)) + (set! (-> this collect-effect) (-> *part-group-id-table* 136)) + ) + (((pickup-type ammo-red)) + (set! (-> this collect-effect) (-> *part-group-id-table* 137)) + ) + (((pickup-type ammo-blue)) + (set! (-> this collect-effect) (-> *part-group-id-table* 138)) + ) + (((pickup-type ammo-dark)) + (set! (-> this collect-effect) (-> *part-group-id-table* 139)) + ) + (((pickup-type eco-pill-dark)) + (set! (-> this collect-effect) (-> *part-group-id-table* 140)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 128) this)) + ) + ) + (case (-> this ammo-type) + (((pickup-type ammo-red) (pickup-type ammo-yellow) (pickup-type ammo-blue) (pickup-type ammo-dark)) + (set! (-> pp level) (-> *target* level)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-special-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-push! 1 0) + (let ((a1-15 (cond + ((= arg2 (pickup-type gun-yellow-1)) + (-> this draw art-group data 19) + ) + ((= arg2 (pickup-type gun-yellow-2)) + (-> this draw art-group data 20) + ) + ((= arg2 (pickup-type gun-yellow-3)) + (-> this draw art-group data 21) + ) + ((= arg2 (pickup-type gun-red-1)) + (-> this draw art-group data 13) + ) + ((= arg2 (pickup-type gun-red-2)) + (-> this draw art-group data 14) + ) + ((= arg2 (pickup-type gun-red-3)) + (-> this draw art-group data 15) + ) + ((= arg2 (pickup-type gun-blue-1)) + (-> this draw art-group data 22) + ) + ((= arg2 (pickup-type gun-blue-2)) + (-> this draw art-group data 23) + ) + ((= arg2 (pickup-type gun-blue-3)) + (-> this draw art-group data 24) + ) + ((= arg2 (pickup-type gun-dark-2)) + (-> this draw art-group data 17) + ) + ((= arg2 (pickup-type gun-dark-3)) + (-> this draw art-group data 18) + ) + (else + (-> this draw art-group data 16) + ) + ) + ) + (a0-30 (-> this skel root-channel 0)) + ) + (set! (-> a0-30 frame-group) (the-as art-joint-anim a1-15)) + (joint-control-channel-group-eval! a0-30 (the-as art-joint-anim a1-15) num-func-identity) + ) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + ) + ) + (case (-> this ammo-type) + (((pickup-type ammo-yellow)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 164)) + ) + (((pickup-type ammo-red)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 158)) + ) + (((pickup-type ammo-blue)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 154)) + ) + (((pickup-type ammo-dark)) + (set! (-> this ammo-effect) (-> *part-group-id-table* 129)) + ) + ) + (update-transforms (-> this root)) + (go (method-of-object this wait)) + ) + ) + +;; failed to figure out what this is: +(defstate wait (ammo-special-pickup) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (when (and (or (= message 'touch) (= message 'attack)) + (not (and (-> self next-state) (= (-> self next-state name) 'pickup))) + ) + (process-contact-action proc) + (go-virtual pickup) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + (when (nonzero? (-> self draw)) + (let* ((f1-2 (lerp-scale-clamp 0.0 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))) 3.0 5.0)) + (f0-3 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint (the int (lerp 128.0 0.0 f0-3)))) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go empty-state) + ) + ) + :code sleep-code + :post (behavior () + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 40049.777 (seconds-per-frame))) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate pickup (ammo-special-pickup) + :virtual #t + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (if (nonzero? (-> self draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (sound-play "ammo-pickup") + (send-event (ppointer->process (-> self parent)) 'ammo-special (-> self ammo-type) (-> self gun-type)) + (when (nonzero? (-> self collect-effect)) + (cond + ((logtest? (-> self collect-effect flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *target* + :group (-> self collect-effect) + :callback part-tracker-track-target + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn + part-tracker + :to *target* + :group (-> self collect-effect) + :callback part-tracker-track-target + ) + ) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (go empty-state) + ) + ) + +;; definition of type assault-bombbot +(deftype assault-bombbot (bombbot) + ((next-node int32) + (new-point-choose-time time-frame) + (max-hp float :offset 1532) + (is-final? symbol) + (last-charge-player-count uint32) + (suck-level int32) + ) + (:methods + (assault-bombbot-method-209 (_type_) int) + ) + ) + +;; definition for method 3 of type assault-bombbot +(defmethod inspect ((this assault-bombbot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bombbot inspect))) + (t9-0 this) + ) + (format #t "~2Tnext-node: ~D~%" (-> this next-node)) + (format #t "~2Tnew-point-choose-time: ~D~%" (-> this new-point-choose-time)) + (format #t "~2Tattacker-info: #~%" (-> this attacker-info)) + (format #t "~2Tmax-hp: ~f~%" (-> this max-hp)) + (format #t "~2Tis-final?: ~A~%" (-> this is-final?)) + (format #t "~2Tlast-charge-player-count: ~D~%" (-> this last-charge-player-count)) + (format #t "~2Tsuck-level: ~D~%" (-> this suck-level)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate explode (assault-bombbot) + :virtual #t + :enter (behavior () + (send-event (ppointer->process (-> self parent)) 'bombbot-death) + (let ((gp-0 (new 'stack 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 409600.0) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-11 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-11 + (let* ((s3-1 (-> v1-11 process)) + (a0-9 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when a0-9 + (if (and a0-9 (logtest? (process-mask guard) (-> a0-9 mask)) (not (logtest? (process-mask enemy) (-> a0-9 mask)))) + (send-event + a0-9 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 *target*) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 r))) + (if (and s5-1 (logtest? (process-mask guard) (-> s5-1 mask)) (not (logtest? (process-mask enemy) (-> s5-1 mask)))) + (send-event + s5-1 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + ) + (let ((t9-11 (-> (find-parent-state) enter))) + (if t9-11 + (t9-11) + ) + ) + ) + ) + +;; definition for method 59 of type assault-bombbot +(defmethod enemy-common-post ((this assault-bombbot)) + (call-parent-method this) + (none) + ) + +;; definition of type assault-bombbot-spawn-params +(deftype assault-bombbot-spawn-params (bombbot-spawn-params) + ((is-final? symbol) + (suck-level int32) + ) + ) + +;; definition for method 3 of type assault-bombbot-spawn-params +(defmethod inspect ((this assault-bombbot-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-bombbot-spawn-params) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~1Tpath: #~%" (-> this path)) + (format #t "~1Tfirst-node: ~D~%" (-> this first-node)) + (format #t "~1Tstop-offset: ~f~%" (-> this stop-offset)) + (format #t "~1Tis-final?: ~A~%" (-> this is-final?)) + (format #t "~1Tsuck-level: ~D~%" (-> this suck-level)) + (label cfg-4) + this + ) + +;; definition for function assault-bombbot-init-by-other +(defbehavior assault-bombbot-init-by-other assault-bombbot ((arg0 assault-bombbot-spawn-params)) + (set! (-> self is-final?) (-> arg0 is-final?)) + (set! (-> self suck-level) (-> arg0 suck-level)) + (bombbot-init-by-other arg0) + ) + +;; definition for method 121 of type assault-bombbot +;; WARN: Return type mismatch float vs none. +(defmethod init-enemy! ((this assault-bombbot)) + (with-pp + (set! (-> pp level) (level-get *level* 'lctyass)) + (call-parent-method this) + (cond + ((-> this is-final?) + (set! (-> this max-hp) 61.0) + ) + (else + 0.0 + (let* ((f1-0 (lerp-scale-clamp 1.0 0.5 (the float (-> this suck-level)) 5.0 10.0)) + (f0-5 (fmax 0.0 (fmin 1.0 f1-0))) + ) + (set! (-> this max-hp) (* 250.0 f0-5)) + ) + (format 0 "Max hp ~f~%" (-> this max-hp)) + ) + ) + (set! (-> this hit-points) (-> this max-hp)) + (none) + ) + ) + +;; definition for method 205 of type assault-bombbot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod bombbot-method-205 ((this assault-bombbot)) + (when (= (-> this nav state mesh) *default-nav-mesh*) + (let ((a0-4 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when a0-4 + (change-to a0-4 this) + (dotimes (s5-0 4) + (let ((s4-0 (-> this feet s5-0))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-orient-by-quat! s3-0 (-> s4-0 pos-offset) (-> this root quat)) + (vector+! s3-0 s3-0 (-> this root trans)) + (set! (-> s4-0 next-position quad) (-> s3-0 quad)) + (set! (-> s4-0 position quad) (-> s3-0 quad)) + ) + (set! (-> s4-0 delta-y) 0.0) + ) + (set! (-> this legs-strength s5-0) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type assault-bombbot-shot +(deftype assault-bombbot-shot (bombbot-shot) + () + ) + +;; definition for method 3 of type assault-bombbot-shot +(defmethod inspect ((this assault-bombbot-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bombbot-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-assault-bombbot-shot-color-blue* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-assault-bombbot-shot-width* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.5 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *assault-bombbot-trail*) (!= loading-level global)) + (set! *assault-bombbot-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* color-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* alpha-2-mode) (the-as uint 6)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* alpha-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* width-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* base-width) 819.2) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* width-repeat-dist) 8192.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* uv-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* uv-repeat-dist) 4096000.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* max-age) (seconds 0.1)) + +;; failed to figure out what this is: +(if #f + (set! (-> *assault-bombbot-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *assault-bombbot-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* width-curve) (the-as curve2d-piecewise *curve-assault-bombbot-shot-width*)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-white*)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* alpha-curve-2) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(if (or (zero? *assault-bombbot-trail-2*) (!= loading-level global)) + (set! *assault-bombbot-trail-2* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* color-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* alpha-2-mode) (the-as uint 6)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* alpha-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* width-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* base-width) 3276.8) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* width-repeat-dist) 8192.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* uv-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* uv-repeat-dist) 4096000.0) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* max-age) (seconds 0.1)) + +;; failed to figure out what this is: +(if #f + (set! (-> *assault-bombbot-trail-2* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *assault-bombbot-trail-2* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* width-curve) + (the-as curve2d-piecewise *curve-assault-bombbot-shot-width*) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* color-curve) + (the-as curve-color-piecewise *curve-assault-bombbot-shot-color-blue*) + ) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* alpha-curve-2) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *assault-bombbot-trail-2* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defpartgroup group-dummy-explode-assault-bombbot-explode + :id 1435 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4717 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 4718 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 4719 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 4717 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4718 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0) + (:b 128.0) + (:a 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4719 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for method 26 of type assault-bombbot-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this assault-bombbot-shot)) + (cond + ((logtest? (-> *part-group-id-table* 1435 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1435)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1435)) + ) + ) + ((method-of-type guard-shot projectile-method-26) this) + 0 + (none) + ) + +;; definition for method 31 of type assault-bombbot-shot +;; WARN: Return type mismatch symbol vs none. +(defmethod init-proj-settings! ((this assault-bombbot-shot)) + (call-parent-method this) + (let ((gp-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-0 tracked-obj) (process->handle this)) + (set! (-> gp-0 appearance) *assault-bombbot-trail*) + (set! (-> gp-0 max-num-crumbs) (the int (* 0.25 (the float (-> gp-0 appearance max-age))))) + (set! (-> gp-0 track-immediately?) #t) + (let* ((v1-11 (estimate-light-trail-mem-usage + (the-as uint (-> gp-0 max-num-crumbs)) + (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-11 8192) 1)) + (v1-12 (when s5-1 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s5-1 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-0) + (-> s5-1 ppointer) + ) + ) + ) + (if v1-12 + (-> v1-12 0 self) + ) + ) + (set! (-> gp-0 appearance) *assault-bombbot-trail-2*) + (let* ((v1-20 (estimate-light-trail-mem-usage + (the-as uint (-> gp-0 max-num-crumbs)) + (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + ) + ) + (s5-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-20 8192) 1)) + (v1-21 (when s5-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s5-2 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 light-trail-tracker-init-by-other gp-0) + (-> s5-2 ppointer) + ) + ) + ) + (if v1-21 + (-> v1-21 0 self) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type assault-bombbot-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this assault-bombbot-shot)) + 0 + (none) + ) + +;; definition for method 206 of type assault-bombbot +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer projectile). +(defmethod fire-shot ((this assault-bombbot) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + 819200.0 + (let ((f0-1 2.0)) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 notify-handle) (process->handle this)) + (set! (-> gp-0 owner-handle) (the-as handle #f)) + (set! (-> gp-0 target-handle) (the-as handle #f)) + (set! (-> gp-0 target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 ignore-handle) (process->handle this)) + (let* ((a0-15 *game-info*) + (a2-12 (+ (-> a0-15 attack-id) 1)) + ) + (set! (-> a0-15 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) f0-1) + ) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 1.0) + ) + (the-as (pointer projectile) (spawn-projectile assault-bombbot-shot gp-0 this *default-dead-pool*)) + ) + ) + +;; definition for method 196 of type assault-bombbot +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod bombbot-method-196 ((this assault-bombbot) (arg0 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s4-0 *target*) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (gp-0 + (set! (-> this target-pos quad) (-> (get-trans gp-0 3) quad)) + (let ((v1-3 (-> this target-pos))) + (let ((a0-4 (-> gp-0 control trans))) + (let ((a1-4 (-> gp-0 control transv))) + (let ((a2-0 0.0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> v1-3 quad) vf6) + ) + (set! (-> this start-target-pos quad) (-> this target-pos quad)) + (set! (-> this start-target-vel quad) (-> gp-0 control transv quad)) + (try-update-focus (-> this focus) gp-0 this) + ) + (else + (clear-focused (-> this focus)) + ) + ) + ) + (none) + ) + ) + +;; definition for method 209 of type assault-bombbot +(defmethod assault-bombbot-method-209 ((this assault-bombbot)) + (local-vars (s4-1 object)) + (let ((s5-0 (rand-vu-int-count-excluding + (the-as int (+ (-> this city-path node-count) -1)) + (the-as int (-> this current-node)) + ) + ) + ) + (+! (-> this last-charge-player-count) 1) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when (or (not (and (if (type? s4-0 process-focusable) + s4-0 + ) + (begin + (let* ((s4-2 #t) + (s3-0 (handle->process (-> this focus handle))) + (v1-13 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s3-0 process-focusable) + (the-as process-focusable s3-0) + ) + ) + focus-status + ) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (cmove-#f-nonzero s4-1 v1-13 s4-2) + ) + s4-1 + ) + ) + ) + (logtest? (-> this last-charge-player-count) 1) + ) + (set! s5-0 s5-0) + (goto cfg-36) + ) + ) + (let ((s4-4 (vector-! (new 'stack-no-clear 'vector) (-> this target-pos) (-> this root trans)))) + 0.0 + (set! (-> s4-4 y) 0.0) + (vector-normalize-ret-len! s4-4 1.0) + (let ((f30-0 0.3)) + (dotimes (s3-1 (the-as int (-> this city-path node-count))) + (when (!= s3-1 (-> this current-node)) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> this city-path node s3-1)) (-> this root trans)) + ) + ) + 0.0 + (set! (-> s2-1 y) 0.0) + (vector-normalize! s2-1 1.0) + (let ((f28-0 (vector-dot s4-4 s2-1))) + (when (and (< f30-0 f28-0) + (< 40960.0 (vector-vector-xz-distance (-> this root trans) (the-as vector (-> this city-path node s3-1)))) + ) + (set! f30-0 f28-0) + (set! s5-0 s3-1) + ) + ) + ) + ) + ) + ) + ) + (label cfg-36) + s5-0 + ) + ) + +;; definition for symbol *bombbot-bomb-hp-thresholds*, type (array float) +(define *bombbot-bomb-hp-thresholds* (new 'static 'boxed-array :type float 0.7 0.4)) + +;; failed to figure out what this is: +(defstate drop-bombs (assault-bombbot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self drop-num) (the-as uint 3)) + ) + ) + +;; definition for method 208 of type assault-bombbot +;; INFO: Used lq/sq +(defmethod bombbot-method-208 ((this assault-bombbot) (arg0 vector) (arg1 vector)) + (set! (-> arg1 quad) (-> this target-pos quad)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + 0.0 + (let* ((f0-1 (vector-normalize-ret-len! s4-1 1.0)) + (f0-2 (fmin 30720.0 f0-1)) + ) + (vector+float*! arg1 arg0 s4-1 f0-2) + ) + ) + arg1 + ) + +;; definition for symbol *look-time*, type time-frame +(define *look-time* (seconds 4)) + +;; failed to figure out what this is: +(defstate hostile (assault-bombbot) + :virtual #t + :enter (behavior () + (set! (-> self attacker-info) (allocate-attacker *cty-attack-controller*)) + (init! (-> self attacker-info) self 13) + (set! (-> self next-node) (the-as int (-> self current-node))) + (set-time! (-> self state-time)) + (set-time! (-> self stop-shoot)) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :exit (behavior () + (remove-attacker *cty-attack-controller* (-> self attacker-info)) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (not (-> self is-final?)) + (let ((f30-0 (/ (-> self hit-points) (-> self max-hp)))) + (when (time-elapsed? (-> self stop-shoot) (seconds 6)) + (dotimes (gp-0 (-> *bombbot-bomb-hp-thresholds* length)) + (if (and (>= (-> *bombbot-bomb-hp-thresholds* gp-0) f30-0) + (>= f30-0 (+ -0.1 (-> *bombbot-bomb-hp-thresholds* gp-0))) + ) + (go-virtual drop-bombs) + ) + ) + ) + ) + ) + (when (< (-> self next-target) (current-time)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 w) 204800.0) + (bombbot-method-196 self a1-0) + ) + (set! (-> self next-target) (+ (current-time) (seconds 8))) + (set! (-> self gun-type) (the-as uint 0)) + 0 + ) + (let ((v1-33 (the-as process-focusable (handle->process (-> self focus handle))))) + (when v1-33 + (when (< (current-time) (+ (-> self next-target) (seconds -2))) + (set-time! (-> self start-target)) + (set! (-> self start-target-pos quad) (-> v1-33 root trans quad)) + (set! (-> self start-target-vel quad) (-> v1-33 root transv quad)) + (vector-! (-> self target-delta) (-> v1-33 root trans) (-> self root trans)) + ) + (let ((a2-2 (-> self target-pos))) + (let ((a0-23 (-> self start-target-pos))) + (let ((a1-12 (-> self start-target-vel))) + (let ((a3-4 (* 0.0033333334 (the float (- (current-time) (-> self start-target)))))) + (.mov vf7 a3-4) + ) + (.lvf vf5 (&-> a1-12 quad)) + ) + (.lvf vf4 (&-> a0-23 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a2-2 quad) vf6) + ) + (if (= (-> v1-33 type) target) + (set! (-> self target-pos quad) (-> self start-target-pos quad)) + ) + (if (< (+ (-> self next-target) (seconds -1)) (current-time)) + (bombbot-method-197 self) + (bombbot-method-204 self) + ) + ) + ) + (bombbot-method-205 self) + (new 'stack-no-clear 'vector) + (let ((f0-8 (* 0.25 (+ (-> self feet 0 next-position y) + (-> self feet 1 next-position y) + (-> self feet 2 next-position y) + (-> self feet 3 next-position y) + ) + ) + ) + ) + (if (!= (-> self nav state mesh) *default-nav-mesh*) + (+! (-> self root trans y) (* 4.0 (seconds-per-frame) (- f0-8 (-> self root trans y)))) + ) + ) + (if (= (vector-length (-> self root transv)) 0.0) + (set-time! (-> self state-time)) + ) + (bombbot-method-202 self) + (bombbot-method-195 self) + ) + ) + :post (behavior () + (let ((v1-0 1200)) + (if (= (logand (-> self last-charge-player-count) 1) 1) + (set! v1-0 600) + ) + (when (and (time-elapsed? (-> self new-point-choose-time) v1-0) + (>= (+ (-> self next-target) (seconds -1)) (current-time)) + ) + (set! (-> self next-node) (assault-bombbot-method-209 self)) + (set-time! (-> self new-point-choose-time)) + ) + ) + (-> self current-node) + (let ((gp-0 (-> self next-node))) + (cond + ((= (-> self nav state mesh) *default-nav-mesh*) + (vector-v+! + (-> self root trans) + (-> self root trans) + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-0)) (-> self root trans)) + (-> *bombbot-nav-enemy-info* run-travel-speed) + ) + ) + (seek! (-> self root trans y) (-> self city-path node gp-0 position y) (* 16384.0 (seconds-per-frame))) + (enemy-common-post self) + (update-transforms (-> self root)) + ) + (else + (let ((v1-29 (-> self nav state)) + (a0-20 (-> self city-path node gp-0)) + ) + (logclear! (-> v1-29 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-29 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-29 target-pos quad) (-> a0-20 position quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-0))) 24576.0) + (set! (-> self current-node) (the-as uint gp-0)) + (set! (-> self next-node) (assault-bombbot-method-209 self)) + ) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-path_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-path_REF.gc new file mode 100644 index 0000000000..9188f8f6bc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-path_REF.gc @@ -0,0 +1,171 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *assault-rooms*, type (array assault-room) +(define *assault-rooms* (new 'static 'boxed-array :type assault-room :length 0 :allocated-length 5)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* length) (-> *assault-rooms* allocated-length)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 0) + (new 'static 'assault-room :center-pos (new 'static 'vector :x -240257.03 :y 36409.344 :z 5520792.5 :w 1.0)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 0 cam-info) (-> *assault-cams* 0)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 0 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80696344 :z 0.5906011) + :uvec (new 'static 'vector :x -0.36253208 :y 0.7894338 :z -0.49534297) + :fvec (new 'static 'vector :x -0.46624056 :y -0.61383563 :z -0.63704425) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x -190874.02 :y 106024.96 :z 5588420.0 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 30608.953 :dist1 40000.055) + :hoz-clip-dist 75502.086 + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 0 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x -320432.12 :y 39460.863 :z 5583748.0 :w 1.0) + (new 'static 'vector :x -157367.1 :y 35726.54 :z 5467749.0 :w 1.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 1) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 371519.1 :y 35597.105 :z 7164435.0 :w 1.0)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 1 cam-info) (-> *assault-cams* 1)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 1 collision) + (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.0033539534 :z 0.9999943) + :uvec (new 'static 'vector :x -0.8762458 :y 0.4818552 :z -0.0029389048) + :fvec (new 'static 'vector :x -0.4818526 :y -0.87625074 :z -0.0016161203) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 423746.75 :y 149545.38 :z 7161433.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 38132.883 :dist1 60766.504) + :hoz-clip-dist 84132.84 + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 1 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 451624.56 :y 37709.004 :z 7164598.5 :w 1.0) + (new 'static 'vector :x 314352.03 :y 35603.25 :z 7283629.0 :w 1.0) + (new 'static 'vector :x 319363.06 :y 35609.395 :z 7031069.5 :w 1.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 2) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 785399.4 :y 35733.504 :z 5553110.0 :w 1.0)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 2 cam-info) (-> *assault-cams* 2)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 2 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.91507846 :z -0.4032754) + :uvec (new 'static 'vector :x 0.34681395 :y 0.51030624 :z -0.7869609) + :fvec (new 'static 'vector :x 0.20579405 :y -0.8599926 :z -0.46697044) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 754367.3 :y 136454.14 :z 5612391.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 34730.176 :dist1 57014.51) + :hoz-clip-dist 76124.41 + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 2 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 784477.8 :y 35810.508 :z 5431458.0 :w 1.0) + (new 'static 'vector :x 684347.0 :y 35715.89 :z 5563923.0 :w 1.0) + (new 'static 'vector :x 882867.8 :y 36161.125 :z 5581003.0 :w 1.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 3) + (new 'static 'assault-room :center-pos (new 'static 'vector :x 1754726.0 :y 35726.95 :z 5489334.5 :w 1.0)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 3 cam-info) (-> *assault-cams* 3)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 3 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.80724764 :z -0.59021246) + :uvec (new 'static 'vector :x 0.4939913 :y 0.54724586 :z -0.67564356) + :fvec (new 'static 'vector :x 0.32299143 :y -0.8369716 :z -0.44176307) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x 1701028.2 :y 180959.23 :z 5565024.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 51394.637 :dist1 87897.0) + :hoz-clip-dist 111438.664 + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 3 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 1655123.5 :y 35728.18 :z 5430803.0 :w 1.0) + (new 'static 'vector :x 1852997.2 :y 35795.76 :z 5552741.0 :w 1.0) + (new 'static 'vector :x 1711406.8 :y 42685.234 :z 5560278.0 :w 1.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 4) + (new 'static 'assault-room :center-pos (new 'static 'vector :x -359565.3 :y 41573.17 :z 5346835.0 :w 1.0)) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 4 cam-info) (-> *assault-cams* 4)) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 4 collision) (new 'static 'assault-room-collision + :cam-matrix (new 'static 'matrix + :rvec (new 'static 'vector :x -0.8088231 :z 0.58805186) + :uvec (new 'static 'vector :x -0.42552334 :y 0.69020355 :z -0.5852767) + :fvec (new 'static 'vector :x -0.4058755 :y -0.7236152 :z -0.5582527) + :trans (new 'static 'vector :w 1.0) + ) + :cam-pos (new 'static 'vector :x -311586.9 :y 110922.0 :z 5417229.5 :w 1.0) + :clip-dists (new 'static 'triangle-dists :dist0 29167.535 :dist1 61501.04) + :hoz-clip-dist 59058.156 + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-rooms* 4 node-positions) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x -318851.9 :y 40452.914 :z 5403400.5 :w 1.0) + (new 'static 'vector :x -350418.94 :y 43542.938 :z 5425846.5 :w 1.0) + (new 'static 'vector :x -292352.4 :y 42613.145 :z 5385706.5 :w 1.0) + (new 'static 'vector :x -426024.56 :y 43729.305 :z 5323487.5 :w 1.0) + (new 'static 'vector :x -350490.22 :y 43717.02 :z 5272411.0 :w 1.0) + (new 'static 'vector :x -326335.7 :y 43717.02 :z 5312429.0 :w 1.0) + (new 'static 'vector :x -406911.38 :y 43717.02 :z 5361293.5 :w 1.0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-script_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-script_REF.gc new file mode 100644 index 0000000000..9be701b3d9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-script_REF.gc @@ -0,0 +1,1183 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *port-assault-speech*, type (array speech-info) +(define *port-assault-speech* + (new 'static 'boxed-array :type speech-info + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x1 :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x2 :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #x3 :probability 1.0) + (new 'static 'speech-instance :speech #x4 :probability 1.0) + (new 'static 'speech-instance :speech #x5 :probability 1.0) + (new 'static 'speech-instance :speech #x6 :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #x7 :probability 1.0) + (new 'static 'speech-instance :speech #x8 :probability 1.0) + (new 'static 'speech-instance :speech #x9 :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xa :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xb :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #xc :probability 1.0) + (new 'static 'speech-instance :speech #xb :probability 1.0) + ) + :flags (speech-info-flag si5) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #xd :probability 1.0)) + :flags (speech-info-flag si0) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance + (new 'static 'speech-instance :speech #xe :probability 1.0) + (new 'static 'speech-instance :speech #xf :probability 1.0) + (new 'static 'speech-instance :speech #x10 :probability 1.0) + (new 'static 'speech-instance :speech #x11 :probability 1.0) + ) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x12 :probability 1.0)) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x145 :probability 1.0)) + :flags (speech-info-flag si8) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x13 :probability 1.0)) + ) + (new 'static 'speech-info + :speeches (new 'static 'boxed-array :type speech-instance (new 'static 'speech-instance :speech #x15 :probability 1.0)) + ) + ) + ) + +;; definition of type assault-spawn-cmd +(deftype assault-spawn-cmd (structure) + ((spawn-delay time-frame) + (command assault-cmd) + (spawn-type assault-cmd-spawn-type) + (count int8) + (spawner-index int8) + (wait-type assault-cmd-wait-type :overlay-at spawn-type) + (faction-type assault-cmd-faction-type :overlay-at spawner-index) + (wait-time time-frame :overlay-at spawn-delay) + (msg symbol) + (path-id int32) + (event0 int32) + (event1 int32) + (event2 int32) + (speech-type assault-cmd-speech-type) + (gun-pickup-type int32) + ) + ) + +;; definition for method 3 of type assault-spawn-cmd +(defmethod inspect ((this assault-spawn-cmd)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-spawn-cmd) + (format #t "~1Tspawn-delay: ~D~%" (-> this spawn-delay)) + (format #t "~1Tcommand: ~D~%" (-> this command)) + (format #t "~1Tspawn-type: ~D~%" (-> this spawn-type)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tspawner-index: ~D~%" (-> this spawner-index)) + (format #t "~1Twait-type: ~D~%" (-> this wait-type)) + (format #t "~1Tfaction-type: ~D~%" (-> this faction-type)) + (format #t "~1Twait-time: ~D~%" (-> this spawn-delay)) + (format #t "~1Tmsg: ~A~%" (-> this msg)) + (format #t "~1Tpath-id: ~D~%" (-> this path-id)) + (format #t "~1Tevent0: ~D~%" (-> this event0)) + (format #t "~1Tevent1: ~D~%" (-> this event1)) + (format #t "~1Tevent2: ~D~%" (-> this event2)) + (format #t "~1Tspeech-type: ~D~%" (-> this speech-type)) + (format #t "~1Tgun-pickup-type: ~D~%" (-> this gun-pickup-type)) + (label cfg-4) + this + ) + +;; definition of type room-powerup-percentage +(deftype room-powerup-percentage (structure) + ((avg-spawn-rate uint64) + (percentages float 51) + (red2 float :overlay-at (-> percentages 27)) + (red3 float :overlay-at (-> percentages 28)) + (yellow2 float :overlay-at (-> percentages 30)) + (yellow3 float :overlay-at (-> percentages 31)) + (blue1 float :overlay-at (-> percentages 32)) + (blue2 float :overlay-at (-> percentages 33)) + (blue3 float :overlay-at (-> percentages 34)) + (darkjak float :overlay-at (-> percentages 7)) + (lightjak float :overlay-at (-> percentages 14)) + (health float :overlay-at (-> percentages 20)) + ) + ) + +;; definition for method 3 of type room-powerup-percentage +(defmethod inspect ((this room-powerup-percentage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'room-powerup-percentage) + (format #t "~1Tavg-spawn-rate: ~D~%" (-> this avg-spawn-rate)) + (format #t "~1Tpercentages[51] @ #x~X~%" (-> this percentages)) + (format #t "~1Tred2: ~f~%" (-> this red2)) + (format #t "~1Tred3: ~f~%" (-> this red3)) + (format #t "~1Tyellow2: ~f~%" (-> this yellow2)) + (format #t "~1Tyellow3: ~f~%" (-> this yellow3)) + (format #t "~1Tblue1: ~f~%" (-> this blue1)) + (format #t "~1Tblue2: ~f~%" (-> this blue2)) + (format #t "~1Tblue3: ~f~%" (-> this blue3)) + (format #t "~1Tdarkjak: ~f~%" (-> this darkjak)) + (format #t "~1Tlightjak: ~f~%" (-> this lightjak)) + (format #t "~1Thealth: ~f~%" (-> this health)) + (label cfg-4) + this + ) + +;; definition of type assault-cmd-context +(deftype assault-cmd-context (structure) + ((start-time time-frame) + (state-time time-frame) + (current-command assault-spawn-cmd :inline) + (script pair) + ) + ) + +;; definition for method 3 of type assault-cmd-context +(defmethod inspect ((this assault-cmd-context)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-cmd-context) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tstate-time: ~D~%" (-> this state-time)) + (format #t "~1Tcurrent-command: #~%" (-> this current-command)) + (format #t "~1Tscript: ~A~%" (-> this script)) + (label cfg-4) + this + ) + +;; definition for symbol *assault-object-count*, type (array int32) +(define *assault-object-count* + (new 'static 'boxed-array :type int32 :length 15 :allocated-length 19 0 5 0 8 0 0 6 12 0 6 0 15 0 1 0) + ) + +;; definition for symbol *assault-fade-dist*, type (array float) +(define *assault-fade-dist* (new 'static 'boxed-array :type float :length 14 :allocated-length 19 + 0.0 + 0.0 + 0.0 + 409600.0 + 409600.0 + 409600.0 + 368640.0 + 245760.0 + 245760.0 + 409600.0 + 245760.0 + 245760.0 + 491520.0 + 0.0 + ) + ) + +;; definition for symbol *assault-graph-classification*, type (array int32) +(define *assault-graph-classification* + (new 'static 'boxed-array :type int32 :length 16 :allocated-length 19 -1 0 0 0 0 0 1 1 1 2 3 2 2 -1 -1 -1) + ) + +;; definition for symbol *assault-faction-lookup*, type (array uint8) +(define *assault-faction-lookup* (new 'static 'boxed-array :type uint8 :length 15 :allocated-length 19 + #x0 + #x2 + #x2 + #x2 + #x2 + #x2 + #x1 + #x1 + #x1 + #x3 + #x3 + #x3 + #x3 + #x3 + #x0 + ) + ) + +;; definition for symbol *assault-guard-count*, type (array int32) +(define *assault-guard-count* (new 'static 'boxed-array :type int32 0 2 0 0 0)) + +;; definition for symbol *assault-citizen-count*, type (array int32) +(define *assault-citizen-count* (new 'static 'boxed-array :type int32 0 0 3 0 0)) + +;; definition for function symbol->assault-target-type +;; WARN: Return type mismatch int vs assault-target-type. +(defun symbol->assault-target-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as assault-target-type (cond + ((= v1-0 'roboguard) + (the-as assault-target-type (assault-target-type roboguard)) + ) + ((= v1-0 'roboguard-giant) + (the-as assault-target-type (assault-target-type roboguard-giant)) + ) + ((= v1-0 'guard-rifle) + (the-as assault-target-type (assault-target-type guard-rifle)) + ) + ((= v1-0 'guard-tazer) + (the-as assault-target-type (assault-target-type guard-tazer)) + ) + ((= v1-0 'guard-grenade) + (the-as assault-target-type (assault-target-type guard-grenade)) + ) + ((= v1-0 'turret) + (the-as assault-target-type (assault-target-type turret)) + ) + ((= v1-0 'spydroid) + (the-as assault-target-type (assault-target-type other)) + ) + ((= v1-0 'flitter) + (the-as assault-target-type (assault-target-type flitter)) + ) + ((= v1-0 'bombbot) + (the-as assault-target-type (assault-target-type assault-bombbot)) + ) + ((= v1-0 'grunt) + (the-as assault-target-type (assault-target-type assault-grunt)) + ) + (else + (the-as assault-target-type (assault-target-type other)) + ) + ) + ) + ) + ) + +;; definition for function symbol->speech-type +;; WARN: Return type mismatch int vs assault-cmd-speech-type. +(defun symbol->speech-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as + assault-cmd-speech-type + (cond + ((= v1-0 'instructions) + (the-as assault-cmd-speech-type (assault-cmd-speech-type instructions)) + ) + ((= v1-0 'jak-hit) + (the-as assault-cmd-speech-type (assault-cmd-speech-type jak-hit)) + ) + ((= v1-0 'room-complete) + (the-as assault-cmd-speech-type (assault-cmd-speech-type room-complete)) + ) + ((= v1-0 'room-start) + (the-as assault-cmd-speech-type (assault-cmd-speech-type room-start)) + ) + ((= v1-0 'encouragement) + (the-as assault-cmd-speech-type (assault-cmd-speech-type encouragement)) + ) + ((= v1-0 'torn-watch-out) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-watch-out)) + ) + ((= v1-0 'guard-hello) + (the-as assault-cmd-speech-type (assault-cmd-speech-type guard-hello)) + ) + ((= v1-0 'guard-bombbot) + (the-as assault-cmd-speech-type (assault-cmd-speech-type guard-bombbot)) + ) + ((= v1-0 'protect-civilians) + (the-as assault-cmd-speech-type (assault-cmd-speech-type protect-civilians)) + ) + ((= v1-0 'grab-pickup) + (the-as assault-cmd-speech-type (assault-cmd-speech-type grab-pickup)) + ) + ((= v1-0 'torn-give-help) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-give-help)) + ) + ((= v1-0 'torn-finish) + (the-as assault-cmd-speech-type (assault-cmd-speech-type torn-finish)) + ) + (else + (the-as assault-cmd-speech-type (assault-cmd-speech-type encouragement)) + ) + ) + ) + ) + ) + +;; definition for function symbol->faction-type +;; WARN: Return type mismatch int vs assault-cmd-faction-type. +(defun symbol->faction-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as assault-cmd-faction-type (cond + ((= v1-0 'kg) + (the-as assault-cmd-faction-type (assault-cmd-faction-type kg)) + ) + ((= v1-0 'ff) + (the-as assault-cmd-faction-type (assault-cmd-faction-type ff)) + ) + ((= v1-0 'mh) + (the-as assault-cmd-faction-type (assault-cmd-faction-type mh)) + ) + (else + (the-as assault-cmd-faction-type (assault-cmd-faction-type kg)) + ) + ) + ) + ) + ) + +;; definition for function symbol->gun-pickup-type +;; WARN: Return type mismatch int vs pickup-type. +(defun symbol->gun-pickup-type ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as pickup-type (cond + ((= v1-0 'gun-red-1) + (the-as pickup-type (pickup-type gun-red-1)) + ) + ((= v1-0 'gun-red-2) + (the-as pickup-type (pickup-type gun-red-2)) + ) + ((= v1-0 'gun-red-3) + (the-as pickup-type (pickup-type gun-red-3)) + ) + ((= v1-0 'gun-yellow-1) + (the-as pickup-type (pickup-type gun-yellow-1)) + ) + ((= v1-0 'gun-yellow-2) + (the-as pickup-type (pickup-type gun-yellow-2)) + ) + ((= v1-0 'gun-yellow-3) + (the-as pickup-type (pickup-type gun-yellow-3)) + ) + ((= v1-0 'gun-blue-1) + (the-as pickup-type (pickup-type gun-blue-1)) + ) + ((= v1-0 'gun-blue-2) + (the-as pickup-type (pickup-type gun-blue-2)) + ) + ((= v1-0 'gun-blue-3) + (the-as pickup-type (pickup-type gun-blue-3)) + ) + ((= v1-0 'gun-dark-1) + (the-as pickup-type (pickup-type gun-dark-1)) + ) + ((= v1-0 'gun-dark-2) + (the-as pickup-type (pickup-type gun-dark-2)) + ) + ((= v1-0 'gun-dark-3) + (the-as pickup-type (pickup-type gun-dark-3)) + ) + ((= v1-0 'health) + (the-as pickup-type (pickup-type health)) + ) + ((= v1-0 'darkjak) + (the-as pickup-type (pickup-type eco-pill-dark)) + ) + (else + (the-as pickup-type (pickup-type none)) + ) + ) + ) + ) + ) + +;; definition for function parse-assault-command +;; WARN: Return type mismatch int vs object. +(defun parse-assault-command ((arg0 pair) (arg1 assault-spawn-cmd)) + (local-vars (v0-11 int)) + (case (ref arg0 0) + (('spawn) + (set! (-> arg1 command) (assault-cmd spawn)) + 0 + ) + (('queue) + (set! (-> arg1 command) (assault-cmd queue)) + ) + (('wait) + (set! (-> arg1 command) (assault-cmd wait)) + ) + (('advance) + (set! (-> arg1 command) (assault-cmd advance)) + ) + (('pickup) + (set! (-> arg1 command) (assault-cmd pickup)) + ) + (('torn) + (set! (-> arg1 command) (assault-cmd torn)) + (set! (-> arg1 msg) (the-as symbol (ref arg0 1))) + (set! (-> arg1 event0) 0) + (set! (-> arg1 event1) 1) + (set! (-> arg1 event2) 2) + (let ((a0-9 arg0)) + (when (>= ((method-of-type (rtype-of a0-9) length) a0-9) 3) + (set! (-> arg1 event0) (command-get-int (ref arg0 2) 0)) + (let ((a0-12 arg0)) + (when (>= ((method-of-type (rtype-of a0-12) length) a0-12) 4) + (set! (-> arg1 event1) (command-get-int (ref arg0 3) 0)) + (let ((a0-15 arg0)) + (if (>= ((method-of-type (rtype-of a0-15) length) a0-15) 5) + (set! (-> arg1 event2) (command-get-int (ref arg0 4) 0)) + ) + ) + ) + ) + ) + ) + (return (the-as object 0)) + ) + (('final-bombbot) + (set! (-> arg1 command) (assault-cmd final-bombbot)) + ) + (('load-continue) + (set! (-> arg1 command) (assault-cmd load-continue)) + ) + (('save-continue) + (set! (-> arg1 command) (assault-cmd save-continue)) + ) + (('speech) + (let* ((a0-23 (ref arg0 1)) + (s2-0 (symbol->speech-type (the-as symbol a0-23))) + ) + (speech-play *port-assault-speech* (the-as int s2-0) *assault-speech-list* (target-pos 0)) + ) + (set! (-> arg1 command) (assault-cmd speech)) + ) + (else + (set! (-> arg1 command) (assault-cmd other)) + (return (the-as object 0)) + ) + ) + (case (-> arg1 command) + (((assault-cmd spawn)) + (let ((a0-28 (ref arg0 1))) + (set! (-> arg1 spawn-type) + (the-as assault-cmd-spawn-type (symbol->assault-target-type (the-as symbol a0-28))) + ) + ) + (let ((a0-29 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-29) length) a0-29) 3) + (set! (-> arg1 count) (the-as int (/ (the-as int (ref arg0 2)) 8))) + (let ((a0-31 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-31) length) a0-31) 4) + (set! (-> arg1 spawner-index) (the-as int (/ (the-as int (ref arg0 3)) 8))) + (let ((a0-33 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-33) length) a0-33) 5) + (let ((f0-0 (command-get-float (ref arg0 4) 0.0))) + (set! v0-11 (the int (* 300.0 f0-0))) + ) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + (else + (set! v0-11 150) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + ) + ) + ) + (else + (set! v0-11 -1) + (set! (-> arg1 spawner-index) v0-11) + ) + ) + ) + ) + (else + (set! v0-11 1) + (set! (-> arg1 count) v0-11) + ) + ) + ) + v0-11 + ) + (((assault-cmd pickup)) + (let ((a0-38 arg0)) + (cond + ((>= ((method-of-type (rtype-of a0-38) length) a0-38) 2) + (let ((a0-40 (ref arg0 1))) + (set! v0-11 (the-as int (symbol->gun-pickup-type (the-as symbol a0-40)))) + ) + (set! (-> arg1 gun-pickup-type) v0-11) + v0-11 + ) + (else + (set! (-> arg1 gun-pickup-type) 0) + 0 + ) + ) + ) + ) + (((assault-cmd wait)) + (let ((s4-5 (ref arg0 1))) + (case s4-5 + (('time) + (set! (-> arg1 wait-type) (assault-cmd-wait-type spawn-delay)) + (let ((f0-3 (command-get-float (ref arg0 2) 0.0))) + (set! v0-11 (the int (* 300.0 f0-3))) + ) + (set! (-> arg1 spawn-delay) (the-as time-frame v0-11)) + ) + (('total) + (format 0 "Yes~%") + (set! (-> arg1 wait-type) (assault-cmd-wait-type cmd2)) + (set! v0-11 (the-as int (/ (the-as int (ref arg0 2)) 8))) + (set! (-> arg1 count) v0-11) + ) + (else + (format 0 "No~%") + (set! (-> arg1 wait-type) (assault-cmd-wait-type cmd1)) + (set! (-> arg1 spawner-index) (the-as int (symbol->faction-type (the-as symbol s4-5)))) + (set! v0-11 (the-as int (/ (the-as int (ref arg0 2)) 8))) + (set! (-> arg1 count) v0-11) + ) + ) + ) + v0-11 + ) + ) + ) + +;; definition for symbol *assault-bombbot-paths*, type (array bombbot-path) +(define *assault-bombbot-paths* + (new 'static 'boxed-array :type bombbot-path + (new 'static 'bombbot-path + :node-count #xe + :node (new 'static 'inline-array bombbot-node 14 + (new 'static 'bombbot-node) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1664327.6 :y 31580.16 :z 5487821.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1695375.4 :y 31580.16 :z 5511086.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1728061.5 :y 31580.16 :z 5529641.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1762836.5 :y 31580.16 :z 5548933.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1797898.2 :y 31662.08 :z 5559378.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1814814.8 :y 31662.08 :z 5542666.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1837875.2 :y 31703.04 :z 5514731.5)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1817108.5 :y 31703.04 :z 5498347.5)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1788928.0 :y 31621.12 :z 5476393.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1752514.5 :y 31621.12 :z 5443789.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1723473.9 :y 34119.68 :z 5425971.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1699717.1 :y 33751.04 :z 5425152.0)) + (new 'static 'bombbot-node :position (new 'static 'vector :x 1679523.9 :y 31621.12 :z 5452308.5)) + ) + ) + ) + ) + +;; definition for symbol *assault-scripts*, type (array pair) +(define *assault-scripts* (new 'static 'boxed-array :type pair :length 0 :allocated-length 5)) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* length) (-> *assault-scripts* allocated-length)) + +;; definition for symbol *room-goal*, type (array uint8) +(define *room-goal* (new 'static 'boxed-array :type uint8 #x0 #x0 #x2 #x0 #x0)) + +;; definition for symbol *room-powerups*, type (array room-powerup-percentage) +(define *room-powerups* + (new 'static 'boxed-array :type room-powerup-percentage + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 1.0 + 1.0 + 1.0 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1d4c :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.1 + 0.0 + 0.0 + 0.1 + 0.1 + 1.5 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.5 + 0.0 + 0.8 + 0.5 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1770 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.1 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + (new 'static 'room-powerup-percentage :avg-spawn-rate #x1194 :percentages (new 'static 'array float 51 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 1.0 + 1.0 + 1.0 + 1.1 + 0.7 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + ) + ) + ) + ) + +;; definition for symbol *room0-script*, type pair +(define *room0-script* '((speech instructions) + (wait time (new 'static 'bfloat :data 1.0)) + (load-continue) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait total 4) + (spawn spydroid 5 0) + (wait total 2) + (spawn roboguard 1) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn guard-tazer 1) + (spawn guard-tazer 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn spydroid 3 0) + (spawn spydroid 3 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 1) + (pickup gun-blue-1) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (wait total 0) + (wait time (new 'static 'bfloat :data 0.2)) + (spawn spydroid 4 0) + (spawn spydroid 4 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2 0) + (spawn spydroid 2 1) + (wait time (new 'static 'bfloat :data 2.0)) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.5)) + (advance) + (end) + ) + ) + +;; definition for symbol *room1-script*, type pair +(define *room1-script* '((save-continue) + (speech guard-hello) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn grunt 1 1) + (spawn grunt 1 2) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn flitter 4 0) + (wait total 4) + (spawn flitter 2 1) + (spawn flitter 2 2) + (spawn grunt 2) + (spawn grunt 2) + (wait total 3) + (spawn flitter 3 1) + (spawn flitter 3 0) + (spawn flitter 3 2) + (wait total 8) + (spawn grunt 1) + (spawn grunt 1) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn grunt 3) + (wait total 4) + (spawn flitter 2 0) + (spawn grunt 1) + (spawn grunt 1) + (wait total 1) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn grunt 1 1) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn grunt 1 1) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (spawn flitter 1 2) + (spawn flitter 1 0) + (spawn flitter 1 1) + (wait total 2) + (spawn grunt 1 0) + (spawn grunt 1 1) + (spawn grunt 1 2) + (spawn flitter 3 0) + (spawn flitter 3 1) + (spawn flitter 3 2) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.0)) + (advance) + (end) + ) + ) + +;; definition for symbol *room2-script*, type pair +(define *room2-script* '((save-continue) + (speech room-start) + (speech protect-civilians) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn spydroid 4) + (wait total 4) + (spawn flitter 4) + (spawn flitter 4) + (spawn flitter 4) + (wait total 6) + (spawn roboguard 1) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn grunt 1) + (spawn grunt 1) + (wait total 4) + (spawn spydroid 2) + (spawn spydroid 2) + (spawn spydroid 2) + (wait total 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (spawn grunt 1) + (wait total 3) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn spydroid 4) + (spawn flitter 3) + (spawn flitter 3) + (spawn flitter 3) + (wait time (new 'static 'bfloat :data 2.0)) + (pickup gun-red-2) + (wait time (new 'static 'bfloat :data 2.0)) + (spawn roboguard 1) + (spawn roboguard 1) + (spawn grunt 1) + (spawn grunt 1) + (wait total 0) + (spawn flitter 10 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 10 1 (new 'static 'bfloat :data 1.0)) + (wait total 4) + (spawn grunt 1 2) + (spawn roboguard 1 2) + (wait time (new 'static 'bfloat :data 2.5)) + (spawn flitter 5 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 5 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn grunt 1 2) + (spawn roboguard 1 2) + (wait total 4) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (spawn roboguard 1 2) + (spawn roboguard 1 0) + (spawn roboguard 1 1) + (spawn roboguard 1 2) + (wait total 0) + (speech room-complete) + (queue) + (wait time (new 'static 'bfloat :data 2.0)) + (advance) + (end) + ) + ) + +;; definition for symbol *room3-script*, type pair +(define *room3-script* '((save-continue) + (speech room-start) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn spydroid 4 0 (new 'static 'bfloat :data 0.3)) + (wait time (new 'static 'bfloat :data 1.0)) + (spawn bombbot 1 0) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn guard-rifle 1 1) + (wait time (new 'static 'bfloat :data 12.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 12.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 1 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 10.0)) + (spawn spydroid 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 10.0)) + (spawn spydroid 2 0 (new 'static 'bfloat :data 1.0)) + (spawn spydroid 2 1 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 7.0)) + (spawn guard-rifle 1 1) + (spawn spydroid 3 0) + (wait kg 0) + (pickup health) + (wait time (new 'static 'bfloat :data 1.0)) + (final-bombbot) + (spawn bombbot 1 0) + (wait time (new 'static 'bfloat :data 1.5)) + (speech torn-give-help) + (wait time (new 'static 'bfloat :data 1.5)) + (spawn guard-rifle 3 1 (new 'static 'bfloat :data 1.0)) + (spawn guard-rifle 3 0 (new 'static 'bfloat :data 1.0)) + (wait time (new 'static 'bfloat :data 1.5)) + (speech guard-bombbot) + (wait time (new 'static 'bfloat :data 1.5)) + (pickup health) + (spawn guard-rifle 127 1 (new 'static 'bfloat :data 2.0)) + (spawn guard-rifle 127 0 (new 'static 'bfloat :data 2.0)) + (wait time (new 'static 'bfloat :data 3.0)) + (pickup health) + (wait time (new 'static 'bfloat :data 3.0)) + (pickup health) + (wait kg 0) + (speech torn-finish) + (wait total 0) + (end) + (advance) + (end) + ) + ) + +;; definition for symbol *room4-script*, type pair +(define *room4-script* '((wait time (new 'static 'bfloat :data 1.0)) + (speech torn-watch-out) + (torn spot-assignment 15) + (torn free-to-move) + (wait time (new 'static 'bfloat :data 0.5)) + (torn spot-assignment 10) + (spawn spydroid 3 0) + (wait total 1) + (spawn spydroid 1 1) + (spawn spydroid 1 2) + (wait total 1) + (spawn spydroid 1 3) + (spawn spydroid 1 4) + (spawn spydroid 1 5) + (spawn spydroid 1 6) + (wait total 2) + (torn spot-assignment 4) + (spawn roboguard 1 0) + (spawn spydroid 3 1) + (spawn spydroid 3 2) + (wait total 1) + (spawn flitter 1 4) + (spawn flitter 1 6) + (spawn grunt 1 3) + (spawn grunt 1 5) + (wait total 0) + (torn spot-assignment 15) + (spawn roboguard 1 3) + (spawn roboguard 1 0) + (spawn grunt 1 1) + (spawn grunt 1 2) + (wait total 0) + (spawn roboguard 1 3) + (spawn roboguard 1 4) + (spawn roboguard 1 5) + (wait total 1) + (spawn grunt 1 0) + (wait total 0) + (wait time (new 'static 'bfloat :data 10.0)) + (end) + ) + ) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* 0) *room0-script*) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* 1) *room1-script*) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* 2) *room2-script*) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* 3) *room3-script*) + +;; failed to figure out what this is: +(set! (-> *assault-scripts* 4) *room4-script*) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-shared_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-shared_REF.gc new file mode 100644 index 0000000000..4e813d1876 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-shared_REF.gc @@ -0,0 +1,295 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type assault-cam-info +(deftype assault-cam-info (structure) + ((pos vector :inline) + (mat matrix :inline) + ) + ) + +;; definition for method 3 of type assault-cam-info +(defmethod inspect ((this assault-cam-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-cam-info) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tmat: #~%" (-> this mat)) + (label cfg-4) + this + ) + +;; definition of type triangle-dists +(deftype triangle-dists (structure) + ((dist0 float) + (dist1 float) + ) + ) + +;; definition for method 3 of type triangle-dists +(defmethod inspect ((this triangle-dists)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'triangle-dists) + (format #t "~1Tdist0: ~f~%" (-> this dist0)) + (format #t "~1Tdist1: ~f~%" (-> this dist1)) + (label cfg-4) + this + ) + +;; definition of type assault-room-collision +(deftype assault-room-collision (structure) + ((cam-matrix matrix :inline) + (cam-pos vector :inline) + (clip-dists triangle-dists :inline) + (hoz-clip-dist float) + ) + ) + +;; definition for method 3 of type assault-room-collision +(defmethod inspect ((this assault-room-collision)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-room-collision) + (format #t "~1Tcam-matrix: #~%" (-> this cam-matrix)) + (format #t "~1Tcam-pos: #~%" (-> this cam-pos)) + (format #t "~1Tclip-dists: #~%" (-> this clip-dists)) + (format #t "~1Thoz-clip-dist: ~f~%" (-> this hoz-clip-dist)) + (label cfg-4) + this + ) + +;; definition of type assault-room +(deftype assault-room (structure) + ((center-pos vector :inline) + (cam-info assault-cam-info) + (collision assault-room-collision) + (node-positions (array vector)) + ) + ) + +;; definition for method 3 of type assault-room +(defmethod inspect ((this assault-room)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-room) + (format #t "~1Tcenter-pos: #~%" (-> this center-pos)) + (format #t "~1Tcam-info: #~%" (-> this cam-info)) + (format #t "~1Tcollision: #~%" (-> this collision)) + (format #t "~1Tnode-positions: ~A~%" (-> this node-positions)) + (label cfg-4) + this + ) + +;; definition for symbol *assault-speech-list*, type (inline-array talker-speech-class) +(define *assault-speech-list* (new 'static 'inline-array talker-speech-class 22 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "torn102" + :channel (gui-channel voicebox) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn202" + :channel (gui-channel voicebox) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn122" + :channel (gui-channel voicebox) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn133" + :channel (gui-channel voicebox) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn203" + :channel (gui-channel voicebox) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn116" + :channel (gui-channel voicebox) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn192" + :channel (gui-channel voicebox) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn205" + :channel (gui-channel voicebox) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn198" + :channel (gui-channel voicebox) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn154" + :channel (gui-channel voicebox) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn194" + :channel (gui-channel rider) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn117" + :channel (gui-channel rider) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "assault-protect-civilians" + :channel (gui-channel message) + :speech #xd + :text-duration (seconds 4) + :neg #x1 + :text-message (text-id text-06de) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax238" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax353" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax330" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax577" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor001" + :channel (gui-channel voicebox) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds178a" + :channel (gui-channel guard) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds178b" + :channel (gui-channel guard) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "grds103a" + :channel (gui-channel guard) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type assault-speech-instance +(deftype assault-speech-instance (speech-instance) + () + ) + +;; definition for method 3 of type assault-speech-instance +(defmethod inspect ((this assault-speech-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'assault-speech-instance) + (format #t "~1Tspeech: ~D~%" (-> this speech)) + (format #t "~1Tnum-play-times: ~D~%" (-> this num-play-times)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc new file mode 100644 index 0000000000..8b80593d19 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc @@ -0,0 +1,1796 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ammo-special-info +(deftype ammo-special-info (structure) + ((ammo-type int32) + (gun-type int32) + (end-lock-time time-frame) + ) + ) + +;; definition for method 3 of type ammo-special-info +(defmethod inspect ((this ammo-special-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ammo-special-info) + (format #t "~1Tammo-type: ~D~%" (-> this ammo-type)) + (format #t "~1Tgun-type: ~D~%" (-> this gun-type)) + (format #t "~1Tend-lock-time: ~D~%" (-> this end-lock-time)) + (label cfg-4) + this + ) + +;; definition of type task-manager-city-port-assault +(deftype task-manager-city-port-assault (task-manager) + ((script-command assault-cmd-context :inline) + (door-handle handle) + (current-room assault-room) + (current-room-index int8) + (h-player-controller handle) + (spawners assault-cmd-context 12 :inline) + (original-cam-point vector :inline :offset 1296) + (original-cam-quat quaternion :inline) + (ammo-special ammo-special-info :inline) + (torn-h handle) + (next-powerup-spawn-time time-frame) + (final-bombbot? symbol) + (room-override-index int8) + (bombbot-dead? symbol) + (cam-pan-sound sound-id) + ) + (:state-methods + transition + combat + player-entrance + player-quickstart + ) + (:methods + (parse-cmd (_type_) none) + (eval-cmd (_type_) symbol) + (cmd-can-run? (_type_) symbol) + (advance-script (_type_) none) + (room-advance (_type_) none) + (task-manager-city-port-assault-method-41 (_type_ assault-spawn-cmd assault-cmd-context) symbol) + (spawn-special-pickup (_type_ pickup-type) none) + (task-manager-city-port-assault-method-43 (_type_ int) int) + (task-manager-city-port-assault-method-44 (_type_) object) + (check-for-pickup-spawn (_type_) int) + (set-next-powerup-spawn-time (_type_) none) + (spawn-guards (_type_ int) symbol) + (spawn-citizens (_type_ int) none) + (task-manager-city-port-assault-method-49 (_type_ int) int) + (pickup-spawn-chance (_type_ room-powerup-percentage int) float) + (get-suck-level (_type_) int) + (task-manager-city-port-assault-method-52 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-city-port-assault +(defmethod inspect ((this task-manager-city-port-assault)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tscript-command: #~%" (-> this script-command)) + (format #t "~2Tdoor-handle: ~D~%" (-> this door-handle)) + (format #t "~2Tcurrent-room: #~%" (-> this current-room)) + (format #t "~2Tcurrent-room-index: ~D~%" (-> this current-room-index)) + (format #t "~2Th-player-controller: ~D~%" (-> this h-player-controller)) + (format #t "~2Tspawners[12] @ #x~X~%" (-> this spawners)) + (format #t "~2Toriginal-cam-point: #~%" (-> this original-cam-point)) + (format #t "~2Toriginal-cam-quat: #~%" (-> this original-cam-quat)) + (format #t "~2Tammo-special: #~%" (-> this ammo-special)) + (format #t "~2Ttorn-h: ~D~%" (-> this torn-h)) + (format #t "~2Tnext-powerup-spawn-time: ~D~%" (-> this next-powerup-spawn-time)) + (format #t "~2Tfinal-bombbot?: ~A~%" (-> this final-bombbot?)) + (format #t "~2Troom-override-index: ~D~%" (-> this room-override-index)) + (format #t "~2Tbombbot-dead?: ~A~%" (-> this bombbot-dead?)) + (format #t "~2Tcam-pan-sound: ~D~%" (-> this cam-pan-sound)) + (label cfg-4) + this + ) + +;; definition of type assault-player-controller +(deftype assault-player-controller (player-controller) + ((collision assault-room-collision) + ) + (:methods + (assault-player-controller-method-36 (_type_) none) + ) + ) + +;; definition for method 3 of type assault-player-controller +(defmethod inspect ((this assault-player-controller)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type player-controller inspect))) + (t9-0 this) + ) + (format #t "~2Tcollision: #~%" (-> this collision)) + (label cfg-4) + this + ) + +;; definition of type assault-squad-control +(deftype assault-squad-control (basic) + ((door-index int16) + (spawn-records (array proc-focusable-spawner)) + (next-spawn-index int16) + (door-pos vector :inline) + ) + (:methods + (init (_type_) none) + (assault-squad-control-method-10 (_type_ int) int) + (spawn-enemies (_type_ process) int) + (init-spawn-records (_type_) symbol) + (reset-enemies (_type_) none) + ) + ) + +;; definition for method 3 of type assault-squad-control +(defmethod inspect ((this assault-squad-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tdoor-index: ~D~%" (-> this door-index)) + (format #t "~1Tspawn-records: ~A~%" (-> this spawn-records)) + (format #t "~1Tnext-spawn-index: ~D~%" (-> this next-spawn-index)) + (format #t "~1Tdoor-pos: #~%" (-> this door-pos)) + (label cfg-4) + this + ) + +;; definition for method 13 of type assault-squad-control +;; WARN: Return type mismatch int vs none. +(defmethod reset-enemies ((this assault-squad-control)) + (dotimes (s5-0 (-> *assault-squad* spawn-records length)) + (reset-and-kill-all! (-> *assault-squad* spawn-records s5-0)) + ) + (set! (-> this next-spawn-index) 0) + 0 + (none) + ) + +;; definition for method 11 of type assault-squad-control +(defmethod spawn-enemies ((this assault-squad-control) (arg0 process)) + (cond + (#f + (kill-by-name "hip-door-a-6" *active-pool*) + (kill-by-name "hip-door-a-1" *active-pool*) + ) + (else + (set-setting! 'airlock #f 0.0 0) + ) + ) + (when (< (-> this next-spawn-index) (-> this spawn-records length)) + (dotimes (s4-0 (-> this spawn-records (-> this next-spawn-index) records length)) + (set! (-> this spawn-records (-> this next-spawn-index) records data s4-0 proc) + (spawn-assault-enemy (the-as assault-target-type (-> this next-spawn-index)) arg0) + ) + ) + (+! (-> this next-spawn-index) 1) + (return 0) + ) + (dotimes (s5-1 (-> this spawn-records length)) + (check-inactive (-> this spawn-records s5-1)) + ) + (the-as int #f) + ) + +;; definition for method 12 of type assault-squad-control +(defmethod init-spawn-records ((this assault-squad-control)) + (set! (-> this spawn-records) (new 'loading-level 'boxed-array proc-focusable-spawner 19)) + (dotimes (s5-0 19) + (set! (-> this spawn-records s5-0) (new 'loading-level 'proc-focusable-spawner)) + (alloc-records! (-> this spawn-records s5-0) (-> *assault-object-count* s5-0) 'loading-level) + ) + #f + ) + +;; definition for method 9 of type assault-squad-control +;; WARN: Return type mismatch int vs none. +(defmethod init ((this assault-squad-control)) + (dotimes (s5-0 19) + (init-records! (-> this spawn-records s5-0)) + ) + (set! (-> this next-spawn-index) 0) + 0 + (none) + ) + +;; failed to figure out what this is: +(when (or (zero? *port-assault-blur-curve*) (!= loading-level global)) + (set! *port-assault-blur-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *port-assault-blur-curve* 4 'loading-level (the-as int #t)) + ) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 0 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 1 first) 0.25) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 1 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 2 first) 0.75) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 2 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 3 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *port-assault-blur-curve* pts data 3 second) 1.0) + +;; definition for method 52 of type task-manager-city-port-assault +;; INFO: Used lq/sq +;; WARN: Return type mismatch matrix vs none. +(defmethod task-manager-city-port-assault-method-52 ((this task-manager-city-port-assault)) + (let ((s5-0 *camera*) + (f0-1 (* 0.0011111111 (the float (- (current-time) (-> this state-time))))) + ) + 0.0 + 0.0 + (let* ((f30-0 (- 1.0 (* (- 1.0 f0-1) (- 1.0 f0-1)))) + (f0-2 (sin (lerp -16384.0 16384.0 f0-1))) + (f0-3 (+ 1.0 f0-2)) + (f0-4 (* 0.5 f0-3)) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + (when s5-0 + (let ((s5-1 (-> s5-0 slave))) + (when s5-1 + (vector-lerp! (-> s5-1 0 saved-pt) (-> this original-cam-point) (-> this current-room cam-info pos) f0-4) + (let ((s4-1 (matrix->quaternion (new 'stack-no-clear 'quaternion) (-> this current-room cam-info mat)))) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (-> this current-room cam-info pos) (-> this original-cam-point)) + ) + ) + (let ((a0-8 s2-1)) + (set! (-> a0-8 quad) (-> s2-1 quad)) + (set! (-> a0-8 y) 0.0) + (vector-normalize! a0-8 1.0) + ) + (if (< (vector-dot s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this original-cam-quat))) 0.0) + (vector-float*! s2-1 s2-1 -1.0) + ) + (quaternion-look-at! s3-0 s2-1 *up-vector*) + ) + (let ((f0-9 0.7)) + (cond + ((< f30-0 f0-9) + (quaternion-slerp! s4-1 (-> this original-cam-quat) s3-0 (/ f30-0 f0-9)) + ) + ((< (- 1.0 f0-9) f30-0) + (let* ((f0-12 (/ (- f30-0 f0-9) (- 1.0 f0-9))) + (f0-13 (* f0-12 f0-12)) + ) + (quaternion-slerp! s4-1 s3-0 s4-1 f0-13) + ) + ) + (else + (quaternion-copy! s4-1 s3-0) + ) + ) + ) + ) + (quaternion->matrix (the-as matrix (-> s5-1 0 tracking)) s4-1) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate transition (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (case (get-status *gui-control* (-> self cam-pan-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self cam-pan-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self cam-pan-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-time! (-> self state-time)) + (set-setting! 'blur-a 'abs 0.5 0) + (let ((v1-10 *camera*)) + (when v1-10 + (let ((v1-11 (-> v1-10 slave))) + (when v1-11 + (set! (-> self original-cam-point quad) (-> v1-11 0 saved-pt quad)) + (matrix->quaternion (-> self original-cam-quat) (the-as matrix (-> v1-11 0 tracking))) + ) + ) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-13 mode) 'lock) + (set! (-> v1-13 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (logclear! (-> v1-13 flags) (player-controller-flag lock-features)) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-13) + ) + ) + :exit (behavior () + (set-setting! 'blur-a 'abs 0.0 0) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + (task-manager-city-port-assault-method-52 self) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (go-virtual player-entrance) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (send-event self 'ammo-special 15 29) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate player-quickstart (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (set-setting! 'interp-time 'abs 0.0 0) + (if *target* + (logior! (-> *target* focus-status) (focus-status teleporting)) + ) + (let ((a0-4 *camera*)) + (when a0-4 + (let ((a0-5 (-> a0-4 slave))) + (when a0-5 + (set! (-> a0-5 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v1-11 (-> a0-5 0 tracking)) + (a3-1 (-> self current-room cam-info mat)) + (a0-8 (-> a3-1 rvec quad)) + (a1-5 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-11 inv-mat rvec quad) a0-8) + (set! (-> v1-11 inv-mat uvec quad) a1-5) + (set! (-> v1-11 inv-mat fvec quad) a2-1) + (set! (-> v1-11 inv-mat trans quad) a3-2) + ) + ) + ) + ) + ) + (when *target* + (move-to-point! (-> *target* control) (-> self current-room center-pos)) + (process-drawable-reset-all-cloth *target*) + ) + (suspend) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (remove-setting! 'interp-time) + (go-virtual combat) + ) + ) + +;; failed to figure out what this is: +(defstate player-entrance (task-manager-city-port-assault) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reached-destination) + (if (and *target* (focus-test? *target* board)) + (send-event *target* 'change-mode 'normal) + ) + (go-virtual combat) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-blackout-frames 0) + (until (process-release? *target*) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> *display* force-sync) (the-as uint 20)) + (when *target* + (logior! (-> *target* focus-status) (focus-status teleporting)) + (process-drawable-show-all-cloth *target* #f) + (logior! (-> *target* draw status) (draw-control-status no-draw)) + (if (and (< 1 (-> self current-room-index)) + (not (logtest? (-> self current-room-index) 1)) + (!= (-> self current-room-index) 4) + ) + (send-event *target* 'change-mode 'board #f) + ) + (let ((f30-0 40960000000.0) + (gp-0 0) + ) + (dotimes (s5-0 (-> self current-room node-positions length)) + (let ((f0-0 (vector-vector-xz-distance (target-pos 0) (-> self current-room node-positions s5-0)))) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! gp-0 s5-0) + ) + ) + ) + (let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> self current-room node-positions gp-0 quad)) + (move-to-point! (-> *target* control) a1-5) + ) + ) + ) + (let ((v1-40 *camera*)) + (when v1-40 + (let ((v1-41 (-> v1-40 slave))) + (when v1-41 + (set! (-> v1-41 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v0-9 (-> v1-41 0 tracking)) + (a2-0 (-> self current-room cam-info mat)) + (v1-45 (-> a2-0 rvec quad)) + (a0-20 (-> a2-0 uvec quad)) + (a1-10 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> v0-9 inv-mat rvec quad) v1-45) + (set! (-> v0-9 inv-mat uvec quad) a0-20) + (set! (-> v0-9 inv-mat fvec quad) a1-10) + (set! (-> v0-9 inv-mat trans quad) a2-1) + ) + ) + ) + ) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (suspend) + (when *target* + (process-drawable-show-all-cloth *target* #t) + (logclear! (-> *target* draw status) (draw-control-status no-draw)) + ) + (suspend) + (let ((v1-4 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-4 mode) 'active) + (set! (-> v1-4 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> v1-4 targ-pos quad) (-> self current-room center-pos quad)) + (logclear! (-> v1-4 flags) (player-controller-flag lock-features)) + (set! (-> v1-4 notify-proc) (process->handle self)) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-4) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate combat (task-manager-city-port-assault) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-setting! 'board #f 0.0 0) + (set-blackout-frames 0) + (let ((v1-2 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> v1-2 mode) 'active) + (set! (-> v1-2 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> v1-2 mode) 'clip-to-nav-mesh) + (logclear! (-> v1-2 flags) (player-controller-flag lock-features)) + (let ((a0-8 (the-as assault-player-controller (handle->process (-> self h-player-controller))))) + (if a0-8 + (set! (-> a0-8 collision) (-> self current-room collision)) + ) + ) + (send-event (handle->process (-> self h-player-controller)) 'set-params v1-2) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (remove-setting! 'board) + (apply-settings *setting-control*) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + (check-for-pickup-spawn self) + (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (= (-> *room-goal* (-> self current-room-index)) 1) + (<= (task-manager-city-port-assault-method-49 self 2) 0) + ) + (send-event self 'fail) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (= (-> *room-goal* (-> self current-room-index)) 2) + (let ((v1-28 (-> *assault-squad* spawn-records 1))) + 0 + (<= (- (-> v1-28 unused-list allocated-length) (-> v1-28 unused-list length)) 0) + ) + ) + (send-event self 'fail) + ) + (task-manager-city-port-assault-method-44 self) + (spawn-enemies *assault-squad* self) + (dotimes (gp-0 (-> self current-room node-positions length)) + (task-manager-city-port-assault-method-43 self gp-0) + ) + (let ((v1-47 *camera*)) + (when v1-47 + (let ((v1-48 (-> v1-47 slave))) + (when v1-48 + (set! (-> v1-48 0 saved-pt quad) (-> self current-room cam-info pos quad)) + (let* ((v0-10 (-> v1-48 0 tracking)) + (a2-0 (-> self current-room cam-info mat)) + (v1-52 (-> a2-0 rvec quad)) + (a0-22 (-> a2-0 uvec quad)) + (a1-9 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> v0-10 inv-mat rvec quad) v1-52) + (set! (-> v0-10 inv-mat uvec quad) a0-22) + (set! (-> v0-10 inv-mat fvec quad) a1-9) + (set! (-> v0-10 inv-mat trans quad) a2-1) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until (process-release? *target*) + (suspend) + ) + (until #f + (until (cmd-can-run? self) + (when (not (eval-cmd self)) + 0 + (goto cfg-7) + ) + (suspend) + ) + (advance-script self) + (parse-cmd self) + ) + #f + (label cfg-7) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; definition for function compute-player-ammo +(defun compute-player-ammo ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-red-1)) + 10.0 + ) + (((pickup-type gun-red-2)) + 20.0 + ) + (((pickup-type gun-red-3)) + 30.0 + ) + (((pickup-type gun-yellow-1)) + 200.0 + ) + (((pickup-type gun-yellow-2)) + 30.0 + ) + (((pickup-type gun-yellow-3)) + 50.0 + ) + (((pickup-type gun-blue-1)) + 40.0 + ) + (((pickup-type gun-blue-2)) + 50.0 + ) + (((pickup-type gun-blue-3)) + 60.0 + ) + (((pickup-type gun-dark-1)) + 5.0 + ) + (((pickup-type gun-dark-2)) + 0.0 + ) + (((pickup-type gun-dark-3)) + 0.0 + ) + (else + 0.0 + ) + ) + ) + +;; definition for method 30 of type task-manager-city-port-assault +;; WARN: disable def twice: 36. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 106. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod taskman-event-handler ((this task-manager-city-port-assault) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (case arg2 + (('restart) + (let ((v1-2 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-2 status) (entity-perm-status bit-5)) + (set! (-> v1-2 user-uint64) (the-as uint 0)) + (logior! (-> v1-2 status) (entity-perm-status bit-14)) + ) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + (('bombbot-death) + (when (-> this final-bombbot?) + (set! v0-2 #t) + (set! (-> this bombbot-dead?) (the-as symbol v0-2)) + v0-2 + ) + ) + (('ammo-special) + (set! (-> this ammo-special ammo-type) (the-as int (-> arg3 param 0))) + (set! (-> this ammo-special gun-type) (the-as int (-> arg3 param 1))) + (if (!= (-> this ammo-special gun-type) 29) + (speech-play *port-assault-speech* 8 *assault-speech-list* (target-pos 0)) + ) + (let ((s5-2 (new 'static 'boxed-array :type int32 15 16 17 18))) + (dotimes (s4-2 (-> s5-2 length)) + (adjust-player-ammo -500.0 (the-as pickup-type (-> s5-2 s4-2))) + ) + ) + (adjust-player-ammo + (compute-player-ammo (the-as pickup-type (-> this ammo-special gun-type))) + (the-as pickup-type (-> this ammo-special ammo-type)) + ) + (let ((t1-0 (logclear + (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (gun-pickup-type->game-feature (the-as pickup-type (-> this ammo-special gun-type))) + ) + ) + ) + (set-setting! 'features 'clear (shr (the-as int t1-0) 32) t1-0) + ) + (apply-settings *setting-control*) + (when *target* + (if (= (-> this ammo-special ammo-type) 7) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage active)) + (send-event *target* 'change-mode 'gun #f (-> this ammo-special gun-type)) + ) + (cond + ((= (-> this ammo-special gun-type) 29) + (set! (-> this ammo-special end-lock-time) 0) + (set! v0-2 (logior (target-flags tf16) (-> *target* target-flags))) + (set! (-> *target* target-flags) (the-as target-flags v0-2)) + ) + (else + (logclear! (-> *target* target-flags) (target-flags tf16)) + (set! v0-2 (current-time)) + (set! (-> this ammo-special end-lock-time) (the-as time-frame v0-2)) + ) + ) + v0-2 + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-city-port-assault) + :virtual #t + :enter (behavior () + (set! (-> self room-override-index) (the-as int (-> (task-perm-by-index *game-info* 46) user-uint64))) + (speeches-reset *port-assault-speech*) + (set-setting! 'allow-look-around #f 0.0 0) + (set-setting! 'gem-seek-target-dir? #t 0.0 0) + (set-setting! 'disable-parking-spots? #t 0.0 0) + (set! (-> *game-info* eco-pill-light) 0.0) + (set-setting! 'pilot #f 0.0 0) + (set-setting! 'hide-crates? #t 0.0 0) + (set-setting! 'sound-ear-scale 'abs 0.25 0) + (set! (-> self bombbot-dead?) #f) + (set! (-> self final-bombbot?) #f) + (set-setting! 'city-sound '(citymhf citykgf citypedh cityffh) 0.0 2) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (set-setting! 'rain 'abs 0.0 0) + (set-setting! 'music 'portattk 0.0 0) + (set-setting! 'exclusive-load '((ignore all)) 0.0 0) + (set-setting! 'gun-special-mode #t 0.0 0) + (set-setting! 'calm #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (send-event self 'ammo-special 15 29) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self h-player-controller) (the-as handle #f)) + (set-setting! 'gun-target-guards? #f 0.0 0) + (reset-hatred *cty-attack-controller*) + (init *assault-squad*) + (init-attack-controller *cty-attack-controller*) + (set! (-> *cty-attack-controller* target-attacker max-num-attackers) (the-as uint 127)) + (set! (-> self h-player-controller) (the-as handle #f)) + (let ((gp-0 (new 'static 'boxed-array :type uint16 #x3 #x4 #x5))) + (dotimes (s5-0 (-> gp-0 length)) + (dotimes (s4-0 19) + (let ((v1-56 (get-hatred-at-idx *cty-attack-controller* s5-0 s4-0))) + (if (nonzero? (-> v1-56 index)) + (set! (-> v1-56 max-consider-dist) 102400.0) + ) + ) + ) + ) + ) + (set! (-> self torn-h) (the-as handle #f)) + (let ((gp-1 (push-back-hatred *cty-attack-controller*)) + (a2-17 (get-hatred-at-idx *cty-attack-controller* 9 0)) + ) + (set! (-> gp-1 hatred) (-> a2-17 hatred)) + (set! (-> gp-1 max-consider-dist) (-> a2-17 max-consider-dist)) + (set! (-> gp-1 hatred-dist) (-> a2-17 hatred-dist)) + (set! (-> gp-1 dist-scale) (-> a2-17 dist-scale)) + (set! (-> gp-1 attacker-scale) (-> a2-17 attacker-scale)) + (set-hatred-indices-for-all *cty-attack-controller* 0 a2-17 gp-1 14) + ) + (let ((gp-2 (push-back-hatred *cty-attack-controller*))) + (set! (-> gp-2 hatred) 0.8) + (set! (-> gp-2 max-consider-dist) 245760.0) + (set! (-> gp-2 hatred-dist) 245760.0) + (set! (-> gp-2 dist-scale) 0.1) + (set! (-> gp-2 attacker-scale) 1.0) + (set-hatred-indices *cty-attack-controller* gp-2 4 13) + (set-hatred-indices *cty-attack-controller* gp-2 3 13) + (set-hatred-indices *cty-attack-controller* gp-2 5 13) + ) + (let ((v1-79 (get-hatred-at-idx *cty-attack-controller* 9 1))) + (set! (-> v1-79 hatred) 1.5) + (set! (-> v1-79 attacker-scale) 0.0) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (spawn-enemies *assault-squad* self) + ) + :code (behavior () + (while (< (-> *assault-squad* next-spawn-index) (-> *assault-squad* spawn-records length)) + (suspend) + ) + (set! (-> self current-room-index) -1) + (let ((gp-0 (new 'stack-no-clear 'player-controller-init-params))) + (set! (-> gp-0 mode) 'active) + (set! (-> gp-0 flags) (player-controller-flag pc1 lock-features letterbox pc4)) + (set! (-> gp-0 mode) 'clip-to-nav-mesh) + (logclear! (-> gp-0 flags) (player-controller-flag lock-features)) + (set! (-> self h-player-controller) (ppointer->handle (process-spawn + assault-player-controller + :init player-controller-init-by-other + gp-0 + :name "assault-player-controller" + :to self + ) + ) + ) + ) + (room-advance self) + ) + ) + +;; definition for function lctypalt-login +;; WARN: Return type mismatch symbol vs none. +(defun lctypalt-login ((arg0 level)) + (set! *assault-squad* (new 'loading-level 'assault-squad-control)) + (init-spawn-records *assault-squad*) + (none) + ) + +;; definition for function lctypalt-logout +;; WARN: Return type mismatch symbol vs none. +(defun lctypalt-logout ((arg0 level)) + (set! *assault-squad* #f) + (none) + ) + +;; definition for method 39 of type task-manager-city-port-assault +;; WARN: Return type mismatch object vs none. +(defmethod advance-script ((this task-manager-city-port-assault)) + (set! (-> this script-command script) (the-as pair (-> this script-command script cdr))) + (none) + ) + +;; definition for method 36 of type task-manager-city-port-assault +;; WARN: Return type mismatch time-frame vs none. +(defmethod parse-cmd ((this task-manager-city-port-assault)) + (format 0 "Parsing command ~s~%" (-> this script-command script car)) + (parse-assault-command + (the-as pair (-> this script-command script car)) + (-> this script-command current-command) + ) + (set-time! (-> this script-command start-time)) + (set! (-> this script-command state-time) + (- (current-time) (-> this script-command current-command spawn-delay)) + ) + (none) + ) + +;; definition for method 43 of type task-manager-city-port-assault +(defmethod task-manager-city-port-assault-method-43 ((this task-manager-city-port-assault) (arg0 int)) + (when (and (-> this final-bombbot?) (-> this bombbot-dead?)) + (set! (-> this spawners arg0 current-command count) 0) + (return 0) + ) + (let ((s4-0 (the-as assault-spawn-cmd (+ (the-as uint (-> this spawners 0 current-command)) (* 80 arg0))))) + (set! (-> s4-0 spawner-index) arg0) + (when (> (-> s4-0 count) 0) + (when (time-elapsed? (-> this spawners arg0 state-time) (-> s4-0 spawn-delay)) + (when (or (task-manager-city-port-assault-method-41 this s4-0 (-> this spawners arg0)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd3)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd4)) + (= (-> s4-0 spawn-type) (assault-cmd-spawn-type cmd5)) + (-> *setting-control* user-current nuke-active?) + ) + (set-time! (-> this spawners arg0 state-time)) + (let ((v0-0 (+ (-> s4-0 count) -1))) + (set! (-> s4-0 count) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition for method 37 of type task-manager-city-port-assault +(defmethod eval-cmd ((this task-manager-city-port-assault)) + (let ((s5-0 (-> this script-command current-command))) + (case (-> s5-0 command) + (((assault-cmd queue)) + (set! (-> this cam-pan-sound) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "cam-pan" -99.0 0) + ) + ) + (((assault-cmd other)) + (return #f) + ) + (((assault-cmd torn)) + (send-event + (handle->process (-> this torn-h)) + (-> s5-0 msg) + (-> s5-0 event0) + (-> s5-0 event1) + (-> s5-0 event2) + ) + ) + (((assault-cmd final-bombbot)) + (set! (-> this final-bombbot?) #t) + ) + (((assault-cmd load-continue)) + (set! (-> this room-override-index) (the-as int (-> (task-perm-by-index *game-info* 46) user-uint64))) + (if (!= (-> this room-override-index) (-> this current-room-index)) + (room-advance this) + ) + ) + (((assault-cmd save-continue)) + (let ((v1-18 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-18 status) (entity-perm-status bit-5)) + (set! (-> v1-18 user-uint64) (the-as uint (-> this current-room-index))) + (logior! (-> v1-18 status) (entity-perm-status bit-14)) + ) + ) + (((assault-cmd advance)) + (room-advance this) + ) + (((assault-cmd pickup)) + (spawn-special-pickup this (the-as pickup-type (-> s5-0 gun-pickup-type))) + ) + (((assault-cmd spawn)) + (let ((v1-21 (-> s5-0 spawner-index))) + (when (= v1-21 -1) + (let ((a1-5 (current-time))) + (set! v1-21 -1) + (let ((a0-44 -1)) + (dotimes (a2-2 (-> this current-room node-positions length)) + (let ((a3-4 (-> this spawners a2-2))) + (when (zero? (-> a3-4 current-command count)) + (set! a0-44 a2-2) + (when (< (-> a3-4 state-time) a1-5) + (set! a1-5 (-> a3-4 state-time)) + (set! v1-21 a2-2) + ) + ) + ) + ) + (if (= v1-21 -1) + (set! v1-21 a0-44) + ) + ) + ) + (set! (-> s5-0 spawner-index) v1-21) + ) + (when (and (< -1 v1-21) (zero? (-> this spawners v1-21 current-command count))) + (mem-copy! (the-as pointer (-> this spawners v1-21)) (the-as pointer (-> this script-command)) 72) + (set! (-> s5-0 count) 0) + 0 + ) + ) + ) + ) + ) + #t + ) + +;; definition for method 38 of type task-manager-city-port-assault +(defmethod cmd-can-run? ((this task-manager-city-port-assault)) + (let ((gp-0 (-> this script-command current-command))) + (case (-> gp-0 command) + (((assault-cmd spawn)) + (zero? (-> gp-0 count)) + ) + (((assault-cmd torn)) + #t + ) + (((assault-cmd speech)) + #t + ) + (((assault-cmd queue)) + #t + ) + (((assault-cmd final-bombbot)) + #t + ) + (((assault-cmd pickup)) + #t + ) + (((assault-cmd advance)) + #f + ) + (((assault-cmd other)) + #f + ) + (((assault-cmd load-continue) (assault-cmd save-continue)) + #t + ) + (((assault-cmd wait)) + (case (-> gp-0 wait-type) + (((assault-cmd-wait-type spawn-delay)) + (time-elapsed? (-> this script-command start-time) (-> gp-0 spawn-delay)) + ) + (((assault-cmd-wait-type cmd2)) + (let ((v1-9 (+ (task-manager-city-port-assault-method-49 this 1) (task-manager-city-port-assault-method-49 this 3))) + ) + (>= (-> gp-0 count) v1-9) + ) + ) + (((assault-cmd-wait-type cmd1)) + (>= (-> gp-0 count) (task-manager-city-port-assault-method-49 this (the-as int (-> gp-0 faction-type)))) + ) + ) + ) + ) + ) + ) + +;; definition for method 49 of type task-manager-city-port-assault +(defmethod task-manager-city-port-assault-method-49 ((this task-manager-city-port-assault) (arg0 int)) + 0 + (let ((v0-0 (assault-squad-control-method-10 *assault-squad* arg0))) + (dotimes (v1-2 12) + (if (= (-> *assault-faction-lookup* (-> this spawners v1-2 current-command spawn-type)) arg0) + (+! v0-0 (-> this spawners v1-2 current-command count)) + ) + ) + v0-0 + ) + ) + +;; definition for method 10 of type assault-squad-control +(defmethod assault-squad-control-method-10 ((this assault-squad-control) (arg0 int)) + (let ((v0-0 0)) + (dotimes (v1-0 (-> this spawn-records length)) + (if (= (-> *assault-faction-lookup* v1-0) arg0) + (+! v0-0 + (- (-> this spawn-records v1-0 unused-list allocated-length) (-> this spawn-records v1-0 unused-list length)) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 47 of type task-manager-city-port-assault +;; INFO: Used lq/sq +(defmethod spawn-guards ((this task-manager-city-port-assault) (arg0 int)) + (local-vars (sv-848 vector) (sv-864 vector) (sv-880 assault-object-spawn-params)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *x-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (/ 65536.0 (the float arg0))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s1-0 arg0) + (let ((s0-0 s3-0)) + (set! sv-848 (-> this current-room center-pos)) + (set! sv-864 s4-0) + (let* ((f28-0 24576.0) + (f26-0 0.0) + (v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + (f0-5 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-7))))) + ) + (.lvf vf2 (&-> sv-864 quad)) + (.lvf vf1 (&-> sv-848 quad)) + (let ((v1-11 f0-5)) + (.mov vf3 v1-11) + ) + ) + (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf2 vf3) + (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.svf (&-> s0-0 quad) vf4) + ) + (let ((v1-12 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-12 quad) (-> s3-0 quad)) + (vector+float*! (-> s0-1 start-pos) s3-0 *up-vector* 24576.0) + (set! (-> s0-1 move-dist quad) (the-as uint128 0)) + (set! (-> s0-1 move-dist y) -49152.0) + (let ((v1-17 s0-1)) + (set! (-> v1-17 radius) 409.6) + (set! (-> v1-17 collide-with) (collide-spec backgnd)) + (set! (-> v1-17 ignore-process0) #f) + (set! (-> v1-17 ignore-process1) #f) + (set! (-> v1-17 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-17 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s0-1) 0.0) + (set! (-> s3-0 quad) (-> s0-1 best-other-tri intersect quad)) + ) + ) + (vector-! s2-0 s3-0 (-> this current-room center-pos)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (let ((s0-2 (get-last-unused-handle! (-> *assault-squad* spawn-records 3)))) + (when (handle->process s0-2) + (set! sv-880 (new 'stack 'assault-object-spawn-params)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 position quad) (-> s3-0 quad)) + (set! (-> sv-880 behavior) (the-as uint 2)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 suck-level) (get-suck-level this)) + (set! (-> sv-880 user-data) (the-as uint (-> this current-room center-pos))) + (logior! (-> sv-880 flags) (traffic-spawn-flags tsf7)) + (set! (-> sv-880 velocity quad) (the-as uint128 0)) + (quaternion-identity! (-> sv-880 rotation)) + (quaternion-look-at! (-> sv-880 rotation) s2-0 *up-vector*) + (set! (-> sv-880 nav-mesh) (find-nearest-nav-mesh (-> sv-880 position) (the-as float #x7f800000))) + (set! (-> sv-880 nav-branch) #f) + (set! (-> sv-880 guard-type) (the-as uint 1)) + (send-event (handle->process s0-2) 'traffic-activate sv-880 *traffic-engine*) + ) + ) + (vector-rotate-around-y! s4-0 s4-0 f30-0) + ) + ) + ) + #f + ) + ) + +;; definition for method 48 of type task-manager-city-port-assault +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-citizens ((this task-manager-city-port-assault) (arg0 int)) + (local-vars + (v1-65 int) + (sv-848 vector) + (sv-864 vector) + (sv-880 assault-object-spawn-params) + (sv-896 (function quaternion quaternion float quaternion)) + (sv-912 quaternion) + (sv-928 quaternion) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *x-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (/ 65536.0 (the float arg0))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s1-0 arg0) + (let ((s0-0 s3-0)) + (set! sv-848 (-> this current-room center-pos)) + (set! sv-864 s4-0) + (let* ((f28-0 10240.0) + (f26-0 47104.0) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + (f0-5 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-8))))) + ) + (.lvf vf2 (&-> sv-864 quad)) + (.lvf vf1 (&-> sv-848 quad)) + (let ((v1-12 f0-5)) + (.mov vf3 v1-12) + ) + ) + (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf2 vf3) + (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.svf (&-> s0-0 quad) vf4) + ) + (let ((v1-13 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-13 quad) (-> s3-0 quad)) + (vector+float*! (-> s0-1 start-pos) s3-0 *up-vector* 24576.0) + (set! (-> s0-1 move-dist quad) (the-as uint128 0)) + (set! (-> s0-1 move-dist y) -49152.0) + (let ((v1-18 s0-1)) + (set! (-> v1-18 radius) 409.6) + (set! (-> v1-18 collide-with) (collide-spec backgnd)) + (set! (-> v1-18 ignore-process0) #f) + (set! (-> v1-18 ignore-process1) #f) + (set! (-> v1-18 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-18 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s0-1) 0.0) + (set! (-> s3-0 quad) (-> s0-1 best-other-tri intersect quad)) + ) + ) + (vector-! s2-0 s3-0 (-> this current-room center-pos)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (let ((s0-2 (get-last-unused-handle! (-> *assault-squad* spawn-records 1)))) + (when (handle->process s0-2) + (set! sv-880 (new 'stack 'assault-object-spawn-params)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 position quad) (-> s3-0 quad)) + (set! (-> sv-880 behavior) (the-as uint 2)) + (set! (-> sv-880 flags) (traffic-spawn-flags)) + (set! (-> sv-880 suck-level) (get-suck-level this)) + (set! (-> sv-880 user-data) (the-as uint (-> this current-room center-pos))) + (logior! (-> sv-880 flags) (traffic-spawn-flags tsf7)) + (set! (-> sv-880 velocity quad) (the-as uint128 0)) + (quaternion-identity! (-> sv-880 rotation)) + (quaternion-look-at! (-> sv-880 rotation) s2-0 *up-vector*) + (set! (-> sv-880 nav-mesh) (find-nearest-nav-mesh (-> sv-880 position) (the-as float #x7f800000))) + (set! (-> sv-880 nav-branch) #f) + (set! sv-896 quaternion-rotate-y!) + (set! sv-912 (-> sv-880 rotation)) + (set! sv-928 (-> sv-880 rotation)) + (let* ((f28-1 65536.0) + (v1-56 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-57 (the-as number (logior #x3f800000 v1-56))) + (a2-2 (* f28-1 (+ -1.0 (the-as float v1-57)))) + ) + (sv-896 sv-912 sv-928 a2-2) + ) + (+! (-> sv-880 position y) 409.6) + (cond + ((= (-> this current-room-index) (-> (task-perm-by-index *game-info* 46) user-uint64)) + (set! v1-65 600) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + ) + (else + (set! v1-65 2100) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + ) + ) + (set! (-> sv-880 flee-time) (the-as time-frame v1-65)) + (send-event (handle->process s0-2) 'traffic-activate sv-880 *traffic-engine*) + ) + ) + (vector-rotate-around-y! s4-0 s4-0 f30-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 41 of type task-manager-city-port-assault +;; INFO: Used lq/sq +(defmethod task-manager-city-port-assault-method-41 ((this task-manager-city-port-assault) (arg0 assault-spawn-cmd) (arg1 assault-cmd-context)) + (if (logtest? (process-mask enemy guard) (-> *kernel-context* prevent-from-run)) + (return #f) + ) + (if (-> *setting-control* user-current nuke-active?) + (return #f) + ) + (let ((s1-0 (-> arg0 spawner-index)) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (the-as int (-> arg0 spawn-type))) + ) + (if (= s1-0 -1) + (set! s1-0 0) + ) + (set! (-> s5-0 quad) (-> this current-room node-positions s1-0 quad)) + (vector-! s4-0 (-> this current-room center-pos) s5-0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (let ((v1-14 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-14 quad) (-> s5-0 quad)) + (vector+float*! (-> s0-0 start-pos) s5-0 *up-vector* 16384.0) + (set! (-> s0-0 move-dist quad) (the-as uint128 0)) + (set! (-> s0-0 move-dist y) -32768.0) + (let ((v1-19 s0-0)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec backgnd)) + (set! (-> v1-19 ignore-process0) #f) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s0-0) 0.0) + (set! (-> s5-0 quad) (-> s0-0 best-other-tri intersect quad)) + (+! (-> s5-0 y) 8192.0) + ) + ) + (case (the-as assault-cmd-spawn-type s2-0) + (((assault-cmd-spawn-type cmd4) (assault-cmd-spawn-type cmd5)) + (set! s2-0 3) + ) + (((assault-cmd-spawn-type cmd12)) + (set! s2-0 9) + ) + ) + (cond + ((= s2-0 13) + (let ((s3-1 (get-last-unused-val! (-> *assault-squad* spawn-records s2-0)))) + (when (>= s3-1 0) + (let ((s1-1 (new 'stack 'assault-bombbot-spawn-params))) + (set! (-> s1-1 position quad) (-> s5-0 quad)) + (quaternion-look-at! (-> s1-1 quat) s4-0 *up-vector*) + (set! (-> s1-1 path) (-> *assault-bombbot-paths* 0)) + (set! (-> s1-1 path node 0 position quad) (-> s5-0 quad)) + (set! (-> s1-1 first-node) (the-as uint 0)) + (set! (-> s1-1 stop-offset) 36000.0) + (set! (-> s1-1 is-final?) (-> this final-bombbot?)) + (set! (-> s1-1 suck-level) (get-suck-level this)) + (set! (-> *assault-squad* spawn-records s2-0 records data s3-1 proc) + (ppointer->handle (process-spawn assault-bombbot s1-1 :name "assault-bombbot" :to this)) + ) + ) + (return #t) + ) + ) + ) + (else + (let ((s2-1 (get-last-unused-handle! (-> *assault-squad* spawn-records s2-0)))) + (when (handle->process s2-1) + (let ((s0-1 (new 'stack 'assault-object-spawn-params))) + (set! (-> s0-1 flags) (traffic-spawn-flags)) + (set! (-> s0-1 position quad) (-> s5-0 quad)) + (set! (-> s0-1 behavior) (the-as uint 2)) + (when (and (< 2 s1-0) (= (-> this current-room-index) 4)) + (+! (-> s0-1 position y) 61440.0) + (set! (-> s0-1 behavior) (the-as uint 6)) + ) + (set! (-> s0-1 flags) (traffic-spawn-flags)) + (logior! (-> s0-1 flags) (traffic-spawn-flags tsf7)) + (set! (-> s0-1 velocity quad) (the-as uint128 0)) + (set! (-> s0-1 user-data) (the-as uint (-> this current-room center-pos))) + (quaternion-identity! (-> s0-1 rotation)) + (quaternion-look-at! (-> s0-1 rotation) s4-0 *up-vector*) + (let ((v1-74 (-> arg0 spawn-type))) + (set! (-> s0-1 guard-type) (the-as uint (cond + ((= v1-74 (assault-cmd-spawn-type cmd4)) + 1 + ) + ((= v1-74 (assault-cmd-spawn-type cmd5)) + 2 + ) + ((= v1-74 (assault-cmd-spawn-type cmd12)) + 7 + ) + (else + 0 + ) + ) + ) + ) + ) + (set! (-> s0-1 nav-mesh) (find-nearest-nav-mesh s5-0 (the-as float #x7f800000))) + (set! (-> s0-1 nav-branch) #f) + (send-event (handle->process s2-1) 'traffic-activate s0-1 *traffic-engine*) + ) + (process-spawn assault-cleanup s2-1 :name "assault-cleanup" :to (handle->process s2-1)) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 25 of type task-manager-city-port-assault +(defmethod task-manager-method-25 ((this task-manager-city-port-assault)) + (reset-enemies *assault-squad*) + (if *target* + (logclear! (-> *target* target-flags) (target-flags tf16)) + ) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (call-parent-method this) + (none) + ) + +;; definition for method 40 of type task-manager-city-port-assault +;; WARN: Return type mismatch int vs none. +(defmethod room-advance ((this task-manager-city-port-assault)) + (let ((a1-0 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-0 9) #f) + (set! (-> a1-0 8) #f) + (set! (-> a1-0 7) #f) + (set! (-> a1-0 6) #f) + (set! (-> a1-0 5) #f) + (set! (-> a1-0 4) #f) + (set! (-> a1-0 3) #f) + (set! (-> a1-0 2) 'hiphog) + (set! (-> a1-0 1) 'ctyport) + (set! (-> a1-0 0) 'ctywide-ff) + (want-levels *load-state* a1-0) + ) + (want-display-level *load-state* 'ctyport 'display) + (want-display-level *load-state* 'hiphog 'display) + (kill-by-type barge *active-pool*) + (kill-by-name "hip-door-a-6" *active-pool*) + (kill-by-name "hip-door-a-1" *active-pool*) + (if (> (-> this room-override-index) 0) + (set! (-> this current-room-index) (-> this room-override-index)) + (+! (-> this current-room-index) 1) + ) + (set-next-powerup-spawn-time this) + (if (= (-> this current-room-index) 3) + (set-setting! 'city-sound '(cityalth citymhf citykgf) 0.0 2) + (set-setting! 'city-sound '(citymhf citykgf citypedh cityffh) 0.0 2) + ) + (if (= (-> this current-room-index) 2) + (set-setting! 'gem-pool-index #f 0.0 -1) + (set-setting! 'gem-pool-index #f 0.0 1) + ) + (cond + ((= (-> this current-room-index) (-> *assault-scripts* length)) + (send-event this 'complete) + ) + (else + (if (> (-> this current-room-index) 0) + (sound-play "room-advance") + ) + (set! (-> this current-room) (-> *assault-rooms* (-> this current-room-index))) + (set! (-> this script-command script) (-> *assault-scripts* (-> this current-room-index))) + (parse-cmd this) + (let ((v1-45 (the-as assault-player-controller (handle->process (-> this h-player-controller))))) + (if v1-45 + (set! (-> v1-45 collision) (-> this current-room collision)) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (remove-setting! 'entity-name) + (dotimes (s5-1 (-> *assault-squad* spawn-records length)) + (when (!= s5-1 1) + (dotimes (s4-1 (-> *assault-squad* spawn-records s5-1 records length)) + (send-event + (handle->process (-> *assault-squad* spawn-records s5-1 records data s4-1 proc)) + 'traffic-off-force + ) + ) + ) + ) + (spawn-guards this (-> *assault-guard-count* (-> this current-room-index))) + (let ((s5-2 (-> *assault-citizen-count* (-> this current-room-index)))) + (cond + ((> s5-2 0) + (let ((a1-19 (+ s5-2 (the int (fmin 2.0 (lerp-scale-clamp 0.0 2.0 (the float (get-suck-level this)) 7.0 14.0)))))) + (spawn-citizens this a1-19) + ) + ) + (else + (process-spawn-function + process + (lambda :behavior process + () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (dotimes (gp-1 (-> *assault-squad* spawn-records 1 records length)) + (send-event (handle->process (-> *assault-squad* spawn-records 1 records data gp-1 proc)) 'traffic-off-force) + ) + #f + ) + :to this + ) + ) + ) + ) + (dotimes (v1-96 12) + (set! (-> this spawners v1-96 current-command count) 0) + ) + (cond + ((> (-> this room-override-index) 0) + (set! (-> this room-override-index) -1) + (go (method-of-object this player-quickstart)) + ) + ((> (-> this current-room-index) 0) + (go (method-of-object this transition)) + ) + (else + (go (method-of-object this combat)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 36 of type assault-player-controller +;; INFO: Used lq/sq +(defmethod assault-player-controller-method-36 ((this assault-player-controller)) + (let ((s4-0 (matrix-transpose! (new 'stack-no-clear 'matrix) (-> this collision cam-matrix))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this collision cam-pos))) + ) + (set! (-> s5-1 w) 0.0) + (vector-matrix*! s5-1 s5-1 s4-0) + (set! (-> s5-1 y) + (fmax (fmin (-> s5-1 y) (-> this collision clip-dists dist1)) (- (-> this collision clip-dists dist0))) + ) + (set! (-> s5-1 x) (fmax + (fmin (-> s5-1 x) (* 0.75 (-> this collision hoz-clip-dist))) + (- (* 0.75 (-> this collision hoz-clip-dist))) + ) + ) + (vector-matrix*! s5-1 s5-1 (-> this collision cam-matrix)) + (vector+! s5-1 s5-1 (-> this collision cam-pos)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 x) (-> s5-1 x)) + (set! (-> gp-1 y) (-> (target-pos 0) y)) + (set! (-> gp-1 z) (-> s5-1 z)) + (set! (-> gp-1 w) 1.0) + (let ((s5-2 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s5-2 start-pos) gp-1 *up-vector* 20480.0) + (set! (-> s5-2 move-dist quad) (the-as uint128 0)) + (set! (-> s5-2 move-dist y) -61440.0) + (let ((v1-15 s5-2)) + (set! (-> v1-15 radius) 0.0) + (set! (-> v1-15 collide-with) (collide-spec backgnd)) + (set! (-> v1-15 ignore-process0) #f) + (set! (-> v1-15 ignore-process1) #f) + (set! (-> v1-15 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-15 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-2) 0.0) + (if (< (fabs (- (-> gp-1 y) (-> s5-2 best-other-tri intersect y))) 6144.0) + (set! (-> gp-1 y) (fmax (-> gp-1 y) (-> s5-2 best-other-tri intersect y))) + ) + ) + ) + (move-to-point! (-> *target* control) gp-1) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate wait (task-manager-city-port-assault) + :virtual #t + :code (behavior () + (if (> (-> (task-perm-by-index *game-info* 46) user-uint64) 0) + (set-blackout-frames (seconds 100)) + ) + (while (or (not *target*) + (not *spawn-actors*) + (!= (status-of-level-and-borrows *level* 'ctypesa #f) 'active) + (!= (status-of-level-and-borrows *level* 'ctypesb #f) 'active) + (!= (status-of-level-and-borrows *level* 'ctypesc #f) 'active) + (!= (status-of-level-and-borrows *level* 'lctypalt #f) 'active) + ) + (suspend) + ) + (set-time-limit self) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate clip-to-nav-mesh (assault-player-controller) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (assault-player-controller-method-36 self) + ) + ) + +;; definition for method 42 of type task-manager-city-port-assault +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-special-pickup ((this task-manager-city-port-assault) (arg0 pickup-type)) + (when (or (= arg0 (pickup-type health)) (logtest? (-> *game-info* features) (gun-pickup-type->game-feature arg0))) + (set-next-powerup-spawn-time this) + (let* ((s4-2 (-> this current-room center-pos)) + (f30-0 0.75) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + (f30-1 + (+ f30-0 + (* (+ -1.0 (the-as float v1-10)) + (+ -0.75 + (* 0.95 + (fmin (-> this current-room collision clip-dists dist0) (-> this current-room collision clip-dists dist1)) + ) + ) + ) + ) + ) + ) + 0.0 + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> *target* control trans) (-> this current-room center-pos))) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (let ((a0-9 s2-1)) + (set! (-> a0-9 quad) (-> s2-1 quad)) + (set! (-> a0-9 y) 0.0) + (vector-normalize! a0-9 1.0) + ) + (let* ((f28-0 20024.889) + (f26-0 25486.22) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + (f0-11 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-27))) (vector-y-angle s2-1))) + ) + (vector-rotate-around-y! s3-1 *z-vector* f0-11) + ) + (vector+float*! s3-1 s4-2 s3-1 f30-1) + (let ((s4-3 (new 'stack-no-clear 'vector)) + (a0-17 (find-nearest-nav-mesh s3-1 (the-as float #x7f800000))) + ) + (when a0-17 + (when (nav-mesh-method-10 a0-17 s4-3 s3-1 (the-as nav-poly #f)) + (set! (-> s4-3 y) (-> s3-1 y)) + (set! (-> s3-1 quad) (-> s4-3 quad)) + ) + ) + ) + (sound-play "pickup-spawn") + (case arg0 + (((pickup-type health)) + (process-spawn special-health s3-1 :name "special-health" :to this) + ) + (else + (process-spawn ammo-special-pickup s3-1 arg0 :name "ammo-special-pickup" :to this) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 44 of type task-manager-city-port-assault +(defmethod task-manager-city-port-assault-method-44 ((this task-manager-city-port-assault)) + (when *target* + (let ((s4-0 (new 'static 'boxed-array :type int32 15 16 17 18)) + (s5-0 0) + ) + (dotimes (s3-0 (-> s4-0 length)) + (+! s5-0 (the int (get-remaining-player-ammo (the-as pickup-type (-> s4-0 s3-0))))) + ) + (if (and (or (= s5-0 0) + (and (< s5-0 2) (= (-> this ammo-special gun-type) 30)) + (and (< s5-0 11) (= (-> this ammo-special gun-type) 31)) + ) + (not (and (focus-test? *target* dark) (nonzero? (-> *target* darkjak)))) + ) + (send-event this 'ammo-special 15 29) + ) + ) + (when (and (or (> (-> this ammo-special end-lock-time) 0) (!= (-> *game-info* gun-type) (-> this ammo-special gun-type))) + (and (time-elapsed? (-> this ammo-special end-lock-time) (seconds 0.1)) + (!= (-> this ammo-special ammo-type) 7) + (not (and (focus-test? *target* dark) (nonzero? (-> *target* darkjak)))) + ) + ) + (set! (-> this ammo-special end-lock-time) 0) + (send-event *target* 'change-mode 'gun #f (-> this ammo-special gun-type)) + ) + ) + ) + +;; definition for method 50 of type task-manager-city-port-assault +(defmethod pickup-spawn-chance ((this task-manager-city-port-assault) (arg0 room-powerup-percentage) (arg1 int)) + (case arg1 + ((20) + (let ((f0-1 (/ (-> *target* fact health) (-> *target* fact health-max)))) + 0.0 + (let* ((f0-2 (- 1.0 f0-1)) + (f0-3 (* f0-2 f0-2)) + (f0-4 (lerp 0.0 7.0 f0-3)) + ) + (* (-> arg0 percentages arg1) f0-4) + ) + ) + ) + (else + (-> arg0 percentages arg1) + ) + ) + ) + +;; definition for method 45 of type task-manager-city-port-assault +(defmethod check-for-pickup-spawn ((this task-manager-city-port-assault)) + (when (< (-> this next-powerup-spawn-time) (current-time)) + (let* ((f30-0 0.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f28-0 (+ -1.0 (the-as float v1-3))) + ) + (dotimes (s5-0 51) + (+! f30-0 (pickup-spawn-chance this (-> *room-powerups* (-> this current-room-index)) s5-0)) + ) + (let ((f30-1 (* f28-0 f30-0)) + (f28-1 0.0) + (s5-1 0) + ) + (while (< s5-1 51) + (+! f28-1 (pickup-spawn-chance this (-> *room-powerups* (-> this current-room-index)) s5-1)) + (when (< f30-1 f28-1) + (spawn-special-pickup this (the-as pickup-type s5-1)) + (return 0) + ) + (set! s5-1 (+ s5-1 1)) + ) + ) + ) + (the-as int #f) + ) + ) + +;; definition for method 51 of type task-manager-city-port-assault +;; WARN: Return type mismatch uint vs int. +(defmethod get-suck-level ((this task-manager-city-port-assault)) + (the-as int (-> *game-info* sub-task-list (game-task-node city-port-assault-resolution) death-count)) + ) + +;; definition for method 46 of type task-manager-city-port-assault +;; WARN: Return type mismatch time-frame vs none. +(defmethod set-next-powerup-spawn-time ((this task-manager-city-port-assault)) + (let ((f30-0 0.0) + (f28-0 10.0) + ) + (dotimes (s5-0 (the int f28-0)) + (let* ((f26-0 1.0) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! f30-0 (+ f26-0 (+ -1.0 (the-as float v1-4)) f30-0)) + ) + ) + (let* ((f30-1 (/ (- f30-0 f28-0) f28-0)) + (f0-8 (lerp-scale-clamp 1.0 2.5 (the float (get-suck-level this)) 0.0 12.0)) + (f28-1 (fmax 1.0 (fmin 2.5 f0-8))) + ) + (format 0 "Powerup frequency scalar : ~f~%" f28-1) + (let* ((f0-10 (/ f30-1 f28-1)) + (s5-2 (the int (* 2.0 (the float (-> *room-powerups* (-> this current-room-index) avg-spawn-rate)) f0-10))) + ) + (format 0 "Spawning in ~f seconds~%" (* 0.0033333334 (the float s5-2))) + (set! (-> this next-powerup-spawn-time) (+ (current-time) s5-2)) + ) + ) + ) + (none) + ) + +;; definition for function skip-to-room +;; WARN: Return type mismatch entity-perm-status vs none. +(defun skip-to-room ((arg0 uint)) + (let ((v1-1 (task-perm-by-index *game-info* 46))) + (logior! (-> v1-1 status) (entity-perm-status bit-5)) + (set! (-> v1-1 user-uint64) arg0) + (logior! (-> v1-1 status) (entity-perm-status bit-14)) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/city/protect/cty-protect_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/cty-protect_REF.gc new file mode 100644 index 0000000000..bf9422c47d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/cty-protect_REF.gc @@ -0,0 +1,632 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type task-manager-protect-hq +(deftype task-manager-protect-hq (task-manager) + ((gunships handle 2) + (spawn-records (array proc-focusable-spawner)) + (spawn-index int8) + (death-count int8) + ) + (:state-methods + fight-gunship + fight-gunship-2 + wait-finish + ) + (:methods + (gunship-spawn (_type_ protect-gunship-enemy-spawn-params) object) + (spawn-gunship (_type_ vector int float) handle) + (get-spawn-pos-for-ship (_type_ vector vector symbol) vector) + ) + ) + +;; definition for method 3 of type task-manager-protect-hq +(defmethod inspect ((this task-manager-protect-hq)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgunships[2] @ #x~X~%" (-> this gunships)) + (format #t "~2Tspawn-records: ~A~%" (-> this spawn-records)) + (format #t "~2Tspawn-index: ~D~%" (-> this spawn-index)) + (format #t "~2Tdeath-count: ~D~%" (-> this death-count)) + (label cfg-4) + this + ) + +;; definition for symbol *protect-object-count*, type (array int32) +(define *protect-object-count* + (new 'static 'boxed-array :type int32 :length 13 :allocated-length 17 0 0 0 0 0 0 0 0 0 8 8 8 0) + ) + +;; definition for method 20 of type task-manager-protect-hq +(defmethod init! ((this task-manager-protect-hq)) + (set-setting! 'music 'factoryb 0.0 0) + (set-setting! 'gun-target-guards? #f 0.0 0) + (set! (-> this spawn-records) (new 'process 'boxed-array proc-focusable-spawner 17)) + (set-setting! 'disable-parking-spots? #t 0.0 0) + (dotimes (v1-7 2) + (set! (-> this gunships v1-7) (the-as handle #f)) + (set! (-> *active-gunships* v1-7 proc) (the-as handle #f)) + ) + (dotimes (s5-0 17) + (set! (-> this spawn-records s5-0) (new 'process 'proc-focusable-spawner)) + (alloc-records! (-> this spawn-records s5-0) (-> *protect-object-count* s5-0) 'process) + ) + (set-setting! 'extra-bank '((cityhq3 citykg)) 0.0 0) + (set! (-> this spawn-index) 0) + (set-cloud-and-fog-interp! *mood-control* 1.0 1.0 50.0 50.0) + (set-time-for-random-weather! *mood-control* 100000000.0 100000000.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 16) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 2.0) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type task-manager-protect-hq +(defmethod relocate ((this task-manager-protect-hq) (offset int)) + (dotimes (v1-0 17) + (if (nonzero? (-> this spawn-records v1-0)) + (&+! (-> this spawn-records v1-0) offset) + ) + ) + (if (nonzero? (-> this spawn-records)) + (&+! (-> this spawn-records) offset) + ) + (call-parent-method this offset) + ) + +;; definition for function protect-type->type +(defun protect-type->type ((arg0 gunship-cmd-spawn-type)) + (case arg0 + (((gunship-cmd-spawn-type guard-tazer) + (gunship-cmd-spawn-type guard-rifle) + (gunship-cmd-spawn-type guard-grenade) + ) + crimson-guard + ) + (((gunship-cmd-spawn-type grunt)) + metalhead-grunt + ) + (((gunship-cmd-spawn-type flitter)) + metalhead-flitter + ) + (((gunship-cmd-spawn-type unknown)) + metalhead-predator + ) + (((gunship-cmd-spawn-type roboguard)) + roboguard-city + ) + (((gunship-cmd-spawn-type turret)) + flying-turret + ) + (((gunship-cmd-spawn-type spydroid)) + spydroid + ) + (else + (the-as type #f) + ) + ) + ) + +;; definition for symbol *protect-levels*, type (array symbol) +(define *protect-levels* (new 'static 'boxed-array :type symbol :length 12 :allocated-length 17 + '#f + 'ctypepa + 'ctypepa + 'ctypesa + 'ctypesa + 'ctypesa + 'ctypesb + 'ctypesb + 'ctypepb + 'ctypesc + 'ctypesc + 'ctypesc + ) + ) + +;; definition for function spawn-protect-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defun spawn-protect-enemy ((arg0 int) (arg1 process)) + (if (logtest? (process-mask enemy guard) (-> *kernel-context* prevent-from-run)) + (return (the-as handle #f)) + ) + (let ((s4-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> s4-0 velocity quad) (the-as uint128 0)) + (set! (-> s4-0 behavior) (the-as uint 1)) + (set! (-> s4-0 object-type) (city-target-type->traffic-object-type (the-as city-target-type arg0))) + (set! (-> s4-0 flags) (traffic-spawn-flags)) + (logior! (-> s4-0 flags) (traffic-spawn-flags tsf7)) + (set! (-> s4-0 nav-branch) #f) + (set! (-> s4-0 guard-type) (the-as uint 0)) + (let ((s5-1 (get-process *default-dead-pool* (protect-type->type (the-as gunship-cmd-spawn-type arg0)) #x4000 1))) + (the-as handle (ppointer->handle (when s5-1 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s5-1 arg1 "protect-enemy" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 citizen-init-by-other s4-0) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait (task-manager-protect-hq) + :virtual #t + :enter (behavior () + (set-blackout-frames (seconds 10)) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-protect-hq) + :virtual #t + :enter (behavior () + (set-setting! 'city-sound '(cityprot) 0.0 2) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set-setting! 'airlock #f 0.0 0) + (let ((v1-8 (get-hatred-at-idx *cty-attack-controller* 9 0))) + (set! (-> v1-8 hatred) 1.0) + (set! (-> v1-8 hatred-dist) 245760.0) + (set! (-> v1-8 dist-scale) 0.25) + (set! (-> v1-8 attacker-scale) 0.0) + (set! (-> v1-8 max-consider-dist) 12288000.0) + ) + (set! (-> *cty-attack-controller* target-attacker max-num-attackers) (the-as uint 100)) + (let ((gp-0 (push-back-hatred *cty-attack-controller*))) + (set! (-> gp-0 hatred) 0.3) + (set! (-> gp-0 hatred-dist) 491520.0) + (set! (-> gp-0 dist-scale) 0.25) + (set! (-> gp-0 attacker-scale) 0.01) + (set! (-> gp-0 max-consider-dist) 12288000.0) + (set-hatred-indices *cty-attack-controller* gp-0 4 13) + (set-hatred-indices *cty-attack-controller* gp-0 3 13) + (set-hatred-indices *cty-attack-controller* gp-0 5 13) + ) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (while (< (-> self spawn-index) (-> self spawn-records length)) + (dotimes (gp-0 (-> self spawn-records (-> self spawn-index) records length)) + (set! (-> self spawn-records (-> self spawn-index) records data gp-0 proc) + (spawn-protect-enemy (-> self spawn-index) self) + ) + ) + (+! (-> self spawn-index) 1) + (suspend) + ) + (go-virtual fight-gunship) + ) + ) + +;; definition for symbol *gunship-start-positions*, type (array vector) +(define *gunship-start-positions* + (new 'static 'boxed-array :type vector (new 'static 'vector :x 2304696.2 :y 40345.6 :z -2179358.8 :w 1.0)) + ) + +;; failed to figure out what this is: +(defstate fight-gunship (task-manager-protect-hq) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gunship-destroyed) + (go-virtual fight-gunship-2) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (ff-squad-control-method-56 *ff-squad-control* 0 0 0) + (ff-squad-control-method-56 *ff-squad-control* 1 4 4) + (let ((a1-3 (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) *zero-vector* #t))) + (set! (-> self gunships 0) (spawn-gunship self a1-3 0 0.0)) + ) + ) + :trans (behavior () + (if (< 1228800.0 (vector-vector-xz-distance (target-pos 0) (-> *gunship-start-positions* 0))) + (send-event self 'fail) + ) + ((-> (method-of-type task-manager active) trans)) + (dotimes (gp-1 (-> self spawn-records length)) + (check-inactive (-> self spawn-records gp-1)) + ) + ) + :code (behavior () + (suspend) + (set-blackout-frames 0) + (sleep-code) + ) + ) + +;; definition for symbol *fountain-center-pos*, type vector +(define *fountain-center-pos* (new 'static 'vector :x 2298060.8 :y 31825.92 :z -2276925.5 :w 1.0)) + +;; definition for method 37 of type task-manager-protect-hq +;; INFO: Used lq/sq +(defmethod get-spawn-pos-for-ship ((this task-manager-protect-hq) (arg0 vector) (arg1 vector) (arg2 symbol)) + (let ((s5-0 0)) + (let ((f30-0 409600000.0)) + (dotimes (s2-0 (-> *protect-path* length)) + (let ((s1-0 (-> *protect-path* s2-0))) + 0.0 + (when (and (< 122880.0 (vector-vector-xz-distance (target-pos 0) s1-0)) + (or (< (vector-length arg1) 4096.0) (< 122880.0 (vector-vector-xz-distance arg1 s1-0))) + ) + (let ((a0-6 (new 'stack 'sphere))) + (set! (-> a0-6 quad) (-> s1-0 quad)) + (+! (-> a0-6 y) 36864.0) + (set! (-> a0-6 r) 61440.0) + (when (or arg2 (not (sphere-in-view-frustum? a0-6))) + (let ((f0-7 (vector-vector-xz-distance s1-0 *fountain-center-pos*))) + (when (and (< 81920.0 f0-7) (< f0-7 f30-0)) + (set! f30-0 f0-7) + (set! s5-0 s2-0) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg0 quad) (-> *protect-path* s5-0 quad)) + ) + arg0 + ) + +;; definition for function get-protect-suck-t +(defun get-protect-suck-t () + (lerp-scale-clamp + 0.0 + 1.0 + (the float (-> *game-info* sub-task-list (game-task-node city-protect-hq-resolution) death-count)) + 3.0 + 10.0 + ) + ) + +;; definition for method 36 of type task-manager-protect-hq +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-gunship ((this task-manager-protect-hq) (arg0 vector) (arg1 int) (arg2 float)) + (let ((s5-0 (new 'stack-no-clear 'protect-gunship-init-params))) + (set! (-> s5-0 task-man) (process->handle this)) + (set! (-> s5-0 script) *gunship-0-script*) + (set! (-> s5-0 num-stages) 2) + (set! (-> s5-0 self-index) arg1) + (set! (-> s5-0 difficulty) arg2) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (quaternion-identity! (-> s5-0 quat)) + (let ((f0-1 (get-protect-suck-t))) + (set! (-> s5-0 difficulty-scalar) (lerp 0.29 1.0 (- 1.0 f0-1))) + ) + (the-as handle (ppointer->handle (process-spawn protect-gunship s5-0 :name "protect-gunship" :to this))) + ) + ) + +;; failed to figure out what this is: +(defstate wait-finish (task-manager-protect-hq) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (dotimes (gp-0 17) + (dotimes (s5-0 (-> self spawn-records gp-0 records length)) + (send-event + (handle->process (-> self spawn-records gp-0 records data s5-0 proc)) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + :trans (behavior () + ((-> (method-of-type task-manager active) trans)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 337) *entity-pool* (target-pos 0) (the-as region #f)) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2.5)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 336) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate fight-gunship-2 (task-manager-protect-hq) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gunship-destroyed) + (+! (-> self death-count) 1) + (if (= (-> self death-count) 2) + (go-virtual wait-finish) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (ff-squad-control-method-56 *ff-squad-control* 0 0 0) + (ff-squad-control-method-56 *ff-squad-control* 1 7 7) + (let ((gp-0 (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) *zero-vector* #f))) + (dotimes (s5-0 2) + (set! (-> self gunships s5-0) (spawn-gunship self gp-0 s5-0 1.0)) + (set! (-> gp-0 quad) (-> (get-spawn-pos-for-ship self (new 'stack-no-clear 'vector) gp-0 #f) quad)) + ) + ) + ) + :trans (behavior () + (if (< 1228800.0 (vector-vector-xz-distance (target-pos 0) (-> *gunship-start-positions* 0))) + (send-event self 'fail) + ) + ((-> (method-of-type task-manager active) trans)) + (dotimes (gp-1 (-> self spawn-records length)) + (check-inactive (-> self spawn-records gp-1)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 334) *entity-pool* (target-pos 0) (the-as region #f)) + (sleep-code) + ) + ) + +;; definition for method 35 of type task-manager-protect-hq +;; INFO: Used lq/sq +(defmethod gunship-spawn ((this task-manager-protect-hq) (arg0 protect-gunship-enemy-spawn-params)) + (let ((gp-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> gp-0 velocity quad) (the-as uint128 0)) + (set! (-> gp-0 position quad) (-> arg0 pos quad)) + (quaternion-copy! (-> gp-0 rotation) (-> arg0 quat)) + (set! (-> gp-0 behavior) (the-as uint 6)) + (set! (-> gp-0 object-type) + (city-target-type->traffic-object-type (the-as city-target-type (-> arg0 spawn-type))) + ) + (set! (-> gp-0 flags) (traffic-spawn-flags)) + (set! (-> gp-0 handle) (-> arg0 parent)) + (set! (-> gp-0 user-data) (the-as uint 0)) + (set! (-> gp-0 proc) #f) + (logior! (-> gp-0 flags) (traffic-spawn-flags tsf7)) + (set! (-> gp-0 nav-branch) #f) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-0 quad) (-> arg0 pos quad)) + (vector+float*! (-> s2-0 start-pos) (-> arg0 pos) *up-vector* 24576.0) + (set! (-> s2-0 move-dist quad) (the-as uint128 0)) + (set! (-> s2-0 move-dist y) -81920.0) + (let ((v1-11 s2-0)) + (set! (-> v1-11 radius) 40.96) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 quad) (-> s2-0 best-other-tri intersect quad)) + ) + ) + (set! (-> gp-0 nav-mesh) (find-nearest-nav-mesh-protect s3-0 (the-as float #x7f800000))) + ) + (let ((v1-21 (get-last-unused-handle! (-> this spawn-records (-> arg0 spawn-type))))) + (send-event (handle->process v1-21) 'traffic-activate gp-0 *traffic-engine*) + ) + ) + ) + +;; definition for method 30 of type task-manager-protect-hq +(defmethod taskman-event-handler ((this task-manager-protect-hq) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('count-active) + (let ((s5-1 0)) + (dotimes (s4-1 (-> this spawn-records length)) + (case (city-target-type->cty-faction (the-as city-target-type s4-1)) + (((cty-faction mh) (cty-faction kg)) + (+! s5-1 + (- (-> this spawn-records s4-1 unused-list allocated-length) (-> this spawn-records s4-1 unused-list length)) + ) + ) + ) + ) + (return s5-1) + ) + v0-1 + ) + (('gunship-spawn) + (let ((a1-3 (-> arg3 param 0))) + (gunship-spawn this (the-as protect-gunship-enemy-spawn-params a1-3)) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition of type prot-crate +(deftype prot-crate (process-drawable) + ((h-crate handle :offset 208) + (dummy-ent entity-actor) + ) + (:state-methods + active + ) + (:methods + (spawn-crate (_type_) handle) + ) + ) + +;; definition for method 3 of type prot-crate +(defmethod inspect ((this prot-crate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Th-crate: ~D~%" (-> this h-crate)) + (format #t "~2Tdummy-ent: ~A~%" (-> this dummy-ent)) + (label cfg-4) + this + ) + +;; definition for method 11 of type prot-crate +(defmethod init-from-entity! ((this prot-crate) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this h-crate) (the-as handle #f)) + (set! (-> this dummy-ent) (the-as entity-actor (entity-by-name "crate-1148"))) + (go (method-of-object this active)) + ) + +;; failed to figure out what this is: +(defstate active (prot-crate) + :virtual #t + :trans (behavior () + (if (handle->process (-> self h-crate)) + (set-time! (-> self state-time)) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 15)) (not (handle->process (-> self h-crate)))) + (let ((a0-11 (new 'stack 'sphere))) + (set! (-> a0-11 quad) (-> self root trans quad)) + (set! (-> a0-11 r) 8192.0) + (if (not (sphere-in-view-frustum? a0-11)) + (spawn-crate self) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 21 of type prot-crate +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-crate ((this prot-crate)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'static 'fact-info)) + ) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) 1.0) + (set! (-> s4-0 pickup-type) (pickup-type ammo-random)) + (let ((f30-0 (get-protect-suck-t))) + (set! (-> s4-0 pickup-spawn-amount) (the float (the int (lerp 1.0 3.0 f30-0)))) + (set! (-> s4-0 pickup-amount) 10.0) + (format 0 "Suck t is ~f, pickup spawn ~f~%" f30-0 (-> s4-0 pickup-spawn-amount)) + (when *target* + (let ((f28-0 (/ (-> *target* fact health) (-> *target* fact health-max)))) + 0.0 + (let* ((f0-9 (lerp 0.3 0.5 f30-0)) + (f1-2 (- 1.0 f28-0)) + (f1-3 (* f1-2 f1-2)) + (f30-1 (lerp 0.0 f0-9 f1-3)) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (when (< (+ -1.0 (the-as float v1-14)) f30-1) + (set! (-> s4-0 pickup-type) (pickup-type health)) + (set! (-> s4-0 pickup-spawn-amount) (-> *FACT-bank* health-small-inc)) + (if (and (< 0.9 f30-1) (let* ((v1-23 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-24 (the-as number (logior #x3f800000 v1-23))) + ) + (< (+ -1.0 (the-as float v1-24)) 0.5) + ) + ) + (set! (-> s4-0 pickup-spawn-amount) (-> *FACT-bank* health-default-inc)) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 + (ppointer->process (process-spawn crate (-> this entity) s5-0 'blue s4-0 :name "crate" :to *entity-pool*)) + ) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (let ((a0-18 s5-1)) + (if a0-18 + (process-entity-set! a0-18 (-> this dummy-ent)) + ) + ) + (let ((v0-12 (process->handle s5-1))) + (set! (-> this h-crate) (the-as handle v0-12)) + (the-as handle v0-12) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager-protect-hq) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (let ((v1-0 *game-info*)) + (set! (-> v1-0 gun-ammo 0) (fmax (-> v1-0 gun-ammo 0) (-> *FACT-bank* ammo-yellow-start))) + (set! (-> v1-0 gun-ammo 1) (fmax (-> v1-0 gun-ammo 1) (-> *FACT-bank* ammo-red-start))) + (set! (-> v1-0 gun-ammo 2) (fmax (-> v1-0 gun-ammo 2) (-> *FACT-bank* ammo-blue-start))) + (set! (-> v1-0 gun-ammo 3) (fmax (-> v1-0 gun-ammo 3) (-> *FACT-bank* ammo-dark-start))) + ) + (let* ((t9-0 find-parent-method) + (a0-5 task-manager-protect-hq) + (t9-1 (-> (the-as (state resetter-params task-manager-protect-hq) (t9-0 a0-5 18)) enter)) + ) + (if t9-1 + (t9-1 (the-as resetter-params a0-5)) + ) + ) + ) + ) + +;; definition for method 25 of type task-manager-protect-hq +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-protect-hq)) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc new file mode 100644 index 0000000000..0a40e486f4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc @@ -0,0 +1,4194 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *gunship-nav-mesh*, type actor-id +(define *gunship-nav-mesh* (the-as actor-id #xe7d4)) + +;; failed to figure out what this is: +(defpart 4752 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4753 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpart 4754 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 30.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 4755 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 6.0) + (:z (meters 0.1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -2.56 -2.56) + (:friction 0.9) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4756 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gunship-laser-guard-hit + :id 1450 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4757 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 4758 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 4759 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 4760 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 4761 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 4762 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gunship-damage + :id 1451 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4763 :flags (sp7)) (sp-item 4764 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4763 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:scale-x (meters 0.6) (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4764 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 30.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.0033333334) (meters -0.0033333334)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:fade-g -0.8) + (:fade-b -0.2) + (:fade-a -0.2 -0.6666667) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-missile-beacon + :id 1452 + :flags (sp0) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 4765 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4765 + :init-specs ((:texture (kg-rob-target-01 lctyprot-sprite)) + (:num 1.0) + (:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 0.0) + (:rotvel-y (degrees 3.6)) + (:fade-a 2.56) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 4766) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4767 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 4766 + :init-specs ((:r 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:rotvel-y (degrees 0)) + (:fade-a 0.0) + (:next-time (seconds 0.035)) + (:next-launcher 4768) + ) + ) + +;; failed to figure out what this is: +(defpart 4768 + :init-specs ((:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.04)) + (:rotvel-y (degrees -3.6)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.167)) + (:next-launcher 4769) + ) + ) + +;; failed to figure out what this is: +(defpart 4769 + :init-specs ((:scalevel-x (meters 0)) (:rotvel-y (degrees 0.15)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpart 4770 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:a 128.0) + (:scalevel-x (meters -0.001)) + (:rotvel-y (degrees 0.15)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.04)) + (:next-launcher 4771) + ) + ) + +;; failed to figure out what this is: +(defpart 4771 + :init-specs ((:r 128.0) + (:a 64.0) + (:scalevel-x (meters -0.001)) + (:rotvel-y (degrees 0.15)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.5)) + (:next-launcher 4770) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-grp-gunship-explosion + :id 1453 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4773 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4774 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4775 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4776 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4777 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4778 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4779 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4780 :period (seconds 30) :length (seconds 0.5)) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4781 :flags (sp3) :binding 4772) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 4772 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4773 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4774 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 1.2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.5) (meters 0.8333333)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4775 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.22857143) + (:fade-b -0.08571429) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.93) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4776 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 8.0 8.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4777 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-dust-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 70.0 :y 70.0 :z 70.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 40.0 :y 40.0 :z 40.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 64.0 :y 32.0 :z 33.0 :w 34.0) + :one-over-x-deltas (new 'static 'vector :x -32.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 24.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 24.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ffexplo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.7 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.4285715 :y -3.3333333 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ffexplo-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ffexplo-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.2 :w 2.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 0.8000001 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-grp-gunship-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-grp-gunship-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4777 init-specs 14 initial-valuef) + (the-as float *part-grp-gunship-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ffexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ffexplo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 4779 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.7) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4780 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.13333334) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 20) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-gunship-explo-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-gunship-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 128.0 :y 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-gunship-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-gunship-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-gunship-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-gunship-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-gunship-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-grp-gunship-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-grp-gunship-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4780 init-specs 16 initial-valuef) + (the-as float *part-grp-gunship-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* color-start) *range-gunship-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* alpha-start) *range-gunship-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-x-start) *range-gunship-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-y-start) *range-gunship-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* a-scalar) *curve-gunship-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-x-scalar) *curve-gunship-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grp-gunship-explosion-texture-curve-settings* scale-y-scalar) *curve-gunship-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 4778 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.33333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4781 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 6)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.1)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 170)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4772 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.0) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 32.0) + (:a 128.0) + (:fade-a -0.36571428 -0.36571428) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-protect-gunship-cannon-charge + :id 1454 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 4782 :flags (sp6)) (sp-item 4783 :flags (sp6)) (sp-item 4784)) + ) + +;; failed to figure out what this is: +(defpart 4782 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 8.0) + (:b 255.0) + (:a 50.0 10.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4783 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.02)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 5.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4784 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 1.0) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpart 4785 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; definition of type fire-missile-state +(deftype fire-missile-state (structure) + ((missile-dest-positions vector 16 :inline) + (missile-handles handle 16) + (beacon-handles handle 16) + (last-fire-missile-time time-frame) + (last-probe-missile-time time-frame) + (launcher-rotate-time time-frame) + (num-missiles int8) + (missile-launch-index int8) + (missile-probe-index int8) + (missile-shoot-index int8) + (current-probe-angle float) + (probe-angle-shift float) + (difficulty-scalar float) + ) + (:methods + (init (_type_) none) + ) + ) + +;; definition for method 3 of type fire-missile-state +(defmethod inspect ((this fire-missile-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fire-missile-state) + (format #t "~1Tmissile-dest-positions[16] @ #x~X~%" (-> this missile-dest-positions)) + (format #t "~1Tmissile-handles[16] @ #x~X~%" (-> this missile-handles)) + (format #t "~1Tbeacon-handles[16] @ #x~X~%" (-> this beacon-handles)) + (format #t "~1Tlast-fire-missile-time: ~D~%" (-> this last-fire-missile-time)) + (format #t "~1Tlast-probe-missile-time: ~D~%" (-> this last-probe-missile-time)) + (format #t "~1Tlauncher-rotate-time: ~D~%" (-> this launcher-rotate-time)) + (format #t "~1Tnum-missiles: ~D~%" (-> this num-missiles)) + (format #t "~1Tmissile-launch-index: ~D~%" (-> this missile-launch-index)) + (format #t "~1Tmissile-probe-index: ~D~%" (-> this missile-probe-index)) + (format #t "~1Tmissile-shoot-index: ~D~%" (-> this missile-shoot-index)) + (format #t "~1Tcurrent-probe-angle: ~f~%" (-> this current-probe-angle)) + (format #t "~1Tprobe-angle-shift: ~f~%" (-> this probe-angle-shift)) + (format #t "~1Tdifficulty-scalar: ~f~%" (-> this difficulty-scalar)) + (label cfg-4) + this + ) + +;; definition of type gunship-info +(deftype gunship-info (structure) + ((proc handle) + (want-target uint8) + (cur-state symbol) + (difficulty float) + ) + ) + +;; definition for method 3 of type gunship-info +(defmethod inspect ((this gunship-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-info) + (format #t "~1Tproc: ~D~%" (-> this proc)) + (format #t "~1Twant-target: ~D~%" (-> this want-target)) + (format #t "~1Tcur-state: ~A~%" (-> this cur-state)) + (format #t "~1Tdifficulty: ~f~%" (-> this difficulty)) + (label cfg-4) + this + ) + +;; definition for symbol *active-gunships*, type (inline-array gunship-info) +(define *active-gunships* + (new 'static 'inline-array gunship-info 2 (new 'static 'gunship-info) (new 'static 'gunship-info)) + ) + +;; definition of type gunship-movement-state +(deftype gunship-movement-state (structure) + ((state-time time-frame) + (next-update-time time-frame) + (cur-mode uint8) + (dest-mode uint8) + (dest-pos vector :inline) + (completed? symbol) + ) + ) + +;; definition for method 3 of type gunship-movement-state +(defmethod inspect ((this gunship-movement-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-movement-state) + (format #t "~1Tstate-time: ~D~%" (-> this state-time)) + (format #t "~1Tnext-update-time: ~D~%" (-> this next-update-time)) + (format #t "~1Tcur-mode: ~D~%" (-> this cur-mode)) + (format #t "~1Tdest-mode: ~D~%" (-> this dest-mode)) + (format #t "~1Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~1Tcompleted?: ~A~%" (-> this completed?)) + (label cfg-4) + this + ) + +;; definition of type gunship-spawn-info +(deftype gunship-spawn-info (structure) + ((counts int8 17) + (next-spawn-time time-frame) + ) + :pack-me + (:methods + (init (_type_) none) + ) + ) + +;; definition for method 3 of type gunship-spawn-info +(defmethod inspect ((this gunship-spawn-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-spawn-info) + (format #t "~1Tcounts[17] @ #x~X~%" (-> this counts)) + (format #t "~1Tnext-spawn-time: ~D~%" (-> this next-spawn-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-protect-gunship kg-robot-transport kg-robot-transport-lod0-jg kg-robot-transport-idle-ja + ((kg-robot-transport-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12.5) + :shadow kg-robot-transport-shadow-mg + ) + +;; definition for symbol *gunship-door-joints*, type (array int32) +(define *gunship-door-joints* (new 'static 'boxed-array :type int32 4 5 6 7)) + +;; definition for symbol *gunship-engine-segs-undamaged*, type (array uint64) +(define *gunship-engine-segs-undamaged* (new 'static 'boxed-array :type uint64 #x4 #x10 #x100 #x40)) + +;; definition for symbol *gunship-engine-segs-damaged*, type (array uint64) +(define *gunship-engine-segs-damaged* (new 'static 'boxed-array :type uint64 #x8 #x20 #x200 #x80)) + +;; definition of type protect-gunship +(deftype protect-gunship (process-focusable) + ((task-man handle) + (missile-info fire-missile-state :inline) + (stage-index int8) + (num-stages int8) + (hit-points float) + (last-attack-id uint32) + (minimap connection-minimap) + (ground-pt vector :inline) + (basetrans vector :inline) + (move-state gunship-movement-state :inline) + (reaction-time time-frame) + (choose-new-point-time time-frame) + (chosen-point vector :inline) + (last-repo-pos vector :inline) + (suppress-times time-frame 8) + (want uint8) + (target uint8) + (spawn-info gunship-spawn-info :inline) + (next-fire-missile-time time-frame) + (next-spin-laser-time time-frame) + (next-spawn-time time-frame) + (last-land-time time-frame) + (last-thrust-vec vector :inline) + (roll-quat quaternion :inline) + (difficulty float) + (base-difficulty float) + (land-start-hp float) + (jmod-turret-twist joint-mod-rotate-local :inline) + (jmod-turret-pitch joint-mod-rotate-local :inline) + (jmod-doors joint-mod-rotate-local 4 :inline) + (open-doors uint8) + (num-open-doors uint8) + (last-door-index uint8) + (engines handle 4) + (rotate-start-time time-frame) + (rotate-total-time time-frame) + (rotate-rate float) + (laser-rotate-speed float) + (current-laser-rotate-speed float) + (base-laser-dir vector :inline) + (next-new-laser-rot-time time-frame) + (laser-y float) + (jmod-laser-descend joint-mod-add-local :inline) + (num-hp-per-stage float) + (self-index int8) + (other-ship-index int8) + (attacker-info city-attacker-info) + (difficulty-scalar float) + (sound-engine-loop sound-id) + (sound-lock-on sound-id) + (sound-lock-on-hi sound-id) + (alive-engines uint8) + (last-engine? symbol) + (desired-thruster-length float) + (last-thrust vector :inline) + (smoke-parts sparticle-launch-control 4) + ) + (:state-methods + protect-gunship-base-state + hover + landed + raising + lowering + enemy-spawning + spinning-laser + die + ) + (:methods + (spawn-missile (_type_ vector vector vector float int) handle) + (protect-gunship-method-37 (_type_) int) + (protect-gunship-method-38 (_type_ int float) none) + (spawn-enemy (_type_ gunship-cmd-spawn-type) symbol) + (update-nav-mesh (_type_) none) + (gunship-post (_type_) none) + (probe-ground (_type_) none) + (protect-gunship-method-43 (_type_) none) + (gunship-init (_type_) object) + (gunship-handler (_type_ process int symbol event-message-block) object) + (protect-gunship-method-46 (_type_) symbol) + (protect-gunship-method-47 (_type_) none) + (protect-gunship-method-48 (_type_ vector) symbol) + (protect-gunship-method-49 (_type_) none) + (protect-gunship-method-50 (_type_) object) + (protect-gunship-method-51 (_type_) none) + (protect-gunship-method-52 (_type_) quaternion) + (open-doors (_type_) int) + (protect-gunship-method-54 (_type_) float) + (fire-laser (_type_ vector vector) object) + (protect-gunship-method-56 (_type_ float) float) + (protect-gunship-method-57 (_type_ int vector) vector) + ) + ) + +;; definition for method 3 of type protect-gunship +(defmethod inspect ((this protect-gunship)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Ttask-man: ~D~%" (-> this task-man)) + (format #t "~2Tmissile-info: #~%" (-> this missile-info)) + (format #t "~2Tstage-index: ~D~%" (-> this stage-index)) + (format #t "~2Tnum-stages: ~D~%" (-> this num-stages)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tground-pt: #~%" (-> this ground-pt)) + (format #t "~2Tbasetrans: #~%" (-> this basetrans)) + (format #t "~2Tmove-state: #~%" (-> this move-state)) + (format #t "~2Treaction-time: ~D~%" (-> this reaction-time)) + (format #t "~2Tchoose-new-point-time: ~D~%" (-> this choose-new-point-time)) + (format #t "~2Tchosen-point: #~%" (-> this chosen-point)) + (format #t "~2Tlast-repo-pos: #~%" (-> this last-repo-pos)) + (format #t "~2Tsuppress-times[8] @ #x~X~%" (-> this suppress-times)) + (format #t "~2Twant: ~D~%" (-> this want)) + (format #t "~2Ttarget: ~D~%" (-> this target)) + (format #t "~2Tspawn-info: #~%" (-> this spawn-info)) + (format #t "~2Tnext-fire-missile-time: ~D~%" (-> this next-fire-missile-time)) + (format #t "~2Tnext-spin-laser-time: ~D~%" (-> this next-spin-laser-time)) + (format #t "~2Tnext-spawn-time: ~D~%" (-> this next-spawn-time)) + (format #t "~2Tlast-land-time: ~D~%" (-> this last-land-time)) + (format #t "~2Tlast-thrust-vec: #~%" (-> this last-thrust-vec)) + (format #t "~2Troll-quat: #~%" (-> this roll-quat)) + (format #t "~2Tdifficulty: ~f~%" (-> this difficulty)) + (format #t "~2Tbase-difficulty: ~f~%" (-> this base-difficulty)) + (format #t "~2Tland-start-hp: ~f~%" (-> this land-start-hp)) + (format #t "~2Tjmod-turret-twist: #~%" (-> this jmod-turret-twist)) + (format #t "~2Tjmod-turret-pitch: #~%" (-> this jmod-turret-pitch)) + (format #t "~2Tjmod-doors[4] @ #x~X~%" (-> this jmod-doors)) + (format #t "~2Topen-doors: ~D~%" (-> this open-doors)) + (format #t "~2Tnum-open-doors: ~D~%" (-> this num-open-doors)) + (format #t "~2Tlast-door-index: ~D~%" (-> this last-door-index)) + (format #t "~2Tengines[4] @ #x~X~%" (-> this engines)) + (format #t "~2Trotate-start-time: ~D~%" (-> this rotate-start-time)) + (format #t "~2Trotate-total-time: ~D~%" (-> this rotate-total-time)) + (format #t "~2Trotate-rate: ~f~%" (-> this rotate-rate)) + (format #t "~2Tlaser-rotate-speed: ~f~%" (-> this laser-rotate-speed)) + (format #t "~2Tcurrent-laser-rotate-speed: ~f~%" (-> this current-laser-rotate-speed)) + (format #t "~2Tbase-laser-dir: #~%" (-> this base-laser-dir)) + (format #t "~2Tnext-new-laser-rot-time: ~D~%" (-> this next-new-laser-rot-time)) + (format #t "~2Tlaser-y: ~f~%" (-> this laser-y)) + (format #t "~2Tjmod-laser-descend: #~%" (-> this jmod-laser-descend)) + (format #t "~2Tnum-hp-per-stage: ~f~%" (-> this num-hp-per-stage)) + (format #t "~2Tself-index: ~D~%" (-> this self-index)) + (format #t "~2Tother-ship-index: ~D~%" (-> this other-ship-index)) + (format #t "~2Tattacker-info: #~%" (-> this attacker-info)) + (format #t "~2Tdifficulty-scalar: ~f~%" (-> this difficulty-scalar)) + (format #t "~2Tsound-engine-loop: ~D~%" (-> this sound-engine-loop)) + (format #t "~2Tsound-lock-on: ~D~%" (-> this sound-lock-on)) + (format #t "~2Tsound-lock-on-hi: ~D~%" (-> this sound-lock-on-hi)) + (format #t "~2Talive-engines: ~D~%" (-> this alive-engines)) + (format #t "~2Tlast-engine?: ~A~%" (-> this last-engine?)) + (format #t "~2Tdesired-thruster-length: ~f~%" (-> this desired-thruster-length)) + (format #t "~2Tlast-thrust: #~%" (-> this last-thrust)) + (format #t "~2Tsmoke-parts[4] @ #x~X~%" (-> this smoke-parts)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-protect-gunship-engine kg-robot-transport-bomb kg-robot-transport-bomb-lod0-jg kg-robot-transport-bomb-idle-ja + ((kg-robot-transport-bomb-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + ) + +;; definition of type gunship-engine +(deftype gunship-engine (process-focusable) + ((hit-points float) + (child-index int16) + (last-attack-id uint32) + (attacker-info city-attacker-info) + (bolt lightning-bolt) + (hit-recently? symbol) + (last-hit-time time-frame) + ) + (:state-methods + idle + explode + ) + (:methods + (gunship-engine-method-30 (_type_) none) + ) + ) + +;; definition for method 3 of type gunship-engine +(defmethod inspect ((this gunship-engine)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tchild-index: ~D~%" (-> this child-index)) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (format #t "~2Tattacker-info: #~%" (-> this attacker-info)) + (format #t "~2Tbolt: ~A~%" (-> this bolt)) + (format #t "~2Thit-recently?: ~A~%" (-> this hit-recently?)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(if (or (zero? *gunship-engine-lightning*) (!= loading-level global)) + (set! *gunship-engine-lightning* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* tex-id) (the-as uint #x408f00)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* regenerate-time-start) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* regenerate-time-end) (seconds 0.25)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* width-range-start) 3072.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* width-range-end) 3072.0) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* fade-time) (seconds 0.1)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *gunship-engine-lightning* use-accurate-interp?) #t) + +;; definition for function gunship-engine-init-by-other +(defbehavior gunship-engine-init-by-other gunship-engine ((arg0 int) (arg1 float)) + (stack-size-set! (-> self main-thread) 128) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self child-index) arg0) + (let ((s5-1 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-1 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-1 reaction) cshape-reaction-default) + (set! (-> s5-1 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-1 penetrated-by) (penetrate)) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-1 (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s5-1 total-prims) (the-as uint 1)) + (set! (-> s5-1 root-prim) v1-10) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-13 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> self root) s5-1) + ) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-protect-gunship-engine" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self hit-points) arg1) + (set! (-> self hit-recently?) #f) + (set! (-> self attacker-info) (allocate-attacker *cty-attack-controller*)) + (init! (-> self attacker-info) self 13) + (set! (-> self bolt) (new 'process 'lightning-bolt)) + (init! (-> self bolt) 2 10 *gunship-engine-lightning*) + (go-virtual idle) + ) + +;; definition for method 30 of type gunship-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 30 gunship-engine) has a return type of none, but the expression builder found a return statement. +(defmethod gunship-engine-method-30 ((this gunship-engine)) + (cond + ((not (logtest? (-> this draw status) (draw-control-status on-screen))) + (lightning-bolt-method-13 (-> this bolt) 3) + (lightning-bolt-method-12 (-> this bolt)) + (return 0) + ) + ((and (-> this next-state) (= (-> this next-state name) 'idle)) + (lightning-bolt-method-13 (-> this bolt) 0) + ) + ) + (let ((s5-0 (-> this bolt))) + (set-vector! (-> this draw color-mult) 0.75 0.75 0.75 1.0) + (cond + ((-> this hit-recently?) + (set-vector! (-> this draw color-emissive) 1.0 1.0 1.0 0.0) + ) + ((zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 6)) + (set-vector! (-> this draw color-emissive) 0.15 0.15 0.3 0.0) + ) + (else + (set! (-> this draw color-emissive quad) (the-as uint128 0)) + ) + ) + (set! (-> s5-0 inner-point-travel-time) (seconds 0.417)) + (set! (-> s5-0 snap-inner-points?) #t) + (set! (-> s5-0 fractal-reduction) 0.3) + (set! (-> s5-0 generate-mode) (the-as uint 1)) + (set! (-> s5-0 appearance) *gunship-engine-lightning*) + (set! (-> s5-0 num-active-spans) 1) + (set! (-> s5-0 spans data 0 random-offset-size-start) 409.6) + (set! (-> s5-0 spans-internal data 0 num-inner-points) 5) + (set! (-> s5-0 spans data 0 inner-random-offset-size) 1228.8) + (when (not (time-elapsed? (-> this last-hit-time) (seconds 0.3))) + (let* ((f0-16 (* 0.011111111 (the float (- (current-time) (-> this last-hit-time))))) + (f0-17 (* f0-16 f0-16)) + ) + (set! (-> s5-0 spans data 0 inner-random-offset-size) + (* (-> s5-0 spans data 0 inner-random-offset-size) (lerp 5.0 1.0 f0-17)) + ) + ) + ) + (vector<-cspace! (the-as vector (-> s5-0 span-pts-start data)) (-> this node-list data 4)) + (vector+float*! + (the-as vector (-> s5-0 span-pts-start data)) + (the-as vector (-> s5-0 span-pts-start data)) + (-> this node-list data 4 bone transform fvec) + 819.2 + ) + (vector<-cspace! (-> s5-0 span-pts-start data 1) (-> this node-list data 5)) + (vector+float*! + (-> s5-0 span-pts-start data 1) + (-> s5-0 span-pts-start data 1) + (-> this node-list data 4 bone transform fvec) + 819.2 + ) + (set! (-> s5-0 spans data 1 random-offset-size-start) 409.6) + (set! (-> s5-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 s5-0) + (lightning-bolt-method-12 s5-0) + ) + (set! (-> this hit-recently?) #f) + (none) + ) + +;; definition for method 7 of type gunship-engine +(defmethod relocate ((this gunship-engine) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 21 of type gunship-engine +;; INFO: Used lq/sq +(defmethod get-trans ((this gunship-engine) (arg0 int)) + "Get the `trans` for this process." + (case arg0 + ((3) + (let ((gp-1 (new 'static 'vector))) + (set! (-> gp-1 quad) (-> this root trans quad)) + (vector+float*! gp-1 gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) 1638.4) + (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) -6144.0) + (set! (-> gp-1 w) 10240.0) + gp-1 + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (gunship-engine) + :virtual #t + :enter (behavior () + (lightning-bolt-method-13 (-> self bolt) 3) + (gunship-engine-method-30 self) + (sound-play "gship-fuel-expl") + (when (type? (-> self root) collide-shape) + (let ((v1-8 (-> self root root-prim))) + (set! (-> v1-8 prim-core collide-as) (collide-spec)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (logclear! (-> self mask) (process-mask enemy)) + (cond + ((logtest? (-> *part-group-id-table* 997 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 997)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 997)) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + (remove-attacker *cty-attack-controller* (-> self attacker-info)) + (send-event (ppointer->process (-> self parent)) 'engine-destroyed (-> self child-index)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (gunship-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 symbol)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (when (!= (-> v1-1 id) (-> self last-attack-id)) + (set! (-> self last-attack-id) (-> v1-1 id)) + (let ((f0-1 (if (logtest? (attack-mask damage) (-> v1-1 mask)) + (-> v1-1 damage) + (penetrate-using->damage (-> v1-1 penetrate-using)) + ) + ) + ) + (if (= (-> proc type) gun-yellow-shot-3) + (set! f0-1 0.5) + ) + (set! (-> self hit-recently?) #t) + (set-time! (-> self last-hit-time)) + (let ((f0-2 (fmin 6.0 f0-1))) + (set! (-> self hit-points) (- (-> self hit-points) f0-2)) + ) + ) + (if (>= 0.0 (-> self hit-points)) + (go-virtual explode) + ) + (return (the-as object #t)) + v0-0 + ) + ) + ) + ) + ) + :trans (behavior () + (send-event + (ppointer->process (-> self parent)) + 'child-engine-update + (-> self child-index) + (-> self root trans) + (-> self root quat) + ) + ) + :code sleep-code + :post (behavior () + (logior! (-> self skel status) (joint-control-status sync-math)) + (transform-post) + (gunship-engine-method-30 self) + ) + ) + +;; definition for method 9 of type gunship-spawn-info +;; WARN: Return type mismatch int vs none. +(defmethod init ((this gunship-spawn-info)) + (dotimes (v1-0 17) + (set! (-> this counts v1-0) 0) + ) + (set! (-> this next-spawn-time) 0) + 0 + (none) + ) + +;; definition for function find-nearest-nav-mesh-protect +(defun find-nearest-nav-mesh-protect ((arg0 vector) (arg1 float)) + (local-vars (v1-15 float) (sv-64 nav-poly) (sv-68 nav-mesh) (sv-72 float) (sv-76 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-poly)) + (set! sv-68 (the-as nav-mesh #f)) + (set! sv-72 arg1) + (set! sv-76 arg0) + (set! (-> sv-64 data 20) (the-as uint 7)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (when (!= (-> v1-5 name) 'lctyprot) + (let ((s5-0 (-> v1-5 bsp nav-meshes))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) + (when s3-0 + (vector-! (the-as vector (-> sv-64 vertex)) sv-76 (the-as vector (-> s3-0 bounds))) + (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-15 vf1) + (let ((f0-1 v1-15) + (f1-0 (-> s3-0 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 vertex1 x) (-> s3-0 nearest-y-threshold)) + (nav-mesh-method-46 s3-0 sv-64) + (when (>= sv-72 (-> sv-64 vertex1 w)) + (set! sv-72 (-> sv-64 vertex1 w)) + (set! sv-68 s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + sv-68 + ) + ) + +;; definition for function gunship-event-handler +(defbehavior gunship-event-handler protect-gunship ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (gunship-handler self arg0 arg1 arg2 arg3) + ) + +;; definition of type protect-gunship-init-params +(deftype protect-gunship-init-params (structure) + ((pos vector :inline) + (quat quaternion :inline) + (task-man handle) + (script pair) + (num-stages int8) + (self-index int8) + (difficulty float) + (difficulty-scalar float) + ) + ) + +;; definition for method 3 of type protect-gunship-init-params +(defmethod inspect ((this protect-gunship-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'protect-gunship-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Ttask-man: ~D~%" (-> this task-man)) + (format #t "~1Tscript: ~A~%" (-> this script)) + (format #t "~1Tnum-stages: ~D~%" (-> this num-stages)) + (format #t "~1Tself-index: ~D~%" (-> this self-index)) + (format #t "~1Tdifficulty: ~f~%" (-> this difficulty)) + (format #t "~1Tdifficulty-scalar: ~f~%" (-> this difficulty-scalar)) + (label cfg-4) + this + ) + +;; definition of type protect-gunship-enemy-spawn-params +(deftype protect-gunship-enemy-spawn-params (structure) + ((pos vector :inline) + (quat quaternion :inline) + (spawn-type gunship-cmd-spawn-type) + (parent handle) + ) + ) + +;; definition for method 3 of type protect-gunship-enemy-spawn-params +(defmethod inspect ((this protect-gunship-enemy-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'protect-gunship-enemy-spawn-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tspawn-type: ~D~%" (-> this spawn-type)) + (format #t "~1Tparent: ~D~%" (-> this parent)) + (label cfg-4) + this + ) + +;; definition for symbol *gunship-shadow-control*, type shadow-control +(define *gunship-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x28)) + :shadow-dir (new 'static 'vector :y -1.0 :w 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 32768.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +;; definition for method 44 of type protect-gunship +(defmethod gunship-init ((this protect-gunship)) + (set! (-> this alive-engines) (the-as uint 15)) + (set! (-> this last-engine?) #f) + (set! (-> this hit-points) (* (the float (-> this num-stages)) (-> this num-hp-per-stage))) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (probe-ground this) + (let ((a0-4 (get-nav-mesh *gunship-nav-mesh*))) + (when a0-4 + (add-process-drawable-to-nav-mesh a0-4 this #t) + (update-nav-mesh this) + ) + ) + (set! (-> this sound-engine-loop) (new-sound-id)) + (set! (-> this sound-lock-on) (new-sound-id)) + (set! (-> this sound-lock-on-hi) (new-sound-id)) + (quaternion-copy! (-> this roll-quat) (-> this root quat)) + (set! (-> this move-state cur-mode) (the-as uint 0)) + (set! (-> this move-state dest-mode) (the-as uint 0)) + (set! (-> this move-state completed?) #f) + (init (-> this jmod-turret-twist) this (the-as uint 8) (joint-mod-base-flags attached)) + (init (-> this jmod-turret-pitch) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-laser-descend) this (the-as uint 16) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this jmod-laser-descend transform scale y) -0.01) + (dotimes (s5-0 4) + (init + (-> this jmod-doors s5-0) + this + (the-as uint (-> *gunship-door-joints* s5-0)) + (joint-mod-base-flags attached) + ) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-0 32)))) + ) + (set! (-> this suppress-times (log2 16)) (+ (current-time) (seconds 4))) + (set! (-> this suppress-times (log2 32)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 10.1))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 5))) + (when (-> this draw shadow) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -81920.0 81920.0 614400.0 (the-as vector #f) (shadow-flags shdf04) 245760.0) + ) + (let ((v1-50 (-> this draw shadow-ctrl))) + (logclear! (-> v1-50 settings flags) (shadow-flags disable-draw)) + ) + 0 + (shadow-control-method-14 + (-> this draw shadow-ctrl) + (-> this root trans) + (-> this draw shadow-ctrl settings shadow-dir) + -122880.0 + -40960.0 + 40960.0 + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1454) this)) + (let* ((s5-5 (-> this part)) + (s4-0 (method-of-object s5-5 set-local-space-info)) + (s3-0 (add-connection *part-local-space-engine* this local-space-proc-joint 17 0 0)) + ) + (let ((v1-65 (process->handle this))) + (if (= v1-65 #f) + (set! v1-65 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-0) hand) (the-as handle v1-65)) + ) + (matrix-identity! (-> (the-as particle-local-space-info s3-0) mat-new)) + (matrix-identity! (-> (the-as particle-local-space-info s3-0) mat-prev)) + (set! (-> (the-as particle-local-space-info s3-0) flags) (part-local-space-flags)) + (s4-0 s5-5 (the-as particle-local-space-info s3-0)) + ) + (dotimes (s5-6 4) + (set! (-> this smoke-parts s5-6) (create-launch-control (-> *part-group-id-table* 1451) this)) + ) + (go (method-of-object this raising)) + ) + +;; definition for function protect-gunship-init-by-other +;; INFO: Used lq/sq +(defbehavior protect-gunship-init-by-other protect-gunship ((arg0 protect-gunship-init-params)) + (stack-size-set! (-> self main-thread) 256) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self level) (level-get *level* 'lctyprot)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 18432.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 9) + (set-vector! (-> v1-19 local-sphere) 0.0 2048.0 0.0 16384.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 0.0 49152.0 0.0 21708.8) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 18432.0 0.0 32768.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 0.0 18432.0 0.0 36864.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-28 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-28 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-28 prim-core collide-with)) + ) + (set! (-> s5-0 nav-radius) 32768.0) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-protect-gunship" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self task-man) (-> arg0 task-man)) + (set! (-> self self-index) (-> arg0 self-index)) + (set! (-> self other-ship-index) (logand (+ (-> self self-index) 1) 1)) + (set! (-> *active-gunships* (-> self self-index) proc) (process->handle self)) + (ja :group! (-> self draw art-group data 3) :num! (identity 1.0)) + (set! (-> self base-difficulty) (-> arg0 difficulty)) + (set! (-> self difficulty-scalar) (-> arg0 difficulty-scalar)) + (init (-> self missile-info)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self basetrans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self num-stages) 4) + (set-vector! (-> self root scale) 0.4 0.4 0.4 1.0) + (set! (-> self num-hp-per-stage) (lerp 22.0 33.0 (-> self base-difficulty))) + (set! (-> self num-hp-per-stage) (* (-> self num-hp-per-stage) (lerp 0.5 1.0 (-> self difficulty-scalar)))) + (dotimes (gp-1 4) + (set! (-> self engines gp-1) + (ppointer->handle + (process-spawn gunship-engine gp-1 (-> self num-hp-per-stage) :name "gunship-engine" :to self) + ) + ) + ) + (gunship-init self) + ) + +;; definition for method 7 of type protect-gunship +(defmethod relocate ((this protect-gunship) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this smoke-parts v1-0)) + (&+! (-> this smoke-parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition of type gunship-exploder +(deftype gunship-exploder (process-drawable) + () + (:state-methods + explode + ) + ) + +;; definition for method 3 of type gunship-exploder +(defmethod inspect ((this gunship-exploder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-gunship-exploder kg-robot-transport-break kg-robot-transport-break-lod0-jg kg-robot-transport-break-idle-ja + ((kg-robot-transport-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80.5) + ) + +;; failed to figure out what this is: +(defstate explode (gunship-exploder) + :virtual #t + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + :post ja-post + ) + +;; definition for function gunship-exploder-init-by-other +;; INFO: Used lq/sq +(defbehavior gunship-exploder-init-by-other gunship-exploder ((arg0 vector) (arg1 quaternion)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gunship-exploder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) 0.4 0.4 0.4 1.0) + (go-virtual explode) + ) + +;; failed to figure out what this is: +(defstate die (protect-gunship) + :virtual #t + :enter (behavior () + (sound-stop (-> self sound-engine-loop)) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> *active-gunships* (-> self self-index) want-target) (the-as uint 0)) + (set! (-> *active-gunships* (-> self self-index) cur-state) 'die) + (when (type? (-> self root) collide-shape) + (let ((v1-9 (-> self root root-prim))) + (set! (-> v1-9 prim-core collide-as) (collide-spec)) + (set! (-> v1-9 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-play "gship-explode") + (cond + ((logtest? (-> *part-group-id-table* 1453 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1453)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1453)) + ) + ) + ) + :code (behavior () + (process-spawn gunship-exploder (-> self root trans) (-> self root quat) :name "gunship-exploder" :to self) + (set! (-> self root trans quad) (-> self ground-pt quad)) + (let ((gp-1 (new 'static 'fact-info))) + (set! (-> gp-1 process) self) + (set! (-> gp-1 pickup-type) (pickup-type ammo-random)) + (set! (-> gp-1 pickup-amount) 15.0) + (dotimes (s5-0 3) + (set! (-> gp-1 pickup-spawn-amount) (the float (+ (logand (rand-uint31-gen *random-generator*) 1) 1))) + (drop-pickup gp-1 #t *entity-pool* gp-1 0 #t) + ) + (set! (-> gp-1 pickup-type) (pickup-type health)) + (set! (-> gp-1 pickup-spawn-amount) 1.0) + (set! (-> gp-1 pickup-amount) 2.0) + (drop-pickup gp-1 #t *entity-pool* gp-1 0 #t) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 5)) + (suspend) + ) + ) + ) + ) + +;; definition for method 45 of type protect-gunship +(defmethod gunship-handler ((this protect-gunship) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('engine-destroyed) + (let ((v0-0 (the-as object (logclear (-> this alive-engines) (ash 1 (the-as int (-> arg3 param 0))))))) + (set! (-> this alive-engines) (the-as uint v0-0)) + v0-0 + ) + ) + (('child-engine-update) + (let ((s2-0 (-> arg3 param 0)) + (s3-0 (-> arg3 param 1)) + (s5-0 (-> arg3 param 2)) + (s4-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) + ) + (vector-rotate-around-axis! + (-> s4-0 fvec) + (the-as quaternion (-> s4-0 fvec)) + (+ 8192.0 (* 16384.0 (the float s2-0))) + (-> s4-0 uvec) + ) + (vector+float*! (the-as vector s3-0) (-> this root trans) (-> s4-0 fvec) 25804.8) + (vector+float*! (the-as vector s3-0) (the-as vector s3-0) (-> s4-0 uvec) 8192.0) + (quaternion-look-at! (the-as quaternion s5-0) (-> s4-0 fvec) *up-vector*) + ) + #t + ) + (('missile-die) + (let ((v1-10 (-> arg3 param 0))) + (if (and (>= (the-as int v1-10) 0) (< (the-as int v1-10) 16)) + (send-event (handle->process (-> this missile-info beacon-handles v1-10)) 'die) + ) + ) + #t + ) + (else + #f + ) + ) + ) + +;; definition of type gunship-missile +(deftype gunship-missile (process-focusable) + ((dest-pos vector :inline) + (launch-dir vector :inline) + (particle-trail sparticle-subsampler) + (travel-speed float) + (attack-time float) + (attack-id uint32) + (index int16) + (swoosh-sound sound-id) + ) + (:state-methods + launch + attack-targ + explode + ) + (:methods + (gunship-missile-method-31 (_type_) none) + (gunship-missile-method-32 (_type_) sound-id) + ) + ) + +;; definition for method 3 of type gunship-missile +(defmethod inspect ((this gunship-missile)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~2Tlaunch-dir: #~%" (-> this launch-dir)) + (format #t "~2Tparticle-trail: ~A~%" (-> this particle-trail)) + (format #t "~2Ttravel-speed: ~f~%" (-> this travel-speed)) + (format #t "~2Tattack-time: ~f~%" (-> this attack-time)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tindex: ~D~%" (-> this index)) + (format #t "~2Tswoosh-sound: ~D~%" (-> this swoosh-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defpart 4786 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 150.0) + (:b 150.0) + (:a 30.0 30.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2 -0.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x400000 #x405c00)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gunship-missile cty-homing-missile cty-homing-missile-lod0-jg cty-homing-missile-idle-ja + ((cty-homing-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :origin-joint-index 3 + ) + +;; definition of type gunship-missile-init-params +(deftype gunship-missile-init-params (structure) + ((pos vector :inline) + (dest-pos vector :inline) + (launch-dir vector :inline) + (time-to-targ float) + (index int16) + ) + ) + +;; definition for method 3 of type gunship-missile-init-params +(defmethod inspect ((this gunship-missile-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-missile-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~1Tlaunch-dir: #~%" (-> this launch-dir)) + (format #t "~1Ttime-to-targ: ~f~%" (-> this time-to-targ)) + (format #t "~1Tindex: ~D~%" (-> this index)) + (label cfg-4) + this + ) + +;; definition for function gunship-missile-init-by-other +;; INFO: Used lq/sq +(defbehavior gunship-missile-init-by-other gunship-missile ((arg0 gunship-missile-init-params)) + (set! (-> self level) (level-get *level* 'lctyprot)) + (stack-size-set! (-> self main-thread) 256) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-with) (collide-spec backgnd obstacle pusher)) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-12) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-15 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self swoosh-sound) (new-sound-id)) + (let* ((v1-17 *game-info*) + (a0-12 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-12) + (set! (-> self attack-id) a0-12) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gunship-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self dest-pos quad) (-> arg0 dest-pos quad)) + (set! (-> self launch-dir quad) (-> arg0 launch-dir quad)) + (set! (-> self index) (-> arg0 index)) + (let ((a1-9 (matrix-f-compose (new 'stack-no-clear 'matrix) (-> self launch-dir)))) + (matrix->quaternion (-> self root quat) a1-9) + ) + (let* ((s5-2 quaternion-rotate-local-z!) + (s4-1 (-> self root quat)) + (s3-0 (-> self root quat)) + (f30-0 65536.0) + (v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-32 (the-as number (logior #x3f800000 v1-31))) + ) + (s5-2 s4-1 s3-0 (* f30-0 (+ -1.0 (the-as float v1-32)))) + ) + (set! (-> self travel-speed) + (/ (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) (-> arg0 time-to-targ)) + ) + self + (set! (-> self particle-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4786) 4.0) + ) + (set-vector! (-> self root scale) 0.8 0.8 0.9 1.0) + (ja-post) + (go-virtual launch) + ) + +;; failed to figure out what this is: +(defstate launch (gunship-missile) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack-targ) + (set! (-> self dest-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self attack-time) (the float (-> block param 1))) + (go-virtual attack-targ) + ) + ) + ) + :trans (behavior () + (gunship-missile-method-31 self) + (gunship-missile-method-32 self) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate attack-targ (gunship-missile) + :virtual #t + :enter (behavior () + (sound-play "gship-incoming") + (set-time! (-> self state-time)) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) (-> self dest-pos) (-> self root trans)))) + 0.0 + (set! (-> self travel-speed) (/ (vector-normalize-ret-len! gp-2 1.0) (* 0.0033333334 (-> self attack-time)))) + (let ((a1-3 (matrix-f-compose (new 'stack-no-clear 'matrix) gp-2))) + (matrix->quaternion (-> self root quat) a1-3) + ) + ) + ) + :trans (behavior () + (gunship-missile-method-31 self) + (gunship-missile-method-32 self) + (if (time-elapsed? (-> self state-time) (the int (-> self attack-time))) + (go-virtual explode) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for symbol *rand-missile-sound-list*, type (array string) +(define *rand-missile-sound-list* (new 'static 'boxed-array :type string + "missle-expl-1" + "missle-expl-2" + "missle-expl-3" + "missle-expl-5" + "missle-expl-6" + ) + ) + +;; failed to figure out what this is: +(defstate explode (gunship-missile) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play-by-name + (string->sound-name + (-> *rand-missile-sound-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *rand-missile-sound-list* length)) + ) + ) + (new-sound-id) + 1024 + 0 + 0 + (sound-group) + #t + ) + (sound-stop (-> self swoosh-sound)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-11 (-> self root root-prim))) + (set! (-> v1-11 prim-core collide-as) (collide-spec)) + (set! (-> v1-11 prim-core collide-with) (collide-spec)) + ) + 0 + (transform-post) + (cond + ((logtest? (-> *part-group-id-table* 104 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self dest-pos quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 104)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self dest-pos quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 104)) + ) + ) + (send-event (ppointer->process (-> self parent)) 'missile-die (-> self index)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.35)) + (go empty-state) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let* ((f1-2 (* 0.00952381 (the float (- (current-time) (-> self state-time))))) + (f0-4 (fmax 0.0 (fmin 1.0 f1-2))) + (f30-0 (lerp 10240.0 17920.0 f0-4)) + ) + (set! (-> gp-0 quad) (-> self dest-pos quad)) + (set! (-> gp-0 w) (* 2.0 f30-0)) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-16 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-16 + (let* ((s2-0 (-> v1-16 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s3-1 mask)) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive)) + (-> (the-as process-focusable s3-1) root root-prim) + (let ((f0-7 + (vector-vector-distance-squared + (-> self dest-pos) + (the-as vector (-> (the-as process-focusable s3-1) root root-prim prim-core)) + ) + ) + (f1-4 f30-0) + ) + (< f0-7 (* f1-4 f1-4)) + ) + ) + (send-event + s3-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (if (= (-> s3-1 type) target) + 1.0 + 12.0 + ) + ) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s4-1 *target*) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 w))) + (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s5-1 mask)) + (not (focus-test? s5-1 disable dead inactive)) + (-> s5-1 control root-prim) + (< (vector-vector-distance-squared (-> self dest-pos) (the-as vector (-> s5-1 control root-prim prim-core))) + (* f30-0 f30-0) + ) + ) + (send-event + s5-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (if (= (-> s5-1 type) target) + 1.0 + 12.0 + ) + ) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 31 of type gunship-missile +;; INFO: Used lq/sq +;; WARN: Return type mismatch matrix vs none. +(defmethod gunship-missile-method-31 ((this gunship-missile)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) *up-vector*) + (set! (-> gp-0 trans quad) (-> this root trans quad)) + (vector+float*! (-> gp-0 trans) (-> gp-0 trans) (-> gp-0 fvec) -3686.4) + (vector+float*! (-> gp-0 trans) (-> gp-0 trans) (-> gp-0 fvec) -4096.0) + (init-with-mat! (-> this particle-trail) gp-0) + ) + (none) + ) + +;; definition for method 32 of type gunship-missile +(defmethod gunship-missile-method-32 ((this gunship-missile)) + (let ((v1-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (vector+float*! (-> this root trans) (-> this root trans) v1-1 (* (-> this travel-speed) (seconds-per-frame))) + (sound-play-by-name + (static-sound-name "gship-mslstreak") + (-> this swoosh-sound) + 1024 + (the int (* 1524.0 (doppler-pitch-shift + (-> this root trans) + (vector-float*! (new 'stack-no-clear 'vector) v1-1 (-> this travel-speed)) + ) + ) + ) + 0 + (sound-group) + #t + ) + ) + ) + +;; definition for method 7 of type gunship-missile +(defmethod relocate ((this gunship-missile) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 36 of type protect-gunship +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-missile ((this protect-gunship) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int)) + (let ((s5-0 (new 'stack-no-clear 'gunship-missile-init-params))) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s5-0 launch-dir) arg1 1.0) + (set! (-> s5-0 dest-pos quad) (-> arg2 quad)) + (set! (-> s5-0 index) arg4) + (set! (-> s5-0 time-to-targ) arg3) + (the-as handle (ppointer->handle (process-spawn gunship-missile s5-0 :name "gunship-missile" :to this))) + ) + ) + +;; definition for method 9 of type fire-missile-state +;; WARN: Return type mismatch symbol vs none. +(defmethod init ((this fire-missile-state)) + (set! (-> this num-missiles) 0) + (set! (-> this missile-launch-index) 0) + (set! (-> this missile-probe-index) 0) + (set! (-> this missile-shoot-index) 0) + (dotimes (v1-0 16) + (set! (-> this beacon-handles v1-0) (the-as handle #f)) + (set! (-> this missile-handles v1-0) (the-as handle #f)) + ) + (none) + ) + +;; definition for method 38 of type protect-gunship +;; WARN: Return type mismatch time-frame vs none. +(defmethod protect-gunship-method-38 ((this protect-gunship) (arg0 int) (arg1 float)) + (init (-> this missile-info)) + (set! (-> this missile-info num-missiles) arg0) + (let* ((f30-0 65536.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (set! (-> this missile-info current-probe-angle) (* f30-0 (+ -1.0 (the-as float v1-5)))) + ) + (set! (-> this missile-info probe-angle-shift) (/ 65536.0 (the float arg0))) + (set! (-> this missile-info difficulty-scalar) arg1) + (set-time! (-> this missile-info launcher-rotate-time)) + (none) + ) + +;; definition for symbol *missile-launch-locations*, type (array int16) +(define *missile-launch-locations* (new 'static 'boxed-array :type int16 10 11 12 13 14 15)) + +;; definition for method 37 of type protect-gunship +;; INFO: Used lq/sq +(defmethod protect-gunship-method-37 ((this protect-gunship)) + (if (zero? (-> this missile-info num-missiles)) + (return 0) + ) + (when (not (time-elapsed? (-> this missile-info launcher-rotate-time) (seconds 0.5))) + (let ((v1-7 (target-pos 0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s5-0 v1-7 (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-float*! s5-0 s5-0 0.85) + (set! (-> s5-0 y) 163840.0) + (vector-normalize! s5-0 1.0) + (let* ((f0-5 (- 16384.0 (acos (vector-dot s5-0 *up-vector*)))) + (f0-8 + (lerp 0.0 f0-5 (* 0.006666667 (the float (- (current-time) (-> this missile-info launcher-rotate-time))))) + ) + (f30-1 (fmin 8192.0 f0-8)) + ) + (quaternion-rotate-x! + (-> this jmod-turret-pitch rotation) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (- f30-1) + ) + ) + ) + (return 0) + ) + (when (and (>= (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.6)) + ) + (dotimes (s5-2 (-> this missile-info num-missiles)) + (send-event (handle->process (-> this missile-info beacon-handles s5-2)) 'die) + ) + (init (-> this missile-info)) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + ) + (when (< (-> this missile-info missile-launch-index) (-> this missile-info num-missiles)) + (if (zero? (-> this missile-info missile-launch-index)) + (sound-play "gship-msllaunch") + ) + (when (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.03)) + (let ((s3-0 (target-pos 0)) + (s4-1 (new 'stack-no-clear 'vector)) + (s5-4 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! + s5-4 + (-> this + node-list + data + (-> *missile-launch-locations* + (mod (-> this missile-info missile-launch-index) (-> *missile-launch-locations* length)) + ) + ) + ) + (vector-! s4-1 s3-0 s5-4) + (set! (-> s4-1 y) 0.0) + (vector-float*! s4-1 s4-1 0.85) + (set! (-> s4-1 y) 163840.0) + (set! (-> this missile-info missile-handles (-> this missile-info missile-launch-index)) + (spawn-missile + this + s5-4 + s4-1 + (target-pos 0) + (lerp 1.2 0.6 (-> this missile-info difficulty-scalar)) + (-> this missile-info missile-launch-index) + ) + ) + ) + (set-time! (-> this missile-info last-fire-missile-time)) + (+! (-> this missile-info missile-launch-index) 1) + ) + (return 0) + ) + (if (and *target* (focus-test? *target* board)) + (set! (-> this missile-info difficulty-scalar) 1.2) + ) + (when (and (< (-> this missile-info missile-probe-index) (-> this missile-info num-missiles)) + (time-elapsed? (-> this missile-info last-probe-missile-time) (seconds 0.03)) + ) + (let ((s5-5 (-> this missile-info missile-probe-index))) + (when (zero? s5-5) + (let ((v1-86 (the int (* 300.0 (lerp 1.2 0.6 (-> this missile-info difficulty-scalar)))))) + (+! (-> this missile-info last-fire-missile-time) v1-86) + ) + ) + (let ((s4-3 (min 1 (- (-> this missile-info num-missiles) s5-5)))) + (set-time! (-> this missile-info last-probe-missile-time)) + (dotimes (s3-2 s4-3) + (when *target* + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> (get-trans *target* 1) quad)) + 0.0 + 0.75 + (let ((f30-3 (vector-length (get-transv *target*))) + (f28-0 (lerp 0.0 0.75 (* 0.0625 (the float (-> this missile-info num-missiles))))) + ) + (if (focus-test? *target* board) + (set! f28-0 1.2) + ) + (let ((f26-0 (* 0.1875 (the float (-> this missile-info num-missiles))))) + (vector+float*! s2-1 s2-1 (get-transv *target*) f28-0) + (let* ((f28-1 (* f26-0 (-> this missile-info probe-angle-shift) (the float s5-5))) + (f26-1 8192.0) + (f24-0 8192.0) + (v1-115 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-116 (the-as number (logior #x3f800000 v1-115))) + (f26-2 (+ f26-1 (* f24-0 (+ -1.0 (the-as float v1-116))))) + (s1-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-3 quad) (-> *x-vector* quad)) + 0.0 + (let* ((v1-121 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-122 (the-as number (logior #x3f800000 v1-121))) + (f0-35 (- (* (+ -1.0 (the-as float v1-122)) (-> this missile-info probe-angle-shift)))) + (f24-1 (* 0.25 f0-35)) + (f0-38 (floor (the float (/ s5-5 3)))) + (f2-0 (* 0.000016276043 f30-3)) + (f1-15 (fmax 0.0 (fmin 1.0 f2-0))) + (f1-16 (* f1-15 f1-15)) + (f0-39 (* f0-38 (- 1.0 f1-16))) + (f0-41 (* f26-2 (+ 0.75 f0-39))) + (f30-4 (fmin 40960.0 f0-41)) + ) + (vector-rotate-around-y! s1-3 s1-3 (+ f28-1 f24-1 (-> this missile-info current-probe-angle))) + (vector+float*! (-> this missile-info missile-dest-positions s5-5) s2-1 s1-3 f30-4) + ) + ) + ) + ) + ) + (let ((v1-138 (new 'stack-no-clear 'vector)) + (s2-2 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> v1-138 quad) (-> this missile-info missile-dest-positions s5-5 quad)) + (vector+float*! (-> s2-2 start-pos) v1-138 *up-vector* 24576.0) + (set! (-> s2-2 move-dist quad) (the-as uint128 0)) + (set! (-> s2-2 move-dist y) -81920.0) + (let ((v1-141 s2-2)) + (set! (-> v1-141 radius) 40.96) + (set! (-> v1-141 collide-with) (collide-spec backgnd)) + (set! (-> v1-141 ignore-process0) #f) + (set! (-> v1-141 ignore-process1) #f) + (set! (-> v1-141 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-141 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-2) 0.0) + (set! (-> this missile-info missile-dest-positions s5-5 quad) (-> s2-2 best-other-tri intersect quad)) + (set! (-> this missile-info missile-dest-positions s5-5 y) 0.0) + ) + ) + (sound-play "gship-bombscan") + (let ((v1-152 (new 'stack-no-clear 'vector))) + (set! (-> v1-152 quad) (-> this missile-info missile-dest-positions s5-5 quad)) + (+! (-> v1-152 y) 409.6) + (set! (-> this missile-info beacon-handles s5-5) + (ppointer->handle + (cond + ((logtest? (-> *part-group-id-table* 1452 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-152 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 1452)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-152 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 1452)) + ) + ) + ) + ) + ) + (+! (-> this missile-info missile-probe-index) 1) + (+! s5-5 1) + ) + ) + ) + ) + ) + (when (and (< (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (< (-> this missile-info missile-shoot-index) (-> this missile-info missile-probe-index)) + ) + (when (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.05)) + (set-time! (-> this missile-info last-fire-missile-time)) + (sound-stop (-> this sound-lock-on)) + (sound-play "gship-bomblock" :id (-> this sound-lock-on-hi)) + (send-event + (handle->process (-> this missile-info missile-handles (-> this missile-info missile-shoot-index))) + 'attack-targ + (-> this missile-info missile-dest-positions (-> this missile-info missile-shoot-index)) + 180 + ) + (+! (-> this missile-info missile-shoot-index) 1) + ) + ) + (cond + ((or (< (-> this missile-info missile-shoot-index) (-> this missile-info num-missiles)) + (not (time-elapsed? (-> this missile-info last-fire-missile-time) (seconds 0.6))) + ) + (set-setting! 'string-min-height 'abs (meters 8) 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (dotimes (v1-221 (-> this missile-info missile-probe-index)) + ) + (the-as int #f) + ) + (else + (sound-stop (-> this sound-lock-on-hi)) + ) + ) + ) + +;; definition for method 39 of type protect-gunship +;; INFO: Used lq/sq +(defmethod spawn-enemy ((this protect-gunship) (arg0 gunship-cmd-spawn-type)) + (let ((s5-0 (new 'stack-no-clear 'protect-gunship-enemy-spawn-params))) + (set! (-> s5-0 parent) (process->handle this)) + (case arg0 + (((gunship-cmd-spawn-type turret)) + (let ((v1-4 0)) + (dotimes (a0-6 4) + (when (and (logtest? (-> this open-doors) (ash 1 a0-6)) + (or (!= a0-6 (-> this last-door-index)) (>= (the-as uint 1) (-> this num-open-doors))) + ) + (set! v1-4 a0-6) + (set! (-> this last-door-index) (the-as uint a0-6)) + 0 + (goto cfg-21) + ) + ) + (label cfg-21) + (let ((v1-10 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* v1-4))) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-0 v1-10 (-> this root trans)) + (set! (-> s3-0 y) 0.0) + (vector+! (-> s5-0 pos) (-> this root trans) s3-0) + (+! (-> s5-0 pos y) 12288.0) + (vector-normalize! s3-0 1.0) + (quaternion-look-at! (-> s5-0 quat) s3-0 *up-vector*) + ) + ) + ) + (else + (set! (-> s5-0 pos quad) (-> this root trans quad)) + (quaternion-copy! (-> s5-0 quat) (-> this root quat)) + ) + ) + (if (not (protect-gunship-method-48 this (-> s5-0 pos))) + (return #f) + ) + (set! (-> s5-0 spawn-type) arg0) + (send-event (handle->process (-> this task-man)) 'gunship-spawn s5-0) + ) + #t + ) + +;; definition for method 42 of type protect-gunship +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod probe-ground ((this protect-gunship)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> this ground-pt quad) (-> this basetrans quad)) + (vector+float*! (-> s5-0 start-pos) (-> this ground-pt) *up-vector* 24576.0) + (set! (-> s5-0 move-dist quad) (the-as uint128 0)) + (set! (-> s5-0 move-dist y) -81920.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec backgnd)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> this ground-pt quad) (-> s5-0 best-other-tri intersect quad)) + (set! (-> this ground-pt y) 7372.8) + ) + ) + 0 + (none) + ) + +;; definition for method 57 of type protect-gunship +(defmethod protect-gunship-method-57 ((this protect-gunship) (arg0 int) (arg1 vector)) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat)))) + (vector-rotate-around-axis! + (-> s5-0 fvec) + (the-as quaternion (-> s5-0 fvec)) + (+ 8192.0 (* 16384.0 (the float arg0))) + (-> s5-0 uvec) + ) + (vector+float*! arg1 (-> this root trans) (-> s5-0 fvec) 21708.8) + ) + arg1 + ) + +;; definition for method 41 of type protect-gunship +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod gunship-post ((this protect-gunship)) + (probe-ground this) + (sound-play "gship-engn-loop" :id (-> this sound-engine-loop)) + (set-virtual-cur-pos! (-> this nav state) (-> this ground-pt)) + (protect-gunship-method-37 this) + (set! (-> this want) (the-as uint 0)) + (set! (-> this target) (the-as uint 0)) + (set! (-> this root trans quad) (-> this basetrans quad)) + (let* ((f0-0 0.4) + (f1-1 (* 0.0033333334 (the float (current-time)))) + (f0-1 (* f0-0 (- f1-1 (* (the float (the int (/ f1-1 2.5))) 2.5)))) + ) + (set! (-> this root trans y) (+ 1228.8 (* 1228.8 (cos (* 65536.0 f0-1))) (-> this basetrans y))) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this last-thrust quad)) + 0.0 + 0.0 + (vector+! s5-0 s5-0 (-> this root transv)) + (vector-float*! s5-0 s5-0 0.5) + (set! (-> s5-0 y) 0.0) + (let* ((f0-11 (vector-normalize-ret-len! s5-0 1.0)) + (f1-6 (* 0.000009765625 f0-11)) + (f0-13 (fmax 0.0 (fmin 1.0 f1-6))) + (f0-14 (* f0-13 f0-13)) + ) + (vector-cross! (new 'stack-no-clear 'vector) *up-vector* s5-0) + (let ((f0-15 (* 2730.6667 f0-14)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! s4-0 s5-0 f0-15) + (quaternion-slerp! (-> this roll-quat) (-> this roll-quat) s4-0 (* 2.0 (seconds-per-frame))) + ) + ) + ) + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (quaternion-look-at! (-> this root quat) s5-1 *up-vector*) + ) + (quaternion*! (-> this root quat) (-> this roll-quat) (-> this root quat)) + (let ((s5-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-2 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0))) + ) + 0.0 + (set! (-> s5-2 y) 0.0) + (set! (-> s4-2 y) 0.0) + (vector-normalize! s5-2 1.0) + (vector-normalize! s4-2 1.0) + (vector-float*! s5-2 s5-2 -1.0) + (let ((a2-6 + (quaternion-rotate-y! + (new 'stack-no-clear 'quaternion) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (- (vector-y-angle s4-2) (vector-y-angle s5-2)) + ) + ) + ) + (quaternion-slerp! + (-> this jmod-turret-twist rotation) + (-> this jmod-turret-twist rotation) + a2-6 + (* 3.0 (seconds-per-frame)) + ) + ) + ) + (if (zero? (-> this missile-info num-missiles)) + (quaternion-slerp! + (-> this jmod-turret-pitch rotation) + (-> this jmod-turret-pitch rotation) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 2.0 (seconds-per-frame)) + ) + ) + (when (and (not (and (-> this next-state) (= (-> this next-state name) 'enemy-spawning))) + (time-elapsed? (-> this spawn-info next-spawn-time) (seconds 1)) + ) + (when (> (-> this num-open-doors) 0) + (sound-play "gship-doorclose") + (set! (-> this num-open-doors) (the-as uint 0)) + 0 + ) + (dotimes (s5-5 4) + (quaternion-slerp! + (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-5 32))) + (the-as quaternion (+ (the-as uint (-> this jmod-doors 0 rotation)) (* s5-5 32))) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 2.0 (seconds-per-frame)) + ) + ) + ) + (cond + ((and (-> this next-state) (let ((v1-75 (-> this next-state name))) + (or (= v1-75 'lowering) (= v1-75 'landed)) + ) + ) + (seek! (-> this desired-thruster-length) 4096.0 (* 8192.0 (seconds-per-frame))) + ) + ((and (-> this next-state) (= (-> this next-state name) 'raising)) + (seek! (-> this desired-thruster-length) 22528.0 (* 24576.0 (seconds-per-frame))) + ) + (else + (let* ((f0-39 (vector-length (-> this last-thrust))) + (f0-40 (lerp-scale-clamp 10240.0 16384.0 f0-39 12288.0 81920.0)) + ) + (seek! (-> this desired-thruster-length) f0-40 (* 12288.0 (seconds-per-frame))) + ) + ) + ) + (set! (-> this hit-points) 0.0) + (dotimes (s5-6 4) + (let ((f0-45 (-> (the-as gunship-engine (handle->process (-> this engines s5-6))) hit-points))) + (+! (-> this hit-points) (fmax 0.0 f0-45)) + (cond + ((>= 0.0 f0-45) + (setup-masks + (-> this draw) + (the-as int (-> *gunship-engine-segs-damaged* s5-6)) + (the-as int (-> *gunship-engine-segs-undamaged* s5-6)) + ) + (let ((a1-32 (protect-gunship-method-57 this s5-6 (new 'stack-no-clear 'vector)))) + (spawn (-> this smoke-parts s5-6) a1-32) + ) + ) + (else + (setup-masks + (-> this draw) + (the-as int (-> *gunship-engine-segs-undamaged* s5-6)) + (the-as int (-> *gunship-engine-segs-damaged* s5-6)) + ) + (let ((s4-6 (protect-gunship-method-57 this s5-6 (new 'stack-no-clear 'vector)))) + (let* ((f30-2 (-> this desired-thruster-length)) + (f28-1 -1228.8) + (f26-0 2457.6) + (v1-117 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-118 (the-as number (logior #x3f800000 v1-117))) + (f0-51 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-118))) f30-2)) + ) + (set! (-> *part-id-table* 4785 init-specs 4 initial-valuef) f0-51) + (set! (-> *part-id-table* 4785 init-specs 3 initial-valuef) (* 0.5 f0-51)) + ) + (draw-beam + (-> *part-id-table* 4785) + s4-6 + (vector-float*! + (new 'stack-no-clear 'vector) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) + -20480.0 + ) + #f + ) + ) + ) + ) + ) + ) + (when (>= 0.0 (-> this hit-points)) + (send-event (handle->process (-> this task-man)) 'gunship-destroyed) + (go (method-of-object this die)) + ) + (set! (-> this stage-index) + (- (-> this num-stages) (the int (ceil (/ (-> this hit-points) (-> this num-hp-per-stage))))) + ) + (set! (-> this difficulty) + (- 1.0 (/ (-> this hit-points) (* (the float (-> this num-stages)) (-> this num-hp-per-stage)))) + ) + (set! (-> this difficulty) (fmax 0.0 (fmin 1.0 (-> this difficulty)))) + (when (>= (-> this base-difficulty) 0.5) + (set! (-> *active-gunships* (-> this self-index) difficulty) (-> this difficulty)) + (set! (-> this difficulty) + (* 0.5 (+ (-> this difficulty) (-> *active-gunships* (-> this other-ship-index) difficulty))) + ) + ) + (set! (-> this difficulty) (* (-> this difficulty) (-> this difficulty-scalar))) + (if (not (and (-> this next-state) (= (-> this next-state name) 'spinning-laser))) + (seek! (-> this jmod-laser-descend transform scale y) -0.01 (seconds-per-frame)) + ) + (transform-post) + (none) + ) + +;; definition for method 40 of type protect-gunship +;; INFO: Used lq/sq +;; WARN: Return type mismatch nav-callback-info vs none. +(defmethod update-nav-mesh ((this protect-gunship)) + (let ((a0-2 (get-nav-mesh *gunship-nav-mesh*))) + (if (and nav-mesh (!= nav-mesh (-> this nav state mesh))) + (change-to a0-2 this) + ) + ) + (let ((a0-3 (-> this nav state)) + (v1-7 (-> this ground-pt)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-7 quad)) + ) + 0 + (set! (-> this nav flags) (nav-control-flag display-marks)) + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 sphere-mask) (the-as uint 0)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 target-speed) 4096.0) + ) + 0 + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 acceleration) 409600000.0) + ) + 0 + (let ((v1-17 (-> this nav))) + (set! (-> v1-17 turning-acceleration) 40960000.0) + ) + 0 + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 speed-scale) 1.0) + ) + 0 + (let ((v1-21 (-> this nav))) + (set! (-> v1-21 max-rotation-rate) 18204444.0) + ) + 0 + (set! (-> this nav callback-info) *default-nav-callback-info*) + (none) + ) + +;; failed to figure out what this is: +(defstate protect-gunship-base-state (protect-gunship) + :virtual #t + :event gunship-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self reaction-time)) + ) + :trans (behavior () + (protect-gunship-method-47 self) + ) + :code sleep-code + :post (behavior () + (gunship-post self) + ) + ) + +;; definition for method 49 of type protect-gunship +;; WARN: Return type mismatch time-frame vs none. +(defmethod protect-gunship-method-49 ((this protect-gunship)) + (let* ((f30-0 (lerp 0.25 1.2 (-> this difficulty))) + (f28-0 10.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (s5-0 (the int (+ f28-0 (* (+ -1.0 (the-as float v1-3)) (+ -10.0 (lerp 12.0 16.0 (-> this difficulty))))))) + (f28-1 (lerp 7.5 5.5 (-> this difficulty))) + ) + (protect-gunship-method-38 this s5-0 f30-0) + (if (handle->process (-> *active-gunships* (-> this other-ship-index) proc)) + (set! f28-1 (* 2.0 f28-1)) + ) + (set! (-> this next-fire-missile-time) (+ (current-time) (the int (* 300.0 f28-1)))) + ) + (set! (-> this suppress-times (log2 32)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 2))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 2.5))) + (none) + ) + +;; definition for method 50 of type protect-gunship +(defmethod protect-gunship-method-50 ((this protect-gunship)) + (when (time-elapsed? (-> this reaction-time) (seconds 0.2)) + (cond + ((logtest? (-> this target) 32) + (go (method-of-object this enemy-spawning)) + ) + ((logtest? (-> this target) 64) + (let ((v1-11 -1) + (a0-2 0) + ) + (dotimes (a1-0 4) + (when (logtest? (-> this alive-engines) (ash 1 a1-0)) + (+! a0-2 1) + (set! v1-11 a1-0) + ) + ) + (cond + ((= a0-2 1) + (set! (-> this last-engine?) #t) + (let ((a0-4 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (send-event this 'child-engine-update v1-11 a0-4 s5-0) + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0))) + ) + 0.0 + (set! (-> s5-1 y) 0.0) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-normalize! s4-1 1.0) + (vector-float*! s5-1 s5-1 -1.0) + (let ((f30-1 (- (vector-y-angle s4-1) (vector-y-angle s5-1)))) + (format 0 "Doing inverse rotate~%") + (set! (-> this rotate-rate) (* 0.25 f30-1)) + ) + ) + ) + (set-time! (-> this rotate-start-time)) + (let ((v0-0 (the-as object 1200))) + (set! (-> this rotate-total-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + (let* ((f30-2 5461.3335) + (f28-0 2730.6665) + (v1-23 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-24 (the-as number (logior #x3f800000 v1-23))) + ) + (set! (-> this rotate-rate) (+ f30-2 (* f28-0 (+ -1.0 (the-as float v1-24))))) + ) + (set-time! (-> this rotate-start-time)) + (set! (-> this rotate-total-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 1501) 900)) + ) + (if (not (logtest? (rand-uint31-gen *random-generator*) 1)) + (set! (-> this rotate-rate) (* -1.0 (-> this rotate-rate))) + ) + ) + ) + ) + ) + ((logtest? (-> this target) 128) + (go (method-of-object this lowering)) + ) + ((logtest? (-> this target) 16) + (protect-gunship-method-49 this) + ) + ((logtest? (-> this target) 8) + (go (method-of-object this spinning-laser)) + ) + ) + ) + ) + +;; definition for method 54 of type protect-gunship +(defmethod protect-gunship-method-54 ((this protect-gunship)) + (let ((f0-1 (lerp 5.0 8.0 (-> this base-difficulty)))) + (lerp 2.0 f0-1 (-> this difficulty)) + ) + ) + +;; definition for method 53 of type protect-gunship +;; WARN: Return type mismatch sound-id vs int. +(defmethod open-doors ((this protect-gunship)) + (with-pp + (init (-> this spawn-info)) + 0.0 + (let ((f30-0 (protect-gunship-method-54 this)) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'count-active) + (let* ((f1-0 (/ (the float (send-event-function (handle->process (-> this task-man)) a1-0)) f30-0)) + (f28-0 (fmax 0.0 (fmin 1.0 f1-0))) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + (f26-0 (+ -1.0 (the-as float v1-13))) + (f24-0 0.5) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + (f24-1 (* f24-0 (+ -1.0 (the-as float v1-18)))) + (f22-0 2.0) + (v1-22 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-23 (the-as number (logior #x3f800000 v1-22))) + (f0-12 (* f22-0 (+ -1.0 (the-as float v1-23)))) + ) + 0.0 + 0.0 + (let* ((f1-8 (+ f26-0 f24-1 f0-12)) + (f22-1 (/ f26-0 f1-8)) + (f24-2 (/ f24-1 f1-8)) + (f26-1 (/ f0-12 f1-8)) + (f0-15 (lerp 1.0 f30-0 (- 1.0 f28-0))) + ) + (set! (-> this spawn-info counts 9) (the int (the float (the int (+ 0.5 (* f0-15 f22-1)))))) + (set! (-> this spawn-info counts 10) (the int (the float (the int (+ 0.5 (* f0-15 f24-2)))))) + (set! (-> this spawn-info counts 11) (the int (the float (the int (+ 0.5 (* f0-15 f26-1)))))) + ) + ) + ) + (set! (-> this open-doors) (the-as uint 0)) + (set! (-> this num-open-doors) (the-as uint 0)) + (the-as + int + (when (> (-> this spawn-info counts 10) 0) + (let ((f30-1 40960000.0) + (f28-1 40960000.0) + (s4-0 -1) + (s5-0 -1) + ) + (dotimes (s3-0 4) + (let ((s2-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* s3-0))) + ) + ) + 0.0 + (let ((f0-23 (vector-vector-xz-distance (target-pos 0) s2-0))) + (cond + ((< f0-23 f30-1) + (set! f28-1 f30-1) + (set! s5-0 s4-0) + (set! f30-1 f0-23) + (set! s4-0 s3-0) + ) + ((< f0-23 f28-1) + (set! f28-1 f0-23) + (set! s5-0 s3-0) + ) + ) + ) + ) + ) + (let ((s3-1 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> *gunship-door-joints* s4-0))) + ) + ) + (when (protect-gunship-method-48 this s3-1) + (logior! (-> this open-doors) (ash 1 s4-0)) + (+! (-> this num-open-doors) 1) + ) + (vector<-cspace! s3-1 (-> this node-list data (-> *gunship-door-joints* s5-0))) + (when (protect-gunship-method-48 this s3-1) + (+! (-> this num-open-doors) 1) + (logior! (-> this open-doors) (ash 1 s5-0)) + ) + ) + ) + (when (and (= (-> this spawn-info counts 10) 1) (< (the-as uint 1) (-> this num-open-doors))) + (set! (-> this num-open-doors) (the-as uint 1)) + (dotimes (v1-79 4) + (when (logtest? (-> this open-doors) (ash 1 v1-79)) + (logclear! (-> this open-doors) (ash 1 v1-79)) + 0 + (goto cfg-42) + ) + ) + ) + (label cfg-42) + (when (zero? (-> this num-open-doors)) + (set! (-> this spawn-info counts 10) 0) + 0 + ) + (if (> (-> this num-open-doors) 0) + (sound-play "gship-dooropen") + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate enemy-spawning (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (let ((a0-1 (-> self nav state)) + (v1-5 (-> self basetrans)) + ) + (logclear! (-> a0-1 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-1 target-pos quad) (-> v1-5 quad)) + ) + 0 + (open-doors self) + ) + :exit (behavior () + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + (set! (-> self next-spawn-time) (+ (current-time) (the int (* 300.0 (lerp 7.5 5.0 (-> self difficulty)))))) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (cond + ((and (not (time-elapsed? (-> self state-time) (seconds 0.5))) (> (-> self num-open-doors) 0)) + (dotimes (gp-1 4) + (if (logtest? (-> self open-doors) (ash 1 gp-1)) + (quaternion-rotate-x! + (the-as quaternion (+ (the-as uint (-> self jmod-doors 0 rotation)) (* gp-1 32))) + (quaternion-identity! (new 'stack-no-clear 'quaternion)) + (* 103.158516 (the float (- (current-time) (-> self state-time)))) + ) + ) + ) + ) + (else + (let ((gp-2 #f)) + (dotimes (s5-1 17) + (when (> (-> self spawn-info counts s5-1) 0) + (when (< (-> self spawn-info next-spawn-time) (current-time)) + (cond + ((spawn-enemy self (the-as gunship-cmd-spawn-type s5-1)) + (set! (-> self spawn-info next-spawn-time) (+ (current-time) (seconds 0.5))) + (+! (-> self spawn-info counts s5-1) -1) + #t + ) + (else + (logior! (-> self target) 2) + ) + ) + ) + ) + ) + (dotimes (v1-43 17) + (if (> (-> self spawn-info counts v1-43) 0) + (set! gp-2 #t) + ) + ) + (when (time-elapsed? (-> self spawn-info next-spawn-time) (seconds 1)) + (logior! (-> self target) 2) + (protect-gunship-method-51 self) + ) + (if (not gp-2) + (go-virtual hover) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +;; definition for method 46 of type protect-gunship +(defmethod protect-gunship-method-46 ((this protect-gunship)) + (when (time-elapsed? (-> this reaction-time) (seconds 0.2)) + (let ((f0-0 (vector-vector-xz-distance (-> this basetrans) (target-pos 0)))) + (or (< 327680.0 f0-0) (< f0-0 122880.0)) + ) + ) + ) + +;; definition for function find-reposition-pt +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5] +(defun find-reposition-pt ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 int) (arg4 int) (arg5 float) (arg6 float)) + (local-vars + (f0-16 float) + (sv-32 int) + (sv-40 float) + (sv-44 float) + (sv-48 vector) + (sv-52 symbol) + (sv-56 float) + (sv-60 vector) + (sv-64 float) + (sv-68 float) + (sv-72 float) + (sv-76 float) + (sv-80 float) + (sv-144 (function vector vector float)) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-32 -1) + (let ((f0-0 409600000.0)) + (set! sv-40 (* f0-0 f0-0)) + ) + (set! sv-44 (the-as float 409600000.0)) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 #t) + (set! sv-56 (the-as float 0.0)) + (let ((v1-9 (the-as protect-gunship (handle->process (-> *active-gunships* arg4 proc))))) + (when v1-9 + (vector-! sv-48 (-> v1-9 root trans) arg1) + (set! (-> sv-48 y) 0.0) + (set! sv-56 (vector-normalize-ret-len! sv-48 1.0)) + ) + ) + (dotimes (s0-0 (-> *protect-path* length)) + (set! sv-60 (-> *protect-path* s0-0)) + (set! sv-64 (vector-vector-xz-distance-squared arg2 (-> *protect-path* s0-0))) + (set! sv-68 (vector-vector-xz-distance-squared arg1 (-> *protect-path* s0-0))) + (set! sv-144 vector-vector-xz-distance-squared) + (set! sv-160 (-> *protect-path* s0-0)) + (let ((a1-8 (target-pos 0))) + (set! sv-72 (sv-144 sv-160 a1-8)) + ) + (set! sv-76 (the-as float 0.0)) + (set! sv-80 (the-as float 1.0)) + (set! sv-52 #t) + (let ((v1-30 (the-as protect-gunship (handle->process (-> *active-gunships* arg4 proc))))) + (when v1-30 + (set! sv-44 (vector-vector-xz-distance sv-60 (-> v1-30 root trans))) + (set! sv-176 (new 'stack-no-clear 'vector)) + (let ((v1-34 sv-60) + (a0-24 arg1) + ) + (.lvf vf4 (&-> v1-34 quad)) + (.lvf vf5 (&-> a0-24 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-176 quad) vf6) + 0.0 + (let ((a0-25 sv-176)) + (set! (-> a0-25 quad) (-> sv-176 quad)) + (set! (-> a0-25 y) 0.0) + (vector-normalize! a0-25 1.0) + ) + (let* ((v1-38 sv-48) + (f0-15 (-> sv-176 x)) + (f1-0 (-> sv-176 y)) + (f2-0 (-> sv-176 z)) + (f3-0 (-> v1-38 x)) + (f4-0 (-> v1-38 y)) + (f5-0 (-> v1-38 z)) + ) + (.mula.s f0-15 f3-0) + (.madda.s f1-0 f4-0) + (.madd.s f0-16 f2-0 f5-0) + ) + (let ((f0-17 f0-16)) + (if (and (< 0.8 f0-17) (< sv-44 sv-56)) + (set! sv-52 (the-as symbol #f)) + ) + ) + ) + ) + (let ((f0-19 143360.0)) + (when (and (< (* f0-19 f0-19) sv-72) + (let ((f0-22 sv-72) + (f1-4 319488.0) + ) + (< f0-22 (* f1-4 f1-4)) + ) + (and (< 102400.0 sv-44) sv-52) + ) + (when (or (not (logtest? arg3 2)) (let ((a0-32 (find-nearest-nav-mesh-protect sv-60 (the-as float #x7f800000)))) + (when a0-32 + (set! sv-192 (new 'stack-no-clear 'vector)) + (nav-mesh-method-10 a0-32 sv-192 sv-60 (the-as nav-poly #f)) + (let ((t9-9 vector-vector-xz-distance) + (a1-14 sv-60) + ) + (< (t9-9 sv-192 a1-14) 4096.0) + ) + ) + ) + ) + (when (or (not (logtest? arg3 6)) (let ((f0-25 arg5)) + (< (* f0-25 f0-25) sv-64) + ) + ) + (when (or (not (logtest? arg3 1)) (let ((f0-28 sv-72) + (f1-10 286720.0) + ) + (and (< f0-28 (* f1-10 f1-10)) (let ((f0-29 163840.0)) + (< (* f0-29 f0-29) sv-72) + ) + ) + ) + ) + (let ((f0-32 sv-68) + (f1-14 arg6) + ) + (set! sv-76 (fabs (- f0-32 (* f1-14 f1-14)))) + ) + (let ((a0-35 (new 'stack 'sphere))) + (set! (-> a0-35 quad) (-> sv-60 quad)) + (set! (-> a0-35 r) 20480.0) + (if (not (sphere-in-view-frustum? a0-35)) + (set! sv-76 (* 100.0 sv-76)) + ) + ) + (when (< sv-76 sv-40) + (set! sv-40 sv-76) + (set! sv-32 s0-0) + ) + ) + ) + ) + ) + ) + ) + (cond + ((< -1 sv-32) + (-> *protect-path* sv-32) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + +;; definition for method 51 of type protect-gunship +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod protect-gunship-method-51 ((this protect-gunship)) + (when (logtest? (-> this target) 7) + (let ((v1-2 (find-reposition-pt + (new 'stack-no-clear 'vector) + (-> this basetrans) + (-> this last-repo-pos) + (the-as int (-> this target)) + (-> this other-ship-index) + 122880.0 + 122880.0 + ) + ) + (a0-3 (-> this nav state)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-2 quad)) + ) + 0 + ) + (none) + ) + +;; definition for method 55 of type protect-gunship +;; INFO: Used lq/sq +(defmethod fire-laser ((this protect-gunship) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 491520.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd obstacle pusher)) + (set! (-> v1-3 ignore-process0) this) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-2 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-2) + ) + ) + (set! (-> *part-id-table* 4752 init-specs 4 initial-valuef) (vector-length (-> s5-0 move-dist))) + (draw-beam (-> *part-id-table* 4752) arg0 (-> s5-0 move-dist) #t) + (launch-particles + (-> *part-id-table* 4755) + (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (-> s5-0 start-pos)) + ) + (launch-particles + (-> *part-id-table* 4756) + (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (-> s5-0 start-pos)) + ) + (let ((v1-19 s5-0)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec jak civilian enemy hit-by-others-list player-list)) + (set! (-> v1-19 ignore-process0) this) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-5 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) + (set! (-> s5-0 best-other-tri collide-ptr) #f) + ) + ) + (when (and (-> s5-0 best-other-tri collide-ptr) (let ((s4-1 (-> s5-0 best-other-tri collide-ptr))) + (if (type? s4-1 collide-shape-prim-sphere) + s4-1 + ) + ) + ) + (let* ((s5-1 (-> s5-0 best-other-tri collide-ptr)) + (s5-2 (-> (the-as collide-shape-prim-sphere (if (type? s5-1 collide-shape-prim-sphere) + (the-as collide-shape-prim-sphere s5-1) + ) + ) + cshape + process + ) + ) + ) + (send-event + s5-2 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 1.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + (send-event this 'notify 'attack s5-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate spinning-laser (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self laser-y) (-> self root trans y)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (vector-z-quaternion! (-> self base-laser-dir) (-> self root quat)) + (set! (-> self base-laser-dir y) 0.0) + (vector-normalize! (-> self base-laser-dir) 1.0) + (set! (-> self current-laser-rotate-speed) 0.0) + (set! (-> self next-new-laser-rot-time) 0) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 3))) + ) + :exit (behavior () + (set! (-> self next-spin-laser-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 1501) 5250 (current-time))) + ) + ) + :trans (behavior () + (set! (-> self suppress-times (log2 32)) (+ (current-time) (seconds 1))) + (set! (-> self suppress-times (log2 64)) (+ (current-time) (seconds 1))) + (set! (-> self suppress-times (log2 128)) (+ (current-time) (seconds 1.2))) + (if (logtest? (-> self target) 16) + (protect-gunship-method-49 self) + ) + (let ((gp-3 #f)) + (let ((t9-4 vector-vector-xz-distance) + (a0-4 (-> self basetrans)) + (a2-0 (-> self nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + (if (< (t9-4 a0-4 a1-0) 20480.0) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + ) + ) + (when (time-elapsed? (-> self choose-new-point-time) (seconds 3)) + (set-time! (-> self choose-new-point-time)) + (set! gp-3 #t) + ) + (when gp-3 + (let ((v1-30 + (find-reposition-pt + (new 'stack-no-clear 'vector) + (-> self basetrans) + (-> self last-repo-pos) + (the-as int (-> self target)) + (-> self other-ship-index) + 122880.0 + 122880.0 + ) + ) + (a0-10 (-> self nav state)) + ) + (logclear! (-> a0-10 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-10 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-10 target-pos quad) (-> v1-30 quad)) + ) + 0 + ) + ) + (when (< (-> self next-new-laser-rot-time) (current-time)) + (if (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (go-virtual hover) + ) + (let* ((f30-0 8192.0) + (v1-44 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-45 (the-as number (logior #x3f800000 v1-44))) + ) + (set! (-> self laser-rotate-speed) + (+ f30-0 (* (+ -1.0 (the-as float v1-45)) (+ -8192.0 (lerp 15473.777 17294.223 (-> self difficulty))))) + ) + ) + (if (not (logtest? (rand-uint31-gen *random-generator*) 1)) + (set! (-> self laser-rotate-speed) (* -1.0 (-> self laser-rotate-speed))) + ) + (set! (-> self next-new-laser-rot-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 901) 900 (current-time))) + ) + ) + (seek! (-> self current-laser-rotate-speed) (-> self laser-rotate-speed) (* 3640.889 (seconds-per-frame))) + (vector-rotate-around-axis! + (-> self base-laser-dir) + (the-as quaternion (-> self base-laser-dir)) + (* (-> self current-laser-rotate-speed) (seconds-per-frame)) + *up-vector* + ) + (quaternion-rotate-y! + (-> self jmod-laser-descend transform quat) + (-> self jmod-laser-descend transform quat) + (* (-> self current-laser-rotate-speed) (seconds-per-frame)) + ) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (set! (-> gp-4 quad) (-> self root trans quad)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (the int (lerp 2.0 4.5 (-> self difficulty)))) + ) + 0.0 + (let ((f30-1 0.0) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (let ((s1-0 *target*)) + (when s1-0 + (set! (-> s2-0 quad) (-> (target-pos 0) quad)) + (set! (-> s3-0 quad) (-> (get-trans s1-0 3) quad)) + (let ((s0-3 (vector-! (new 'stack-no-clear 'vector) s2-0 (-> self root trans))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self root trans))) + ) + 0.0 + (set! (-> s0-3 y) 0.0) + (set! (-> s1-2 y) 0.0) + (let ((f0-26 (vector-normalize-ret-len! s0-3 1.0))) + (vector-float*! s0-3 s0-3 f0-26) + ) + (set! (-> s2-0 x) (+ (-> self root trans x) (-> s0-3 x))) + (set! (-> s2-0 z) (+ (-> self root trans z) (-> s0-3 z))) + (let* ((f0-31 (vector-normalize-ret-len! s1-2 1.0)) + (f0-32 (fmin 184320.0 f0-31)) + ) + (vector-float*! s1-2 s1-2 f0-32) + ) + (set! (-> s3-0 x) (+ (-> self root trans x) (-> s1-2 x))) + (set! (-> s3-0 z) (+ (-> self root trans z) (-> s1-2 z))) + ) + ) + ) + (let ((s1-3 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s1-3 start-pos) s2-0 *up-vector* 24576.0) + (set! (-> s1-3 move-dist quad) (the-as uint128 0)) + (set! (-> s1-3 move-dist y) -81920.0) + (let ((v1-85 s1-3)) + (set! (-> v1-85 radius) 40.96) + (set! (-> v1-85 collide-with) (collide-spec backgnd)) + (set! (-> v1-85 ignore-process0) #f) + (set! (-> v1-85 ignore-process1) #f) + (set! (-> v1-85 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-85 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s1-3) 0.0) + (set! f30-1 (-> s1-3 best-other-tri intersect y)) + ) + ) + ) + (seek! (-> self jmod-laser-descend transform scale y) 1.9 (seconds-per-frame)) + (vector<-cspace! gp-4 (joint-node kg-robot-transport-lod0-jg laser)) + (let ((f0-44 (vector-vector-xz-distance gp-4 s3-0)) + (f1-13 (- (-> gp-4 y) f30-1)) + ) + (set! (-> self base-laser-dir y) + (lerp (-> self base-laser-dir y) (- (/ f1-13 (+ 32768.0 f0-44))) (* 2.0 (seconds-per-frame))) + ) + ) + ) + (+! (-> gp-4 y) (* 2048.0 (- (-> self base-laser-dir y)))) + (vector-normalize-copy! s5-0 (-> self base-laser-dir) 1.0) + (cond + ((time-elapsed? (-> self state-time) (seconds 3)) + (dotimes (s3-1 s4-0) + (fire-laser self gp-4 s5-0) + (vector-rotate-around-axis! s5-0 (the-as quaternion s5-0) (/ 65536.0 (the float s4-0)) *up-vector*) + ) + ) + ((time-elapsed? (-> self state-time) (seconds 1.5)) + (spawn-from-mat (-> self part) (-> self node-list data 17 bone transform)) + ) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 15)) + (go-virtual hover) + ) + ) + :code sleep-code + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +;; definition for method 52 of type protect-gunship +;; INFO: Used lq/sq +(defmethod protect-gunship-method-52 ((this protect-gunship)) + (let ((a0-1 (-> this nav state)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 quad) (-> a0-1 target-pos quad)) + 0.0 + (let ((a0-4 (-> this nav state)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-4 heading quad)) + 0.0 + (let* ((f0-2 (vector-vector-xz-distance (-> this basetrans) a1-0)) + (f0-3 (fmin 102400.0 f0-2)) + ) + (vector-float*! s5-0 s5-0 f0-3) + ) + (let ((v1-8 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> this root transv)))) + 0.0 + 0.0 + (let* ((f0-6 (vector-length v1-8)) + (f0-7 (* 0.000009765625 f0-6)) + (f1-3 (* f0-7 f0-7 (seconds-per-frame))) + (f0-10 (fmax 0.0 (fmin 1.0 f1-3))) + ) + (vector+float*! (-> this root transv) (-> this root transv) v1-8 f0-10) + ) + (vector-float*! (-> this last-thrust) v1-8 1.0) + ) + ) + ) + (vector+float*! (-> this basetrans) (-> this basetrans) (-> this root transv) (seconds-per-frame)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (nav-mesh-method-10 (-> this nav state mesh) s5-1 (-> this basetrans) (the-as nav-poly #f)) + (let ((v1-15 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this basetrans)))) + 0.0 + (set! (-> v1-15 y) 0.0) + (vector+float*! (-> this root transv) (-> this root transv) v1-15 (* 0.1 (seconds-per-frame))) + ) + ) + (let ((a0-29 (the-as protect-gunship (handle->process (-> *active-gunships* (-> this other-ship-index) proc))))) + (when a0-29 + (let ((s5-3 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> a0-29 root trans)))) + 0.0 + (set! (-> s5-3 y) 0.0) + (let ((f1-6 (vector-normalize-ret-len! s5-3 1.0))) + (when (< f1-6 122880.0) + (let* ((f0-21 (* 0.000008138021 f1-6)) + (f0-22 (- 1.0 f0-21)) + (f0-23 (* f0-22 f0-22)) + ) + (vector-float*! s5-3 s5-3 (- 122880.0 f1-6)) + (vector+float*! (-> this root transv) (-> this root transv) s5-3 (* 4.0 (seconds-per-frame) f0-23)) + ) + ) + ) + ) + ) + ) + (let* ((f0-25 (vector-normalize-ret-len! (-> this root transv) 1.0)) + (f0-26 (fmin 102400.0 f0-25)) + ) + (vector-float*! (-> this root transv) (-> this root transv) f0-26) + ) + (if (not (time-elapsed? (-> this rotate-start-time) (-> this rotate-total-time))) + (quaternion-rotate-local-y! + (-> this root quat) + (-> this root quat) + (* (-> this rotate-rate) (seconds-per-frame)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hover (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self choose-new-point-time) 0) + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (protect-gunship-method-50 self) + (protect-gunship-method-51 self) + ) + :post (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (protect-gunship-method-52 self) + ) + ) + +;; failed to figure out what this is: +(defstate landed (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self last-thrust quad) (the-as uint128 0)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (set! (-> self land-start-hp) (-> self hit-points)) + ) + :exit (behavior () + (set-time! (-> self last-land-time)) + (set! (-> self last-repo-pos quad) (-> self basetrans quad)) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (logtest? (-> self target) 16) + (protect-gunship-method-49 self) + ) + (if (or (time-elapsed? (-> self state-time) (the int (* 300.0 (lerp 6.0 4.5 (-> self difficulty))))) + (< 0.2 (/ (- (-> self land-start-hp) (-> self hit-points)) (-> self num-hp-per-stage))) + (< 348160.0 (vector-vector-xz-distance (-> self basetrans) (target-pos 0))) + ) + (go-virtual raising) + ) + ) + ) + +;; failed to figure out what this is: +(defstate raising (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (sound-play "gship-thrust") + (set! (-> self move-state dest-pos y) (+ 22528.0 (-> self ground-pt y))) + (set! (-> self root nav-radius) 0.0) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-2 (-> v1-4 enter))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (seek! (-> self basetrans y) (-> self move-state dest-pos y) (* 20480.0 (seconds-per-frame))) + (if (= (the int (-> self basetrans y)) (the int (-> self move-state dest-pos y))) + (go-virtual hover) + ) + ) + ) + +;; failed to figure out what this is: +(defstate lowering (protect-gunship) + :virtual #t + :parent (protect-gunship protect-gunship-base-state) + :enter (behavior () + (set! (-> self root nav-radius) 32768.0) + (set! (-> self move-state dest-pos y) (+ 6144.0 (-> self ground-pt y))) + (set! (-> self suppress-times (log2 16)) (+ (current-time) (seconds 5))) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-1 (-> v1-8 enter))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + :trans (behavior () + (vector-lerp! (-> self root transv) (-> self root transv) *zero-vector* (* 5.0 (seconds-per-frame))) + (vector-lerp! (-> self last-thrust) (-> self last-thrust) *zero-vector* (* 5.0 (seconds-per-frame))) + (let ((a0-2 (-> self state parent))) + (when a0-2 + (let ((t9-2 (-> a0-2 trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + (seek! (-> self basetrans y) (-> self move-state dest-pos y) (* 12288.0 (seconds-per-frame))) + (if (= (the int (-> self basetrans y)) (the int (-> self move-state dest-pos y))) + (go-virtual landed) + ) + ) + :post (behavior () + (protect-gunship-method-52 self) + (let ((v1-3 (-> self state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + ) + +;; definition for method 56 of type protect-gunship +(defmethod protect-gunship-method-56 ((this protect-gunship) (arg0 float)) + 0.0 + (let ((f0-2 (- (-> this root trans y) arg0))) + (* 0.00012849507 f0-2) + ) + ) + +;; definition for method 47 of type protect-gunship +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 47 protect-gunship) has a return type of none, but the expression builder found a return statement. +(defmethod protect-gunship-method-47 ((this protect-gunship)) + (if (not (time-elapsed? (-> this reaction-time) (seconds 0.2))) + (return 0) + ) + (if (protect-gunship-method-46 this) + (logior! (-> this want) 1) + ) + (if (and (< (-> this next-fire-missile-time) (current-time)) + (not (and (-> this next-state) (let ((v1-15 (-> this next-state name))) + (or (= v1-15 'raising) (= v1-15 'lowering)) + ) + ) + ) + ) + (logior! (-> this want) 16) + ) + (if (and (< (-> this next-spin-laser-time) (current-time)) + (and (not (and (-> this next-state) (let ((v1-24 (-> this next-state name))) + (or (= v1-24 'raising) (= v1-24 'lowering)) + ) + ) + ) + (>= (-> this base-difficulty) 0.5) + (>= (-> this difficulty) 0.3) + ) + ) + (logior! (-> this want) 8) + ) + (if (and (< (-> this next-spawn-time) (current-time)) + (not (and (-> this next-state) (let ((v1-36 (-> this next-state name))) + (or (= v1-36 'raising) (= v1-36 'lowering)) + ) + ) + ) + ) + (logior! (-> this want) 32) + ) + (if (time-elapsed? (-> this last-land-time) (the int (* 300.0 (lerp 10.0 15.0 (-> this difficulty))))) + (logior! (-> this want) 128) + ) + (if (and (and (-> this next-state) (= (-> this next-state name) 'hover)) + (or (and (-> this last-engine?) (time-elapsed? (-> this rotate-start-time) (seconds 4))) + (time-elapsed? (-> this rotate-start-time) (+ (-> this rotate-total-time) (seconds 5))) + ) + ) + (logior! (-> this want) 64) + ) + (dotimes (v1-63 8) + (if (>= (-> this suppress-times v1-63) (current-time)) + (logclear! (-> this want) (ash 1 v1-63)) + ) + ) + (when (and (logtest? (-> this want) 128) + (< (vector-vector-xz-distance (-> this basetrans) (-> this last-repo-pos)) 81920.0) + ) + (logior! (-> this want) 4) + (logand! (-> this want) -129) + ) + (if (and (logtest? (-> this want) 32) + (let ((s5-1 (the int (protect-gunship-method-54 this)))) + (< s5-1 (the-as int (send-event (handle->process (-> this task-man)) 'count-active))) + ) + ) + (logand! (-> this want) -33) + ) + (when (and (logtest? (-> this want) 32) + (or (< (vector-vector-xz-distance (-> this basetrans) (-> this last-repo-pos)) 122880.0) + (not (protect-gunship-method-48 this (-> this basetrans))) + ) + ) + (logior! (-> this want) 2) + (logand! (-> this want) -33) + ) + (if (and (logtest? (-> this want) 16) + (let ((s5-2 (the int (* 2.0 (protect-gunship-method-54 this))))) + (< s5-2 (the-as int (send-event (handle->process (-> this task-man)) 'count-active))) + ) + ) + (logand! (-> this want) -17) + ) + (when (or (logtest? (-> *active-gunships* (-> this other-ship-index) want-target) 8) + (= (-> *active-gunships* (-> this other-ship-index) cur-state) 'spinning-laser) + ) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 5))) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 5))) + ) + (if (logtest? (-> *active-gunships* (-> this other-ship-index) want-target) 16) + (set! (-> this suppress-times (log2 128)) (+ (current-time) (seconds 5))) + ) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set! (-> this suppress-times (log2 8)) (+ (current-time) (seconds 2))) + ) + (dotimes (v1-153 8) + (if (>= (-> this suppress-times v1-153) (current-time)) + (logclear! (-> this want) (ash 1 v1-153)) + ) + ) + (set! (-> this target) (the-as uint 0)) + (set! (-> this target) (logand (-> this want) 7)) + (cond + ((logtest? (-> this target) 7) + (if (logtest? (-> this want) 64) + (logior! (-> this target) 64) + ) + (if (and (or (not (logtest? (-> this target) 1)) + (< 327680.0 (vector-vector-xz-distance (-> this basetrans) (target-pos 0))) + ) + (logtest? (-> this want) 16) + ) + (logior! (-> this target) 16) + ) + ) + (else + (dotimes (v1-174 8) + (when (logtest? (-> this want) (ash 1 v1-174)) + (logior! (-> this target) (ash 1 v1-174)) + 0 + (goto cfg-150) + ) + ) + ) + ) + (label cfg-150) + (dotimes (v1-181 8) + (when (logtest? (-> this want) (ash 1 v1-181)) + (cond + ((logtest? (-> this target) (ash 1 v1-181)) + ) + (else + ) + ) + ) + ) + (set! (-> *active-gunships* (-> this self-index) want-target) (-> this target)) + (if (-> this next-state) + (set! (-> *active-gunships* (-> this self-index) cur-state) (-> this next-state name)) + (set! (-> *active-gunships* (-> this self-index) cur-state) #f) + ) + (none) + ) + +;; definition for method 48 of type protect-gunship +(defmethod protect-gunship-method-48 ((this protect-gunship) (arg0 vector)) + (let ((a0-2 (find-nearest-nav-mesh-protect arg0 (the-as float #x7f800000)))) + (when a0-2 + (let ((s5-0 (new 'stack-no-clear 'vector))) + (nav-mesh-method-10 a0-2 s5-0 arg0 (the-as nav-poly #f)) + (if (< (vector-vector-xz-distance s5-0 arg0) 4096.0) + (return #t) + ) + ) + ) + ) + #f + ) + +;; definition for method 10 of type protect-gunship +(defmethod deactivate ((this protect-gunship)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-engine-loop)) + (sound-stop (-> this sound-lock-on)) + (sound-stop (-> this sound-lock-on-hi)) + (call-parent-method this) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/protect-path_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/protect-path_REF.gc new file mode 100644 index 0000000000..7f0675d11b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/protect-path_REF.gc @@ -0,0 +1,42 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *protect-path*, type (array vector) +(define *protect-path* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 2211630.2 :y 22453.863 :z -2517228.8 :w 1.0) + (new 'static 'vector :x 2295778.5 :y 22453.863 :z -2456190.2 :w 1.0) + (new 'static 'vector :x 2446499.0 :y 22453.453 :z -2412481.8 :w 1.0) + (new 'static 'vector :x 2310667.5 :y 21837.004 :z -2087288.4 :w 1.0) + (new 'static 'vector :x 2148552.0 :y 22453.863 :z -2113359.0 :w 1.0) + (new 'static 'vector :x 2152553.8 :y 22453.863 :z -2376441.0 :w 1.0) + (new 'static 'vector :x 2515651.8 :y 21837.004 :z -2508594.5 :w 1.0) + (new 'static 'vector :x 2602777.8 :y 22453.863 :z -2511727.8 :w 1.0) + (new 'static 'vector :x 2831592.8 :y 21837.004 :z -1880559.2 :w 1.0) + (new 'static 'vector :x 2487184.5 :y 21837.004 :z -1848802.9 :w 1.0) + (new 'static 'vector :x 2380442.8 :y 21837.004 :z -1984007.8 :w 1.0) + (new 'static 'vector :x 2432462.0 :y 21837.004 :z -1985765.0 :w 1.0) + (new 'static 'vector :x 2299293.0 :y 21836.596 :z -2372226.2 :w 1.0) + (new 'static 'vector :x 2080341.6 :y 22453.453 :z -2027671.1 :w 1.0) + (new 'static 'vector :x 2017324.6 :y 22453.863 :z -2045197.9 :w 1.0) + (new 'static 'vector :x 2351111.2 :y 22453.863 :z -2034216.5 :w 1.0) + (new 'static 'vector :x 2449616.0 :y 22453.863 :z -2154450.0 :w 1.0) + (new 'static 'vector :x 2448837.8 :y 22453.863 :z -2273426.8 :w 1.0) + (new 'static 'vector :x 2518544.0 :y 22453.863 :z -2397093.0 :w 1.0) + (new 'static 'vector :x 2314292.5 :y 22453.863 :z -2181963.0 :w 1.0) + (new 'static 'vector :x 2300230.8 :y 22453.863 :z -2519006.5 :w 1.0) + (new 'static 'vector :x 2557939.0 :y 22453.863 :z -1909649.0 :w 1.0) + (new 'static 'vector :x 2473258.2 :y 22453.863 :z -1937055.4 :w 1.0) + (new 'static 'vector :x 2541858.0 :y 22453.863 :z -1848254.0 :w 1.0) + (new 'static 'vector :x 2211847.2 :y 22453.863 :z -2048368.2 :w 1.0) + (new 'static 'vector :x 2186792.2 :y 21836.596 :z -2284154.0 :w 1.0) + (new 'static 'vector :x 2247048.5 :y 21836.596 :z -2196921.5 :w 1.0) + (new 'static 'vector :x 2281217.2 :y 21836.596 :z -2032336.5 :w 1.0) + (new 'static 'vector :x 2398612.8 :y 21836.596 :z -2275601.5 :w 1.0) + (new 'static 'vector :x 2336705.8 :y 21836.596 :z -2370383.0 :w 1.0) + (new 'static 'vector :x 2144562.5 :y 22453.863 :z -2027876.0 :w 1.0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/protect/protect-script_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/protect-script_REF.gc new file mode 100644 index 0000000000..a643c76837 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/protect/protect-script_REF.gc @@ -0,0 +1,175 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type gunship-cmd +(deftype gunship-cmd (structure) + ((command gunship-command) + (spawn-type gunship-cmd-spawn-type) + (count int8) + (wait-type gunship-cmd-wait-type :overlay-at spawn-type) + (difficulty float) + (wait-time time-frame) + (timeout-period time-frame) + ) + :pack-me + ) + +;; definition for method 3 of type gunship-cmd +(defmethod inspect ((this gunship-cmd)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-cmd) + (format #t "~1Tcommand: ~D~%" (-> this command)) + (format #t "~1Tspawn-type: ~D~%" (-> this spawn-type)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Twait-type: ~D~%" (-> this wait-type)) + (format #t "~1Tdifficulty: ~f~%" (-> this difficulty)) + (format #t "~1Twait-time: ~D~%" (-> this wait-time)) + (format #t "~1Ttimeout-period: ~D~%" (-> this timeout-period)) + (label cfg-4) + this + ) + +;; definition of type gunship-cmd-context +(deftype gunship-cmd-context (structure) + ((start-time time-frame) + (current-command gunship-cmd :inline) + (script pair) + (script-jump-point basic) + ) + ) + +;; definition for method 3 of type gunship-cmd-context +(defmethod inspect ((this gunship-cmd-context)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gunship-cmd-context) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tcurrent-command: #~%" (-> this current-command)) + (format #t "~1Tscript: ~A~%" (-> this script)) + (format #t "~1Tscript-jump-point: ~A~%" (-> this script-jump-point)) + (label cfg-4) + this + ) + +;; definition for function parse-protect-command +;; WARN: Return type mismatch int vs object. +(defun parse-protect-command ((arg0 gunship-cmd-context)) + (let ((s5-0 (-> arg0 script car)) + (gp-0 (-> arg0 current-command)) + ) + (case (ref s5-0 0) + (('spawn) + (set! (-> gp-0 command) (gunship-command spawn)) + 0 + ) + (('wait) + (set! (-> gp-0 command) (gunship-command wait)) + ) + (('missiles) + (set! (-> gp-0 command) (gunship-command missiles)) + ) + (('script-set-jump) + (set! (-> gp-0 command) (gunship-command script-set-jump)) + (return (the-as object 0)) + ) + (('no-op) + (set! (-> gp-0 command) (gunship-command no-op)) + (return (the-as object 0)) + ) + (('script-jump) + (set! (-> gp-0 command) (gunship-command script-jump)) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 1)) 8))) + (return (the-as object 0)) + ) + (else + (set! (-> gp-0 command) (gunship-command other)) + (return (the-as object 0)) + ) + ) + (case (-> gp-0 command) + (((gunship-command spawn)) + (let ((a0-11 (ref s5-0 1))) + (set! (-> gp-0 spawn-type) (the-as gunship-cmd-spawn-type (symbol->city-target-type (the-as symbol a0-11)))) + ) + (let ((a0-12 s5-0)) + (if (>= ((method-of-type (rtype-of a0-12) length) a0-12) 3) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 2)) 8))) + (set! (-> gp-0 count) 1) + ) + ) + ) + (((gunship-command missiles)) + (set! (-> gp-0 count) (max 0 (min 16 (the-as int (/ (the-as int (ref s5-0 1)) 8))))) + (set! (-> gp-0 difficulty) 1.0) + (let ((a0-17 s5-0)) + (if (>= ((method-of-type (rtype-of a0-17) length) a0-17) 3) + (set! (-> gp-0 difficulty) (command-get-float (ref s5-0 2) 0.0)) + ) + ) + ) + (((gunship-command wait)) + (case (ref s5-0 1) + (('time) + (set! (-> gp-0 wait-type) (gunship-cmd-wait-type time)) + (let ((f0-2 (command-get-float (ref s5-0 2) 0.0))) + (set! (-> gp-0 wait-time) (the-as time-frame (the int (* 300.0 f0-2)))) + ) + ) + (('total) + (set! (-> gp-0 wait-type) (gunship-cmd-wait-type total)) + (set! (-> gp-0 count) (the-as int (/ (the-as int (ref s5-0 2)) 8))) + ) + ) + ) + ) + (let* ((a0-28 s5-0) + (s3-2 ((method-of-type (rtype-of a0-28) length) a0-28)) + (s4-4 (ref s5-0 (+ s3-2 -2))) + (a0-31 (ref s5-0 (+ s3-2 -1))) + (v0-1 6000) + ) + (if (= s4-4 'timeout) + (set! v0-1 (the int (* 300.0 (command-get-float a0-31 0.0)))) + ) + (set! (-> gp-0 timeout-period) (the-as time-frame v0-1)) + v0-1 + ) + ) + ) + +;; definition for symbol *gunship-0-script*, type pair +(define *gunship-0-script* '((no-op) + (spawn roboguard 1) + (missiles 16) + (spawn turret 1) + (wait total 0) + (missiles 10 (new 'static 'bfloat :data 0.5)) + (spawn roboguard 1) + (missiles 16) + (wait time (new 'static 'bfloat :data 5.0)) + (script-set-jump) + (spawn roboguard 2) + (wait time (new 'static 'bfloat :data 5.0)) + (missiles 16) + (spawn spydroid 5) + (wait time (new 'static 'bfloat :data 2.0)) + (missiles 8) + (wait time (new 'static 'bfloat :data 3.0)) + (spawn spydroid 2) + (wait time (new 'static 'bfloat :data 5.0)) + (spawn roboguard 1) + (missiles 16) + (wait time (new 'static 'bfloat :data 10.0)) + (script-jump 1) + (end) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/slums/neon-baron-part_REF.gc b/test/decompiler/reference/jak3/levels/city/slums/neon-baron-part_REF.gc new file mode 100644 index 0000000000..4284220507 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/slums/neon-baron-part_REF.gc @@ -0,0 +1,3605 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *baron-neon-skull*, type (array object) +(define *baron-neon-skull* + (new 'static 'boxed-array :type object + (the binteger 54) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'array uint64 1 #x3ffffffe0f8000)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x40418ff :y #x100) + (new 'static 'vector4w :x #x487f :y #x20001) + (new 'static 'vector4w :x #x80097f) + (new 'static 'vector4w :x #x1000887f :y #x8200) + (new 'static 'vector4w :x #x4010087f :y #x80000) + (new 'static 'vector4w :x #x4000a7f :y #x804) + (new 'static 'vector4w :x #x2087f) + (new 'static 'vector4w :x #x2000087f :y #x20440) + (new 'static 'vector4w :x #x1000a7f :y #x1000) + (new 'static 'vector4w :x #x287f :y #x100010) + (new 'static 'vector4w :x #x1208087f :y #x4200) + (new 'static 'vector4w :x #xc7f :y #x10000) + (new 'static 'vector4w :x #x840487f :y 2) + (new 'static 'vector4w :x #x97f :y #x420) + (new 'static 'vector4w :x #x1087f :y #x40000) + (new 'static 'vector4w :x #x1000c7f :y #x202080) + (new 'static 'vector4w :x -2146957057 :y 8) + (new 'static 'vector4w :x #x400087f :y #x8100) + (new 'static 'vector4w :x #x10a7f :y #x100020) + (new 'static 'vector4w :x #x2020087f) + ) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x -1073739649 :y #x3fffff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x3fffffff)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x20007fff :y #x200000) + (new 'static 'vector4w :x #x30007fff :y #x300000) + (new 'static 'vector4w :x #x18007fff :y #x180000) + (new 'static 'vector4w :x #xc007fff :y #xc0000) + (new 'static 'vector4w :x #x6007fff :y #x60000) + (new 'static 'vector4w :x #x2007fff :y #x30000) + (new 'static 'vector4w :y #x18000) + (new 'static 'vector4w :y #xc000) + (new 'static 'vector4w :x #x1000000 :y #x6000) + (new 'static 'vector4w :x #x1007fff :y #x3000) + (new 'static 'vector4w :x #x7fff :y #x1800) + (new 'static 'vector4w :x #x7fff :y #xc00) + (new 'static 'vector4w :x #x807fff :y #x600) + (new 'static 'vector4w :x #xc07fff :y #x300) + (new 'static 'vector4w :x #x607fff :y #x180) + (new 'static 'vector4w :x #x300000 :y #xc0) + (new 'static 'vector4w :x #x100000 :y 96) + (new 'static 'vector4w :y 48) + (new 'static 'vector4w :x #x7fff :y 24) + (new 'static 'vector4w :x #x87fff :y 12) + (new 'static 'vector4w :x #xc7fff :y 6) + (new 'static 'vector4w :x #x67fff :y 3) + (new 'static 'vector4w :x -2147254273 :y 1) + (new 'static 'vector4w :x -1073610753) + (new 'static 'vector4w :x #x40008000) + (new 'static 'vector4w) + (new 'static 'vector4w) + ) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w :x #x7fffffff :y #x10410) + (new 'static 'vector4w :x #x7fffffff :y #x10410) + (new 'static 'vector4w :x -1073741825 :y #x20820) + (new 'static 'vector4w :x -1073741825 :y #x20820) + (new 'static 'vector4w :x #x3fffffff :y #x41041) + (new 'static 'vector4w :x #x3fffffff :y #x41041) + (new 'static 'vector4w :x #x3fffffff :y #x82082) + (new 'static 'vector4w :x #x3fffffff :y #x82082) + (new 'static 'vector4w :x #x3fffffff :y #x104104) + (new 'static 'vector4w :x #x3fffffff :y #x104104) + (new 'static 'vector4w :x #x3fffffff :y #x208208) + (new 'static 'vector4w :x #x3fffffff :y #x208208) + ) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x7fff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x #x7800)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w :x -1 :y #x3fffff)) + (new 'static 'boxed-array :type object (the binteger 1) (new 'static 'vector4w)) + (new 'static 'boxed-array :type object + (the binteger 1) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w :x 4) + (new 'static 'vector4w :x 6) + (new 'static 'vector4w :x 70) + (new 'static 'vector4w :x 71) + (new 'static 'vector4w :x #x847) + (new 'static 'vector4w :x #x847) + (new 'static 'vector4w :x #x84f) + (new 'static 'vector4w :x #x84f) + (new 'static 'vector4w :x #x85f) + (new 'static 'vector4w :x #x85f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x87f) + (new 'static 'vector4w :x #x4000087f) + (new 'static 'vector4w :x -536868737) + (new 'static 'vector4w :x -268433281 :y 1) + (new 'static 'vector4w :x -134215553 :y 3) + (new 'static 'vector4w :x -67106689 :y 7) + (new 'static 'vector4w :x -33552257 :y 15) + (new 'static 'vector4w :x -16775041 :y 31) + (new 'static 'vector4w :x -16775041 :y 63) + (new 'static 'vector4w :x -16775041 :y #x7f) + (new 'static 'vector4w :x -16775041 :y #xff) + (new 'static 'vector4w :x -16775041 :y #x1ff) + (new 'static 'vector4w :x -8370049 :y #x3ff) + (new 'static 'vector4w :x -4167553 :y #x7ff) + (new 'static 'vector4w :x -2066305 :y #xfff) + (new 'static 'vector4w :x -1017729 :y #x1fff) + (new 'static 'vector4w :x -1017729 :y #x3fff) + (new 'static 'vector4w :x -1016705 :y #x7fff) + (new 'static 'vector4w :x -1016193 :y #xffff) + (new 'static 'vector4w :x -1015937 :y #x1ffff) + (new 'static 'vector4w :x -491521 :y #x3ffff) + (new 'static 'vector4w :x -229377 :y #x7ffff) + (new 'static 'vector4w :x -98305 :y #xfffff) + (new 'static 'vector4w :x -32769 :y #x1fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + (new 'static 'vector4w :x -1 :y #x3fffff) + ) + ) + ) + +;; failed to figure out what this is: +(defpart 3456 + :init-specs ((:texture (baron-neon-skull-main ctysluma-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata + :data (new 'static 'boxed-array :type object '*baron-neon-skull* 0 (the binteger 17434368) (the binteger 17434400)) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3457 + :init-specs ((:texture (baron-neon-skull-main ctysluma-sprite)) + (:num 1.0) + (:x (meters 4)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata + :data (new 'static 'boxed-array :type object '*baron-neon-skull* 0 (the binteger 17434368) (the binteger 17434400)) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3458 + :init-specs ((:texture (baron-neon-skull-circle ctysluma-sprite)) + (:num 1.0) + (:x (meters -2.9)) + (:y (meters 1.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 1) + (the binteger 17434304) + (the binteger 17434336) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3459 + :init-specs ((:texture (baron-neon-skull-circle ctysluma-sprite)) + (:num 1.0) + (:x (meters 2.9)) + (:y (meters 1.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 16)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 1) + (the binteger 17434304) + (the binteger 17434336) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3460 + :init-specs ((:texture (baron-neon-eye-border ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.4)) + (:y (meters -2.3)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 8.88)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 11) + (the binteger 17433984) + (the binteger 17434016) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3461 + :init-specs ((:texture (baron-neon-eye-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -1.5)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 12) + (the binteger 17433856) + (the binteger 17433888) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3462 + :init-specs ((:texture (baron-neon-eye-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 13) + (the binteger 17433920) + (the binteger 17433952) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3463 + :init-specs ((:texture (baron-neon-eye-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.6)) + (:y (meters -3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 14) + (the binteger 17434048) + (the binteger 17434080) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3464 + :init-specs ((:texture (baron-neon-eye-border ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.4)) + (:y (meters -2.3)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 8.88)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 11) + (the binteger 17433984) + (the binteger 17434016) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3465 + :init-specs ((:texture (baron-neon-eye-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -1.5)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 12) + (the binteger 17433856) + (the binteger 17433888) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3466 + :init-specs ((:texture (baron-neon-eye-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 13) + (the binteger 17433920) + (the binteger 17433952) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3467 + :init-specs ((:texture (baron-neon-eye-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.6)) + (:y (meters -3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 14) + (the binteger 17434048) + (the binteger 17434080) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3468 + :init-specs ((:texture (baron-neon-triangle-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 9)) + (:z (meters 0)) + (:scale-x (meters 4.44)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 4.44)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 2) + (the binteger 17434432) + (the binteger 17434464) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3469 + :init-specs ((:texture (baron-neon-dot-ring ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 3.5)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 10)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 6) + (the binteger 17433792) + (the binteger 17433824) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3470 + :init-specs ((:texture (baron-neon-dot-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 5.25)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 7) + (the binteger 17433536) + (the binteger 17433568) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3471 + :init-specs ((:texture (baron-neon-dot-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 3.825)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 8) + (the binteger 17433664) + (the binteger 17433696) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3472 + :init-specs ((:texture (baron-neon-dot-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2.625)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 9) + (the binteger 17433664) + (the binteger 17433696) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3473 + :init-specs ((:texture (baron-neon-dot-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.325)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 10) + (the binteger 17433728) + (the binteger 17433760) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3474 + :init-specs ((:texture (baron-neon-nose ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -7.8)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 3) + (the binteger 17434240) + (the binteger 17434272) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3475 + :init-specs ((:texture (baron-neon-mouth ctysluma-sprite)) + (:num 1.0) + (:x (meters -3.2)) + (:y (meters -10.1)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 4)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 4) + (the binteger 17434176) + (the binteger 17434208) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3476 + :init-specs ((:texture (baron-neon-mouth ctysluma-sprite)) + (:num 1.0) + (:x (meters 3.2)) + (:y (meters -10.1)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 4)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 4) + (the binteger 17434176) + (the binteger 17434208) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3477 + :init-specs ((:texture (baron-neon-ghotee ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -14)) + (:z (meters 0)) + (:scale-x (meters 5.3)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 5.3)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 5) + (the binteger 17434112) + (the binteger 17434144) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3478 + :init-specs ((:texture (baron-neon-cheek-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters 0.75)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 20) + (the binteger 17433280) + (the binteger 17433312) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3479 + :init-specs ((:texture (baron-neon-cheek-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -0.325)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 21) + (the binteger 17433344) + (the binteger 17433376) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3480 + :init-specs ((:texture (baron-neon-cheek-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -1.625)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 22) + (the binteger 17433408) + (the binteger 17433440) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3481 + :init-specs ((:texture (baron-neon-cheek-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -7.825)) + (:y (meters -2.875)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 23) + (the binteger 17433472) + (the binteger 17433504) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3482 + :init-specs ((:texture (baron-neon-cheek-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters 0.75)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 20) + (the binteger 17433280) + (the binteger 17433312) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3483 + :init-specs ((:texture (baron-neon-cheek-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -0.325)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 21) + (the binteger 17433344) + (the binteger 17433376) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3484 + :init-specs ((:texture (baron-neon-cheek-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -1.625)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 22) + (the binteger 17433344) + (the binteger 17433440) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3485 + :init-specs ((:texture (baron-neon-cheek-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 7.825)) + (:y (meters -2.875)) + (:z (meters 0)) + (:scale-x (meters 2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 23) + (the binteger 17433472) + (the binteger 17433504) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3486 + :init-specs ((:texture (baron-neon-white-long ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 10.6)) + (:z (meters 0)) + (:scale-x (meters 16)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 15) + (the binteger 17434816) + (the binteger 17434848) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3487 + :init-specs ((:texture (baron-neon-white-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 9.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 16) + (the binteger 17434496) + (the binteger 17434528) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3488 + :init-specs ((:texture (baron-neon-white-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 8.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 17) + (the binteger 17434560) + (the binteger 17434592) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3489 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 7.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 18) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3490 + :init-specs ((:texture (baron-neon-white-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters 6.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 19) + (the binteger 17434688) + (the binteger 17434720) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3491 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -8.200001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 24) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3492 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -12.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 25) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3493 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -13.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 26) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3494 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -14.700001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 27) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3495 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -4.3)) + (:y (meters -15.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 28) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3496 + :init-specs ((:texture (baron-neon-white-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 9.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 16) + (the binteger 17434496) + (the binteger 17434528) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3497 + :init-specs ((:texture (baron-neon-white-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 8.7)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 17) + (the binteger 17434560) + (the binteger 17434592) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3498 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 7.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 18) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3499 + :init-specs ((:texture (baron-neon-white-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters 6.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 19) + (the binteger 17434688) + (the binteger 17434720) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3500 + :init-specs ((:texture (baron-neon-white-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -8.200001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 24) + (the binteger 17434624) + (the binteger 17434656) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3501 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -12.3)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 25) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3502 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -13.5)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 26) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3503 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -14.700001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 27) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3504 + :init-specs ((:texture (baron-neon-white-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 4.3)) + (:y (meters -15.9)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 28) + (the binteger 17434752) + (the binteger 17434784) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3505 + :init-specs ((:texture (baron-neon-white-long ctysluma-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -17)) + (:z (meters 0)) + (:scale-x (meters 16)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 29) + (the binteger 17434816) + (the binteger 17434848) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3506 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 10.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 30) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3507 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 9.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 31) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3508 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 8.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 32) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3509 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 6.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 33) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3510 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 5.675)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 34) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3511 + :init-specs ((:texture (baron-neon-blue-b ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 4.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 35) + (the binteger 17432640) + (the binteger 17432672) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3512 + :init-specs ((:texture (baron-neon-blue-c ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 3.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 36) + (the binteger 17432704) + (the binteger 17432736) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3513 + :init-specs ((:texture (baron-neon-blue-d ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 2.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 37) + (the binteger 17432768) + (the binteger 17432800) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3514 + :init-specs ((:texture (baron-neon-blue-e ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters 0.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 38) + (the binteger 17432832) + (the binteger 17432864) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3515 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -0.32500005)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 39) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3516 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -1.5250001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 40) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3517 + :init-specs ((:texture (baron-neon-blue-g ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -2.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 41) + (the binteger 17432960) + (the binteger 17432992) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3518 + :init-specs ((:texture (baron-neon-blue-h ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -3.9250002)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 42) + (the binteger 17433024) + (the binteger 17433056) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3519 + :init-specs ((:texture (baron-neon-blue-i ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -5.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 43) + (the binteger 17433088) + (the binteger 17433120) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3520 + :init-specs ((:texture (baron-neon-blue-j ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -6.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 44) + (the binteger 17433152) + (the binteger 17433184) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3521 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -7.5249996)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 45) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3522 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -8.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 46) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3523 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -9.925)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 47) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3524 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -11.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 48) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3525 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -12.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 49) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3526 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -13.525)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 50) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3527 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -14.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 51) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3528 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -15.924999)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 52) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3529 + :init-specs ((:texture (baron-neon-blue-k ctysluma-sprite)) + (:num 1.0) + (:x (meters -10)) + (:y (meters -17.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 53) + (the binteger 17433216) + (the binteger 17433248) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3530 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 10.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 30) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3531 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 9.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 31) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3532 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 8.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 32) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3533 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 6.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 33) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3534 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 5.675)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 34) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3535 + :init-specs ((:texture (baron-neon-blue-b ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 4.475)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 35) + (the binteger 17432640) + (the binteger 17432672) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3536 + :init-specs ((:texture (baron-neon-blue-c ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 3.275)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 36) + (the binteger 17432704) + (the binteger 17432736) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3537 + :init-specs ((:texture (baron-neon-blue-d ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 2.075)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 37) + (the binteger 17432768) + (the binteger 17432800) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3538 + :init-specs ((:texture (baron-neon-blue-e ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters 0.875)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 38) + (the binteger 17432832) + (the binteger 17432864) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3539 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -0.32500005)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 39) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3540 + :init-specs ((:texture (baron-neon-blue-f ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -1.5250001)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 40) + (the binteger 17432896) + (the binteger 17432928) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3541 + :init-specs ((:texture (baron-neon-blue-g ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -2.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 41) + (the binteger 17432960) + (the binteger 17432992) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3542 + :init-specs ((:texture (baron-neon-blue-h ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -3.9250002)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 42) + (the binteger 17433024) + (the binteger 17433056) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3543 + :init-specs ((:texture (baron-neon-blue-i ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -5.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 43) + (the binteger 17433088) + (the binteger 17433120) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3544 + :init-specs ((:texture (baron-neon-blue-j ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -6.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 44) + (the binteger 17433152) + (the binteger 17433184) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3545 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -7.5249996)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 45) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3546 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -8.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 46) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3547 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -9.925)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 47) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3548 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -11.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 48) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3549 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -12.325)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 49) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3550 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -13.525)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 50) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3551 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -14.725)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 51) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3552 + :init-specs ((:texture (baron-neon-blue-a ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -15.924999)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 52) + (the binteger 17432576) + (the binteger 17432608) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3553 + :init-specs ((:texture (baron-neon-blue-k ctysluma-sprite)) + (:num 1.0) + (:x (meters 10)) + (:y (meters -17.125)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:rot-y (degrees 180)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 48.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type object + '*baron-neon-skull* + (the binteger 53) + (the binteger 17433216) + (the binteger 17433248) + ) + ) + (:func 'sparticle-mode-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-neon-baron + :id 972 + :bounds (static-bspherem 0 -3 0 16) + :parts ((sp-item 3456 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3457 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3458 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3459 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3460 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3461 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3462 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3463 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3464 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3465 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3466 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3467 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3468 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3469 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3470 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3471 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3472 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3473 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3474 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3475 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3476 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3477 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3478 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3479 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3480 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3481 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3482 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3483 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3484 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3485 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3506 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3507 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3508 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3509 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3510 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3511 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3512 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3513 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3514 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3515 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3516 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3517 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3518 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3519 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3520 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3521 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3522 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3523 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3524 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3525 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3526 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3527 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3528 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3529 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3486 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3487 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3488 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3489 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3490 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3496 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3497 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3498 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3499 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3491 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3492 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3493 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3494 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3495 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3500 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3501 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3502 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3503 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3504 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3505 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3530 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3531 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3532 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3533 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3534 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3535 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3536 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3537 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3538 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3539 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3540 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3541 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3542 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3543 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3544 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3545 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3546 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3547 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3548 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3549 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3550 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3551 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3552 :flags (is-3d sp3 sp6 sp7)) + (sp-item 3553 :flags (is-3d sp3 sp6 sp7)) + ) + ) + +;; definition for symbol *city-baron-group-ids*, type (array int32) +(define *city-baron-group-ids* (new 'static 'boxed-array :type int32 #x3cc)) + +;; definition of type neon-baron +(deftype neon-baron (process) + ((flags neon-baron-flag) + (master-enable uint64) + (mode uint64) + (sign (array object)) + (parts sparticle-launch-control 1) + (state-time time-frame) + (mat matrix :inline) + ) + (:state-methods + idle + ) + (:methods + (spawn-parts (_type_) symbol) + (update-mode (_type_) none) + ) + ) + +;; definition for method 3 of type neon-baron +(defmethod inspect ((this neon-baron)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tmaster-enable: ~D~%" (-> this master-enable)) + (format #t "~2Tmode: ~D~%" (-> this mode)) + (format #t "~2Tsign: ~A~%" (-> this sign)) + (format #t "~2Tparts[1] @ #x~X~%" (-> this parts)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tmat: #~%" (-> this mat)) + (label cfg-4) + this + ) + +;; definition for method 10 of type neon-baron +(defmethod deactivate ((this neon-baron)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((s5-0 0)) + (while (< s5-0 1) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + (set! s5-0 (the-as int (+ (the-as uint s5-0) 1))) + ) + ) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 7 of type neon-baron +;; WARN: Return type mismatch process vs neon-baron. +(defmethod relocate ((this neon-baron) (offset int)) + (dotimes (v1-0 1) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (the-as neon-baron ((method-of-type process relocate) this offset)) + ) + +;; definition for method 15 of type neon-baron +(defmethod spawn-parts ((this neon-baron)) + (+! (-> this parts 0 state-counter) 1) + (when (!= (-> this parts 0 state-mode 0) (-> this flags)) + (set! (-> this parts 0 state-mode 0) (the-as uint (-> this flags))) + (set! (-> this parts 0 state-counter) (the-as uint 0)) + 0 + ) + (let ((s5-0 (the-as int (-> this master-enable)))) + (dotimes (s4-0 1) + (if (logtest? s5-0 1) + (spawn-from-mat (-> this parts s4-0) (-> this mat)) + ) + (set! s5-0 (/ s5-0 2)) + ) + ) + #f + ) + +;; definition for method 16 of type neon-baron +;; WARN: Return type mismatch int vs none. +(defmethod update-mode ((this neon-baron)) + (set! (-> this mode) (the-as uint (rand-vu-int-count-excluding 12 (ash 1 (the-as int (-> this mode)))))) + (none) + ) + +;; definition for symbol *neon-baron-flashing-acc*, type (pointer uint32) +(define *neon-baron-flashing-acc* (new 'static 'array uint32 40 + #x258 + #x168 + #x168 + #xd8 + #xd8 + #x81 + #x81 + #x4d + #x4d + #x2e + #x2e + #x2e + #x1b + #x1b + #x10 + #x10 + #xa + #xa + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x6 + #x5a + #x0 + #x0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (neon-baron) + :virtual #t + :trans (behavior () + (spawn-parts self) + ) + :code (behavior () + (until #f + (update-mode self) + (let ((v1-2 (-> self mode))) + (cond + ((= v1-2 2) + 600 + (dotimes (gp-0 19) + (let ((s5-0 (-> *neon-baron-flashing-acc* (* gp-0 2)))) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-0)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (let ((s5-1 (-> *neon-baron-flashing-acc* (+ (* gp-0 2) 1)))) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-1)) + (suspend) + ) + ) + ) + ) + ((zero? v1-2) + (dotimes (gp-1 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ((= v1-2 1) + (dotimes (gp-2 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb3)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb3)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + ) + ) + ((= v1-2 10) + 600 + (dotimes (gp-3 19) + (let ((s5-2 (-> *neon-baron-flashing-acc* (* gp-3 2)))) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-2)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (let ((s5-3 (-> *neon-baron-flashing-acc* (+ (* gp-3 2) 1)))) + (until (time-elapsed? (-> self state-time) (the-as time-frame s5-3)) + (suspend) + ) + ) + ) + ) + ((= v1-2 8) + (dotimes (gp-4 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ((= v1-2 9) + (dotimes (gp-5 3) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb0 nb1)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (set-time! (-> self state-time)) + (set! (-> self flags) (neon-baron-flag nb1)) + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + ) + ) + ((= v1-2 3) + (set! (-> self flags) (neon-baron-flag nb1 nb3)) + (let ((gp-6 (rand-vu-int-range 2 3))) + (dotimes (s5-4 gp-6) + (let ((s4-0 0)) + (while (let ((a0-38 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-0 (* (+ (-> a0-38 length) -1) (the-as int (/ (the-as int (-> a0-38 0)) 8)))) + ) + (suspend) + (+! s4-0 1) + ) + ) + ) + ) + ) + ((= v1-2 4) + (set! (-> self flags) (neon-baron-flag nb0 nb2)) + (let ((gp-7 (rand-vu-int-range 10 40))) + (dotimes (s5-5 gp-7) + (let ((s4-1 0)) + (while (let ((a0-45 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-1 (* (+ (-> a0-45 length) -1) (the-as int (/ (the-as int (-> a0-45 0)) 8)))) + ) + (suspend) + (+! s4-1 1) + ) + ) + ) + ) + ) + ((= v1-2 5) + (set! (-> self flags) (neon-baron-flag nb2)) + (let ((gp-8 (rand-vu-int-range 3 10))) + (dotimes (s5-6 gp-8) + (let ((s4-2 0)) + (while (let ((a0-52 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-2 (* (+ (-> a0-52 length) -1) (the-as int (/ (the-as int (-> a0-52 0)) 8)))) + ) + (suspend) + (+! s4-2 1) + ) + ) + ) + ) + ) + ((= v1-2 6) + (set! (-> self flags) (neon-baron-flag nb0 nb1 nb2)) + (let ((gp-9 (rand-vu-int-range 3 6))) + (dotimes (s5-7 gp-9) + (let ((s4-3 0)) + (while (let ((a0-59 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-3 (* (+ (-> a0-59 length) -1) (the-as int (/ (the-as int (-> a0-59 0)) 8)))) + ) + (suspend) + (+! s4-3 1) + ) + ) + ) + ) + ) + ((= v1-2 11) + (set! (-> self flags) (neon-baron-flag nb1 nb2)) + (let ((gp-10 (rand-vu-int-range 3 6))) + (dotimes (s5-8 gp-10) + (let ((s4-4 0)) + (while (let ((a0-66 (the-as (array object) (-> self sign (+ (-> self flags) 1))))) + (< s4-4 (* (+ (-> a0-66 length) -1) (the-as int (/ (the-as int (-> a0-66 0)) 8)))) + ) + (suspend) + (+! s4-4 1) + ) + ) + ) + ) + ) + ((= v1-2 7) + (set! (-> self flags) (neon-baron-flag nb0)) + (let ((gp-11 (rand-vu-int-range 3 6))) + (dotimes (s5-9 gp-11) + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +;; definition for method 11 of type neon-baron +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this neon-baron) (arg0 entity-actor)) + (matrix-rotate-y! (-> this mat) (quaternion-y-angle (-> arg0 quat))) + (set! (-> this mat trans quad) (-> arg0 extra trans quad)) + (set! (-> this master-enable) (the-as uint -1)) + (set! (-> this flags) (neon-baron-flag nb0 nb3)) + (set! (-> this mode) (the-as uint 0)) + (set! (-> this sign) *baron-neon-skull*) + (let ((s5-1 *city-baron-group-ids*)) + (dotimes (s4-1 1) + (set! (-> this parts s4-1) (create-launch-control (-> *part-group-id-table* (-> s5-1 s4-1)) this)) + ) + ) + (update-mode this) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc b/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc new file mode 100644 index 0000000000..0682ae9b47 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc @@ -0,0 +1,225 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type combx-elevator +(deftype combx-elevator (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + (setup-skel-and-draw-masks (_type_) none) + ) + ) + +;; definition for method 3 of type combx-elevator +(defmethod inspect ((this combx-elevator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (combx-elevator) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defskelgroup skel-combx-elevator tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +;; definition for method 21 of type combx-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this combx-elevator)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 45056.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 3) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-21 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-21 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-21 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 22 of type combx-elevator +;; WARN: Return type mismatch int vs none. +(defmethod setup-skel-and-draw-masks ((this combx-elevator)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-combx-elevator" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 1 2) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 11 of type combx-elevator +(defmethod init-from-entity! ((this combx-elevator) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (setup-skel-and-draw-masks this) + (set! (-> this draw light-index) (the-as uint 1)) + (go (method-of-object this idle)) + ) + +;; definition of type combx-states +(deftype combx-states (structure) + () + ) + +;; definition for method 3 of type combx-states +(defmethod inspect ((this combx-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'combx-states) + (label cfg-4) + this + ) + +;; definition for function init-mood-combx +(defun init-mood-combx ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a0-1 (-> v1-0 dir0))) + (set! (-> a0-1 direction x) 0.0) + (set! (-> a0-1 direction y) 1.0) + (set! (-> a0-1 direction z) 0.0) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 dir0 extra x) 0.75) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.25) + ) + ) + +;; definition for function update-mood-combx +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-combx time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let* ((s5-0 (camera-pos)) + (f0-1 (fmin + (vector-vector-distance s5-0 (new 'static 'vector :x 368640.0 :z 40960.0 :w 1.0)) + (vector-vector-distance s5-0 (new 'static 'vector :x 14274560.0 :y -167936.0 :z 614400.0 :w 1.0)) + ) + ) + ) + (when (< f0-1 716800.0) + (let ((f30-1 (fmax 0.0 (fmin 1.0 (* 0.000009765625 (- 819200.0 f0-1))))) + (a1-4 (-> arg0 current-fog)) + (s5-1 (-> arg0 current-fog fog-dists)) + ) + (vector4-lerp! + (the-as vector a1-4) + (the-as vector a1-4) + (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) + f30-1 + ) + (vector4-lerp! s5-1 s5-1 (new 'static 'vector :x 262144.0 :y 937984.0 :z 255.0 :w 200.0) f30-1) + ) + ) + ) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (let* ((s5-2 (-> *display* part-clock frame-counter)) + (f0-6 (* 1310.72 (the float (mod s5-2 25)))) + (f30-2 (sin f0-6)) + (f0-8 (* 109.22667 (the float (mod s5-2 600)))) + (s5-3 (/ (mod s5-2 125) 25)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) f30-2) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.15 (cos f0-8)))) + (set! (-> arg0 times 3 w) (if (zero? s5-3) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 4 w) (if (= s5-3 1) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 5 w) (if (= s5-3 2) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 6 w) (if (= s5-3 3) + f30-2 + 0.0 + ) + ) + (set! (-> arg0 times 7 w) (if (= s5-3 4) + f30-2 + 0.0 + ) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc new file mode 100644 index 0000000000..9f4132dfa1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc @@ -0,0 +1,288 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *faccity-part-updater*, type lfaccity-pparticle-mover +(define *faccity-part-updater* (the-as lfaccity-pparticle-mover #f)) + +;; definition of type lfaccity-states +(deftype lfaccity-states (structure) + ((light light-state :inline) + (roty float) + (rotz float) + (rot-bob float) + (wobble float) + (bob float) + (zero-test int32) + ) + ) + +;; definition for method 3 of type lfaccity-states +(defmethod inspect ((this lfaccity-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lfaccity-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Troty: ~f~%" (-> this roty)) + (format #t "~1Trotz: ~f~%" (-> this rotz)) + (format #t "~1Trot-bob: ~f~%" (-> this rot-bob)) + (format #t "~1Twobble: ~f~%" (-> this wobble)) + (format #t "~1Tbob: ~f~%" (-> this bob)) + (format #t "~1Tzero-test: ~D~%" (-> this zero-test)) + (label cfg-4) + this + ) + +;; definition for function update-mood-lfaccity +;; WARN: Return type mismatch object vs none. +(defbehavior update-mood-lfaccity time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (let ((gp-1 (the-as object (-> arg0 state)))) + (cond + ((level-get *level* 'factoryb) + (set-vector! (-> *math-camera* trans-other) 1228800.0 (-> (the-as lfaccity-states gp-1) bob) 1228800.0 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set-vector! s3-0 -409600.0 0.0 0.0 1.0) + (vector-rotate-y! s3-0 s3-0 (-> (the-as lfaccity-states gp-1) roty)) + (vector+! (-> *math-camera* trans-other) (-> *math-camera* trans-other) s3-0) + ) + ) + ((or (level-get *level* 'factoryc) (level-get *level* 'factoryd)) + (set-vector! + (-> *math-camera* trans-other) + 696320.0 + (+ -614400.0 (-> (the-as lfaccity-states gp-1) bob)) + -368640.0 + 1.0 + ) + ) + ) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (let ((s5-1 *math-camera*)) + (when (not (paused?)) + (let ((s3-1 (new 'stack-no-clear 'quaternion)) + (s4-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! s3-1 *y-vector* (-> (the-as lfaccity-states gp-1) roty)) + (quaternion-vector-angle! s4-1 *z-vector* (-> (the-as lfaccity-states gp-1) wobble)) + (quaternion*! (-> s5-1 quat-other) s4-1 s3-1) + ) + (let ((f0-17 (+ (-> (the-as lfaccity-states gp-1) roty) (* 910.2222 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) roty) (- f0-17 (* (the float (the int (/ f0-17 65536.0))) 65536.0))) + ) + (let ((f0-20 (+ (-> (the-as lfaccity-states gp-1) rotz) (* 8192.0 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) rotz) (- f0-20 (* (the float (the int (/ f0-20 65536.0))) 65536.0))) + ) + (set! (-> (the-as lfaccity-states gp-1) wobble) (* 910.2222 (sin (-> (the-as lfaccity-states gp-1) rotz)))) + (let ((f0-26 (+ (-> (the-as lfaccity-states gp-1) rot-bob) (* 16384.0 (seconds-per-frame))))) + (set! (-> (the-as lfaccity-states gp-1) rot-bob) + (- f0-26 (* (the float (the int (/ f0-26 65536.0))) 65536.0)) + ) + ) + (set! (-> (the-as lfaccity-states gp-1) bob) + (+ -40960.0 (* 40960.0 (sin (-> (the-as lfaccity-states gp-1) rot-bob)))) + ) + (send-event *faccity-part-updater* 'mood-update) + ) + ) + ) + ) + (none) + ) + +;; definition of type faccity-pparticle-info +(deftype faccity-pparticle-info (structure) + ((original-pos vector :inline) + (inited? symbol) + ) + ) + +;; definition for method 3 of type faccity-pparticle-info +(defmethod inspect ((this faccity-pparticle-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'faccity-pparticle-info) + (format #t "~1Toriginal-pos: #~%" (-> this original-pos)) + (format #t "~1Tinited?: ~A~%" (-> this inited?)) + (label cfg-4) + this + ) + +;; definition of type faccity-pparticle-array +(deftype faccity-pparticle-array (inline-array-class) + ((data faccity-pparticle-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type faccity-pparticle-array +(defmethod inspect ((this faccity-pparticle-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(set! (-> faccity-pparticle-array heap-base) (the-as uint 32)) + +;; definition of type lfaccity-pparticle-mover +(deftype lfaccity-pparticle-mover (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (particles faccity-pparticle-array) + ) + (:state-methods + active + ) + (:methods + (mood-update (_type_) symbol) + ) + ) + +;; definition for method 3 of type lfaccity-pparticle-mover +(defmethod inspect ((this lfaccity-pparticle-mover)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (format #t "~2Tparticles: ~A~%" (-> this particles)) + (label cfg-7) + this + ) + +;; definition for method 11 of type lfaccity-pparticle-mover +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this lfaccity-pparticle-mover) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this root) (new 'process 'trsqv)) + (if (<= (-> this actor-group-count) 0) + (go process-drawable-art-error "actor group") + ) + (set! (-> this entity extra vis-dist) 40960000000000.0) + (set! (-> this particles) (new 'process 'faccity-pparticle-array (-> this actor-group 0 length))) + (dotimes (v1-18 (-> this particles length)) + (set! (-> this particles data v1-18 inited?) #f) + ) + (set! *faccity-part-updater* this) + (go (method-of-object this active)) + ) + +;; definition for function lfaccity-pparticle-mover-init-by-other +(defbehavior lfaccity-pparticle-mover-init-by-other lfaccity-pparticle-mover ((arg0 entity-actor)) + (init-from-entity! self arg0) + ) + +;; failed to figure out what this is: +(defstate active (lfaccity-pparticle-mover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('mood-update) + (mood-update self) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 12 of type lfaccity-pparticle-mover +(defmethod run-logic? ((this lfaccity-pparticle-mover)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 10 of type lfaccity-pparticle-mover +(defmethod deactivate ((this lfaccity-pparticle-mover)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *faccity-part-updater* #f) + (call-parent-method this) + (none) + ) + +;; definition for method 21 of type lfaccity-pparticle-mover +;; INFO: Used lq/sq +(defmethod mood-update ((this lfaccity-pparticle-mover)) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> *math-camera* quat-other)))) + (dotimes (s4-0 (-> this particles length)) + (cond + ((-> this particles data s4-0 inited?) + (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (the-as vector (-> this particles data s4-0)) s5-0)) + (a1-4 (-> this actor-group 0 data s4-0 actor)) + ) + (when a1-4 + (let ((a1-5 (-> a1-4 extra process))) + (when a1-5 + (set! (-> (the-as process-drawable a1-5) root trans quad) (-> v1-6 quad)) + (vector+! + (-> (the-as process-drawable a1-5) root trans) + (-> (the-as process-drawable a1-5) root trans) + (-> *math-camera* trans-other) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-14 (-> this actor-group 0 data s4-0 actor))) + (when v1-14 + (set! (-> this particles data s4-0 original-pos quad) (-> v1-14 extra trans quad)) + (set! (-> this particles data s4-0 inited?) #t) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 7 of type lfaccity-pparticle-mover +(defmethod relocate ((this lfaccity-pparticle-mover) (offset int)) + (set! *faccity-part-updater* this) + (if *faccity-part-updater* + (set! *faccity-part-updater* (&+ *faccity-part-updater* offset)) + ) + (if (nonzero? (-> this particles)) + (&+! (-> this particles) offset) + ) + (call-parent-method this offset) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/hover-nav-precura_REF.gc b/test/decompiler/reference/jak3/levels/precursor/hover-nav-precura_REF.gc new file mode 100644 index 0000000000..4fc4156425 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/hover-nav-precura_REF.gc @@ -0,0 +1,642 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *precura-adjacency*, type nav-network-data +(define *precura-adjacency* + (new 'static 'nav-network-data + :node-array (new 'static 'boxed-array :type nav-network-info + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :parent #f) + :pos (new 'static 'vector :x 155320.31 :y 2275000.2 :z -253829.12 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 97320.96) + (new 'static 'nav-network-adjacency :index 23 :dist 81141.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 173219.84 :y 2275000.2 :z -149340.16 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 103505.92) + (new 'static 'nav-network-adjacency :index 24 :dist 83312.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 184770.56 :y 2180259.8 :z -189399.05 :w 1.0) + :index 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 103505.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 175063.05 :y 2180259.8 :z -263946.25 :w 1.0) + :index 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 (new 'static 'nav-network-adjacency :dist 97320.96)) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 153722.88 :y 2289991.8 :z 150568.95 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 86548.48) + (new 'static 'nav-network-adjacency :index 26 :dist 136929.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 152453.12 :y 2247188.5 :z 225812.48 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 86548.48) + (new 'static 'nav-network-adjacency :index 6 :dist 99409.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 232693.77 :y 2190991.2 :z 242606.08 :w 1.0) + :index 6 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 99409.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 632709.1 :y 2243788.8 :z -189972.48 :w 1.0) + :index 7 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 39198.72) + (new 'static 'nav-network-adjacency :index 16 :dist 110510.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 593551.4 :y 2243788.8 :z -192307.2 :w 1.0) + :index 8 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 7 :dist 39198.72) + (new 'static 'nav-network-adjacency :index 9 :dist 47308.8) + (new 'static 'nav-network-adjacency :index 17 :dist 110387.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 546693.1 :y 2243788.8 :z -198656.0 :w 1.0) + :index 9 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 8 :dist 47308.8) + (new 'static 'nav-network-adjacency :index 10 :dist 93020.16) + (new 'static 'nav-network-adjacency :index 18 :dist 109363.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 483450.88 :y 2243788.8 :z -266895.38 :w 1.0) + :index 10 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 9 :dist 93020.16) + (new 'static 'nav-network-adjacency :index 11 :dist 105594.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 484024.3 :y 2272174.0 :z -368599.03 :w 1.0) + :index 11 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 10 :dist 105594.88) + (new 'static 'nav-network-adjacency :index 12 :dist 71106.56) + (new 'static 'nav-network-adjacency :index 19 :dist 97812.48) + (new 'static 'nav-network-adjacency :index 20 :dist 107069.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 555130.9 :y 2272174.0 :z -367861.75 :w 1.0) + :index 12 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 71106.56) + (new 'static 'nav-network-adjacency :index 13 :dist 48906.24) + (new 'static 'nav-network-adjacency :index 20 :dist 103464.96) + (new 'static 'nav-network-adjacency :index 21 :dist 104120.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 570736.6 :y 2272174.0 :z -321495.03 :w 1.0) + :index 13 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 12 :dist 48906.24) + (new 'static 'nav-network-adjacency :index 14 :dist 49233.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 568074.25 :y 2272174.0 :z -272343.03 :w 1.0) + :index 14 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 13 :dist 49233.92) + (new 'static 'nav-network-adjacency :index 15 :dist 62709.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 607887.4 :y 2272174.0 :z -223846.4 :w 1.0) + :index 15 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 14 :dist 62709.76) + (new 'static 'nav-network-adjacency :index 22 :dist 111329.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 611205.1 :y 2137948.2 :z -166584.31 :w 1.0) + :index 16 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 110510.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 577331.2 :y 2137948.2 :z -165478.4 :w 1.0) + :index 17 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 8 :dist 110387.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 542105.6 :y 2137948.2 :z -171540.48 :w 1.0) + :index 18 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 109363.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 480256.0 :y 2178048.0 :z -394936.3 :w 1.0) + :index 19 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 11 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 525189.1 :y 2178048.0 :z -398704.62 :w 1.0) + :index 20 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 11 :dist 107069.44) + (new 'static 'nav-network-adjacency :index 12 :dist 103464.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 591872.0 :y 2178048.0 :z -392847.38 :w 1.0) + :index 21 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 104120.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 631521.25 :y 2178048.0 :z -278446.1 :w 1.0) + :index 22 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 15 :dist 111329.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 236093.44 :y 2270126.0 :z -259768.31 :w 1.0) + :index 23 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 81141.76) + (new 'static 'nav-network-adjacency :index 24 :dist 63242.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 241541.12 :y 2270126.0 :z -196730.88 :w 1.0) + :index 24 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 83312.64) + (new 'static 'nav-network-adjacency :index 23 :dist 63242.24) + (new 'static 'nav-network-adjacency :index 25 :dist 73809.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 263168.0 :y 2270126.0 :z -126197.76 :w 1.0) + :index 25 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 24 :dist 73809.92) + (new 'static 'nav-network-adjacency :index 26 :dist 193863.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 260874.23 :y 2270126.0 :z 67665.92 :w 1.0) + :index 26 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 136929.28) + (new 'static 'nav-network-adjacency :index 25 :dist 193863.69) + (new 'static 'nav-network-adjacency :index 27 :dist 129720.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 258252.8 :y 2323169.2 :z 185999.36 :w 1.0) + :index 27 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 26 :dist 129720.32) + (new 'static 'nav-network-adjacency :index 28 :dist 40427.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 232939.52 :y 2323169.2 :z 217497.6 :w 1.0) + :index 28 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 40427.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 876871.7 :y 2194350.0 :z -19251.2 :w 1.0) + :index 29 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 30 :dist 37724.16) + (new 'static 'nav-network-adjacency :index 34 :dist 91299.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 914595.8 :y 2194350.0 :z -19660.8 :w 1.0) + :index 30 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 29 :dist 37724.16) + (new 'static 'nav-network-adjacency :index 31 :dist 39936.0) + (new 'static 'nav-network-adjacency :index 34 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 954531.8 :y 2194350.0 :z -19496.96 :w 1.0) + :index 31 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 30 :dist 39936.0) + (new 'static 'nav-network-adjacency :index 32 :dist 37642.24) + (new 'static 'nav-network-adjacency :index 33 :dist 89292.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x 992092.2 :y 2194350.0 :z -21667.84 :w 1.0) + :index 32 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 31 :dist 37642.24) + (new 'static 'nav-network-adjacency :index 33 :dist 88350.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x 977551.4 :y 2274304.0 :z 12943.36 :w 1.0) + :index 33 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 31 :dist 89292.8) + (new 'static 'nav-network-adjacency :index 32 :dist 88350.72) + (new 'static 'nav-network-adjacency :index 34 :dist 69427.2) + (new 'static 'nav-network-adjacency :index 35 :dist 87531.52) + (new 'static 'nav-network-adjacency :index 39 :dist 87244.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x 908124.2 :y 2274304.0 :z 11837.44 :w 1.0) + :index 34 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 29 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 30 :dist 86179.84) + (new 'static 'nav-network-adjacency :index 33 :dist 69427.2) + (new 'static 'nav-network-adjacency :index 35 :dist 84500.48) + (new 'static 'nav-network-adjacency :index 39 :dist 81756.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x 940277.75 :y 2279997.5 :z -66068.48 :w 1.0) + :index 35 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 87531.52) + (new 'static 'nav-network-adjacency :index 34 :dist 84500.48) + (new 'static 'nav-network-adjacency :index 36 :dist 210984.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x 935976.94 :y 2279997.5 :z -277012.47 :w 1.0) + :index 36 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 35 :dist 210984.95) + (new 'static 'nav-network-adjacency :index 37 :dist 73359.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x 876789.75 :y 2279997.5 :z -320430.1 :w 1.0) + :index 37 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 36 :dist 73359.36) + (new 'static 'nav-network-adjacency :index 38 :dist 64471.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x 812728.3 :y 2279997.5 :z -327311.38 :w 1.0) + :index 38 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 37 :dist 64471.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x 934993.94 :y 2252636.2 :z 85975.04 :w 1.0) + :index 39 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 34 :dist 81756.16) + (new 'static 'nav-network-adjacency :index 40 :dist 131072.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x 1011507.2 :y 2215198.8 :z 185630.72 :w 1.0) + :index 40 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 39 :dist 131072.0) + (new 'static 'nav-network-adjacency :index 41 :dist 179691.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x 1152450.5 :y 2198446.0 :z 295854.1 :w 1.0) + :index 41 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 179691.52) + (new 'static 'nav-network-adjacency :index 42 :dist 135741.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x 1048125.44 :y 2184806.5 :z 381665.28 :w 1.0) + :index 42 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 135741.44) + (new 'static 'nav-network-adjacency :index 43 :dist 183541.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x 917012.5 :y 2120540.2 :z 492830.72 :w 1.0) + :index 43 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 42 :dist 183541.77) + (new 'static 'nav-network-adjacency :index 44 :dist 160808.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x 985210.9 :y 2077532.1 :z 631971.8 :w 1.0) + :index 44 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 43 :dist 160808.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x 992419.8 :y 2083635.2 :z 907796.5 :w 1.0) + :index 45 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 46 :dist 127754.24) + (new 'static 'nav-network-adjacency :index 47 :dist 117800.96) + (new 'static 'nav-network-adjacency :index 50 :dist 116244.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x 993730.56 :y 2083635.2 :z 780001.25 :w 1.0) + :index 46 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 45 :dist 127754.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x 995328.0 :y 1966202.9 :z 899112.94 :w 1.0) + :index 47 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 45 :dist 117800.96) + (new 'static 'nav-network-adjacency :index 48 :dist 68853.76) + (new 'static 'nav-network-adjacency :index 49 :dist 70082.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x 1031454.75 :y 1966202.9 :z 840458.25 :w 1.0) + :index 48 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 47 :dist 68853.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x 952811.5 :y 1966202.9 :z 843407.4 :w 1.0) + :index 49 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 47 :dist 70082.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x 991232.0 :y 2083635.2 :z 1024040.94 :w 1.0) + :index 50 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 45 :dist 116244.48) + (new 'static 'nav-network-adjacency :index 51 :dist 122675.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x 946298.9 :y 2083635.2 :z 1138196.5 :w 1.0) + :index 51 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 50 :dist 122675.2) + (new 'static 'nav-network-adjacency :index 52 :dist 104857.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x 866672.6 :y 2083635.2 :z 1206435.9 :w 1.0) + :index 52 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 51 :dist 104857.6) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 7 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 9 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 22 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 23 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 24 :radius 20889.6) + (new 'static 'nav-network-edge :start-index 24 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 35553.28) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 46694.4) + (new 'static 'nav-network-edge :start-index 26 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 27 :radius 24780.8) + (new 'static 'nav-network-edge :start-index 27 :end-index 28 :radius 18841.6) + (new 'static 'nav-network-edge :start-index 29 :end-index 30 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 29 :end-index 34 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 30 :end-index 31 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 31 :end-index 33 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 32 :end-index 31 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 33 :end-index 32 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 34 :end-index 30 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 34 :end-index 35 :radius 19456.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 35 :end-index 33 :radius 19251.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 35 :end-index 36 :radius 22118.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 36 :end-index 37 :radius 19988.48 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 37 :end-index 38 :radius 21299.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 39 :end-index 33 :radius 29941.76 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 39 :end-index 34 :radius 33013.76 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 40 :end-index 39 :radius 25968.64 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 41 :end-index 40 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 42 :end-index 41 :radius 38215.68 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 43 :end-index 42 :radius 45875.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 44 :end-index 43 :radius 17203.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 45 :end-index 46 :radius 25804.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 45 :end-index 50 :radius 36945.92 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 45 :radius 17612.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 48 :radius 22937.6 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 47 :end-index 49 :radius 19251.2 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 50 :end-index 51 :radius 23961.6 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 51 :end-index 52 :radius 35553.28 :sub-graph 3) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-mood_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-mood_REF.gc new file mode 100644 index 0000000000..91347c07a1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precura-mood_REF.gc @@ -0,0 +1,452 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type precura-states +(deftype precura-states (structure) + ((pulse pulse-state :inline) + (generator pulse-state :inline) + (main float) + (target-laser float 2) + (current-laser float 2) + (speed-laser float) + (target-bomb float) + (current-bomb float) + (speed-bomb float) + ) + ) + +;; definition for method 3 of type precura-states +(defmethod inspect ((this precura-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'precura-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (format #t "~1Tgenerator: #~%" (-> this generator)) + (format #t "~1Tmain: ~f~%" (-> this main)) + (format #t "~1Ttarget-laser[2] @ #x~X~%" (-> this target-laser)) + (format #t "~1Tcurrent-laser[2] @ #x~X~%" (-> this current-laser)) + (format #t "~1Tspeed-laser: ~f~%" (-> this speed-laser)) + (format #t "~1Ttarget-bomb: ~f~%" (-> this target-bomb)) + (format #t "~1Tcurrent-bomb: ~f~%" (-> this current-bomb)) + (format #t "~1Tspeed-bomb: ~f~%" (-> this speed-bomb)) + (label cfg-4) + this + ) + +;; definition for function init-mood-precura +(defun init-mood-precura ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (set! (-> v1-0 3) (the-as uint 1.0)) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 6) (the-as uint 1.0)) + (let ((f0-5 2.0)) + (set! (-> v1-0 7) (the-as uint f0-5)) + f0-5 + ) + ) + ) + +;; definition for function update-precura-lights +;; WARN: Return type mismatch float vs none. +(defun update-precura-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a0-1 (-> v1-0 0))) + (set! (-> a0-1 dir0 direction x) 0.0) + (set! (-> a0-1 dir0 direction y) 1.0) + (set! (-> a0-1 dir0 direction z) 0.0) + (set! (-> a0-1 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.5 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.25 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + (none) + ) + +;; definition for function update-mood-precura +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-precura time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precura-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((gp-0 (the-as object (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (update-mood-pulse arg0 4 16 1.0 0.125 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-10 (-> *display* part-clock frame-counter)) + (f0-7 (* 218.45334 (the float (mod v1-10 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-7)))) + ) + (set! (-> arg0 times 5 w) (-> (the-as precura-states gp-0) current-bomb)) + (set! (-> arg0 times 6 w) (-> (the-as precura-states gp-0) current-laser 0)) + (set! (-> arg0 times 7 w) (-> (the-as precura-states gp-0) current-laser 1)) + (when (not (paused?)) + (seek! + (-> (the-as precura-states gp-0) current-bomb) + (-> (the-as precura-states gp-0) target-bomb) + (-> (the-as precura-states gp-0) speed-bomb) + ) + (seek! + (-> (the-as precura-states gp-0) current-laser 0) + (-> (the-as precura-states gp-0) target-laser 0) + (-> (the-as precura-states gp-0) speed-laser) + ) + (seek! + (-> (the-as precura-states gp-0) current-laser 1) + (-> (the-as precura-states gp-0) target-laser 1) + (-> (the-as precura-states gp-0) speed-laser) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-precura-generator-light! +;; WARN: Return type mismatch float vs none. +(defun set-precura-generator-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) generator target-brightness) arg0) + ) + ) + ) + (none) + ) + +;; definition for function set-precura-laser-light! +;; WARN: Return type mismatch float vs none. +(defun set-precura-laser-light! ((arg0 float) (arg1 float) (arg2 int)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) target-laser arg2) arg0) + (set! (-> (the-as precura-states v1-2) speed-laser) arg1) + (if (= arg1 0.0) + (set! (-> (the-as precura-states (+ (* arg2 4) (the-as int v1-2))) current-laser 0) arg0) + ) + ) + ) + ) + (none) + ) + +;; definition for function set-precura-bomb-light! +;; WARN: Return type mismatch float vs none. +(defun set-precura-bomb-light! ((arg0 float) (arg1 float)) + (let ((v1-1 (level-get *level* 'precura))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as precura-states v1-2) target-bomb) arg0) + (set! (-> (the-as precura-states v1-2) speed-bomb) arg1) + ) + ) + ) + (none) + ) + +;; definition of type precurb-states +(deftype precurb-states (structure) + ((pulse pulse-state :inline) + (main float) + ) + ) + +;; definition for method 3 of type precurb-states +(defmethod inspect ((this precurb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'precurb-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (format #t "~1Tmain: ~f~%" (-> this main)) + (label cfg-4) + this + ) + +;; definition for function init-mood-precurb +(defun init-mood-precurb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +;; definition for function update-mood-precurb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-precurb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precura-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-9 (-> *display* part-clock frame-counter)) + (f0-5 (* 218.45334 (the float (mod v1-9 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-5)))) + ) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; definition of type lprecurc-loader +(deftype lprecurc-loader (process) + () + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type lprecurc-loader +(defmethod inspect ((this lprecurc-loader)) + (when (not this) + (set! this this) + (goto cfg-68) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tmask: #x~X : (process-mask " (-> this mask)) + (let ((s5-0 (-> this mask))) + (if (= (logand s5-0 (process-mask process-tree)) (process-mask process-tree)) + (format #t "process-tree ") + ) + (if (= (logand s5-0 (process-mask target)) (process-mask target)) + (format #t "target ") + ) + (if (= (logand (process-mask collectable) s5-0) (process-mask collectable)) + (format #t "collectable ") + ) + (if (= (logand (process-mask projectile) s5-0) (process-mask projectile)) + (format #t "projectile ") + ) + (if (= (logand s5-0 (process-mask sleep-code)) (process-mask sleep-code)) + (format #t "sleep-code ") + ) + (if (= (logand s5-0 (process-mask actor-pause)) (process-mask actor-pause)) + (format #t "actor-pause ") + ) + (if (= (logand (process-mask metalhead) s5-0) (shl #x8000 16)) + (format #t "metalhead ") + ) + (if (= (logand (process-mask bot) s5-0) (process-mask bot)) + (format #t "bot ") + ) + (if (= (logand (process-mask vehicle) s5-0) (process-mask vehicle)) + (format #t "vehicle ") + ) + (if (= (logand (process-mask enemy) s5-0) (process-mask enemy)) + (format #t "enemy ") + ) + (if (= (logand (process-mask entity) s5-0) (process-mask entity)) + (format #t "entity ") + ) + (if (= (logand s5-0 (process-mask heap-shrunk)) (process-mask heap-shrunk)) + (format #t "heap-shrunk ") + ) + (if (= (logand (process-mask sidekick) s5-0) (process-mask sidekick)) + (format #t "sidekick ") + ) + (if (= (logand s5-0 (process-mask going)) (process-mask going)) + (format #t "going ") + ) + (if (= (logand s5-0 (process-mask execute)) (process-mask execute)) + (format #t "execute ") + ) + (if (= (logand (process-mask civilian) s5-0) (process-mask civilian)) + (format #t "civilian ") + ) + (if (= (logand (process-mask death) s5-0) (process-mask death)) + (format #t "death ") + ) + (if (= (logand (process-mask guard) s5-0) (process-mask guard)) + (format #t "guard ") + ) + (if (= (logand s5-0 (process-mask no-kill)) (process-mask no-kill)) + (format #t "no-kill ") + ) + (if (= (logand (process-mask kg-robot) s5-0) (process-mask kg-robot)) + (format #t "kg-robot ") + ) + (if (= (logand (process-mask platform) s5-0) (process-mask platform)) + (format #t "platform ") + ) + (if (= (logand s5-0 (process-mask freeze)) (process-mask freeze)) + (format #t "freeze ") + ) + (if (= (logand s5-0 (process-mask sleep)) (process-mask sleep)) + (format #t "sleep ") + ) + (if (= (logand s5-0 (process-mask progress)) (process-mask progress)) + (format #t "progress ") + ) + (if (= (logand s5-0 (process-mask menu)) (process-mask menu)) + (format #t "menu ") + ) + (if (= (logand (process-mask camera) s5-0) (process-mask camera)) + (format #t "camera ") + ) + (if (= (logand (process-mask ambient) s5-0) (process-mask ambient)) + (format #t "ambient ") + ) + (if (= (logand s5-0 (process-mask dark-effect)) (process-mask dark-effect)) + (format #t "dark-effect ") + ) + (if (= (logand (process-mask crate) s5-0) (process-mask crate)) + (format #t "crate ") + ) + (if (= (logand s5-0 (process-mask kernel-run)) (process-mask kernel-run)) + (format #t "kernel-run ") + ) + (if (= (logand s5-0 (process-mask movie)) (process-mask movie)) + (format #t "movie ") + ) + (if (= (logand s5-0 (process-mask pause)) (process-mask pause)) + (format #t "pause ") + ) + ) + (format #t ")~%") + (format #t "~1Tclock: ~A~%" (-> this clock)) + (format #t "~1Tparent: #x~X~%" (-> this parent)) + (format #t "~1Tbrother: #x~X~%" (-> this brother)) + (format #t "~1Tchild: #x~X~%" (-> this child)) + (format #t "~1Tppointer: #x~X~%" (-> this ppointer)) + (format #t "~1Tself: ~A~%" (-> this self)) + (format #t "~1Tpool: ~A~%" (-> this pool)) + (format #t "~1Tstatus: ~A~%" (-> this status)) + (format #t "~1Tpid: ~D~%" (-> this pid)) + (format #t "~1Tmain-thread: ~A~%" (-> this main-thread)) + (format #t "~1Ttop-thread: ~A~%" (-> this top-thread)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tstate: ~A~%" (-> this state)) + (format #t "~1Tprev-state: ~A~%" (-> this prev-state)) + (format #t "~1Tnext-state: ~A~%" (-> this next-state)) + (format #t "~1Tstate-stack: ~A~%" (-> this state-stack)) + (format #t "~1Ttrans-hook: ~A~%" (-> this trans-hook)) + (format #t "~1Tpost-hook: ~A~%" (-> this post-hook)) + (format #t "~1Tevent-hook: ~A~%" (-> this event-hook)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Theap-base: #x~X~%" (-> this heap-base)) + (format #t "~1Theap-top: #x~X~%" (-> this heap-top)) + (format #t "~1Theap-cur: #x~X~%" (-> this heap-cur)) + (format #t "~1Tstack-frame-top: ~A~%" (-> this stack-frame-top)) + (format #t "~1Theap: #~%" (&-> this heap-base)) + (format #t "~1Tconnection-list: ~`connectable`P~%" (-> this connection-list)) + (format #t "~1Tstack[0] @ #x~X~%" (-> this stack)) + (label cfg-68) + this + ) + +;; failed to figure out what this is: +(defstate idle (lprecurc-loader) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('deactivate) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set-setting! 'borrow '((precurc 0 lprecurc copy)) 0.0 0) + (apply-settings *setting-control*) + ) + :exit (behavior () + (remove-setting! 'borrow) + (apply-settings *setting-control*) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (lprecurc-loader) + :virtual #t + :code (behavior () + '() + ) + ) + +;; definition for function lprecurc-loader-init-by-other +(defbehavior lprecurc-loader-init-by-other lprecurc-loader ((arg0 level)) + (set! (-> self level) arg0) + (go-virtual idle) + ) + +;; definition for function precura-login +;; WARN: Return type mismatch int vs none. +(defun precura-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +;; definition for function precura-activate +(defun precura-activate ((arg0 level)) + (persist-with-delay + *setting-control* + 'precur-activate + (the-as time-frame (the-as uint #xb2d05e00)) + 'sky-type + 'star-field + 0.0 + 0 + ) + (process-spawn lprecurc-loader arg0 :name "lprecurc-loader" :to *entity-pool*) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *precura-adjacency*) + ) + (none) + ) + +;; definition for function precura-deactivate +(defun precura-deactivate ((arg0 level)) + (persist-with-delay *setting-control* 'precur-activate 0 'sky-type #f 0.0 0) + (none) + ) + +;; definition for function precura-logout +;; WARN: Return type mismatch int vs none. +(defun precura-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc new file mode 100644 index 0000000000..744fa21afe --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc @@ -0,0 +1,2915 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-kg-bomb-explosion + :id 1325 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6 sp7) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :scale (1.5 1.5 1.5) + :parts ((sp-item 4446 :flags (sp3)) + (sp-item 4447 :flags (sp3)) + (sp-item 4448 :flags (sp3)) + (sp-item 4449 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4446 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4447 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4448 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4450 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -1) 2.0 (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 200.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4449 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -1) 2.0 (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.013333334)) + (:fade-g -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 4451) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4451 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-g -0.6666667) (:friction 0.99)) + ) + +;; definition of type mechblock +(deftype mechblock (process-focusable) + ((root collide-shape-moving :override) + (origin vector :inline) + (drop-point vector :inline :offset 256) + (allow-drag? symbol) + (reset-on-land? symbol) + (nav-mesh nav-mesh) + (hit-something? symbol) + (attack-id uint32) + (next-entity entity) + ) + (:state-methods + idle + carry + drag-object + fall + wait + ) + (:methods + (can-drop? (_type_ vector) symbol) + ) + ) + +;; definition for method 3 of type mechblock +(defmethod inspect ((this mechblock)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Torigin: ~`vector`P~%" (-> this origin)) + (format #t "~2Tdrop-point: ~`vector`P~%" (-> this drop-point)) + (format #t "~2Tallow-drag?: ~A~%" (-> this allow-drag?)) + (format #t "~2Treset-on-land?: ~A~%" (-> this reset-on-land?)) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~2Thit-something?: ~A~%" (-> this hit-something?)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tnext-entity: ~A~%" (-> this next-entity)) + (label cfg-4) + this + ) + +;; definition for method 33 of type mechblock +(defmethod can-drop? ((this mechblock) (arg0 vector)) + (let ((v1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg0 8192.0)) + (a1-1 (new 'stack-no-clear 'collide-query)) + ) + (vector+float*! (-> a1-1 start-pos) (-> this root trans) v1-0 -1.0) + (vector-float*! (-> a1-1 move-dist) v1-0 2.0) + (let ((v1-1 a1-1)) + (set! (-> v1-1 radius) 40.96) + (set! (-> v1-1 collide-with) (collide-spec backgnd)) + (set! (-> v1-1 ignore-process0) #f) + (set! (-> v1-1 ignore-process1) #f) + (set! (-> v1-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-1 action-mask) (collide-action solid)) + ) + (cond + ((= (fill-and-probe-using-line-sphere *collide-cache* a1-1) -100000000.0) + (return #t) + ) + (else + (sound-play "mech-drag-pikup") + (return #f) + ) + ) + ) + (the-as symbol 0) + ) + +;; failed to figure out what this is: +(defstate idle (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('pickup) + (go-virtual carry) + (cond + ((-> self allow-drag?) + (carry! + (the-as carry-info (-> block param 0)) + (-> self carry) + (the-as vector (-> block param 1)) + (the-as vector (-> block param 2)) + ) + (go-virtual drag-object) + ) + (else + (drag! (the-as carry-info (-> block param 0)) (-> self carry)) + (go-virtual carry) + ) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (dotimes (gp-0 2) + (transform-post) + (carry-info-method-9 (-> self carry)) + (suspend) + ) + (sleep-code) + ) + :post (behavior () + (when *display-nav-marks* + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait (mechblock) + :virtual #t + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :trans (behavior () + (when (or (not *target*) (< 40960.0 (vector-vector-distance (-> self origin) (-> *target* control trans)))) + (move-to-point! + (-> self root) + (vector+! (new 'stack-no-clear 'vector) (-> self origin) (new 'static 'vector :y 81920.0 :w 1.0)) + ) + (quaternion-copy! (-> self root quat) (the-as quaternion (&-> self stack 96))) + (set-vector! (-> self root transv) 0.0 -4096.0 0.0 1.0) + (set! (-> self drop-point quad) (-> self origin quad)) + (go-virtual fall) + ) + ) + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate carry (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('can-drop?) + (can-drop? self (the-as vector (-> block param 0))) + ) + (('drop) + (set! (-> self root transv quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (go-virtual fall) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + (carry-info-method-9 (-> self carry)) + (carry-info-method-13 (-> self carry)) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate drag-object (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case message + (('carry? 'carry-info) + (-> self carry) + ) + (('drop) + (if (handle->process (-> self carry other)) + (drop! (the-as carry-info (send-event (handle->process (-> self carry other)) 'carry-info)) (-> self carry)) + ) + (set! (-> self root transv quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (go-virtual fall) + ) + (('move) + (let ((s4-0 (-> self root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> s4-0 trans quad)) + (set! (-> s4-0 transv quad) (-> (the-as vector (-> block param 0)) quad)) + (let ((s2-0 (-> self nav)) + (s1-0 (-> s4-0 root-prim prim-core)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> (-> s4-0 transv) quad)) + (let ((f0-0 (seconds-per-frame))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s3-0 quad) vf1) + (set! (-> s3-0 y) 0.0) + (vector-float*! s3-0 s3-0 10.0) + (when (nonzero? s2-0) + (let ((v1-28 s2-0) + (a0-26 s1-0) + (a1-6 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-6 vertex)) (the-as vector a0-26) (the-as vector (-> v1-28 state mesh bounds))) + (set! (-> a1-6 vertex1 x) (-> v1-28 nearest-y-threshold)) + (set! (-> a1-6 data 20) (the-as uint 2)) + (let ((a2-4 (nav-mesh-method-45 (-> v1-28 state mesh) a1-6))) + (cond + (a2-4 + (clamp-vector-to-mesh-cross-gaps + s2-0 + (the-as vector s1-0) + a2-4 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + ) + (else + ) + ) + ) + ) + ) + (vector-float*! (-> s4-0 transv) s3-0 (* 0.1 (-> self clock frames-per-second))) + ) + (let ((v1-35 (-> s4-0 root-prim))) + (set! (-> v1-35 prim-core collide-as) (-> s4-0 backup-collide-as)) + (set! (-> v1-35 prim-core collide-with) (-> s4-0 backup-collide-with)) + ) + (set! (-> s4-0 root-prim type) collide-shape-prim-sphere) + (let ((a2-5 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-5 collide-with) + (logclear (-> s4-0 root-prim prim-core collide-with) (collide-spec backgnd jak player-list tobot)) + ) + (set! (-> a2-5 ignore-process0) self) + (set! (-> a2-5 ignore-process1) #f) + (set! (-> a2-5 ignore-pat) (-> s4-0 pat-ignore-mask)) + (set! (-> a2-5 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide s4-0 (-> s4-0 transv) a2-5 (meters 0)) + ) + (when (nonzero? (-> self nav)) + (let ((v1-44 (-> self nav)) + (a0-41 (-> self root root-prim prim-core)) + (a1-9 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-9 vertex)) (the-as vector a0-41) (the-as vector (-> v1-44 state mesh bounds))) + (set! (-> a1-9 vertex1 x) (-> v1-44 nearest-y-threshold)) + (set! (-> a1-9 data 20) (the-as uint 2)) + (let ((v1-46 (nav-mesh-method-45 (-> v1-44 state mesh) a1-9))) + (when v1-46 + (when (< (-> self root trans y) (-> v1-46 vertex0 y)) + (let* ((a0-47 (-> self root)) + (t9-7 (method-of-object a0-47 move-by-vector!)) + (a1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-11 x) 0.0) + (set! (-> a1-11 y) (- (-> v1-46 vertex0 y) (-> self root trans y))) + (set! (-> a1-11 z) 0.0) + (set! (-> a1-11 w) 1.0) + (t9-7 a0-47 a1-11) + ) + ) + ) + ) + ) + ) + (set! (-> s4-0 root-prim type) collide-shape-prim-mesh) + (let ((v1-50 (-> s4-0 root-prim))) + (set! (-> v1-50 prim-core collide-as) (collide-spec)) + (set! (-> v1-50 prim-core collide-with) (collide-spec)) + ) + 0 + (vector-! (the-as vector (-> block param 1)) (-> s4-0 trans) s5-0) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + (carry-info-method-9 (-> self carry)) + (translate! (-> self carry)) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate fall (mechblock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry-info) + (-> self carry) + ) + (('carry? 'pickup) + (the-as basic #f) + ) + (('touched) + (when (!= (-> proc type) target) + (sound-play "block-hit") + (let ((v0-0 (the-as basic (-> proc entity)))) + (set! (-> self hit-something?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + (if (handle->process (-> self carry other)) + (drop-impl! + (the-as carry-info (send-event (handle->process (-> self carry other)) 'carry-info)) + (-> self carry) + ) + ) + (set! (-> self root status) (collide-status)) + (set! (-> self root root-prim local-sphere w) (-> self carry carry-radius)) + ) + :trans (behavior () + (when (or (and (logtest? (-> self root status) (collide-status on-surface)) (< 0.8 (-> self root surface-angle))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (vector-reset! (-> self root transv)) + (set! (-> self root root-prim local-sphere w) (-> self carry backup-radius)) + (cond + ((and (-> self reset-on-land?) + (and (or (< 12288.0 (vector-vector-distance (-> self drop-point) (-> self root trans))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (and (-> self next-entity) + (not (logtest? (-> self next-entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + ) + (sound-play "block-break") + (cond + ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) + ) + ) + (go-virtual wait) + ) + ((or (< 12288.0 (vector-vector-distance (-> self drop-point) (-> self root trans))) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + (sound-play "block-break") + (cond + ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) + ) + ) + (go-virtual wait) + ) + (else + (go-virtual idle) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) + (let ((v1-2 (new-stack-vector0)) + (f0-1 (vector-dot (-> self root dynam gravity-normal) (-> self root transv))) + ) + 0.0 + (vector-! v1-2 (-> self root transv) (vector-float*! v1-2 (-> self root dynam gravity-normal) f0-1)) + (let* ((f1-2 (vector-length v1-2)) + (f2-0 f1-2) + ) + (if (< f0-1 (- (-> self root dynam gravity-max))) + (set! f0-1 (- (-> self root dynam gravity-max))) + ) + (vector+! + (-> self root transv) + (vector-float*! (-> self root transv) (-> self root dynam gravity-normal) f0-1) + (vector-float*! v1-2 v1-2 (/ f1-2 f2-0)) + ) + ) + ) + (let ((a2-8 (new 'stack-no-clear 'collide-query)) + (gp-1 (-> self root)) + ) + (let ((v1-3 #x80402)) + (set! (-> gp-1 root-prim type) collide-shape-prim-sphere) + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (set! v1-3 0) + ) + (set! (-> a2-8 collide-with) (logclear (-> gp-1 root-prim prim-core collide-with) v1-3)) + ) + (set! (-> a2-8 ignore-process0) self) + (set! (-> a2-8 ignore-process1) #f) + (set! (-> a2-8 ignore-pat) (-> gp-1 pat-ignore-mask)) + (set! (-> a2-8 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-1 (-> gp-1 transv) a2-8 (meters 0)) + (set! (-> gp-1 root-prim type) collide-shape-prim-mesh) + ) + (transform-post) + (carry-info-method-9 (-> self carry)) + ) + ) + +;; definition for function precur-bomb-bounce-reaction +;; INFO: Used lq/sq +(defun precur-bomb-bounce-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((f28-0 (vector-dot arg3 (-> arg0 surface-normal))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (let ((f30-0 (vector-length arg3))) + 0.0 + (let* ((f0-5 (fabs (vector-dot (-> arg0 surface-normal) *up-vector*))) + (f0-6 (* f0-5 f0-5)) + (f0-7 (- 1.0 f0-6)) + ) + (set! (-> s3-0 quad) (-> arg0 surface-normal quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 f0-7) + ) + (vector-float*! s3-0 s3-0 f30-0) + (vector-float*! s2-0 (-> arg0 surface-normal) (* f28-0 (rand-vu-float-range 1.6 2.2))) + (vector-! arg2 arg3 s2-0) + (vector+! arg2 arg2 s3-0) + (let ((f0-12 (fmin (vector-normalize-ret-len! arg2 1.0) f30-0))) + (vector-float*! arg2 arg2 f0-12) + ) + ) + ) + (-> arg0 status) + ) + +;; definition of type precur-bomb +(deftype precur-bomb (mechblock) + ((bomb-timer uint32) + (blink-timer uint32) + (blink-rate float) + (blink symbol) + (collide-timer uint32) + (spin-quat quaternion :inline) + (default-emissive-color vector :inline) + (hint? symbol) + (sound-id sound-id) + ) + (:state-methods + ready + explode + spawn-up + pre-spawn-up + ) + (:methods + (update-blink (_type_) object) + ) + ) + +;; definition for method 3 of type precur-bomb +(defmethod inspect ((this precur-bomb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mechblock inspect))) + (t9-0 this) + ) + (format #t "~2Tbomb-timer: ~D~%" (-> this bomb-timer)) + (format #t "~2Tblink-timer: ~D~%" (-> this blink-timer)) + (format #t "~2Tblink-rate: ~f~%" (-> this blink-rate)) + (format #t "~2Tblink: ~A~%" (-> this blink)) + (format #t "~2Tcollide-timer: ~D~%" (-> this collide-timer)) + (format #t "~2Tspin-quat: #~%" (-> this spin-quat)) + (format #t "~2Tdefault-emissive-color: #~%" (-> this default-emissive-color)) + (format #t "~2Thint?: ~A~%" (-> this hint?)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; definition for method 21 of type precur-bomb +(defmethod get-trans ((this precur-bomb) (arg0 int)) + "Get the `trans` for this process." + (let ((s5-0 (-> this root))) + (cond + ((zero? arg0) + (-> s5-0 trans) + ) + ((and (= arg0 1) (type? s5-0 collide-shape-moving)) + (-> s5-0 gspot-pos) + ) + ((= arg0 2) + (the-as vector #f) + ) + ((= arg0 3) + (-> s5-0 trans) + ) + (else + (-> s5-0 trans) + ) + ) + ) + ) + +;; definition for method 20 of type precur-bomb +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this precur-bomb)) + (the-as search-info-flag (logior 0 16)) + ) + +;; definition for method 38 of type precur-bomb +;; INFO: Used lq/sq +(defmethod update-blink ((this precur-bomb)) + (when (and (>= (the-as uint (- (current-time) (the-as int (-> this blink-timer)))) + (the-as uint (the int (-> this blink-rate))) + ) + (nonzero? (-> this blink-timer)) + ) + (let ((f0-3 (* 0.00033333333 (the float (- (current-time) (the-as int (-> this bomb-timer))))))) + (set! (-> this blink-rate) (lerp 600.0 30.0 f0-3)) + ) + (set! (-> this blink-timer) (the-as uint (current-time))) + (sound-play "prec-bomb-timer") + (cond + ((-> this blink) + (set-vector! (-> this draw color-emissive) 1.0 0.0 0.0 1.0) + (set! (-> this blink) (not (-> this blink))) + ) + (else + (set! (-> this draw color-emissive quad) (-> this default-emissive-color quad)) + (set! (-> this blink) (not (-> this blink))) + ) + ) + ) + (if (and (>= (the-as uint (- (current-time) (the-as int (-> this bomb-timer)))) (the-as uint 3000)) + (nonzero? (-> this bomb-timer)) + ) + (go (method-of-object this explode)) + ) + ) + +;; definition for function precur-bomb-handler +;; INFO: Used lq/sq +(defbehavior precur-bomb-handler precur-bomb ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((s4-0 (the-as attack-info (-> arg3 param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? arg0 process-drawable) + arg0 + ) + (the-as touching-shapes-entry (-> arg3 param 0)) + ) + (when (logtest? (-> s3-0 mask) (attack-mask intersection)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-1 (target-rot)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (vector-normalize-copy! gp-1 gp-1 102400.0) + (+! (-> gp-1 y) 102400.0) + (set! (-> self root transv quad) (-> gp-1 quad)) + ) + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + (go-virtual fall) + ) + ) + ) + (else + (go-virtual explode) + ) + ) + ) + ) + (('combo) + #t + ) + (('dont-face?) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate ready (precur-bomb) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fall) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (target-rot)) + (set! (-> self drop-point quad) (-> self root trans quad)) + (vector-normalize-copy! gp-0 gp-0 102400.0) + (+! (-> gp-0 y) 102400.0) + (set! (-> self root transv quad) (-> gp-0 quad)) + ) + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + (go-virtual fall) + ) + (else + (precur-bomb-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (set-precura-bomb-light! 0.0 (* 10.0 (seconds-per-frame))) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (until #f + (let ((f30-0 27306.666)) + (sound-play "bomb-hover" :id (-> self sound-id)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f30-0 (seconds-per-frame))) + (quaternion-rotate-z! (-> self root quat) (-> self root quat) (* f30-0 (seconds-per-frame))) + ) + (suspend) + 0 + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate idle (precur-bomb) + :virtual #t + :event precur-bomb-handler + :trans (behavior () + (update-blink self) + (let ((t9-1 (-> (method-of-type mechblock idle) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate pre-spawn-up (precur-bomb) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (if (time-elapsed? (-> self state-time) (seconds 0.4)) + (go-virtual spawn-up) + ) + ) + ) + +;; failed to figure out what this is: +(defstate spawn-up (precur-bomb) + :virtual #t + :event precur-bomb-handler + :enter (behavior () + (set-precura-bomb-light! 1.0 (* 2.0 (seconds-per-frame))) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((f30-0 3072.0) + (f28-0 36408.89) + ) + (while (< 40.96 f30-0) + (+! (-> self root trans y) f30-0) + (set! f30-0 (* 0.87 f30-0)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f28-0 (seconds-per-frame))) + (quaternion-rotate-z! (-> self root quat) (-> self root quat) (* f28-0 (seconds-per-frame))) + (set! f28-0 (* 0.95 f28-0)) + (suspend) + ) + ) + (go-virtual ready) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate carry (precur-bomb) + :virtual #t + :enter (behavior () + (when (zero? (-> self bomb-timer)) + (set! (-> self bomb-timer) (the-as uint (current-time))) + (set! (-> self blink-timer) (the-as uint (current-time))) + ) + ) + :trans (behavior () + (when (-> self hint?) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 280 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (send-event (ppointer->process (-> self parent)) 'stop-hint) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (let ((v1-9 gp-0)) + (set! (-> v1-9 width) (the float 340)) + ) + (let ((v1-10 gp-0)) + (set! (-> v1-10 height) (the float 80)) + ) + (let ((v1-11 gp-0)) + (set! (-> v1-11 scale) 0.9) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-077c) #f)) + (s5-0 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (let ((t9-6 (-> (method-of-type mechblock carry) trans))) + (if t9-6 + (t9-6) + ) + ) + (let ((a2-3 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (add-debug-matrix #t (bucket-id debug) a2-3 (meters 4)) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type mechblock carry) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (update-blink self) + ) + ) + +;; failed to figure out what this is: +(defstate fall (precur-bomb) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('carry-info) + (-> self carry) + ) + (('carry? 'pickup) + #f + ) + (('touched) + (if (not (type? proc target)) + (go-virtual explode) + ) + (let ((v0-0 (the-as object (-> proc entity)))) + (set! (-> self hit-something?) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (precur-bomb-handler proc argc message block) + ) + ) + ) + :trans (behavior () + (when (logtest? (-> self root status) (collide-status touch-surface)) + (if (< 0.09 (* 0.0033333334 (the float (- (current-time) (the-as int (-> self collide-timer)))))) + (sound-play "pre-bomb-bounce") + ) + (set! (-> self collide-timer) (the-as uint (current-time))) + (vector-float*! (-> self root transv) (-> self root transv) 0.75) + ) + (when (and (logtest? (-> self root status) (collide-status on-surface)) + (< 0.8 (-> self root surface-angle)) + (let ((v1-26 (-> self root transv))) + (< (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z)))) 2048.0) + ) + ) + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self root root-prim local-sphere w) (-> self carry backup-radius)) + (go-virtual idle) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root transv quad)) + (let ((f0-9 32768.0)) + (set! (-> gp-1 y) 0.0) + (let* ((f0-11 (* 0.000048828126 f0-9 (vector-length gp-1))) + (f30-0 (fmin 32768.0 f0-11)) + ) + (vector-normalize! gp-1 1.0) + (vector-cross! gp-1 *up-vector* gp-1) + (quaternion-vector-angle! (-> self spin-quat) gp-1 (* f30-0 (seconds-per-frame))) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self spin-quat) (-> self root quat)) + (if (< (* 0.00024414062 (-> self root trans y)) 500.0) + (go-virtual explode) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type mechblock fall) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (update-blink self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (precur-bomb) + :virtual #t + :enter (behavior () + (sound-play "prec-bomb-xplo") + (let ((gp-1 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-1 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 spawn-quat)) + (set! (-> gp-1 radius) 40960.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1325)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-1 damage) 2.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 1.0) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (when (type? (-> self root) collide-shape) + (let ((v1-17 (-> self root root-prim))) + (set! (-> v1-17 prim-core collide-as) (collide-spec)) + (set! (-> v1-17 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (explosion-spawn gp-1 self) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bomb precur-bomb precur-bomb-lod0-jg precur-bomb-idle-ja + ((precur-bomb-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 2.7) + ) + +;; definition for function precur-bomb-init-by-other +;; INFO: Used lq/sq +(defbehavior precur-bomb-init-by-other precur-bomb ((arg0 vector) (arg1 symbol)) + (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) precur-bomb-bounce-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak crate obstacle hit-by-others-list player-list tobot) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 11059.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-6) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-9 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s4-0 max-iteration-count) (the-as uint 4)) + (set! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self hint?) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-bomb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (mem-copy! (the-as pointer (-> self origin)) (the-as pointer (-> self root trans)) 48) + (set! (-> self collide-timer) (the-as uint 0)) + (set! (-> self bomb-timer) (the-as uint 0)) + (set! (-> self blink-timer) (the-as uint 0)) + (set! (-> self blink-rate) 600.0) + (set! (-> self blink) #t) + (set! (-> self default-emissive-color quad) (-> self draw color-emissive quad)) + (set! (-> self allow-drag?) #f) + (set! (-> self reset-on-land?) #f) + (let* ((v1-22 *game-info*) + (a0-19 (+ (-> v1-22 attack-id) 1)) + ) + (set! (-> v1-22 attack-id) a0-19) + (set! (-> self attack-id) a0-19) + ) + (set! (-> self hit-something?) #f) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 12288.0) + (let ((v1-28 (new 'process 'carry-info self 3 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0) 0.0))) + (set! (-> v1-28 max-distance) 16384.0) + (set! (-> v1-28 min-pull) 2048.0) + (set! (-> v1-28 max-pull) 6963.2) + (set! (-> v1-28 carry-radius) 6144.0) + (set! (-> v1-28 mode) (carry-mode mech-carry)) + (set! (-> v1-28 point quad) (-> gp-1 quad)) + (set! (-> v1-28 hold-trans quad) (-> (new 'static 'vector :y 12288.0 :w 1.0) quad)) + (set! (-> self carry) v1-28) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (logior! (-> self focus-status) (focus-status hit)) + (go-virtual pre-spawn-up) + ) + +;; definition of type precur-box +(deftype precur-box (mechblock) + ((taskman handle) + ) + ) + +;; definition for method 3 of type precur-box +(defmethod inspect ((this precur-box)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mechblock inspect))) + (t9-0 this) + ) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-box precur-box precur-box-lod0-jg precur-box-idle-ja + ((precur-box-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (precur-box) + :virtual #t + :exit (behavior () + (if (handle->process (-> self taskman)) + (send-event (handle->process (-> self taskman)) 'place-hint) + ) + (let ((t9-1 (-> (method-of-type mechblock idle) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (if (and (handle->process (-> self taskman)) + (< (vector-vector-distance (-> self root trans) (target-pos 0)) 20480.0) + ) + (send-event (handle->process (-> self taskman)) 'pickup-hint) + ) + (let ((t9-3 (-> (method-of-type mechblock idle) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; definition for method 11 of type precur-box +(defmethod init-from-entity! ((this precur-box) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak crate obstacle hit-by-others-list player-list tobot) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 1228.8 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-6) + ) + (set! (-> s4-0 nav-radius) 16384.0) + (let ((v1-8 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-8 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-8 prim-core collide-with)) + ) + (set! (-> s4-0 max-iteration-count) (the-as uint 4)) + (set! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-box" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (mem-copy! (the-as pointer (-> this origin)) (the-as pointer (-> this root trans)) 48) + (set! (-> this allow-drag?) #f) + (set! (-> this reset-on-land?) #t) + (let* ((v1-17 *game-info*) + (a0-16 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-16) + (set! (-> this attack-id) a0-16) + ) + (set! (-> this hit-something?) #f) + (set! (-> this next-entity) (entity-actor-lookup (-> this entity) 'next-actor 0)) + (let ((v1-19 (new 'process 'carry-info this 3 (new 'static 'vector :w 1.0) (new 'static 'vector :y 1.0 :w 1.0) 0.0)) + ) + (set! (-> v1-19 max-distance) 24576.0) + (set! (-> v1-19 min-pull) 2048.0) + (set! (-> v1-19 max-pull) 6963.2) + (set! (-> v1-19 carry-radius) 4096.0) + (set! (-> v1-19 mode) (carry-mode mech-carry)) + (set! (-> this carry) v1-19) + ) + (set! (-> this nav-mesh) (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0)) + (if (not (-> this nav-mesh)) + (go process-drawable-art-error "no nav-mesh") + ) + (add-process-drawable-to-nav-mesh (-> this nav-mesh) this #f) + (let ((v1-28 (-> *game-info* sub-task-list (game-task-node precursor-tour-generator-trigger)))) + (set! (-> this taskman) (if (-> v1-28 manager) + (-> v1-28 manager manager) + (the-as handle #f) + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition (debug) for function hint-mode->string +(defun-debug hint-mode->string ((arg0 precur-hint-mode)) + (case arg0 + (((precur-hint-mode normal)) + "normal" + ) + (((precur-hint-mode teach-bomb)) + "teach-bomb" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition of type precur-bomb-spawner +(deftype precur-bomb-spawner (process-drawable) + ((proc-handle handle) + (hint-mode precur-hint-mode) + ) + (:state-methods + idle + ) + (:methods + (spawn-bomb (_type_) handle) + ) + ) + +;; definition for method 3 of type precur-bomb-spawner +(defmethod inspect ((this precur-bomb-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tproc-handle: ~D~%" (-> this proc-handle)) + (format #t "~2Thint-mode: ~D~%" (-> this hint-mode)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bomb-spawner precur-bomb-spawner precur-bomb-spawner-lod0-jg precur-bomb-spawner-idle-ja + ((precur-bomb-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 21 of type precur-bomb-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-bomb ((this precur-bomb-spawner)) + (local-vars (v1-10 (pointer process))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (format 0 "spawning bomb~%") + (sound-play "prec-bomb-spawn") + (format 0 "spawning bomb-post~%") + (+! (-> s5-0 y) -10240.0) + (cond + ((= (-> this hint-mode) (precur-hint-mode teach-bomb)) + (let ((s4-1 (get-process *default-dead-pool* precur-bomb #x4000 1))) + (set! v1-10 (when s4-1 + (let ((t9-5 (method-of-type precur-bomb activate))) + (t9-5 (the-as precur-bomb s4-1) this "precur-bomb" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 precur-bomb-init-by-other s5-0 #t) + (-> s4-1 ppointer) + ) + ) + ) + ) + (else + (let ((s4-2 (get-process *default-dead-pool* precur-bomb #x4000 1))) + (set! v1-10 (when s4-2 + (let ((t9-8 (method-of-type precur-bomb activate))) + (t9-8 (the-as precur-bomb s4-2) this "precur-bomb" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 precur-bomb-init-by-other s5-0 #f) + (-> s4-2 ppointer) + ) + ) + ) + ) + ) + ) + (the-as handle (when (-> v1-10 0) + (let ((v0-10 (ppointer->handle v1-10))) + (set! (-> this proc-handle) (the-as handle v0-10)) + v0-10 + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-bomb-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('stop-hint) + (let ((v0-0 (the-as object 1))) + (set! (-> self hint-mode) (the-as precur-hint-mode v0-0)) + v0-0 + ) + ) + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? proc process-drawable) + proc + ) + (the-as touching-shapes-entry (-> block param 0)) + ) + (when (logtest? (-> s3-0 mask) (attack-mask intersection)) + (let ((a0-10 (handle->process (-> self proc-handle)))) + (when a0-10 + (if (and (-> a0-10 next-state) (= (-> a0-10 next-state name) 'ready)) + (send-event a0-10 'fall) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + :code (behavior () + (until #f + (let ((v1-1 (handle->process (-> self proc-handle)))) + (cond + (v1-1 + (when (not (or (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'idle)) + (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'ready)) + (and (-> v1-1 next-state) (= (-> v1-1 next-state name) 'spawn-up)) + ) + ) + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + (else + (spawn-bomb self) + (ja-no-eval :group! precur-bomb-spawner-spawn-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + ) + (spawn (-> self part) (-> self root trans)) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; definition for method 11 of type precur-bomb-spawner +(defmethod init-from-entity! ((this precur-bomb-spawner) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-bomb-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (cond + ((res-lump-struct (-> this entity) 'art-name structure) + (set! (-> this hint-mode) (precur-hint-mode teach-bomb)) + 0 + ) + (else + (set! (-> this hint-mode) (precur-hint-mode normal)) + ) + ) + (set! (-> this proc-handle) (the-as handle #f)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1315) this)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 38) (new 'static 'lightning-spec + :name "laser-lightning-shock-target" + :flags (lightning-spec-flags lsf2) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 120.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defpart 4452 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; definition for symbol *laser-angles-array*, type (array float) +(define *laser-angles-array* (new 'static 'boxed-array :type float 36.40889 8192.0 16384.0 24576.0)) + +;; failed to figure out what this is: +(defpartgroup group-placeholder-single-laser + :id 1326 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4453 :flags (sp7) :period (seconds 11) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 4453 + :init-specs ((:texture (middot level-default-sprite)) + (:num 3.0) + (:y (meters -0.3) (meters -0.3)) + (:scale-y (meters 0.1) (meters 0.05)) + (:r 80.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00083333335)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-x (degrees 90)) + ) + ) + +;; definition of type precur-laser-beam +(deftype precur-laser-beam (process-drawable) + ((laser-dir vector :inline) + (attack-id uint32) + (org-laser-quat quaternion :inline) + (on-duration float) + (off-duration float) + (current-angle int8) + (last-attack-time uint32) + (counter uint8) + (sound-id sound-id) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + active + telegraph + hide + dormant + ) + (:methods + (fire-beam (_type_ vector vector) none) + (fire-beam0 (_type_ vector vector) none) + ) + ) + +;; definition for method 3 of type precur-laser-beam +(defmethod inspect ((this precur-laser-beam)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlaser-dir: #~%" (-> this laser-dir)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Torg-laser-quat: #~%" (-> this org-laser-quat)) + (format #t "~2Ton-duration: ~f~%" (-> this on-duration)) + (format #t "~2Toff-duration: ~f~%" (-> this off-duration)) + (format #t "~2Tcurrent-angle: ~D~%" (-> this current-angle)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tcounter: ~D~%" (-> this counter)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (label cfg-7) + this + ) + +;; definition for function elec-mech +;; INFO: Used lq/sq +(defun elec-mech ((arg0 vector) (arg1 uint)) + (format 0 "~d~%" arg1) + (send-event + *target* + 'shove + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id arg1) + (damage 10.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector arg0) + (shove-back (meters 3)) + (mode 'shock) + (shove-up (meters 1)) + ) + ) + ) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + (spawn-mech-shock-effect) + (none) + ) + +;; definition for method 24 of type precur-laser-beam +;; INFO: Used lq/sq +(defmethod fire-beam ((this precur-laser-beam) (arg0 vector) (arg1 vector)) + (local-vars (sv-560 collide-query) (sv-564 float)) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 83968.0) + (set! (-> sv-560 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! arg1 arg1 sv-564) + (vector-normalize-copy! (-> sv-560 move-dist) arg1 sv-564) + (let ((v1-5 sv-560)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec backgnd)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f0-4 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (cond + ((>= f0-4 0.0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 move-dist) f0-4) + (set! sv-564 (* sv-564 f0-4)) + ) + (else + (set! (-> sv-560 best-other-tri collide-ptr) #f) + ) + ) + ) + (set! (-> *part-id-table* 4452 init-specs 4 initial-valuef) sv-564) + (draw-beam (-> *part-id-table* 4452) arg0 arg1 #t) + (let ((v1-19 sv-560)) + (set! (-> v1-19 radius) 40.96) + (set! (-> v1-19 collide-with) (collide-spec jak enemy player-list)) + (set! (-> v1-19 ignore-process0) #f) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* sv-560)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-0 (target-pos 0) arg0) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (when (and (>= f30-0 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (elec-mech s3-0 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (vector-float*! arg1 arg1 -1.0) + (vector-normalize-copy! (-> sv-560 move-dist) arg1 sv-564) + (let ((f30-1 (fill-and-probe-using-line-sphere *collide-cache* sv-560)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (vector-! s3-1 (target-pos 0) arg0) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (when (and (>= f30-1 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (format 0 "attack-time: ~d~%" (-> this last-attack-time)) + (elec-mech s3-1 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (draw-beam (-> *part-id-table* 4452) arg0 arg1 #t) + (none) + ) + +;; definition for method 25 of type precur-laser-beam +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod fire-beam0 ((this precur-laser-beam) (arg0 vector) (arg1 vector)) + "Unused." + (local-vars (sv-560 collide-query) (sv-564 float)) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 83968.0) + (set! (-> sv-560 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> sv-560 move-dist) arg1 sv-564) + (let ((v1-7 sv-560)) + (set! (-> v1-7 radius) 40.96) + (set! (-> v1-7 collide-with) (collide-spec backgnd)) + (set! (-> v1-7 ignore-process0) #f) + (set! (-> v1-7 ignore-process1) #f) + (set! (-> v1-7 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (cond + ((>= f0-3 0.0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 move-dist) f0-3) + (set! sv-564 (* sv-564 f0-3)) + ) + (else + (set! (-> sv-560 best-other-tri collide-ptr) #f) + ) + ) + ) + (set! (-> *part-id-table* 4452 init-specs 4 initial-valuef) sv-564) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'matrix)) + ) + (vector+float*! s3-0 arg0 arg1 sv-564) + (matrix-f-compose s4-0 arg1) + (set! (-> s4-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> *part-group-id-table* 1326 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1326) + :mat-joint s4-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1326) :mat-joint s4-0) + ) + (vector+float*! s3-0 arg0 arg1 (- sv-564)) + (matrix-f-compose s4-0 (vector-float*! (new 'stack-no-clear 'vector) arg1 -1.0)) + (set! (-> s4-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> *part-group-id-table* 1326 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1326) + :mat-joint s4-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1326) :mat-joint s4-0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate telegraph (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (vector-y-quaternion! (-> self laser-dir) (-> self root quat)) + (cond + ((= (-> self counter) 2) + (set! (-> self counter) (the-as uint 0)) + (set! (-> self on-duration) 690.0) + ) + (else + (+! (-> self counter) 1) + (set! (-> self on-duration) 60.0) + ) + ) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self off-duration)))) + (when (not (time-elapsed? (-> self state-time) (seconds 0.1))) + ) + (suspend) + ) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (precur-laser-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-active) + (go-virtual active) + ) + ) + ) + :code (behavior () + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (let ((gp-0 (res-lump-data (-> self entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and gp-0 (nonzero? (-> sv-16 elt-count))) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 1)) + (suspend) + ) + ) + (set! (-> self actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> self actor-group) (the-as (pointer actor-group) gp-0)) + (dotimes (gp-1 (length (-> self actor-group 0))) + (let* ((v1-15 (-> self actor-group 0 data gp-1 actor)) + (a0-6 (if v1-15 + (-> v1-15 extra process) + ) + ) + ) + (if a0-6 + (send-event a0-6 'go-active) + ) + ) + ) + ) + (else + (format #t "entity missing actor-group!~%") + (until #f + (suspend) + ) + #f + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (sound-play "arc-bar" :id (-> self sound-id) :position (-> self root trans)) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self on-duration)))) + (vector-y-quaternion! (-> self laser-dir) (-> self root quat)) + (if (>= (the-as uint (- (current-time) (the-as int (-> self last-attack-time)))) (the-as uint 600)) + (fire-beam self (-> self root trans) (-> self laser-dir)) + ) + (suspend) + ) + (go-virtual hide) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate hide (precur-laser-beam) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((< (-> self current-angle) (+ (length *laser-angles-array*) -1)) + (+! (-> self current-angle) 1) + ) + (else + (set! (-> self current-angle) 0) + 0 + ) + ) + (quaternion-rotate-local-x! + (-> self root quat) + (-> self org-laser-quat) + (-> *laser-angles-array* (-> self current-angle)) + ) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (the int (-> self off-duration)))) + (suspend) + ) + (go-virtual telegraph) + ) + :post ja-post + ) + +;; definition for method 11 of type precur-laser-beam +(defmethod init-from-entity! ((this precur-laser-beam) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this on-duration) 60.0) + (set! (-> this off-duration) 15.0) + (set! (-> this last-attack-time) (the-as uint 0)) + (set! (-> this counter) (the-as uint 0)) + (set! (-> this sound-id) (new-sound-id)) + (quaternion-copy! (-> this org-laser-quat) (-> this root quat)) + (let* ((v1-4 *game-info*) + (a0-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-5) + (set! (-> this attack-id) a0-5) + ) + (set! (-> this current-angle) 0) + (quaternion-rotate-local-x! + (-> this root quat) + (-> this org-laser-quat) + (-> *laser-angles-array* (-> this current-angle)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this dormant)) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-engulfing-death + :id 1327 + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4454 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4454 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0 5.0) + (:x (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 240.0 15.0) + (:g 200.0 16.0) + (:b 160.0 16.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.20833333)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:timer (seconds 0.535) (seconds 0.265)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1) (seconds 0.03)) + (:next-launcher 4455) + ) + ) + +;; failed to figure out what this is: +(defpart 4455 + :init-specs ((:b 0.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.4 -0.2) + (:next-time (seconds 0.017) (seconds 0.03)) + (:next-launcher 4456) + ) + ) + +;; failed to figure out what this is: +(defpart 4456 + :init-specs ((:fade-r -0.125) (:fade-g 0.4) (:fade-b 0.4)) + ) + +;; definition of type task-manager-precura +(deftype task-manager-precura (task-manager) + ((part-doom sparticle-launch-control) + (doom-time time-frame) + (extra-time time-frame) + (doom-counter uint8) + (faded uint8) + (movie-played? symbol) + ) + ) + +;; definition for method 3 of type task-manager-precura +(defmethod inspect ((this task-manager-precura)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tpart-doom: ~A~%" (-> this part-doom)) + (format #t "~2Tdoom-time: ~D~%" (-> this doom-time)) + (format #t "~2Textra-time: ~D~%" (-> this extra-time)) + (format #t "~2Tdoom-counter: ~D~%" (-> this doom-counter)) + (format #t "~2Tfaded: ~D~%" (-> this faded)) + (format #t "~2Tmovie-played?: ~A~%" (-> this movie-played?)) + (label cfg-4) + this + ) + +;; definition for symbol *precura-continue-sphere*, type sphere +(define *precura-continue-sphere* (new 'static 'sphere :x 684753.7 :y 2241180.5 :z -334490.84 :r 122880.0)) + +;; definition for symbol *precura-continue2-sphere*, type sphere +(define *precura-continue2-sphere* (new 'static 'sphere :x 733905.7 :y 2241180.5 :z -334490.84 :r 40960.0)) + +;; definition for method 30 of type task-manager-precura +(defmethod taskman-event-handler ((this task-manager-precura) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('extra-time) + (let* ((v1-1 (-> arg3 param 0)) + (v0-0 (the-as object (+ (-> this extra-time) (the-as time-frame v1-1)))) + ) + (set! (-> this extra-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for symbol *pca-sph1*, type sphere +(define *pca-sph1* (new 'static 'sphere :x 261120.0 :y 2199552.0 :z -181452.8 :r 31129.6)) + +;; definition for symbol *pca-sph2*, type sphere +(define *pca-sph2* (new 'static 'sphere :x 261120.0 :y 2199552.0 :z 115916.8 :r 31129.6)) + +;; definition for method 26 of type task-manager-precura +;; INFO: Used lq/sq +(defmethod task-manager-method-26 ((this task-manager-precura)) + (when *target* + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (target-pos 0) quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when (and (>= (-> s4-0 z) (-> *pca-sph1* z)) (>= (-> *pca-sph2* z) (-> s4-0 z))) + (set! (-> s3-0 quad) (-> *pca-sph1* quad)) + (set! (-> s4-0 z) 0.0) + (set! (-> s3-0 z) 0.0) + (when (< (vector-vector-distance s4-0 s3-0) (-> *pca-sph1* r)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) s3-0 s4-0))) + (set! (-> s5-1 y) 0.0) + (set! (-> s5-1 z) 0.0) + (set! (-> s5-1 x) (sign (-> s5-1 x))) + (send-event + *target* + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'shock-no-interrupt) + (vector s5-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (* 0.0033333334 (the float (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (if (and (not (logtest? (-> this info mask) (task-manager-mask time-limit))) + (-> this movie-played?) + (not (movie?)) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + ) + (if (and (movie?) (not (-> this movie-played?))) + (set! (-> this movie-played?) #t) + ) + (let ((f0-14 (vector-vector-distance-squared (target-pos 0) *precura-continue2-sphere*)) + (f1-5 (-> *precura-continue2-sphere* r)) + ) + (if (and (< f0-14 (* f1-5 f1-5)) (not (task-node-closed? (game-task-node precursor-destroy-ship-escape)))) + (task-node-close! (game-task-node precursor-destroy-ship-escape) 'event) + ) + ) + (when (and (not (time-elapsed? (-> this start-time) (seconds 1))) + (< (seconds 150) (-> this time-limit)) + (let ((f0-15 (vector-vector-distance-squared (target-pos 0) *precura-continue-sphere*)) + (f1-8 (-> *precura-continue-sphere* r)) + ) + (< f0-15 (* f1-8 f1-8)) + ) + ) + (set! (-> this time-limit) (seconds 150)) + (send-event (process-by-name "dp-bipedal-104" *active-pool*) 'die-fast) + (send-event (process-by-name "dp-bipedal-105" *active-pool*) 'die-fast) + (send-event (process-by-name "dp-bipedal-106" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-9" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-10" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-11" *active-pool*) 'die-fast) + (send-event (process-by-name "neo-wasp-15" *active-pool*) 'die-fast) + ) + 0 + (call-parent-method this) + (none) + ) + +;; definition for method 23 of type task-manager-precura +;; WARN: Return type mismatch object vs none. +(defmethod hud-timer-handler ((this task-manager-precura)) + (with-pp + (when (or (> (-> this extra-time) 0) (and *target* (focus-test? *target* dead))) + (let ((v1-7 (- (current-time) (-> pp clock old-frame-counter)))) + (if (and (> (-> this extra-time) 0) (< (-> this extra-time) v1-7)) + (set! v1-7 (-> this extra-time)) + ) + (if (> (-> this extra-time) 0) + (set! (-> this extra-time) (- (-> this extra-time) v1-7)) + ) + (+! (-> this time-limit) v1-7) + ) + ) + (let ((v1-10 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (cond + ((and (>= (seconds 0.015) v1-10) (not (-> this movie-played?)) (not (movie?))) + (process-spawn scene-player :init scene-player-init "precursor-destroy-ship-lose" #t #f :name "scene-player") + (logclear! (-> this info mask) (task-manager-mask time-limit)) + ) + ((not (movie?)) + (call-parent-method this) + ) + ) + ) + (none) + ) + ) + +;; definition for method 7 of type task-manager-precura +(defmethod relocate ((this task-manager-precura) (offset int)) + (if (nonzero? (-> this part-doom)) + (&+! (-> this part-doom) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 25 of type task-manager-precura +(defmethod task-manager-method-25 ((this task-manager-precura)) + (if (nonzero? (-> this part-doom)) + (kill-particles (-> this part-doom)) + ) + (disable *screen-filter*) + (call-parent-method this) + (none) + ) + +;; definition for method 20 of type task-manager-precura +(defmethod init! ((this task-manager-precura)) + (set! (-> this part-doom) (create-launch-control (-> *part-group-id-table* 1327) this)) + (set-time! (-> this doom-time)) + (set! (-> this doom-counter) (the-as uint 0)) + (set! (-> this faded) (the-as uint 0)) + (set! (-> this movie-played?) #f) + (set! (-> this extra-time) 0) + (call-parent-method this) + (none) + ) + +;; definition for function process-drawable-shock-wave-effect +;; INFO: Used lq/sq +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Return type mismatch int vs object. +(defun process-drawable-shock-wave-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 vector) + (arg5 int) + (arg6 float) + ) + (local-vars + (sv-624 (pointer lightning-tracker)) + (sv-640 float) + (sv-656 matrix) + (sv-672 collide-query) + (sv-688 symbol) + (sv-704 vector) + (sv-720 int) + (sv-736 process) + ) + (set! sv-640 arg6) + (let ((s5-0 *lightning-probe-vars*)) + (set! sv-656 (new 'stack-no-clear 'matrix)) + (set! sv-672 (new 'stack-no-clear 'collide-query)) + (set! sv-688 (the-as symbol #f)) + (set! (-> sv-672 start-pos quad) (-> arg4 quad)) + (set! sv-704 (-> sv-672 move-dist)) + (set! (-> sv-704 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-704 w) 1.0) + (matrix-rotate-zyx! sv-656 (-> sv-672 move-dist)) + (set! sv-720 6) + (while (nonzero? sv-720) + (set! sv-720 (+ sv-720 -1)) + (vector-rotate*! (-> sv-672 move-dist) (-> s5-0 probe-dirs sv-720) sv-656) + (vector-normalize! (-> sv-672 move-dist) sv-640) + (let ((v1-18 sv-672)) + (set! (-> v1-18 radius) 409.6) + (set! (-> v1-18 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-18 ignore-process0) arg0) + (set! (-> v1-18 ignore-process1) #f) + (set! (-> v1-18 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-18 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* sv-672) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> s5-0 end-pos quad) (-> sv-672 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-672 start-pos))) + (set! sv-688 #t) + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (when sv-688 + (set! sv-736 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-624 + (the-as + (pointer lightning-tracker) + (when sv-736 + (let ((t9-9 (method-of-type lightning-tracker activate))) + (t9-9 (the-as lightning-tracker sv-736) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-736 lightning-tracker-init arg1 arg5 arg2 arg0 arg4 (-> s5-0 end-pos)) + (-> sv-736 ppointer) + ) + ) + ) + (when sv-624 + (set! (-> sv-624 0 user-time 0) 0) + (when arg3 + (let ((v1-46 (get-field-spec-by-id arg3 (sp-field-id spt-timer)))) + (if v1-46 + (set! (-> v1-46 initial-valuef) (the-as float (-> sv-624 0 duration))) + ) + ) + (let ((t9-12 sp-launch-particles-var) + (a0-26 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s5-0 end-pos quad)) + (t9-12 a0-26 arg3 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + ) + +;; failed to figure out what this is: +(defpartgroup group-placeholder-single-shockwave + :id 1328 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4457 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4457 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.005)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-spot-ring gun gun-dark-2-ring-lod0-jg gun-dark-2-ring-idle-ja + ((gun-dark-2-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0.5 84) + :longest-edge (meters 80) + :shadow gun-dark-2-ring-shadow-mg + ) + +;; definition of type precur-spot-shadow-effect +(deftype precur-spot-shadow-effect (process-drawable) + ((focal-length float) + (near-clip float) + (far-clip float) + (color rgba) + (pre-flicker-pos vector :inline) + (jmod-outer joint-mod-add-local :inline) + (jmod-inner joint-mod-add-local :inline) + ) + (:state-methods + idle + inactive + ) + (:methods + (set-inner-jmod-scale (_type_ vector) none) + (set-outer-jmod-scale (_type_ vector) none) + ) + ) + +;; definition for method 3 of type precur-spot-shadow-effect +(defmethod inspect ((this precur-spot-shadow-effect)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tfocal-length: ~f~%" (-> this focal-length)) + (format #t "~2Tnear-clip: ~f~%" (-> this near-clip)) + (format #t "~2Tfar-clip: ~f~%" (-> this far-clip)) + (format #t "~2Tcolor: ~D~%" (-> this color)) + (format #t "~2Tpre-flicker-pos: #~%" (-> this pre-flicker-pos)) + (format #t "~2Tjmod-outer: #~%" (-> this jmod-outer)) + (format #t "~2Tjmod-inner: #~%" (-> this jmod-inner)) + (label cfg-4) + this + ) + +;; definition for method 22 of type precur-spot-shadow-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-inner-jmod-scale ((this precur-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-inner transform scale quad) (-> arg0 quad)) + (none) + ) + +;; definition for method 23 of type precur-spot-shadow-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-outer-jmod-scale ((this precur-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-outer transform scale quad) (-> arg0 quad)) + (none) + ) + +;; definition for function precur-spot-shadow-effect-init-by-other +;; INFO: Used lq/sq +(defbehavior precur-spot-shadow-effect-init-by-other precur-spot-shadow-effect ((arg0 vector) (arg1 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion arg1)) + (set! (-> self pre-flicker-pos quad) (-> self root trans quad)) + (set! (-> self level) (-> *level* level-default)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-spot-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init (-> self jmod-inner) self (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> self jmod-outer) self (the-as uint 3) (joint-mod-base-flags attached scale)) + (set! (-> self focal-length) 409600.0) + (set! (-> self near-clip) 0.0) + (set! (-> self far-clip) 122880.0) + (set! (-> self color) (new 'static 'rgba :r #xf0 :g #xf0 :a #x80)) + (cond + ((-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + 0.0 + 0.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf02 shdf03 shdf04 disable-draw) + 245760.0 + ) + ) + (set! (-> self draw shadow-ctrl settings shadow-type) 1) + (set! (-> self draw shadow-ctrl settings flags) (shadow-flags disable-fade shdf03 shdf04 shdf07)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (else + (go process-drawable-art-error "Shadow error (no self draw shadow)") + ) + ) + (go-virtual idle) + ) + +;; definition for function precur-spot-shadow-effect-handler +(defbehavior precur-spot-shadow-effect-handler precur-spot-shadow-effect ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('on) + (go-virtual idle) + ) + (('off) + (go-virtual inactive) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-spot-shadow-effect) + :virtual #t + :event precur-spot-shadow-effect-handler + :enter (behavior () + (setup-masks (-> self draw) 0 1) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + (shadow-control-method-14 + (-> self draw shadow-ctrl) + (-> self root trans) + (vector-negate! (new 'stack-no-clear 'vector) (-> self node-list data 3 bone transform uvec)) + (-> self focal-length) + (-> self near-clip) + (-> self far-clip) + ) + (persist-with-delay + *setting-control* + 'spotlight-color + (seconds 0.1) + 'spotlight-color + #f + 0.0 + (the-as int (-> self color)) + ) + ) + :code sleep-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 x) (+ -1024.0 (* 4096.0 (* 0.5 (rand-vu))))) + (set! (-> gp-0 y) 0.0) + (set! (-> gp-0 z) (+ -1024.0 (* 4096.0 (* 0.5 (rand-vu))))) + (set! (-> gp-0 w) 1.0) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (+! (-> self root trans y) -8192.0) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate inactive (precur-spot-shadow-effect) + :virtual #t + :event precur-spot-shadow-effect-handler + :enter (behavior () + (setup-masks (-> self draw) 0 1) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logior! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +;; definition of type precur-path +(deftype precur-path (process-drawable) + ((pathb path-control) + (last-attack-time uint32) + (attack-id uint32) + (bolt lightning-bolt) + (shock-part-time uint32) + (shock-shadow-handle handle) + ) + (:state-methods + idle + dormant + ) + (:methods + (probe-for-player-collision (_type_ vector vector) none) + (draw-lightning (_type_ vector vector) none) + ) + ) + +;; definition for method 3 of type precur-path +(defmethod inspect ((this precur-path)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpathb: ~A~%" (-> this pathb)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tbolt: ~A~%" (-> this bolt)) + (format #t "~2Tshock-part-time: ~D~%" (-> this shock-part-time)) + (format #t "~2Tshock-shadow-handle: ~D~%" (-> this shock-shadow-handle)) + (label cfg-4) + this + ) + +;; definition for method 22 of type precur-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch time-frame vs none. +(defmethod probe-for-player-collision ((this precur-path) (arg0 vector) (arg1 vector)) + (local-vars (sv-576 collide-query) (sv-580 vector) (sv-584 float)) + (set! sv-576 (new 'stack-no-clear 'collide-query)) + (set! sv-580 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (set! sv-584 (vector-vector-distance arg0 arg1)) + (set! (-> sv-576 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> sv-576 move-dist) sv-580 sv-584) + (let ((v1-5 sv-576)) + (set! (-> v1-5 radius) 40.96) + (set! (-> v1-5 collide-with) (collide-spec jak enemy player-list)) + (set! (-> v1-5 ignore-process0) #f) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* sv-576)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (when (and (>= f30-0 0.0) + (>= (the-as uint (- (current-time) (the-as int (-> this last-attack-time)))) (the-as uint 600)) + ) + (elec-mech s5-1 (-> this attack-id)) + (set! (-> this last-attack-time) (the-as uint (current-time))) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 39) (new 'static 'lightning-spec + :name "lightning-shock-wave" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 819.2 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *precur-tour-lightning*) (!= loading-level global)) + (set! *precur-tour-lightning* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* tex-id) (the-as uint #x403f00)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* regenerate-time-start) (seconds 0.085)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* regenerate-time-end) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* width-range-start) 4096.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* width-range-end) 4096.0) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *precur-tour-lightning* use-accurate-interp?) #t) + +;; definition for method 23 of type precur-path +;; INFO: Used lq/sq +(defmethod draw-lightning ((this precur-path) (arg0 vector) (arg1 vector)) + (let ((gp-0 (-> this bolt))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + 0.0 + (when arg0 + (let ((f0-1 (vector-vector-distance arg0 arg1))) + (vector+! s3-0 arg0 arg1) + (vector-float*! s3-0 s3-0 0.5) + (when (handle->process (-> this shock-shadow-handle)) + (let ((a0-8 (the-as precur-spot-shadow-effect (-> this shock-shadow-handle process 0))) + (a1-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-8 root trans quad) (-> s3-0 quad)) + (set-vector! a1-6 (* 0.0001319679 f0-1) 0.4 0.4 1.0) + (set-outer-jmod-scale a0-8 a1-6) + ) + ) + ) + ) + ) + (set! (-> gp-0 inner-point-travel-time) (seconds 0.25)) + (set! (-> gp-0 snap-inner-points?) #t) + (set! (-> gp-0 fractal-reduction) 0.6) + (set! (-> gp-0 generate-mode) (the-as uint 1)) + (set! (-> gp-0 appearance) *precur-tour-lightning*) + (set! (-> gp-0 num-active-spans) 2) + (set! (-> gp-0 spans-internal data 0 num-inner-points) 30) + (set! (-> gp-0 spans data 0 inner-random-offset-size) 10240.0) + (set! (-> gp-0 spans data 1 inner-random-offset-size) 10240.0) + (when arg0 + (set! (-> gp-0 span-pts-start data 0 quad) (-> arg0 quad)) + (+! (-> gp-0 span-pts-start data 0 y) 4096.0) + ) + (when arg1 + (set! (-> gp-0 span-pts-start data 1 quad) (-> arg1 quad)) + (+! (-> gp-0 span-pts-start data 1 y) 4096.0) + ) + (set! (-> gp-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 gp-0) + (lightning-bolt-method-12 gp-0) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (precur-path) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (lightning-bolt-method-13 (-> self bolt) 1) + ) + :exit (behavior () + (set-precura-laser-light! 0.0 (* 8.0 (seconds-per-frame)) 0) + (set-precura-laser-light! 0.0 (* 8.0 (seconds-per-frame)) 1) + ) + :trans (behavior () + (when *target* + (if (focus-test? *target* grabbed) + (go-virtual dormant) + ) + ) + (if (nonzero? (-> self path)) + (debug-draw (-> self path)) + ) + (if (nonzero? (-> self pathb)) + (debug-draw (-> self pathb)) + ) + (let ((f30-0 (* 0.0006666667 (the float (- (current-time) (-> self state-time))))) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (if (< 0.9 f30-0) + (go-virtual dormant) + ) + (set-precura-laser-light! (- 1.0 f30-0) 0.0 0) + (set-precura-laser-light! f30-0 0.0 1) + (get-point-at-percent-along-path! (-> self path) s5-0 f30-0 'interp) + (get-point-at-percent-along-path! (-> self pathb) gp-0 f30-0 'interp) + (probe-for-player-collision self s5-0 gp-0) + (draw-lightning self s5-0 gp-0) + (process-drawable-shock-wave-effect + self + (-> *lightning-spec-id-table* 39) + lightning-probe-callback + (-> *part-id-table* 160) + s5-0 + 0 + 40960.0 + ) + (process-drawable-shock-wave-effect + self + (-> *lightning-spec-id-table* 39) + lightning-probe-callback + (-> *part-id-table* 160) + gp-0 + 0 + 40960.0 + ) + (when (>= (the-as uint (- (current-time) (the-as int (-> self shock-part-time)))) 0) + (spawn (-> self part) s5-0) + (spawn (-> self part) gp-0) + (set! (-> self shock-part-time) (the-as uint (current-time))) + ) + ) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go-virtual dormant) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate dormant (precur-path) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (lightning-bolt-method-13 (-> self bolt) 2) + ) + :trans (behavior () + (draw-lightning self (the-as vector #f) (the-as vector #f)) + (when *target* + (if (and (time-elapsed? (-> self state-time) (seconds 3)) + (not (logtest? (-> *target* focus-status) (focus-status grabbed))) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 7 of type precur-path +(defmethod relocate ((this precur-path) (offset int)) + (if (nonzero? (-> this pathb)) + (&+! (-> this pathb) offset) + ) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 11 of type precur-path +(defmethod init-from-entity! ((this precur-path) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (when (res-lump-data arg0 'patha pointer) + (set! (-> this path) (new 'process 'curve-control this 'patha -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (when (res-lump-data arg0 'pathb pointer) + (set! (-> this pathb) (new 'process 'curve-control this 'pathb -1000000000.0)) + (logior! (-> this pathb flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (set! (-> this last-attack-time) (the-as uint 0)) + (set! (-> this shock-part-time) (the-as uint 0)) + (let* ((v1-13 *game-info*) + (a0-10 (+ (-> v1-13 attack-id) 1)) + ) + (set! (-> v1-13 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (set! (-> this bolt) (new 'process 'lightning-bolt)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1316) this)) + (init! (-> this bolt) 2 32 *precur-tour-lightning*) + (new 'stack-no-clear 'vector) + (let ((v1-22 (process-spawn + precur-spot-shadow-effect + (-> this root trans) + (-> this root quat) + :name "precur-spot-shadow-effect" + :to this + ) + ) + ) + (when v1-22 + (set! (-> this shock-shadow-handle) (ppointer->handle v1-22)) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 far-clip) 2867.2) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 near-clip) 0.4096) + (set! (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0 color) + (new 'static 'rgba :r #x90 :g #x90 :b #xff :a #x80) + ) + (set-inner-jmod-scale + (the-as precur-spot-shadow-effect (-> (the-as (pointer precur-spot-shadow-effect) v1-22) 0)) + (new 'static 'vector :x 0.0001 :y 0.0001 :z 0.0001 :w 1.0) + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-b precur-door-b precur-door-b-lod0-jg precur-door-b-idle-ja + ((precur-door-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; definition of type precur-door-b +(deftype precur-door-b (com-airlock) + ((pad uint8 4) + ) + ) + +;; definition for method 3 of type precur-door-b +(defmethod inspect ((this precur-door-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type com-airlock inspect))) + (t9-0 this) + ) + (format #t "~2Topen-test: ~A~%" (-> this open-test)) + (label cfg-4) + this + ) + +;; definition for method 11 of type precur-door-b +(defmethod init-from-entity! ((this precur-door-b) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 5) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this open-test) (the-as pair ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not #f)) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +;; failed to figure out what this is: +(defstate open (precur-door-b) + :virtual #t + :enter (behavior ((arg0 symbol)) + (let ((gp-0 sound-play-by-name) + (a0-3 (make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f642d63657270))) + ) + (gp-0 (the-as sound-name a0-3) (new-sound-id) 1024 0 0 (sound-group) #t) + (let ((t9-2 (-> (method-of-type com-airlock open) enter))) + (if t9-2 + (t9-2 (the-as symbol a0-3)) + ) + ) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc new file mode 100644 index 0000000000..c0c6d2b2fb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc @@ -0,0 +1,2899 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function spawn-mech-shock-effect +;; WARN: Return type mismatch int vs none. +(defun spawn-mech-shock-effect () + (process-spawn-function + process + (lambda :behavior process + () + (let ((gp-0 (current-time)) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 (seconds 1)) + (when (time-elapsed? gp-0 (seconds 0.03)) + (set! gp-0 (current-time)) + (process-drawable-shock-effect + *target* + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + (suspend) + ) + ) + #f + ) + :to *target* + ) + 0 + (none) + ) + +;; definition of type precur-switch +(deftype precur-switch (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + idle + going-down + going-up + idle-down + ) + ) + +;; definition for method 3 of type precur-switch +(defmethod inspect ((this precur-switch)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-switch precur-switch 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 4)) + +;; failed to figure out what this is: +(defstate idle (precur-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual going-down) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! (-> self draw art-group data 2) :num! zero) + (transform-post) + ) + :trans rider-trans + :code sleep-code + :post rider-post + ) + +;; failed to figure out what this is: +(defstate going-down (precur-switch) + :virtual #t + :enter (behavior () + (sound-play "bridge-button") + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle-down) + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate going-up (precur-switch) + :virtual #t + :trans rider-trans + :code (behavior () + (let* ((v1-0 (-> self alt-actor)) + (a0-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-0 + (send-event a0-0 'stop-rotate) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! 0.0) :frame-num 1.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (go-virtual idle) + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate idle-down (precur-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (let ((v0-0 (current-time))) + (set! (-> self state-time) v0-0) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (go-virtual going-up) + ) + ) + :code (behavior () + (let* ((v1-0 (-> self alt-actor)) + (a0-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-0 + (send-event a0-0 'start-rotate) + ) + ) + (sleep-code) + ) + :post rider-post + ) + +;; definition for method 11 of type precur-switch +(defmethod init-from-entity! ((this precur-switch) (arg0 entity-actor)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-16 transform-index) 4) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-19 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type precur-jump-plate +(deftype precur-jump-plate (process-drawable) + ((start-quat quaternion :inline) + (turn-start time-frame) + (angle float) + (first? symbol) + (idx uint8) + (sound-id sound-id) + ) + (:state-methods + idle + turn + ) + ) + +;; definition for method 3 of type precur-jump-plate +(defmethod inspect ((this precur-jump-plate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstart-quat: #~%" (-> this start-quat)) + (format #t "~2Tturn-start: ~D~%" (-> this turn-start)) + (format #t "~2Tangle: ~f~%" (-> this angle)) + (format #t "~2Tfirst?: ~A~%" (-> this first?)) + (format #t "~2Tidx: ~D~%" (-> this idx)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-jump-plate precur-jump-plate precur-jump-plate-lod0-jg precur-jump-plate-idle-ja + ((precur-jump-plate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defstate idle (precur-jump-plate) + :virtual #t + :enter (behavior () + (transform-post) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + ) + :code (behavior () + (local-vars (v1-3 time-frame) (a0-3 float) (f0-0 float)) + (let ((gp-0 (current-time))) + (until (>= v1-3 (the int (* f0-0 a0-3))) + (suspend) + (set! v1-3 (- (current-time) gp-0)) + (set! f0-0 300.0) + (set! a0-3 (if (-> self first?) + (the float (-> self idx)) + 2.0 + ) + ) + ) + ) + (set! (-> self first?) #f) + (go-virtual turn) + ) + :post rider-post + ) + +;; definition for method 12 of type precur-jump-plate +(defmethod run-logic? ((this precur-jump-plate)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate turn (precur-jump-plate) + :virtual #t + :enter (behavior () + (set-time! (-> self turn-start)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-stop") + ) + :trans (behavior () + float + (set! (-> self angle) + (the float (sar (shl (the int (* 72.81778 (the float (- (current-time) (-> self turn-start))))) 48) 48)) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self start-quat) (-> self angle)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :pitch 1) + (when #f + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :position (-> self root trans)) + ) + (when #f + (sound-stop (-> self sound-id)) + (sound-play "bridg-ring-turn" :id (-> self sound-id) :position (-> self root trans)) + ) + (when (and (< (seconds 1) (- (current-time) (-> self turn-start))) + (< 0.0 (-> self angle)) + (< (-> self angle) 3640.889) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self start-quat) 0.0) + (go-virtual idle) + ) + (rider-trans) + ) + :code sleep-code + :post (behavior () + (if (< (fabs (-> self angle)) 8192.0) + (rider-post) + (ja-post) + ) + ) + ) + +;; definition for method 11 of type precur-jump-plate +(defmethod init-from-entity! ((this precur-jump-plate) (arg0 entity-actor)) + (set-time! (-> this state-time)) + (set-time! (-> this turn-start)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 2) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-22 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-jump-plate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (quaternion-copy! (-> this start-quat) (-> this root quat)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this first?) #t) + (set! (-> this idx) (the-as uint (the int (* 0.000027126736 (+ 147456.0 (-> this root trans z)))))) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 36) (new 'static 'lightning-spec + :name "generator-lightning-shock" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :end-color (new 'static 'rgba :b #xff :a #xff) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3b :page #x4) + :reduction 0.6 + :num-points 20 + :box-size 40960.0 + :merge-factor 0.5 + :merge-count 2 + :radius 3276.8 + :duration 210.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 37) (new 'static 'lightning-spec + :name "generator-lightning-shock-target" + :flags (lightning-spec-flags lsf2) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.5 + :num-points 16 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 4096.0 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-debug-placeholder-multiple-generator + :id 1324 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4445 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4445 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 2)) + (:flags ()) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition of type precur-generator +(deftype precur-generator (process-drawable) + ((root collide-shape :override) + (attack-id uint32) + (shove-id uint32) + (sound-id sound-id) + (next-lightning-time uint32) + (shock-distance float) + ) + (:state-methods + idle + explode + ) + (:methods + (init-fields (_type_) none) + ) + ) + +;; definition for method 3 of type precur-generator +(defmethod inspect ((this precur-generator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tshove-id: ~D~%" (-> this shove-id)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tnext-lightning-time: ~D~%" (-> this next-lightning-time)) + (format #t "~2Tshock-distance: ~f~%" (-> this shock-distance)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (format 0 "explode-event~%") + (if (type? proc explosion) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (local-vars (sv-128 symbol) (sv-144 vector)) + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 40960.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + (when (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) (-> self shock-distance)) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0)) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.3)) + (send-event + *target* + 'shove + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self shove-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector gp-1) + (shove-back (meters 2)) + (shove-up (meters 1.5)) + ) + ) + ) + ) + (let ((gp-2 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-2 + (let ((t9-10 (method-of-type lightning-tracker activate))) + (t9-10 (the-as lightning-tracker gp-2) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-2 run-function-in-process) + (s4-0 gp-2) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 37)) + (s1-0 90) + (s0-0 #f) + ) + (set! sv-128 (the-as symbol #f)) + (set! sv-144 (new 'stack-no-clear 'vector)) + (set! (-> sv-144 x) (-> (target-pos 0) x)) + (let* ((f30-0 (-> (target-pos 0) y)) + (f28-0 4096.0) + (f26-0 1.0) + (f24-0 4.0) + (v1-35 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-36 (the-as number (logior #x3f800000 v1-35))) + ) + (set! (-> sv-144 y) (+ f30-0 (* f28-0 (+ f26-0 (* f24-0 (+ -1.0 (the-as float v1-36))))))) + ) + (set! (-> sv-144 z) (-> (target-pos 0) z)) + (set! (-> sv-144 w) 1.0) + (let ((t3-0 (-> self root trans))) + ((the-as (function object object object object object object object object none) s5-2) + s4-0 + s3-0 + s2-0 + s1-0 + s0-0 + sv-128 + sv-144 + t3-0 + ) + ) + ) + (-> gp-2 ppointer) + ) + ) + (if *target* + (spawn-mech-shock-effect) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator) + :virtual #t + :enter (behavior () + (sound-play "gen-explode") + ) + :code sleep-code + ) + +;; definition for method 22 of type precur-generator +;; WARN: Return type mismatch int vs none. +(defmethod init-fields ((this precur-generator)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this next-lightning-time) (the-as uint 0)) + (let* ((v1-0 *game-info*) + (a0-2 (+ (-> v1-0 attack-id) 1)) + ) + (set! (-> v1-0 attack-id) a0-2) + (set! (-> this attack-id) a0-2) + ) + (let* ((v1-1 *game-info*) + (a0-4 (+ (-> v1-1 attack-id) 1)) + ) + (set! (-> v1-1 attack-id) a0-4) + (set! (-> this shove-id) a0-4) + ) + (set! (-> this shock-distance) 61440.0) + 0 + (none) + ) + +;; definition of type precur-generator-a +(deftype precur-generator-a (precur-generator) + () + ) + +;; definition for method 3 of type precur-generator-a +(defmethod inspect ((this precur-generator-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type precur-generator inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-a precur-generator-a precur-generator-a-lod0-jg precur-generator-a-idle-ja + ((precur-generator-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-a-explode precur-generator-a precur-generator-a-explode-lod0-jg precur-generator-a-explode-idle-ja + ((precur-generator-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition for symbol *precur-generator-a-exploder-params*, type joint-exploder-static-params +(define *precur-generator-a-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator-a) + :virtual #t + :enter (behavior () + (set-precura-generator-light! 1.0) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type precur-generator idle) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-36 (-> self root root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-stop (-> self sound-id)) + (set-precura-generator-light! 0.0) + (format 0 "tag1~%") + (let ((t9-11 (-> (method-of-type precur-generator explode) enter))) + (if t9-11 + (t9-11) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-a-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-a-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type precur-generator-a +(defmethod init-from-entity! ((this precur-generator-a) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-13 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-fields this) + (go (method-of-object this idle)) + ) + +;; definition of type precur-generator-b +(deftype precur-generator-b (precur-generator) + () + ) + +;; definition for method 3 of type precur-generator-b +(defmethod inspect ((this precur-generator-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type precur-generator inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-b precur-generator-b precur-generator-b-lod0-jg precur-generator-b-idle-ja + ((precur-generator-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-b-explode precur-generator-b precur-generator-b-explode-lod0-jg precur-generator-b-explode-idle-ja + ((precur-generator-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition for symbol *precur-generator-b-exploder-params*, type joint-exploder-static-params +(define *precur-generator-b-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (if (type? proc explosion) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type precur-generator idle) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator-b) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-36 (-> self root root-prim))) + (set! (-> v1-36 prim-core collide-as) (collide-spec)) + (set! (-> v1-36 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-stop (-> self sound-id)) + (let ((t9-9 (-> (method-of-type precur-generator explode) enter))) + (if t9-9 + (t9-9) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-b-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-b-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type precur-generator-b +(defmethod init-from-entity! ((this precur-generator-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-fields this) + (set! (-> this shock-distance) 40960.0) + (go (method-of-object this idle)) + ) + +;; definition of type precur-generator-c +(deftype precur-generator-c (process-drawable) + ((root collide-shape :override) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (next-lightning-time uint32) + (sound-id sound-id) + ) + (:state-methods + idle + explode + ) + ) + +;; definition for method 3 of type precur-generator-c +(defmethod inspect ((this precur-generator-c)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (format #t "~2Tnext-lightning-time: ~D~%" (-> this next-lightning-time)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-c precur-generator-c precur-generator-c-lod0-jg precur-generator-c-idle-ja + ((precur-generator-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-c-explode precur-generator-c precur-generator-c-explode-lod0-jg precur-generator-c-explode-idle-ja + ((precur-generator-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition for symbol *precur-generator-c-exploder-params*, type joint-exploder-static-params +(define *precur-generator-c-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator-c) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (type? proc explosion) + (when (nonzero? (-> self actor-group-count)) + (dotimes (gp-0 (length (-> self actor-group 0))) + (let ((v1-5 (-> self actor-group 0 data gp-0))) + (when v1-5 + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'trigger) + (let ((t9-1 send-event-function) + (v1-6 (-> v1-5 actor)) + ) + (t9-1 + (if v1-6 + (-> v1-6 extra process) + ) + a1-3 + ) + ) + ) + 0 + ) + ) + ) + ) + (go-virtual explode) + ) + ) + ) + ) + :trans (behavior () + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 81920.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator-c) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-stop (-> self sound-id)) + (let ((t9-7 (-> (method-of-type precur-generator explode) enter))) + (if t9-7 + (t9-7) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-c-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-c-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1.2)) + (suspend) + ) + ) + (when (res-lump-struct (-> self entity) 'art-name structure) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-grab? *target* #f) + (set-setting! 'entity-name "camera-359" 0.0 0) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (task-close! "precursor-tour-generator-trigger") + (send-event (process-by-name "precur-door-b-4" *active-pool*) 'open) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 1)) + (suspend) + ) + ) + (set-setting! 'interp-time 'abs 450.0 0) + (remove-setting! 'entity-name) + (process-release? *target*) + (suspend) + 0 + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type precur-generator-c +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this precur-generator-c) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-13 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-id) (new-sound-id)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this next-lightning-time) (the-as uint 0)) + (set! (-> this entity) arg0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-19 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-19)) + ) + (else + (format 0 "ERROR: entity missing actor-group!~%") + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition of type precur-generator-d-gem +(deftype precur-generator-d-gem (process-drawable) + ((root collide-shape :override) + (ang-vel float) + (offset-vec vector :inline) + (init-pos vector :inline) + (sound-id sound-id) + ) + (:state-methods + idle + orbit-gen + smoking + explode + ) + ) + +;; definition for method 3 of type precur-generator-d-gem +(defmethod inspect ((this precur-generator-d-gem)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tang-vel: ~f~%" (-> this ang-vel)) + (format #t "~2Toffset-vec: #~%" (-> this offset-vec)) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-d-gem precur-generator-d-gem precur-generator-d-gem-lod0-jg precur-generator-d-gem-idle-ja + ((precur-generator-d-gem-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('spin) + (let ((v1-1 (the-as object (-> block param 0))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> (the-as vector (-> block param 1)) quad)) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate orbit-gen (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual smoking) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + (sound-play "gem-pain") + ) + :trans (behavior () + (sound-play "gem-airloop" :id (-> self sound-id)) + (vector-rotate-around-y! (-> self offset-vec) (-> self offset-vec) (* (-> self ang-vel) (seconds-per-frame))) + (vector+! (-> self root trans) (-> self init-pos) (-> self offset-vec)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self offset-vec quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate smoking (precur-generator-d-gem) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (sound-play "gem-smokeloop" :id (-> self sound-id)) + (vector-rotate-around-y! + (-> self offset-vec) + (-> self offset-vec) + (* 3.0 (seconds-per-frame) (-> self ang-vel)) + ) + (vector+! (-> self root trans) (-> self init-pos) (-> self offset-vec)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self offset-vec quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! s5-0 3072.0) + (vector+! (-> self root trans) (-> self root trans) s5-0) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (quaternion-look-at! (-> self root quat) gp-0 *up-vector*) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator-d-gem) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (type? (-> self root) collide-shape) + (let ((v1-4 (-> self root root-prim))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (cond + ((logtest? (-> *part-group-id-table* 1318 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1318)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1318)) + ) + ) + (sound-play "gem-explode") + ) + :code (behavior () + (suspend) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for function precur-generator-d-gem-init-by-other +;; INFO: Used lq/sq +(defbehavior precur-generator-d-gem-init-by-other precur-generator-d-gem ((arg0 vector) (arg1 float) (arg2 vector)) + (let ((s3-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s3-0 penetrated-by) (penetrate)) + (let ((s2-0 (new 'process 'collide-shape-prim-group s3-0 (the-as uint 1) 0))) + (set! (-> s3-0 total-prims) (the-as uint 2)) + (set! (-> s2-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s2-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s3-0 root-prim) s2-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s3-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w))) + (let ((v1-11 (-> s3-0 root-prim))) + (set! (-> s3-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s3-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s3-0) + ) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self offset-vec quad) (-> arg2 quad)) + (set! (-> self ang-vel) arg1) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1317) self)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self init-pos quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-precur-generator-d-gem" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (go-virtual orbit-gen) + ) + +;; definition of type precur-generator-d +(deftype precur-generator-d (process-drawable) + ((root collide-shape :override) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (next-lightning-time uint32) + (proc-handle handle 3) + (animation-speed float) + (sound-id sound-id) + ) + (:state-methods + idle + explode + explosions + ) + (:methods + (spawn-gems (_type_) none) + ) + ) + +;; definition for method 3 of type precur-generator-d +(defmethod inspect ((this precur-generator-d)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (format #t "~2Tnext-lightning-time: ~D~%" (-> this next-lightning-time)) + (format #t "~2Tproc-handle[3] @ #x~X~%" (-> this proc-handle)) + (format #t "~2Tanimation-speed: ~f~%" (-> this animation-speed)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-d precur-generator-d precur-generator-d-lod0-jg precur-generator-d-idle-ja + ((precur-generator-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-generator-d-explode precur-generator-d precur-generator-d-explode-lod0-jg precur-generator-d-explode-idle-ja + ((precur-generator-d-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition for symbol *precur-generator-d-exploder-params*, type joint-exploder-static-params +(define *precur-generator-d-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 24 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 25 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 26 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 27 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 28 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 29 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 30 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 23 of type precur-generator-d +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-gems ((this precur-generator-d)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> this proc-handle 0) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + 14563.556 + (new 'static 'vector :x 61440.0 :y -40960.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + (set! (-> this proc-handle 1) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + -6553.6 + (new 'static 'vector :x 61440.0 :y -32768.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + (set! (-> this proc-handle 2) (ppointer->handle (process-spawn + precur-generator-d-gem + s5-0 + 11650.845 + (new 'static 'vector :x 61440.0 :y -53248.0 :w 1.0) + :name "precur-generator-d-gem" + :to this + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (precur-generator-d) + :virtual #t + :trans (behavior () + (sound-play "prec-generator" :id (-> self sound-id) :position (-> self root trans)) + (when (< (the-as time-frame (-> self next-lightning-time)) (current-time)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 36) + lightning-probe-callback + (-> *part-id-table* 160) + 5 + 0 + 163840.0 + ) + (set! (-> self next-lightning-time) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + (let ((v1-10 (the-as object #f))) + (set! (-> self animation-speed) 0.5) + (dotimes (a0-7 3) + (set! v1-10 (or (handle->process (-> self proc-handle a0-7)) v1-10)) + (if (not v1-10) + (set! (-> self animation-speed) (* 2.0 (-> self animation-speed))) + ) + ) + (if (not v1-10) + (go-virtual explode) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! precur-generator-d-idle-ja :num! (seek! max (-> self animation-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self animation-speed))) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate explode (precur-generator-d) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-stop (-> self sound-id)) + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) 0.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 0.0 0.0 0.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-generator-d-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-generator-d-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (go-virtual explosions) + ) + ) + +;; failed to figure out what this is: +(defstate explosions (precur-generator-d) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (activate! *camera-smush-control* 2048.0 15 1500 1.0 0.9 (-> *display* camera-clock)) + (persist-with-delay *setting-control* 'blur-a (seconds 5) 'blur-a 'abs 0.8 0) + (disable *screen-filter*) + (process-grab? *target* #f) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (seconds 0.5))) + (suspend) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-0 105472.0) + (set! (-> gp-0 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-0 105472.0) + (set! (-> gp-0 y) -32768.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-0 (-> self root trans) gp-0) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 0.033333335 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + (while (not (time-elapsed? (-> self state-time) (seconds 1.5))) + (suspend) + ) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-4 105472.0) + (set! (-> gp-4 y) -61440.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-4 105472.0) + (set! (-> gp-4 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-4 (-> self root trans) gp-4) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (while (not (time-elapsed? (-> self state-time) (seconds 2))) + (suspend) + ) + (let ((gp-8 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point! gp-8 105472.0) + (set! (-> gp-8 y) -61440.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + (sound-play "gem-explode") + (rand-vu-sphere-point! gp-8 105472.0) + (set! (-> gp-8 y) -20480.0) + (cond + ((logtest? (-> *part-group-id-table* 1313 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (vector+! gp-8 (-> self root trans) gp-8) quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1313)) + ) + ) + ) + (sound-play "gem-explode") + (while (not (time-elapsed? (-> self state-time) (seconds 6))) + (suspend) + ) + (process-spawn scene-player :init scene-player-init "precursor-tour-res" #t #f :name "scene-player") + ) + ) + +;; definition for method 11 of type precur-generator-d +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this precur-generator-d) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-generator-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this next-lightning-time) (the-as uint 0)) + (set! (-> this entity) arg0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this animation-speed) 0.5) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-18 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-18 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-18)) + ) + (else + (format 0 "ERROR: entity missing actor-group!~%") + ) + ) + ) + (dotimes (v1-20 3) + (set! (-> this proc-handle v1-20) (the-as handle #f)) + ) + (spawn-gems this) + (set! (-> this root scale z) 1.3) + (go (method-of-object this idle)) + ) + +;; definition of type precur-platform-round +(deftype precur-platform-round (process-drawable) + ((root collide-shape :override) + (start-quat quaternion :inline) + (start-height float) + (sound-id sound-id) + (start-dip-time float) + (last-ridden-time float) + ) + (:state-methods + idle + hidden-state + rotate-plat + fade-in + ) + (:methods + (precur-platform-round-method-24 () none) + ) + ) + +;; definition for method 3 of type precur-platform-round +(defmethod inspect ((this precur-platform-round)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstart-quat: #~%" (-> this start-quat)) + (format #t "~2Tstart-height: ~f~%" (-> this start-height)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tstart-dip-time: ~f~%" (-> this start-dip-time)) + (format #t "~2Tlast-ridden-time: ~f~%" (-> this last-ridden-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-platform-round precur-platform-round precur-platform-round-lod0-jg precur-platform-round-idle-ja + ((precur-platform-round-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 17.5) + ) + +;; failed to figure out what this is: +(defstate idle (precur-platform-round) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate hidden-state (precur-platform-round) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('stop-rotate) + (go-virtual idle) + ) + (('trigger) + (go-virtual fade-in) + ) + ) + ) + :enter (behavior () + (when (type? (-> self root) collide-shape) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (collide-spec)) + (set! (-> v1-2 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (set! (-> self draw force-fade) (the-as uint 0)) + 0 + ) + :exit (behavior () + (when (type? (-> self root) collide-shape) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-2 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + ) + :code sleep-code + :post rider-post + ) + +;; failed to figure out what this is: +(defstate fade-in (precur-platform-round) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "plat-appear") + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + ) + :trans (behavior () + (let ((f30-0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))))) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + (let ((f0-2 (fmax 0.0 (fmin 1.0 f30-0)))) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 f0-2)))) + (when (= f0-2 1.0) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + (go-virtual rotate-plat) + ) + ) + ) + (rider-trans) + ) + :code sleep-code + :post rider-post + ) + +;; definition for function rotate-platform-behavior +;; WARN: Return type mismatch object vs none. +(defbehavior rotate-platform-behavior precur-platform-round () + (add-debug-sphere + #t + (bucket-id debug) + (-> self node-list data 4 bone transform trans) + (meters 1) + *color-green* + ) + (sound-play "prec-plats" :id (-> self sound-id) :position (-> self root trans)) + (if (not (time-elapsed? (-> self state-time) (seconds 10))) + (spawn-from-mat (-> self part) (-> self node-list data 4 bone transform)) + ) + 0.0 + (let* ((f0-2 (* 0.00033333336 (the float (- (current-time) (-> self state-time))))) + (f0-3 (lerp 0.0 65536.0 f0-2)) + ) + (quaternion-rotate-local-y! (-> self root quat) (-> self start-quat) f0-3) + ) + (rider-trans) + (when (< 0.0 (-> self start-dip-time)) + (let ((f30-0 + (sin-rad + (* 0.010471975 (the float (- (current-time) (the-as time-frame (the int (-> self start-dip-time)))))) + ) + ) + ) + (when (< (seconds 1) (- (current-time) (the-as time-frame (the int (-> self start-dip-time))))) + (set! (-> self start-dip-time) -1.0) + (set! (-> self root trans y) (-> self start-height)) + (format 0 "end-dip~%") + ) + (set! (-> self root trans y) (+ (* -10240.0 f30-0) (-> self start-height))) + (format 0 "processing-dip: ~f~%" f30-0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate rotate-plat (precur-platform-round) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (persist-with-delay *setting-control* 'pilot-exit (seconds 0.5) 'pilot-exit #f 0.0 0) + ) + (('ridden) + (when (< (-> self start-dip-time) 0.0) + (when (< (seconds 0.1) (- (current-time) (the-as time-frame (the int (-> self last-ridden-time))))) + (set! (-> self start-dip-time) (the float (current-time))) + (format 0 "start-dip~%") + ) + ) + (set! (-> self last-ridden-time) (the float (current-time))) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans rotate-platform-behavior + :code sleep-code + :post rider-post + ) + +;; definition for method 11 of type precur-platform-round +(defmethod init-from-entity! ((this precur-platform-round) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 71680.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 2) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 71680.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-16 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this start-dip-time) -1.0) + (set! (-> this start-height) (-> this root trans y)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-precur-platform-round" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (quaternion-copy! (-> this start-quat) (-> this root quat)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1314) this)) + (let* ((s5-2 (-> this part)) + (s4-2 (method-of-object s5-2 set-local-space-info)) + (s3-1 (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0)) + ) + (let ((v1-31 (process->handle this))) + (if (= v1-31 #f) + (set! v1-31 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-1) hand) (the-as handle v1-31)) + ) + (matrix-identity! (-> (the-as particle-local-space-info s3-1) mat-new)) + (matrix-identity! (-> (the-as particle-local-space-info s3-1) mat-prev)) + (set! (-> (the-as particle-local-space-info s3-1) flags) (part-local-space-flags)) + (s4-2 s5-2 (the-as particle-local-space-info s3-1)) + ) + (go (method-of-object this hidden-state)) + ) + +;; definition of type precur-door-d +(deftype precur-door-d (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type precur-door-d +(defmethod inspect ((this precur-door-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-d precur-door-d precur-door-d-lod0-jg precur-door-d-idle-ja + ((precur-door-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-d-explode precur-door-d precur-door-d-explode-lod0-jg precur-door-d-explode-idle-ja + ((precur-door-d-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; definition for symbol *precur-door-d-exploder-params*, type joint-exploder-static-params +(define *precur-door-d-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-door-d) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (case (-> s4-0 mode) + (('mech-punch 'crush) + (let ((s3-0 + (the-as attack-info (mem-copy! (the-as pointer (new 'stack-no-clear 'attack-info)) (the-as pointer s4-0) 168)) + ) + ) + (compute-intersect-info + s3-0 + s4-0 + self + (if (type? proc process-drawable) + proc + ) + (the-as touching-shapes-entry (-> block param 0)) + ) + (if (logtest? (-> s3-0 mask) (attack-mask intersection)) + (go-virtual die) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (let ((gp-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> self root trans)))) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion-rotate-local-y! s5-0 s5-0 16384.0) + (when (= (status-of-level-and-borrows *level* 'lmech #f) 'active) + (mech-target-spawn + (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :x 8192.0 :w 1.0) gp-0) + self + s5-0 + (-> self entity) + ) + (mech-target-spawn + (vector-matrix*! (new 'stack-no-clear 'vector) (new 'static 'vector :x -8192.0 :w 1.0) gp-0) + self + s5-0 + (-> self entity) + ) + ) + ) + ) + :exit (behavior () + (while (-> self child) + (deactivate (-> self child 0)) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate die (precur-door-d) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (sound-play "prec-break-door") + ) + :code (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-door-d-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-door-d-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (suspend) + (when (type? (-> self root) collide-shape) + (let ((v1-10 (-> self root root-prim))) + (set! (-> v1-10 prim-core collide-as) (collide-spec)) + (set! (-> v1-10 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type precur-door-d +(defmethod init-from-entity! ((this precur-door-d) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 2) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 71680.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 2) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 71680.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-12 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition for function precur-door-d-init-by-other +(defbehavior precur-door-d-init-by-other precur-door-d ((arg0 object) (arg1 entity-actor)) + (process-entity-set! self arg1) + (init-from-entity! self arg1) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-c precur-door-c precur-door-c-lod0-jg precur-door-c-idle-ja + ((precur-door-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-c-explode precur-door-c precur-door-c-explode-lod0-jg precur-door-c-explode-idle-ja + ((precur-door-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *precur-door-c-exploder-params*, type joint-exploder-static-params +(define *precur-door-c-exploder-params* + (new 'static 'joint-exploder-static-params + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition of type precur-door-c +(deftype precur-door-c (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + explode + ) + (:methods + (init-collision! (_type_) none) + (spawn-exploder (_type_) (pointer joint-exploder)) + ) + ) + +;; definition for method 3 of type precur-door-c +(defmethod inspect ((this precur-door-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for function precur-door-c-handler +(defbehavior precur-door-c-handler precur-door-c ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('spin 'dark-smack) + (go-virtual explode) + ) + ) + ) + ) + ) + +;; definition for method 23 of type precur-door-c +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod spawn-exploder ((this precur-door-c)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f0-0 (rand-vu-float-range 0.5 1.5)) + ) + (let ((v1-1 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-4 (-> this root trans))) + (let ((a1-2 *up-vector*)) + (let ((a2-1 0.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> a0-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> v1-1 quad) vf6) + ) + (vector-reset! s4-0) + (let ((a1-3 s4-0)) + (let ((v1-3 s4-0)) + (let ((a0-5 *up-vector*)) + (let ((a2-3 40960.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-3 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-3 quad) vf6) + ) + (let ((a1-4 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-4 s4-0)) + (let ((a0-6 *identity-vector*)) + (let ((a2-5 (* -204800.0 f0-0))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-4 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-4 quad) vf6) + ) + (let ((a0-7 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-5 *identity-vector*)) + (let ((a1-6 (* 204800.0 f0-0))) + (.mov vf7 a1-6) + ) + (.lvf vf5 (&-> v1-5 quad)) + ) + (.lvf vf4 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 0.3) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-precur-door-c-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *precur-door-c-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (precur-door-c) + :virtual #t + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (spawn-exploder self) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle (precur-door-c) + :virtual #t + :event precur-door-c-handler + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +;; definition for method 22 of type precur-door-c +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this precur-door-c)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-12 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type precur-door-c +(defmethod init-from-entity! ((this precur-door-c) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition (debug) for function hint-type->string +(defun-debug hint-type->string ((arg0 precur-hint-type)) + (case arg0 + (((precur-hint-type pickup-hint)) + "pickup-hint" + ) + (((precur-hint-type normal)) + "normal" + ) + (((precur-hint-type place-hint)) + "place-hint" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition of type task-manager-precur-tour +(deftype task-manager-precur-tour (task-manager) + ((hint-type precur-hint-type) + ) + ) + +;; definition for method 3 of type task-manager-precur-tour +(defmethod inspect ((this task-manager-precur-tour)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Thint-type: ~D~%" (-> this hint-type)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-precur-tour +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-precur-tour)) + (call-parent-method this) + (disable *screen-filter*) + (set-setting! 'gun-special-mode #t 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'music 'pretour 0.0 0) + (set! (-> this hint-type) (precur-hint-type normal)) + (none) + ) + +;; definition for method 30 of type task-manager-precur-tour +;; WARN: disable def twice: 12. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod taskman-event-handler ((this task-manager-precur-tour) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('pickup-hint) + (when (= (-> this hint-type) (precur-hint-type normal)) + (set! (-> this hint-type) (precur-hint-type pickup-hint)) + 0 + ) + ) + (('place-hint) + (when (= (-> this hint-type) (precur-hint-type pickup-hint)) + (let ((v0-0 (the-as object 1))) + (set! (-> this hint-type) (the-as precur-hint-type v0-0)) + v0-0 + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-precur-tour +;; WARN: Return type mismatch sound-id vs none. +(defmethod task-manager-method-26 ((this task-manager-precur-tour)) + (cond + ((= (-> this hint-type) (precur-hint-type pickup-hint)) + (talker-spawn-func (-> *talker-speech* 348) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this hint-type) (precur-hint-type place-hint)) + (talker-spawn-func (-> *talker-speech* 349) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this hint-type) (precur-hint-type normal)) + (talker-spawn-func (-> *talker-speech* 350) *entity-pool* (target-pos 0) (the-as region #f)) + (talker-spawn-func (-> *talker-speech* 141) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precura-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +;; definition of type precura-door-a +(deftype precura-door-a (process-drawable) + ((open-test pair) + (open-started time-frame) + (do-camera? symbol) + (open-frame float) + (precur-tour? symbol) + ) + (:state-methods + open + close + ) + (:methods + (precura-door-a-method-22 () none) + ) + ) + +;; definition for method 3 of type precura-door-a +(defmethod inspect ((this precura-door-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Topen-test: ~A~%" (-> this open-test)) + (format #t "~2Topen-started: ~D~%" (-> this open-started)) + (format #t "~2Tdo-camera?: ~A~%" (-> this do-camera?)) + (format #t "~2Topen-frame: ~f~%" (-> this open-frame)) + (format #t "~2Tprecur-tour?: ~A~%" (-> this precur-tour?)) + (label cfg-4) + this + ) + +;; definition for method 11 of type precura-door-a +(defmethod init-from-entity! ((this precura-door-a) (arg0 entity-actor)) + (set! (-> this open-started) 0) + (set! (-> this open-frame) 45.0) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-14 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this precur-tour?) (task-node-open? (game-task-node precursor-tour-generator-trigger))) + (set! (-> this open-test) + (the-as + pair + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this do-camera?) + (the-as + symbol + (and (res-lump-struct (-> this entity) 'camera-name structure) + (task-node-closed? (game-task-node precursor-tour-resolution)) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precura-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 1228800.0) + (go (method-of-object this close)) + ) + +;; failed to figure out what this is: +(defstate close (precura-door-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (when (script-eval (-> self open-test)) + (when (and (-> self precur-tour?) + (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (set-setting! 'entity-name "camera-420" 0.0 0) + (process-grab? *target* #f) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + (go-virtual open) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +;; definition for function precura-do-blur-if-more-than-dist-away +;; WARN: Return type mismatch int vs none. +(defun precura-do-blur-if-more-than-dist-away ((arg0 vector) (arg1 float)) + (let ((f0-0 (vector-vector-distance (target-pos 0) arg0))) + (when (< arg1 f0-0) + (persist-with-delay *setting-control* 'blur-a (seconds 2) 'blur-a 'abs 0.5 0) + (set! (-> *display* force-sync) (the-as uint 200)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate open (precura-door-a) + :virtual #t + :enter (behavior () + (cond + ((-> self precur-tour?) + (set-time! (-> self state-time)) + (set-time! (-> self open-started)) + ) + (else + (cond + ((and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (and (-> self do-camera?) (zero? (-> self open-started))) + ) + (precura-do-blur-if-more-than-dist-away (-> self root trans) 368640.0) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 900 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let* ((v1-19 (-> *game-info* sub-task-list (game-task-node precursor-destroy-ship-escape))) + (v1-21 (if (-> v1-19 manager) + (-> v1-19 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-21 + (send-event (handle->process v1-21) 'extra-time 1200) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set-time! (-> self open-started)) + ) + (else + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + ) + (set-time! (-> self state-time)) + ) + ) + ) + :code (behavior () + (when (-> self precur-tour?) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2.5)) + (suspend) + ) + ) + (remove-setting! 'entity-name) + (process-release? *target*) + ) + (sleep-code) + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= 0.0 (ja-frame-num 0)) + (sound-play "prec-door-open") + ) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0))) + ) + (transform-post) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-part_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-part_REF.gc new file mode 100644 index 0000000000..94b503ad6e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precura-part_REF.gc @@ -0,0 +1,799 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-precura-generator-explode + :id 1313 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4411 :period (seconds 10) :length (seconds 6)) + (sp-item 4412 :period (seconds 10) :length (seconds 2)) + (sp-item 4413 :period (seconds 15) :length (seconds 0.035)) + (sp-item 4414 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4411 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.2125 -0.2125) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 4415) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4415 + :init-specs ((:accel-x (meters -0.0033333334) 1 (meters 0.006666667)) + (:accel-y (meters -0.0033333334) 1 (meters 0.006666667)) + (:accel-z (meters -0.0033333334) 1 (meters 0.006666667)) + (:next-time (seconds 0.067) (seconds 0.03)) + (:next-launcher 4415) + ) + ) + +;; failed to figure out what this is: +(defpart 4412 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -8) (degrees 16)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4413 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.08888889) + (:fade-g -0.033333335) + (:fade-a -0.14222223 -0.14222223) + (:friction 0.999) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4414 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 40.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-platform-effect + :id 1314 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4417 :flags (sp7) :period (seconds 20) :length (seconds 2)) + (sp-item 4418 :flags (sp3 sp7) :binding 4416) + (sp-item 4419 :flags (sp3 sp7) :binding 4416) + (sp-item 4420 :flags (sp3 sp7) :binding 4416) + (sp-item 4421 :flags (sp3 sp7) :binding 4416) + (sp-item 4422 :flags (sp3 sp7) :binding 4416) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4416 :flags (sp2) :period (seconds 20) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4417 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 2.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 450)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 1)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64 -0.64) + (:friction 0.6 0.05) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + (:func 'spt-func-relative-pos) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function sparticle-track-joint-xz +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-joint-xz ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (the int (-> arg1 user-float))) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 launchrot x) (-> v1-3 x)) + (set! (-> arg2 launchrot z) (-> v1-3 z)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 4418 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +;; failed to figure out what this is: +(defpart 4419 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -1)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +;; failed to figure out what this is: +(defpart 4420 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +;; failed to figure out what this is: +(defpart 4421 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -3)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +;; failed to figure out what this is: +(defpart 4422 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:y (meters -4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 1.0) + (:a 1.0) + (:timer (seconds 5)) + (:flags ()) + (:userdata 4.0) + (:func 'sparticle-track-joint-xz) + ) + ) + +;; failed to figure out what this is: +(defpart 4416 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:z (meters 4.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.026666667) 1 (meters 0.053333335)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64 -0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpart 4423 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.5) + (:scale-x (meters 15) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 60.0) + (:fade-a -0.2 -0.2) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 4424 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 255.0) + (:a 60.0 10.0) + (:fade-a -0.36571428 -0.36571428) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 4425 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 20.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.9) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4426 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters -0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.36571428 -0.36571428) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-bomb-spawner + :id 1315 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4427) (sp-item 4428)) + ) + +;; failed to figure out what this is: +(defpart 4427 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.5)) + (:scale-y (meters 1.7)) + (:r 0.0 50.0) + (:g 50.0 32.0) + (:b 0.0 64.0) + (:a 32.0 64.0) + (:scalevel-y (meters 0.21333334)) + (:fade-a -1.6) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4428 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0.4)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 6)) + (:r 40.0 10.0) + (:g 70.0 10.0) + (:b 20.0 10.0) + (:a 70.0 5.0) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-shock-wave + :id 1316 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4429) (sp-item 4430)) + ) + +;; failed to figure out what this is: +(defpart 4429 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5) (meters 3)) + (:scale-y :copy scale-x) + (:r 84.0) + (:g 84.0) + (:b 255.0) + (:a 30.0 10.0) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4430 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gem-d-smoke + :id 1317 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4431 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4432 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20.4) (meters 1.4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 30.0) + (:a 128.0 55.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4431 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 34.0) + (:g 34.0) + (:b 64.0 34.0) + (:a 64.0 10.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-b -0.64) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gem-explosion + :id 1318 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6 sp7) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :scale (1.5 1.5 1.5) + :parts ((sp-item 4433 :flags (sp3)) + (sp-item 4434 :flags (sp3)) + (sp-item 4435 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4436 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4437 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4433 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4434 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4435 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -1) 2.0 (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 200.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4436 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -1) 2.0 (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 255.0) + (:vel-y (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.013333334)) + (:fade-r -1.7) + (:fade-g -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 4438) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4438 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.6666667) + (:friction 0.99) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-bulb-green-glow + :id 1319 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4439 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4439 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-bulb-green-glow-long + :id 1320 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4440 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4440 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-green-steam + :id 1321 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 4441 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4441 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.04) + (:z (meters 0) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 80.0) + (:a 0.0) + (:vel-y (meters 0.005925926)) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.000033333334) (meters 0.00006666667)) + (:accel-y (meters 0.00033333333) (meters 0.000033333334)) + (:accel-z (meters -0.000033333334) (meters 0.00006666667)) + (:friction 0.94) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 4442) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4442 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-green-glow-small + :id 1322 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4443 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4443 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precura-rtableb + :id 1323 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4444 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4444 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 90.0) + (:b 80.0) + (:a 70.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurc-mood_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurc-mood_REF.gc new file mode 100644 index 0000000000..abad8380d7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurc-mood_REF.gc @@ -0,0 +1,102 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type precurc-states +(deftype precurc-states (structure) + ((pulse pulse-state :inline) + ) + ) + +;; definition for method 3 of type precurc-states +(defmethod inspect ((this precurc-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'precurc-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (label cfg-4) + this + ) + +;; definition for function init-mood-precurc +(defun init-mood-precurc ((arg0 mood-context)) + (let ((v1-0 (the-as object (-> arg0 state)))) + (set! (-> (the-as precurc-states v1-0) pulse brightness) 1.0) + (set! (-> (the-as precurc-states v1-0) pulse target-brightness) 1.0) + (set! (-> (the-as precurc-states v1-0) pulse speed) 1.0) + ) + ) + +;; definition for function update-precurc-lights +;; WARN: Return type mismatch float vs none. +(defun update-precurc-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a0-1 (-> v1-0 0))) + (set! (-> a0-1 dir0 direction x) 0.0) + (set! (-> a0-1 dir0 direction y) 1.0) + (set! (-> a0-1 dir0 direction z) 0.0) + (set! (-> a0-1 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.5 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.25 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + (none) + ) + +;; definition for function update-mood-precurc +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-precurc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-precurc-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (let* ((v1-9 (-> *display* part-clock frame-counter)) + (f0-5 (* 218.45334 (the float (mod v1-9 300)))) + ) + (set! (-> arg0 times 3 w) (+ 0.875 (* 0.175 (cos f0-5)))) + ) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; definition for function precurc-activate +(defun precurc-activate ((arg0 level)) + (persist-with-delay + *setting-control* + 'precur-activate + (the-as time-frame (the-as uint #xb2d05e00)) + 'sky-type + 'star-field + 0.0 + 0 + ) + (none) + ) + +;; definition for function precur-deactivate +(defun precur-deactivate ((arg0 level)) + (persist-with-delay *setting-control* 'precur-activate 0 'sky-type #f 0.0 0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc new file mode 100644 index 0000000000..ca4c0f2fff --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc @@ -0,0 +1,495 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type precur-elevator +(deftype precur-elevator (elevator) + () + ) + +;; definition for method 3 of type precur-elevator +(defmethod inspect ((this precur-elevator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elevator inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-elevator precur-elevator precur-elevator-lod0-jg precur-elevator-idle-ja + ((precur-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 16) + ) + +;; definition for method 31 of type precur-elevator +(defmethod get-art-group ((this precur-elevator)) + (art-group-get-by-name *level* "skel-precur-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 47 of type precur-elevator +(defmethod elevator-method-47 ((this precur-elevator)) + (if *target* + (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) + (* 0.4 (-> this root root-prim prim-core world-sphere w)) + ) + #f + ) + ) + +;; definition for method 32 of type precur-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this precur-elevator)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 65536.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 65536.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-18 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 34 of type precur-elevator +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this precur-elevator)) + (set! (-> this sound-running-loop) (static-sound-spec "prec-elev-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "prec-elev-stop" :group 0)) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +;; definition of type precur-door-a +(deftype precur-door-a (process-drawable) + ((open-test pair) + (open-started time-frame) + (do-camera? symbol) + (open-frame float) + ) + (:state-methods + open + close + ) + (:methods + (precur-door-a-method-22 () none) + ) + ) + +;; definition for method 3 of type precur-door-a +(defmethod inspect ((this precur-door-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Topen-test: ~A~%" (-> this open-test)) + (format #t "~2Topen-started: ~D~%" (-> this open-started)) + (format #t "~2Tdo-camera?: ~A~%" (-> this do-camera?)) + (format #t "~2Topen-frame: ~f~%" (-> this open-frame)) + (label cfg-4) + this + ) + +;; definition for method 11 of type precur-door-a +(defmethod init-from-entity! ((this precur-door-a) (arg0 entity-actor)) + (set! (-> this open-started) 0) + (set! (-> this open-frame) 45.0) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-14 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this open-test) + (the-as + pair + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this do-camera?) + (the-as + symbol + (and (res-lump-struct (-> this entity) 'camera-name structure) + (and (not (script-eval (-> this open-test))) (task-node-closed? (game-task-node precursor-tour-resolution))) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precur-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this close)) + ) + +;; failed to figure out what this is: +(defstate close (precur-door-a) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (if (script-eval (-> self open-test)) + (go-virtual open) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate open (precur-door-a) + :virtual #t + :enter (behavior () + (cond + ((and (time-elapsed? (-> self state-time) (seconds 0.5)) (-> self do-camera?) (zero? (-> self open-started))) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 900 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let* ((v1-14 (-> *game-info* sub-task-list (game-task-node precursor-destroy-ship-escape))) + (v1-16 (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-16 + (send-event (handle->process v1-16) 'extra-time 900) + ) + ) + (set-time! (-> self open-started)) + ) + (else + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= 0.0 (ja-frame-num 0)) + (sound-play "prec-door-open") + ) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0) 0.5)) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-swingpole-pop precur-swingpole-pop precur-swingpole-pop-lod0-jg precur-swingpole-pop-idle-ja + ((precur-swingpole-pop-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 6 8) + ) + +;; definition of type precur-swingpole-pop +(deftype precur-swingpole-pop (swingpole) + ((root collide-shape :override) + (moving? symbol) + (player-grabbed? symbol) + (halfway? symbol) + (stopped-time time-frame) + (movedist float) + (tt float) + (paused-time time-frame) + (direction uint8) + ) + ) + +;; definition for method 3 of type precur-swingpole-pop +(defmethod inspect ((this precur-swingpole-pop)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type swingpole inspect))) + (t9-0 this) + ) + (format #t "~2Tmoving?: ~A~%" (-> this moving?)) + (format #t "~2Tplayer-grabbed?: ~A~%" (-> this player-grabbed?)) + (format #t "~2Thalfway?: ~A~%" (-> this halfway?)) + (format #t "~2Tstopped-time: ~D~%" (-> this stopped-time)) + (format #t "~2Tmovedist: ~f~%" (-> this movedist)) + (format #t "~2Ttt: ~f~%" (-> this tt)) + (format #t "~2Tpaused-time: ~D~%" (-> this paused-time)) + (format #t "~2Tdirection: ~D~%" (-> this direction)) + (label cfg-4) + this + ) + +;; definition for method 22 of type precur-swingpole-pop +;; INFO: Used lq/sq +(defmethod swingpole-method-22 ((this precur-swingpole-pop)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (-> this moving?) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> this node-list data 3))) + 0.0 + (cond + ((zero? (-> this paused-time)) + (+! (-> this tt) (* 0.5 (seconds-per-frame))) + (when (< 1.0 (-> this tt)) + (let ((f0-4 (-> this tt))) + (set! (-> this tt) (- f0-4 (* (the float (the int (/ f0-4 1.0))) 1.0))) + ) + (set-time! (-> this paused-time)) + ) + ) + (else + (when (time-elapsed? (-> this paused-time) (seconds 1)) + (set! (-> this paused-time) 0) + (sound-play "spike-retract") + (set! (-> this halfway?) #f) + ) + ) + ) + (when (and (not (-> this halfway?)) (< 0.5 (-> this tt))) + (set! (-> this halfway?) #t) + (sound-play "spike-reveal") + ) + (let ((f0-9 (cos (* 65536.0 (-> this tt))))) + (set! (-> this movedist) (* 20480.0 (+ -1.0 f0-9))) + ) + (set! (-> s5-0 quad) (-> this entity extra trans quad)) + (vector-normalize-copy! (-> this dir) (-> s4-0 bone transform fvec) 1.0) + ) + (let ((a1-3 s5-0)) + (let ((v1-30 s5-0)) + (let ((a0-12 (-> this dir))) + (let ((a2-3 (-> this movedist))) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-30 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-3 quad) vf6) + ) + (move-to-point! (-> this root) s5-0) + ) + (when (and (-> this moving?) + (< (fabs (-> this movedist)) 1228.8) + (< 122880.0 (vector-vector-distance (target-pos 0) (-> this entity extra trans))) + ) + (set! (-> this moving?) #f) + (set! (-> this player-grabbed?) #f) + (set-time! (-> this stopped-time)) + ) + ) + (when (-> this player-grabbed?) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this entity extra trans quad)) + (seek! (-> this movedist) 0.0 (* 36864.0 (seconds-per-frame))) + (let ((a1-7 s5-2)) + (let ((v1-48 s5-2)) + (let ((a0-21 (-> this dir))) + (let ((a2-5 (-> this movedist))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-21 quad)) + ) + (.lvf vf4 (&-> v1-48 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a1-7 quad) vf6) + ) + (move-to-point! (-> this root) s5-2) + ) + ) + (when (and (not (-> this moving?)) (and (not (-> this player-grabbed?)) + (time-elapsed? (-> this stopped-time) (seconds 0.5)) + (< (vector-vector-distance (target-pos 0) (-> this root trans)) 122880.0) + ) + ) + (set! (-> this moving?) #t) + (set! (-> this player-grabbed?) #f) + (set-time! (-> this stopped-time)) + ) + (call-parent-method this) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate idle (precur-swingpole-pop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (when (send-event proc 'pole-grab (-> block param 0)) + (go-virtual active (process->handle proc)) + (set! (-> self moving?) #f) + (set! (-> self player-grabbed?) #t) + (set-time! (-> self stopped-time)) + ) + #f + ) + ) + ) + :enter (behavior () + (set! (-> self player-grabbed?) #f) + (set! (-> self tt) 0.0) + (set! (-> self direction) (the-as uint 0)) + 0 + ) + :code (behavior () + (if (nonzero? (-> self draw)) + (ja-post) + ) + (update-transforms (-> self root)) + (until #f + (swingpole-method-22 self) + (suspend) + ) + #f + ) + ) + +;; definition for method 23 of type precur-swingpole-pop +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this precur-swingpole-pop)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 24576.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 24576.0 32768.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 24576.0 12288.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-12 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type precur-swingpole-pop +;; WARN: Return type mismatch symbol vs object. +(defmethod init-from-entity! ((this precur-swingpole-pop) (arg0 entity-actor)) + (call-parent-method this arg0) + (set! (-> this player-grabbed?) #f) + (set! (-> this moving?) #f) + (set-time! (-> this stopped-time)) + (set! (-> this halfway?) #f) + #f + ) + +;; definition for method 24 of type precur-swingpole-pop +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this precur-swingpole-pop)) + (the-as vector (-> this root root-prim prim-core)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurc-part_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurc-part_REF.gc new file mode 100644 index 0000000000..1a517e7769 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurc-part_REF.gc @@ -0,0 +1,152 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-precurc-bulb-green-glow + :id 1329 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4458 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4458 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurc-bulb-green-glow-long + :id 1330 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4459 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4459 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurc-green-steam + :id 1331 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 4460 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4460 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.04) + (:z (meters 0) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 80.0) + (:a 0.0) + (:vel-y (meters 0.005925926)) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.000033333334) (meters 0.00006666667)) + (:accel-y (meters 0.00033333333) (meters 0.000033333334)) + (:accel-z (meters -0.000033333334) (meters 0.00006666667)) + (:friction 0.94) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 4461) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4461 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurc-green-glow-small + :id 1332 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4462 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4462 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurc-purple-glow-small + :id 1333 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4463 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4463 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.5)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 90.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurd-obs_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurd-obs_REF.gc new file mode 100644 index 0000000000..c9b198a13b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurd-obs_REF.gc @@ -0,0 +1,2523 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-pre-tformer terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-tformer-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja + ((terraformer-leg-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 38 0 50) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-tformer-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja + ((terraformer-leg-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 61 0 68) + :origin-joint-index 4 + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-tformer-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja + ((terraformer-leg-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 25 0 75) + :origin-joint-index 5 + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-tformer-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja + ((terraformer-spike-lod0-mg (meters 20)) + (terraformer-spike-lod1-mg (meters 40)) + (terraformer-spike-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 40 20 35) + :origin-joint-index 3 + ) + +;; definition of type pre-tformer +(deftype pre-tformer (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type pre-tformer +(defmethod inspect ((this pre-tformer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (pre-tformer) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; definition for function pre-tformer-spawn-leg-a +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-a process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; definition for function pre-tformer-spawn-leg-b +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-b process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; definition for function pre-tformer-spawn-leg-c +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-leg-c process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; definition for function pre-tformer-spawn-spike +;; WARN: Return type mismatch object vs none. +(defbehavior pre-tformer-spawn-spike process-drawable () + (let ((gp-0 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-0 + (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-0) 'prefix "lf-") + ) + ) + (let ((gp-2 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-2 + (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-2) 'prefix "lm-") + ) + ) + (let ((gp-4 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-4 + (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-4) 'prefix "lr-") + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-6) 'prefix "rf-") + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-8) 'prefix "rm-") + ) + ) + (let ((gp-10 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-10 + (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim) + (send-event (ppointer->process gp-10) 'prefix "rr-") + ) + ) + (none) + ) + +;; definition for method 11 of type pre-tformer +(defmethod init-from-entity! ((this pre-tformer) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-pre-tformer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (pre-tformer-spawn-leg-a) + (pre-tformer-spawn-leg-b) + (pre-tformer-spawn-leg-c) + (pre-tformer-spawn-spike) + (go (method-of-object this idle)) + ) + +;; definition of type wall-window-big +(deftype wall-window-big (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wall-window-big +(defmethod inspect ((this wall-window-big)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wall-window-big precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja + ((precur-wall-window-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + ) + +;; definition for symbol *precurd-obs-shake-time*, type time-frame +(define *precurd-obs-shake-time* (the-as time-frame 0)) + +;; failed to figure out what this is: +(defstate idle (wall-window-big) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition for method 11 of type wall-window-big +(defmethod init-from-entity! ((this wall-window-big) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw lod-set lod 0 dist) 2048000.0) + (go (method-of-object this idle)) + ) + +;; definition for function wall-window-big-init-by-other +;; INFO: Used lq/sq +(defbehavior wall-window-big-init-by-other wall-window-big ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precurd-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja + ((precur-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 10) + ) + +;; definition of type precurd-door-a +(deftype precurd-door-a (com-airlock) + () + ) + +;; definition for method 3 of type precurd-door-a +(defmethod inspect ((this precurd-door-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type com-airlock inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 11 of type precurd-door-a +(defmethod init-from-entity! ((this precurd-door-a) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 40960.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-precurd-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +;; definition for symbol *precur-blocks-trigger-points*, type (array float) +(define *precur-blocks-trigger-points* (new 'static 'boxed-array :type float + 525926.4 + 880640.0 + 974028.8 + 1155891.2 + 1220198.4 + 1295564.8 + 1335296.0 + 1444249.6 + 1433190.4 + 1637990.4 + 1682227.2 + 1721958.4 + 1800601.6 + 1850982.4 + 1890713.6 + 1921843.2 + ) + ) + +;; definition for symbol *precur-path-trigger-points*, type (array float) +(define *precur-path-trigger-points* + (new 'static 'boxed-array :type float 532480.0 920780.8 1162854.4 1438924.8 1640038.4 1838284.8) + ) + +;; definition for symbol *precur-path-2nd-trigger-points*, type (array float) +(define *precur-path-2nd-trigger-points* + (new 'static 'boxed-array :type float 866713.6 1123123.2 1401241.6 1626112.0 1807155.2 2109849.5) + ) + +;; definition for symbol *precur-trigger-idx*, type int +(define *precur-trigger-idx* 0) + +;; definition for function precur-bridge-reset +(defun precur-bridge-reset () + #f + ) + +;; definition for function precur-bridge-path-trigger +;; INFO: Used lq/sq +(defun precur-bridge-path-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-path-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2048000.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +;; definition for function precur-bridge-path-2nd-trigger +;; INFO: Used lq/sq +(defun precur-bridge-path-2nd-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-path-2nd-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2129920.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +;; definition for function precur-bridge-blocks-trigger +;; INFO: Used lq/sq +(defun precur-bridge-blocks-trigger ((arg0 int)) + (when *target* + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (and (< (-> *precur-blocks-trigger-points* arg0) (-> gp-0 z)) + (< (-> gp-0 z) 2048000.0) + (< -40960.0 (-> gp-0 x)) + (< (-> gp-0 x) 94208.0) + (< 778240.0 (-> gp-0 y)) + (< (-> gp-0 y) 860160.0) + ) + ) + ) + ) + +;; definition for function precur-trigger-update +;; WARN: Return type mismatch int vs none. +(defun precur-trigger-update () + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-path-break precur-bridge-path-break precur-bridge-path-break-lod0-jg precur-bridge-path-break-idle-ja + ((precur-bridge-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.5381 1.3474 -23.1812 89.6366) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-a-path-break precur-bridge-a-path-break precur-bridge-a-path-break-lod0-jg precur-bridge-a-path-break-idle-ja + ((precur-bridge-a-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.2239 0 0.6457 39.9771) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-b-path-break precur-bridge-b-path-break precur-bridge-b-path-break-lod0-jg precur-bridge-b-path-break-idle-ja + ((precur-bridge-b-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0.5849 0 -0.1007 37.7788) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-c-path-break precur-bridge-c-path-break precur-bridge-c-path-break-lod0-jg precur-bridge-c-path-break-idle-ja + ((precur-bridge-c-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4207 0 1.3753 39.7237) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-d-path-break precur-bridge-d-path-break precur-bridge-d-path-break-lod0-jg precur-bridge-d-path-break-idle-ja + ((precur-bridge-d-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4207 0 1.3753 37.9194) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-e-path-break precur-bridge-e-path-break precur-bridge-e-path-break-lod0-jg precur-bridge-e-path-break-idle-ja + ((precur-bridge-e-path-break-lod0-mg (meters 999999))) + :bounds (static-spherem -0.0382 -0.0803 -0.1898 52.5007) + :origin-joint-index 3 + ) + +;; definition of type precur-bridge-path-break +(deftype precur-bridge-path-break (process-drawable) + ((root collide-shape :override) + (triggered? symbol) + (idx uint8) + (l-origin matrix :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (anim-1-time time-frame) + (delay-time time-frame) + (debris-handle handle) + ) + (:state-methods + idle + ) + (:methods + (precur-bridge-path-break-method-21 (_type_) none) + (init-collision! (_type_) none) + (get-skel (_type_) art-group) + (set-idx-by-name (_type_) none) + (precur-bridge-path-break-method-25 (_type_ vector) none) + (precur-bridge-path-break-method-26 (_type_) none) + (precur-bridge-path-break-method-27 (_type_) none) + ) + ) + +;; definition for method 3 of type precur-bridge-path-break +(defmethod inspect ((this precur-bridge-path-break)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttriggered?: ~A~%" (-> this triggered?)) + (format #t "~2Tidx: ~D~%" (-> this idx)) + (format #t "~2Tl-origin: #~%" (-> this l-origin)) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (format #t "~2Tanim-1-time: ~D~%" (-> this anim-1-time)) + (format #t "~2Tdelay-time: ~D~%" (-> this delay-time)) + (format #t "~2Tdebris-handle: ~D~%" (-> this debris-handle)) + (label cfg-7) + this + ) + +;; definition for method 27 of type precur-bridge-path-break +;; WARN: Return type mismatch int vs none. +(defmethod precur-bridge-path-break-method-27 ((this precur-bridge-path-break)) + 0 + (none) + ) + +;; definition for method 26 of type precur-bridge-path-break +;; WARN: Return type mismatch matrix vs none. +(defmethod precur-bridge-path-break-method-26 ((this precur-bridge-path-break)) + (let ((v1-1 (-> this node-list data 3))) + (matrix-4x4-inverse! (-> this l-origin) (-> v1-1 bone transform)) + ) + (none) + ) + +;; definition for method 25 of type precur-bridge-path-break +;; WARN: Return type mismatch int vs none. +(defmethod precur-bridge-path-break-method-25 ((this precur-bridge-path-break) (arg0 vector)) + (let ((s4-0 (-> this node-list data 3))) + (vector<-cspace! (new 'stack-no-clear 'vector) s4-0) + (matrix*! (the-as matrix arg0) (-> s4-0 bone transform) (-> this l-origin)) + ) + 0 + (none) + ) + +;; definition for method 24 of type precur-bridge-path-break +;; WARN: Return type mismatch int vs none. +(defmethod set-idx-by-name ((this precur-bridge-path-break)) + (let ((s5-0 (-> this name))) + (cond + ((string= s5-0 "precur-bridge-path-break-1") + (set! (-> this idx) (the-as uint 0)) + 0 + ) + ((string= s5-0 "precur-bridge-path-break-2") + (set! (-> this idx) (the-as uint 1)) + ) + ((string= s5-0 "precur-bridge-path-break-3") + (set! (-> this idx) (the-as uint 2)) + ) + ((string= s5-0 "precur-bridge-path-break-4") + (set! (-> this idx) (the-as uint 3)) + ) + ((string= s5-0 "precur-bridge-path-break-5") + (set! (-> this idx) (the-as uint 4)) + ) + ((string= s5-0 "precur-bridge-path-break-6") + (set! (-> this idx) (the-as uint 5)) + ) + ) + ) + (none) + ) + +;; definition for method 23 of type precur-bridge-path-break +(defmethod get-skel ((this precur-bridge-path-break)) + (let* ((v1-1 (-> this idx)) + (v0-0 (cond + ((zero? v1-1) + (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 1) + (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 2) + (art-group-get-by-name *level* "skel-precur-bridge-b-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 3) + (art-group-get-by-name *level* "skel-precur-bridge-c-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 4) + (art-group-get-by-name *level* "skel-precur-bridge-d-path-break" (the-as (pointer level) #f)) + ) + ((= v1-1 5) + (art-group-get-by-name *level* "skel-precur-bridge-e-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + +;; definition for method 22 of type precur-bridge-path-break +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this precur-bridge-path-break)) + (set! (-> this root) #f) + (let ((v1-0 (-> this idx))) + (cond + ((zero? v1-0) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 9) 0))) + (set! (-> s5-0 total-prims) (the-as uint 10)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 14492.058 5518.95 -94950.195 367151.5) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -3893.6577 286.3104 0.0 139815.73) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-14 transform-index) 4) + (set-vector! (-> v1-14 local-sphere) 0.0 79.4624 -1256.6528 98625.945) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-16 transform-index) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 1306.624 96.256 95901.29) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-18 transform-index) 6) + (set-vector! (-> v1-18 local-sphere) 2593.5872 -20.0704 0.0 104466.02) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-20 transform-index) 7) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 83188.53) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-22 transform-index) 8) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 127257.4) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-24 transform-index) 9) + (set-vector! (-> v1-24 local-sphere) -343.6544 47.104 928.9728 117174.27) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-26 transform-index) 10) + (set-vector! (-> v1-26 local-sphere) 0.0 -462.4384 0.0 70856.3) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-28 transform-index) 11) + (set-vector! (-> v1-28 local-sphere) 499.3024 366.1824 0.0 164432.69) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-31 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-31 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-31 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((= v1-0 1) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 1) 0))) + (set! (-> s5-1 total-prims) (the-as uint 2)) + (set! (-> s4-1 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) -5013.094 0.0 2644.787 163746.2) + (set! (-> s5-1 root-prim) s4-1) + ) + (pusher-init s5-1) + (let ((v1-44 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-44 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-44 transform-index) 3) + (set-vector! (-> v1-44 local-sphere) 0.0 0.0 1480.704 135834.83) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-47 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-47 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-47 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((= v1-0 2) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 1) 0))) + (set! (-> s5-2 total-prims) (the-as uint 2)) + (set! (-> s4-2 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 2395.7505 0.0 -412.4672 154741.97) + (set! (-> s5-2 root-prim) s4-2) + ) + (pusher-init s5-2) + (let ((v1-60 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-60 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-60 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-60 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-60 transform-index) 3) + (set-vector! (-> v1-60 local-sphere) 0.0 0.0 344.8832 153374.72) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-63 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-63 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-63 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((= v1-0 3) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 1) 0))) + (set! (-> s5-3 total-prims) (the-as uint 2)) + (set! (-> s4-3 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) -5819.187 0.0 5633.229 162708.28) + (set! (-> s5-3 root-prim) s4-3) + ) + (pusher-init s5-3) + (let ((v1-76 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-76 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-76 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-76 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-76 transform-index) 3) + (set-vector! (-> v1-76 local-sphere) 0.0 0.0 254.3616 131729.4) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-79 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-79 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-79 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((= v1-0 4) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 1) 0))) + (set! (-> s5-4 total-prims) (the-as uint 2)) + (set! (-> s4-4 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) -5819.187 0.0 5633.229 155317.86) + (set! (-> s5-4 root-prim) s4-4) + ) + (pusher-init s5-4) + (let ((v1-92 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-92 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-92 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-92 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-92 transform-index) 3) + (set-vector! (-> v1-92 local-sphere) 1553.2032 0.0 -466.944 123079.48) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-95 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-95 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-95 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((= v1-0 5) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0))) + (set! (-> s5-6 total-prims) (the-as uint 2)) + (set! (-> s4-5 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) -156.4672 -328.9088 -777.4208 215042.88) + (set! (-> s5-6 root-prim) s4-5) + ) + (pusher-init s5-6) + (let ((v1-108 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-108 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-108 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-108 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-108 transform-index) 3) + (set-vector! (-> v1-108 local-sphere) 1206.272 4508.4673 -5612.749 189132.39) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-111 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-111 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-111 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ) + ) + (when (not (-> this root)) + (let ((s5-7 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-mesh s5-7 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-6 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-6 transform-index) 0) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 4096000.0) + (set! (-> s5-7 total-prims) (the-as uint 1)) + (set! (-> s5-7 root-prim) s4-6) + ) + (pusher-init s5-7) + (set! (-> s5-7 nav-radius) (* 0.75 (-> s5-7 root-prim local-sphere w))) + (let ((v1-126 (-> s5-7 root-prim))) + (set! (-> s5-7 backup-collide-as) (-> v1-126 prim-core collide-as)) + (set! (-> s5-7 backup-collide-with) (-> v1-126 prim-core collide-with)) + ) + (set! (-> this root) s5-7) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (precur-bridge-path-break) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :trans (behavior () + (rider-trans) + ) + :code sleep-code + :post (behavior () + (cond + ((task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + (if (not (handle->process (-> self debris-handle))) + (set! (-> self debris-handle) (process->handle (process-by-name "precurd-debris-part-1" *active-pool*))) + ) + (send-event (handle->process (-> self debris-handle)) 'start) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) -1000.0) + ) + (else + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (precur-bridge-path-break-method-25 self gp-0) + (dotimes (s5-0 (-> self actor-group-count)) + (let ((s4-0 (-> self actor-group s5-0))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'xform) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-5 send-event-function) + (v1-33 (-> s4-0 data s3-0 actor)) + ) + (t9-5 + (if v1-33 + (-> v1-33 extra process) + ) + a1-5 + ) + ) + ) + ) + ) + ) + ) + (when (precur-bridge-reset) + (ja :num-func num-func-identity :frame-num 0.0) + (set! (-> self triggered?) #f) + ) + (when *debug-segment* + (if (zero? (-> self idx)) + (precur-trigger-update) + ) + ) + (when (and (-> self triggered?) (ja-done? 0) (zero? (-> self anim-1-time))) + (ja :group! precur-bridge-path-break-idle2-ja :num! min) + (set-time! (-> self anim-1-time)) + (set! (-> self triggered?) #f) + ) + (when (and (not (-> self triggered?)) + (nonzero? (-> self anim-1-time)) + (or (precur-bridge-path-2nd-trigger (the-as int (-> self idx))) + (time-elapsed? (-> self anim-1-time) (-> self delay-time)) + ) + ) + (sound-play "plat-fall") + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 1) (seconds 2)))) + (set! (-> self triggered?) #t) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (when (and (precur-bridge-path-trigger (the-as int (-> self idx))) + (zero? (-> self anim-1-time)) + (not (-> self triggered?)) + ) + (sound-play "plat-separate") + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 2) (seconds 3)))) + (set! (-> self triggered?) #t) + ) + (when (and (< *precurd-obs-shake-time* (current-time)) (precur-bridge-path-trigger 0)) + (sound-play "plat-shake") + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 3) (seconds 4)))) + ) + (if (-> self triggered?) + (ja :num! (seek!)) + ) + (if (not (-> self triggered?)) + (ja :num-func num-func-identity :frame-num 0.0) + ) + (rider-post) + (if (= (-> self l-origin trans x) 0.0) + (precur-bridge-path-break-method-26 self) + ) + ) + ) + +;; definition for symbol *precur-path-delay-time*, type (array float) +(define *precur-path-delay-time* (new 'static 'boxed-array :type float 6.7 4.9 5.25 3.0 2.7 4.5)) + +;; definition for symbol *precurd-blow-snd-id*, type sound-id +(define *precurd-blow-snd-id* (new 'static 'sound-id)) + +;; definition for function precur-play-blow-sound +;; WARN: Return type mismatch int vs none. +(defun precur-play-blow-sound () + (when (and (zero? *precurd-blow-snd-id*) + (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + ) + (set! *precurd-blow-snd-id* (new-sound-id)) + (sound-play "prec-blow-amb" :id *precurd-blow-snd-id* :pitch 1 :position (target-pos 0)) + ) + 0 + (none) + ) + +;; definition for function precur-stop-blow-sound +;; WARN: Return type mismatch int vs none. +(defun precur-stop-blow-sound () + (when (nonzero? *precurd-blow-snd-id*) + (sound-stop *precurd-blow-snd-id*) + (set! *precurd-blow-snd-id* (new 'static 'sound-id)) + 0 + ) + (none) + ) + +;; definition for method 11 of type precur-bridge-path-break +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this precur-bridge-path-break) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set-idx-by-name this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this anim-1-time) 0) + (set! (-> this delay-time) + (the-as time-frame (the int (* 300.0 (-> *precur-path-delay-time* (-> this idx))))) + ) + (set! (-> this debris-handle) (the-as handle #f)) + (precur-bridge-reset) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-13 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (set! (-> this draw lod-set lod 1 dist) 14336000.0) + (set! (-> this draw lod-set lod 2 dist) 14336000.0) + (set! (-> this triggered?) #f) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-16 param 0) 1.0) + (set! (-> a0-16 frame-num) 0.0) + (joint-control-channel-group! + a0-16 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (precur-stop-blow-sound) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-a-blocks-break precur-bridge-a-blocks-break precur-bridge-a-blocks-break-lod0-jg precur-bridge-a-blocks-break-idle-ja + ((precur-bridge-a-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 9.0334 0.2107 -3.8519 494.66) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-b-blocks-break precur-bridge-b-blocks-break precur-bridge-b-blocks-break-lod0-jg precur-bridge-b-blocks-break-idle-ja + ((precur-bridge-b-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.4472 -1.3478 -0.911 304.626) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-c-blocks-break precur-bridge-c-blocks-break precur-bridge-c-blocks-break-lod0-jg precur-bridge-c-blocks-break-idle-ja + ((precur-bridge-c-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 9.998 -0.1649 -1.0795 294.914) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-d-blocks-break precur-bridge-d-blocks-break precur-bridge-d-blocks-break-lod0-jg precur-bridge-d-blocks-break-idle-ja + ((precur-bridge-d-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 1.386 -0.0346 -10.9652 321.94598) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-e-blocks-break precur-bridge-e-blocks-break precur-bridge-e-blocks-break-lod0-jg precur-bridge-e-blocks-break-idle-ja + ((precur-bridge-e-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 1.0517 -0.4516 -13.2966 452.576) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-f-blocks-break precur-bridge-f-blocks-break precur-bridge-f-blocks-break-lod0-jg precur-bridge-f-blocks-break-idle-ja + ((precur-bridge-f-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.9763 -0.4431 -3.0526 228.36398) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-g-blocks-break precur-bridge-g-blocks-break precur-bridge-g-blocks-break-lod0-jg precur-bridge-g-blocks-break-idle-ja + ((precur-bridge-g-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 86.51) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-h-blocks-break precur-bridge-h-blocks-break precur-bridge-h-blocks-break-lod0-jg precur-bridge-h-blocks-break-idle-ja + ((precur-bridge-h-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.1676 0.2012 -9.3751 356.966) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-i-blocks-break precur-bridge-i-blocks-break precur-bridge-i-blocks-break-lod0-jg precur-bridge-i-blocks-break-idle-ja + ((precur-bridge-i-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 6.7898 0.0443 0.6402 296.336) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-j-blocks-break precur-bridge-j-blocks-break precur-bridge-j-blocks-break-lod0-jg precur-bridge-j-blocks-break-idle-ja + ((precur-bridge-j-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -1.4829 0.4836 -4.9468 330.75598) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-k-blocks-break precur-bridge-k-blocks-break precur-bridge-k-blocks-break-lod0-jg precur-bridge-k-blocks-break-idle-ja + ((precur-bridge-k-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0.576 0.5238 -9.0496 389.09198) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-l-blocks-break precur-bridge-l-blocks-break precur-bridge-l-blocks-break-lod0-jg precur-bridge-l-blocks-break-idle-ja + ((precur-bridge-l-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 2.2279 0.4542 -7.9808 363.432) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-m-blocks-break precur-bridge-m-blocks-break precur-bridge-m-blocks-break-lod0-jg precur-bridge-m-blocks-break-idle-ja + ((precur-bridge-m-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -3.1801 0.1337 -7.183 346.85797) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-n-blocks-break precur-bridge-n-blocks-break precur-bridge-n-blocks-break-lod0-jg precur-bridge-n-blocks-break-idle-ja + ((precur-bridge-n-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem -3.7999 0.003 -5.6982 302.406) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-o-blocks-break precur-bridge-o-blocks-break precur-bridge-o-blocks-break-lod0-jg precur-bridge-o-blocks-break-idle-ja + ((precur-bridge-o-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.0848 0.5307 -13.0752 387.26398) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-bridge-p-blocks-break precur-bridge-p-blocks-break precur-bridge-p-blocks-break-lod0-jg precur-bridge-p-blocks-break-idle-ja + ((precur-bridge-p-blocks-break-lod0-mg (meters 999999))) + :bounds (static-spherem 3.2394 0.174 -3.3591 299.408) + :origin-joint-index 3 + ) + +;; definition of type precur-bridge-blocks-break +(deftype precur-bridge-blocks-break (process-drawable) + ((root collide-shape :override) + (triggered? symbol) + (idx uint8) + (snds sound-id 5) + (toe-up? symbol 5) + ) + (:state-methods + idle + ) + (:methods + (precur-bridge-blocks-break-method-21 (_type_) none) + (init-collision! (_type_) none) + (init-collision2! (_type_) none) + (get-skel (_type_) art-group) + (set-idx-by-name (_type_) none) + ) + ) + +;; definition for method 3 of type precur-bridge-blocks-break +(defmethod inspect ((this precur-bridge-blocks-break)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttriggered?: ~A~%" (-> this triggered?)) + (format #t "~2Tidx: ~D~%" (-> this idx)) + (format #t "~2Tsnds[5] @ #x~X~%" (-> this snds)) + (format #t "~2Ttoe-up?[5] @ #x~X~%" (-> this toe-up?)) + (label cfg-4) + this + ) + +;; definition for method 25 of type precur-bridge-blocks-break +;; WARN: Return type mismatch int vs none. +(defmethod set-idx-by-name ((this precur-bridge-blocks-break)) + (let ((s5-0 (-> this name))) + (cond + ((string= s5-0 "precur-bridge-blocks-break-1") + (set! (-> this idx) (the-as uint 0)) + 0 + ) + ((string= s5-0 "precur-bridge-blocks-break-2") + (set! (-> this idx) (the-as uint 1)) + ) + ((string= s5-0 "precur-bridge-blocks-break-3") + (set! (-> this idx) (the-as uint 2)) + ) + ((string= s5-0 "precur-bridge-blocks-break-4") + (set! (-> this idx) (the-as uint 3)) + ) + ((string= s5-0 "precur-bridge-blocks-break-5") + (set! (-> this idx) (the-as uint 4)) + ) + ((string= s5-0 "precur-bridge-blocks-break-6") + (set! (-> this idx) (the-as uint 5)) + ) + ((string= s5-0 "precur-bridge-blocks-break-7") + (set! (-> this idx) (the-as uint 6)) + ) + ((string= s5-0 "precur-bridge-blocks-break-8") + (set! (-> this idx) (the-as uint 7)) + ) + ((string= s5-0 "precur-bridge-blocks-break-9") + (set! (-> this idx) (the-as uint 8)) + ) + ((string= s5-0 "precur-bridge-blocks-break-10") + (set! (-> this idx) (the-as uint 9)) + ) + ((string= s5-0 "precur-bridge-blocks-break-11") + (set! (-> this idx) (the-as uint 10)) + ) + ((string= s5-0 "precur-bridge-blocks-break-12") + (set! (-> this idx) (the-as uint 11)) + ) + ((string= s5-0 "precur-bridge-blocks-break-13") + (set! (-> this idx) (the-as uint 12)) + ) + ((string= s5-0 "precur-bridge-blocks-break-14") + (set! (-> this idx) (the-as uint 13)) + ) + ((string= s5-0 "precur-bridge-blocks-break-15") + (set! (-> this idx) (the-as uint 14)) + ) + ((string= s5-0 "precur-bridge-blocks-break-16") + (set! (-> this idx) (the-as uint 15)) + ) + ) + ) + (none) + ) + +;; definition for method 24 of type precur-bridge-blocks-break +(defmethod get-skel ((this precur-bridge-blocks-break)) + (let* ((v1-1 (-> this idx)) + (v0-0 (cond + ((zero? v1-1) + (art-group-get-by-name *level* "skel-precur-bridge-a-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 1) + (art-group-get-by-name *level* "skel-precur-bridge-b-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 2) + (art-group-get-by-name *level* "skel-precur-bridge-c-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 3) + (art-group-get-by-name *level* "skel-precur-bridge-d-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 4) + (art-group-get-by-name *level* "skel-precur-bridge-e-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 5) + (art-group-get-by-name *level* "skel-precur-bridge-f-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 6) + (art-group-get-by-name *level* "skel-precur-bridge-g-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 7) + (art-group-get-by-name *level* "skel-precur-bridge-h-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 8) + (art-group-get-by-name *level* "skel-precur-bridge-i-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 9) + (art-group-get-by-name *level* "skel-precur-bridge-j-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 10) + (art-group-get-by-name *level* "skel-precur-bridge-k-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 11) + (art-group-get-by-name *level* "skel-precur-bridge-l-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 12) + (art-group-get-by-name *level* "skel-precur-bridge-m-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 13) + (art-group-get-by-name *level* "skel-precur-bridge-n-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 14) + (art-group-get-by-name *level* "skel-precur-bridge-o-blocks-break" (the-as (pointer level) #f)) + ) + ((= v1-1 15) + (art-group-get-by-name *level* "skel-precur-bridge-p-blocks-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f)) + ) + ) + ) + ) + +;; definition for method 23 of type precur-bridge-blocks-break +;; WARN: Return type mismatch int vs none. +(defmethod init-collision2! ((this precur-bridge-blocks-break)) + (set! (-> this root) #f) + (case (-> this idx) + ((8) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 27811.021 181.4528 2622.2593 60689.613) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid deadly)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -4582.605 0.0 0.0 17555.047) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 2863.923 0.0 131.072 32398.951) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 3861.2993 0.0 0.0 20425.523) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-17 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((9) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0))) + (set! (-> s5-1 total-prims) (the-as uint 4)) + (set! (-> s4-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid deadly)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) -6073.9585 1980.8256 -20262.094 67738.83) + (set! (-> s5-1 root-prim) s4-1) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 1085.8496 31956.992) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 -3903.8977 18616.73) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 5) + (set-vector! (-> v1-32 local-sphere) -4066.9185 0.0 0.0 18914.1) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-35 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((10) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0))) + (set! (-> s5-2 total-prims) (the-as uint 4)) + (set! (-> s4-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid deadly)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 2359.296 2145.4849 -37067.16 79686.04) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid deadly)) + (set! (-> v1-46 transform-index) 3) + (set-vector! (-> v1-46 local-sphere) 3346.8416 0.0 3758.4895 21093.172) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid deadly)) + (set! (-> v1-48 transform-index) 4) + (set-vector! (-> v1-48 local-sphere) 0.0 0.0 -3421.389 22275.277) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid deadly)) + (set! (-> v1-50 transform-index) 5) + (set-vector! (-> v1-50 local-sphere) 3240.3457 0.0 2986.3936 32168.756) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-53 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((11) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 3) 0))) + (set! (-> s5-3 total-prims) (the-as uint 4)) + (set! (-> s4-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid deadly)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) 9125.479 1860.4032 -32689.357 74430.875) + (set! (-> s5-3 root-prim) s4-3) + ) + (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-64 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-64 prim-core action) (collide-action solid deadly)) + (set! (-> v1-64 transform-index) 3) + (set-vector! (-> v1-64 local-sphere) -2207.3345 0.0 4195.5327 31714.51) + ) + (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-66 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-66 prim-core action) (collide-action solid deadly)) + (set! (-> v1-66 transform-index) 4) + (set-vector! (-> v1-66 local-sphere) 0.0 0.0 442.368 17464.934) + ) + (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-68 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-68 prim-core action) (collide-action solid deadly)) + (set! (-> v1-68 transform-index) 5) + (set-vector! (-> v1-68 local-sphere) 0.0 0.0 396.0832 30894.898) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-71 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-71 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-71 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((12) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0))) + (set! (-> s5-4 total-prims) (the-as uint 4)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid deadly)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) -13025.689 547.6352 -29421.568 71036.516) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-82 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-82 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-82 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-82 prim-core action) (collide-action solid deadly)) + (set! (-> v1-82 transform-index) 3) + (set-vector! (-> v1-82 local-sphere) 0.0 0.0 1914.0608 20204.34) + ) + (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-84 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-84 prim-core action) (collide-action solid deadly)) + (set! (-> v1-84 transform-index) 4) + (set-vector! (-> v1-84 local-sphere) 0.0 0.0 278.528 35575.4) + ) + (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-86 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-86 prim-core action) (collide-action solid deadly)) + (set! (-> v1-86 transform-index) 5) + (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -3116.6465 29947.904) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-89 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-89 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-89 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((13) + (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0))) + (set! (-> s5-5 total-prims) (the-as uint 4)) + (set! (-> s4-5 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid deadly)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) -15564.391 12.288 -23339.828 61932.75) + (set! (-> s5-5 root-prim) s4-5) + ) + (let ((v1-100 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-100 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-100 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-100 prim-core action) (collide-action solid deadly)) + (set! (-> v1-100 transform-index) 3) + (set-vector! (-> v1-100 local-sphere) 0.0 0.0 4241.8174 19154.535) + ) + (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-102 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-102 prim-core action) (collide-action solid deadly)) + (set! (-> v1-102 transform-index) 4) + (set-vector! (-> v1-102 local-sphere) 0.0 0.0 762.2656 34124.188) + ) + (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-104 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-104 prim-core action) (collide-action solid deadly)) + (set! (-> v1-104 transform-index) 5) + (set-vector! (-> v1-104 local-sphere) 0.0 0.0 0.0 21233.664) + ) + (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w))) + (let ((v1-107 (-> s5-5 root-prim))) + (set! (-> s5-5 backup-collide-as) (-> v1-107 prim-core collide-as)) + (set! (-> s5-5 backup-collide-with) (-> v1-107 prim-core collide-with)) + ) + (set! (-> this root) s5-5) + ) + ) + ((14) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 4) 0))) + (set! (-> s5-6 total-prims) (the-as uint 5)) + (set! (-> s4-6 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid deadly)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 12635.341 2173.7473 -53556.02 79311.664) + (set! (-> s5-6 root-prim) s4-6) + ) + (let ((v1-118 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-118 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-118 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-118 prim-core action) (collide-action solid deadly)) + (set! (-> v1-118 transform-index) 3) + (set-vector! (-> v1-118 local-sphere) -2649.7024 0.0 0.0 17005.773) + ) + (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-120 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-120 prim-core action) (collide-action solid deadly)) + (set! (-> v1-120 transform-index) 4) + (set-vector! (-> v1-120 local-sphere) -2694.3489 0.0 -2862.285 16540.057) + ) + (let ((v1-122 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-122 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-122 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-122 prim-core action) (collide-action solid deadly)) + (set! (-> v1-122 transform-index) 5) + (set-vector! (-> v1-122 local-sphere) -5552.128 0.0 -3180.544 30642.586) + ) + (let ((v1-124 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-124 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-124 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-124 prim-core action) (collide-action solid deadly)) + (set! (-> v1-124 transform-index) 6) + (set-vector! (-> v1-124 local-sphere) 0.0 0.0 -3341.5168 31176.703) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-127 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-127 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-127 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ((15) + (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 2) 0))) + (set! (-> s5-8 total-prims) (the-as uint 3)) + (set! (-> s4-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-7 prim-core action) (collide-action solid deadly)) + (set! (-> s4-7 transform-index) 3) + (set-vector! (-> s4-7 local-sphere) 13268.582 712.704 -13758.874 61318.758) + (set! (-> s5-8 root-prim) s4-7) + ) + (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-138 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-138 prim-core action) (collide-action solid deadly)) + (set! (-> v1-138 transform-index) 3) + (set-vector! (-> v1-138 local-sphere) -3382.8865 0.0 1936.1792 32668.057) + ) + (let ((v1-140 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-140 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-140 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-140 prim-core action) (collide-action solid deadly)) + (set! (-> v1-140 transform-index) 4) + (set-vector! (-> v1-140 local-sphere) 3927.2449 0.0 4255.744 35694.594) + ) + (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w))) + (let ((v1-143 (-> s5-8 root-prim))) + (set! (-> s5-8 backup-collide-as) (-> v1-143 prim-core collide-as)) + (set! (-> s5-8 backup-collide-with) (-> v1-143 prim-core collide-with)) + ) + (set! (-> this root) s5-8) + ) + ) + ) + (when (not (-> this root)) + (format 0 "Unknown entity ~S found in precurd-obs~%" (-> this name)) + (let ((s5-9 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-149 (new 'process 'collide-shape-prim-mesh s5-9 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-149 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-149 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-149 prim-core action) (collide-action solid deadly)) + (set! (-> v1-149 transform-index) 0) + (set-vector! (-> v1-149 local-sphere) 0.0 0.0 0.0 4096000.0) + (set! (-> s5-9 total-prims) (the-as uint 1)) + (set! (-> s5-9 root-prim) v1-149) + ) + (set! (-> s5-9 nav-radius) (* 0.75 (-> s5-9 root-prim local-sphere w))) + (let ((v1-152 (-> s5-9 root-prim))) + (set! (-> s5-9 backup-collide-as) (-> v1-152 prim-core collide-as)) + (set! (-> s5-9 backup-collide-with) (-> v1-152 prim-core collide-with)) + ) + (set! (-> this root) s5-9) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type precur-bridge-blocks-break +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this precur-bridge-blocks-break)) + (set! (-> this root) #f) + (let ((v1-0 (-> this idx))) + (cond + ((zero? v1-0) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 37000.805 863.0272 -15777.383 101306.37) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid deadly)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -1275.904 -155.2384 -2952.3967 31805.85) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) -1967.3088 0.0 -330.5472 33507.33) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 20190.004) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-17 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + ) + ((= v1-0 1) + (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0))) + (set! (-> s5-1 total-prims) (the-as uint 4)) + (set! (-> s4-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-1 prim-core action) (collide-action solid deadly)) + (set! (-> s4-1 transform-index) 3) + (set-vector! (-> s4-1 local-sphere) 14119.731 -5520.589 -3731.456 62387.406) + (set! (-> s5-1 root-prim) s4-1) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) -3164.5696 0.0 1624.4736 28662.17) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 625.4592 0.0 2129.92 30461.133) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 5) + (set-vector! (-> v1-32 local-sphere) -2308.9153 0.0 989.184 18648.27) + ) + (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w))) + (let ((v1-35 (-> s5-1 root-prim))) + (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-1) + ) + ) + ((= v1-0 2) + (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0))) + (set! (-> s5-2 total-prims) (the-as uint 4)) + (set! (-> s4-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-2 prim-core action) (collide-action solid deadly)) + (set! (-> s4-2 transform-index) 3) + (set-vector! (-> s4-2 local-sphere) 40951.81 -675.4304 -4421.632 60398.387) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid deadly)) + (set! (-> v1-46 transform-index) 3) + (set-vector! (-> v1-46 local-sphere) 0.0 0.0 3322.2656 19020.596) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid deadly)) + (set! (-> v1-48 transform-index) 4) + (set-vector! (-> v1-48 local-sphere) -5020.0576 0.0 3517.6448 19905.332) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid deadly)) + (set! (-> v1-50 transform-index) 5) + (set-vector! (-> v1-50 local-sphere) 0.0 0.0 1477.4272 31325.799) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-53 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with)) + ) + (set! (-> this root) s5-2) + ) + ) + ((= v1-0 3) + (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 4) 0))) + (set! (-> s5-3 total-prims) (the-as uint 5)) + (set! (-> s4-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-3 prim-core action) (collide-action solid deadly)) + (set! (-> s4-3 transform-index) 3) + (set-vector! (-> s4-3 local-sphere) 5677.056 -141.7216 -44913.46 65934.54) + (set! (-> s5-3 root-prim) s4-3) + ) + (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-64 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-64 prim-core action) (collide-action solid deadly)) + (set! (-> v1-64 transform-index) 3) + (set-vector! (-> v1-64 local-sphere) 0.0 0.0 888.0128 17994.137) + ) + (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-66 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-66 prim-core action) (collide-action solid deadly)) + (set! (-> v1-66 transform-index) 4) + (set-vector! (-> v1-66 local-sphere) 0.0 0.0 -607.4368 28441.395) + ) + (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-68 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-68 prim-core action) (collide-action solid deadly)) + (set! (-> v1-68 transform-index) 5) + (set-vector! (-> v1-68 local-sphere) 0.0 0.0 91.3408 16444.621) + ) + (let ((v1-70 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-70 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-70 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-70 prim-core action) (collide-action solid deadly)) + (set! (-> v1-70 transform-index) 6) + (set-vector! (-> v1-70 local-sphere) 0.0 0.0 3636.4287 17122.1) + ) + (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w))) + (let ((v1-73 (-> s5-3 root-prim))) + (set! (-> s5-3 backup-collide-as) (-> v1-73 prim-core collide-as)) + (set! (-> s5-3 backup-collide-with) (-> v1-73 prim-core collide-with)) + ) + (set! (-> this root) s5-3) + ) + ) + ((= v1-0 4) + (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0))) + (set! (-> s5-4 total-prims) (the-as uint 4)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-4 prim-core action) (collide-action solid deadly)) + (set! (-> s4-4 transform-index) 3) + (set-vector! (-> s4-4 local-sphere) 4307.763 -1849.7535 -54462.875 92687.56) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-84 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-84 prim-core action) (collide-action solid deadly)) + (set! (-> v1-84 transform-index) 3) + (set-vector! (-> v1-84 local-sphere) 3515.5967 0.0 -4386.4062 28917.35) + ) + (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-86 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-86 prim-core action) (collide-action solid deadly)) + (set! (-> v1-86 transform-index) 4) + (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -358.4 21415.527) + ) + (let ((v1-88 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-88 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-88 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-88 prim-core action) (collide-action solid deadly)) + (set! (-> v1-88 transform-index) 5) + (set-vector! (-> v1-88 local-sphere) 2953.216 0.0 -1265.2544 30869.914) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-91 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-91 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-91 prim-core collide-with)) + ) + (set! (-> this root) s5-4) + ) + ) + ((= v1-0 5) + (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0))) + (set! (-> s5-5 total-prims) (the-as uint 4)) + (set! (-> s4-5 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-5 prim-core action) (collide-action solid deadly)) + (set! (-> s4-5 transform-index) 3) + (set-vector! (-> s4-5 local-sphere) 16286.925 -1814.9376 -12503.449 46768.945) + (set! (-> s5-5 root-prim) s4-5) + ) + (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-102 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-102 prim-core action) (collide-action solid deadly)) + (set! (-> v1-102 transform-index) 3) + (set-vector! (-> v1-102 local-sphere) 0.0 0.0 3398.4512 18284.545) + ) + (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-104 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-104 prim-core action) (collide-action solid deadly)) + (set! (-> v1-104 transform-index) 4) + (set-vector! (-> v1-104 local-sphere) 3489.792 0.0 -1718.6816 18917.377) + ) + (let ((v1-106 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-106 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-106 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-106 prim-core action) (collide-action solid deadly)) + (set! (-> v1-106 transform-index) 5) + (set-vector! (-> v1-106 local-sphere) 0.0 0.0 1899.7249 32303.514) + ) + (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w))) + (let ((v1-109 (-> s5-5 root-prim))) + (set! (-> s5-5 backup-collide-as) (-> v1-109 prim-core collide-as)) + (set! (-> s5-5 backup-collide-with) (-> v1-109 prim-core collide-with)) + ) + (set! (-> this root) s5-5) + ) + ) + ((= v1-0 6) + (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0))) + (set! (-> s5-6 total-prims) (the-as uint 2)) + (set! (-> s4-6 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-6 prim-core action) (collide-action solid deadly)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 17717.248) + (set! (-> s5-6 root-prim) s4-6) + ) + (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-120 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-120 prim-core action) (collide-action solid deadly)) + (set! (-> v1-120 transform-index) 3) + (set-vector! (-> v1-120 local-sphere) 0.0 0.0 0.0 17717.248) + ) + (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w))) + (let ((v1-123 (-> s5-6 root-prim))) + (set! (-> s5-6 backup-collide-as) (-> v1-123 prim-core collide-as)) + (set! (-> s5-6 backup-collide-with) (-> v1-123 prim-core collide-with)) + ) + (set! (-> this root) s5-6) + ) + ) + ((= v1-0 7) + (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 3) 0))) + (set! (-> s5-8 total-prims) (the-as uint 4)) + (set! (-> s4-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-7 prim-core action) (collide-action solid deadly)) + (set! (-> s4-7 transform-index) 3) + (set-vector! (-> s4-7 local-sphere) -4782.4897 824.1152 -38400.41 73106.64) + (set! (-> s5-8 root-prim) s4-7) + ) + (let ((v1-134 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-134 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-134 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-134 prim-core action) (collide-action solid deadly)) + (set! (-> v1-134 transform-index) 3) + (set-vector! (-> v1-134 local-sphere) 2784.4607 0.0 1649.4592 22121.678) + ) + (let ((v1-136 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-136 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-136 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-136 prim-core action) (collide-action solid deadly)) + (set! (-> v1-136 transform-index) 4) + (set-vector! (-> v1-136 local-sphere) 3878.912 0.0 542.72 33871.87) + ) + (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-138 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-138 prim-core action) (collide-action solid deadly)) + (set! (-> v1-138 transform-index) 5) + (set-vector! (-> v1-138 local-sphere) 0.0 0.0 -4243.8657 22156.492) + ) + (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w))) + (let ((v1-141 (-> s5-8 root-prim))) + (set! (-> s5-8 backup-collide-as) (-> v1-141 prim-core collide-as)) + (set! (-> s5-8 backup-collide-with) (-> v1-141 prim-core collide-with)) + ) + (set! (-> this root) s5-8) + ) + ) + ) + ) + (if (not (-> this root)) + (init-collision2! this) + ) + 0 + (none) + ) + +;; definition for symbol *precurd-panel-tear-off-time*, type time-frame +(define *precurd-panel-tear-off-time* (the-as time-frame 0)) + +;; failed to figure out what this is: +(defstate idle (precur-bridge-blocks-break) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (if (not (-> *setting-control* user-current freeze-screen)) + (send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 30)) + (shove-up (meters 5)) + ) + ) + ) + ) + #f + ) + (('xform) + (let ((v1-9 (-> block param 0))) + (when (not (-> self triggered?)) + (set! (-> self root trans quad) (-> self entity extra trans quad)) + (vector+! (-> self root trans) (-> self root trans) (the-as vector (+ v1-9 48))) + ) + ) + ) + (('exit) + #t + ) + ) + ) + :enter (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :trans (behavior () + (if (-> *setting-control* user-current freeze-screen) + (rider-trans) + ) + ) + :code (behavior () + (until #f + (until (ja-max? 0) + (suspend) + ) + (dotimes (gp-0 5) + (sound-stop (-> self snds gp-0)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + #f + ) + :post (behavior () + (when (precur-bridge-reset) + (ja :num-func num-func-identity :frame-num 0.0) + (set! (-> self triggered?) #f) + ) + (if (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (when (and (precur-bridge-blocks-trigger (the-as int (-> self idx))) (not (ja-max? 0))) + (let* ((a0-8 (-> self root root-prim)) + (gp-0 a0-8) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (when (= (-> a0-8 type) collide-shape-prim-group) + (dotimes (s4-0 (the-as int (-> gp-0 specific 0))) + (set! (-> (new 'stack-no-clear 'vector) quad) + (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere quad) + ) + (set! (-> s5-0 quad) (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere quad)) + (when (and (not (-> self toe-up? s4-0)) (< 831488.0 (-> s5-0 y))) + (set! (-> self toe-up? s4-0) #t) + (when (time-elapsed? *precurd-panel-tear-off-time* (seconds 1)) + (set! *precurd-panel-tear-off-time* (current-time)) + (sound-play "panel-tear-off" :position s5-0) + ) + 0 + ) + (when (and (< (- (-> s5-0 z) (-> (target-pos 0) z)) 8192.0) (< s4-0 5)) + (when (and (< s4-0 5) (zero? (-> self snds s4-0))) + (set! (-> self snds s4-0) (new-sound-id)) + (sound-play "passby-whoosh" :id (-> self snds s4-0) :position s5-0) + 0 + ) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) s5-0 (-> s5-0 w) *color-blue*) + ) + ) + (when (not (-> self triggered?)) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (set! (-> self triggered?) #t) + (precur-play-blow-sound) + ) + ) + ) + ) + (if (-> self triggered?) + (ja :num! (seek!)) + ) + (transform-post) + ) + ) + +;; definition for method 11 of type precur-bridge-blocks-break +(defmethod init-from-entity! ((this precur-bridge-blocks-break) (arg0 entity-actor)) + (set-idx-by-name this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (if (string-suffix= (-> this name) "-1") + (set-setting! 'extra-bank '((precur1 precur4) (precur3 precur5)) 0.0 0) + ) + (dotimes (v1-10 5) + (set! (-> this snds v1-10) (new 'static 'sound-id)) + (set! (-> this toe-up? v1-10) #f) + ) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (set! (-> this draw lod-set lod 1 dist) 14336000.0) + (set! (-> this draw lod-set lod 2 dist) 14336000.0) + (set! (-> this triggered?) #f) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-13 (-> this skel root-channel 0))) + (set! (-> a0-13 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-13 param 0) 0.6) + (set! (-> a0-13 frame-num) 0.0) + (joint-control-channel-group! + a0-13 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurd-part_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurd-part_REF.gc new file mode 100644 index 0000000000..45d87e1566 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurd-part_REF.gc @@ -0,0 +1,201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-precur-debris-wind + :id 1309 + :flags (sp0 sp4 sp10) + :bounds (static-bspherem 0 0 0 500) + :parts ((sp-item 4401 :flags (is-3d sp7)) (sp-item 4402 :flags (sp7)) (sp-item 4403 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4401 + :init-specs ((:texture (crate-wood-01-splinter level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 0) (meters 50)) + (:z (meters -300)) + (:scale-x (meters 0.5) (meters 10)) + (:scale-y (meters 0.5) (meters 10)) + (:r 20.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-z (meters 0.6) (meters 0.06666667)) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:timer (seconds 2.5)) + (:flags (launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x400600 -743440384 -743440128 -743439872)) + (:next-time (seconds 0.335)) + (:next-launcher 4404) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4404 + :init-specs ((:r 20.0 50.0) + (:g :copy r) + (:b :copy r) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-y (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.017) (seconds 0.997)) + (:next-launcher 4405) + ) + ) + +;; failed to figure out what this is: +(defpart 4405 + :init-specs ((:r 255.0) + (:g :copy r) + (:b :copy r) + (:rotvel-x (degrees -5) (degrees 10)) + (:rotvel-y (degrees -5) (degrees 10)) + (:rotvel-z (degrees -5) (degrees 10)) + (:next-time (seconds 0.017)) + (:next-launcher 4404) + ) + ) + +;; failed to figure out what this is: +(defpart 4402 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 50)) + (:z (meters -300)) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.6) (meters 0.06666667)) + (:fade-a 0.06 0.06) + (:timer (seconds 2.5)) + (:flags ()) + (:next-time (seconds 0.335)) + (:next-launcher 4406) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4406 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 4403 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters 40) (meters 40)) + (:z (meters -300)) + (:scale-x (meters 20) (meters 40)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.6666667) (meters 0.06666667)) + (:fade-a 0.08 0.08) + (:timer (seconds 2.5)) + (:flags ()) + (:next-time (seconds 0.335)) + (:next-launcher 4406) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurd-bulb-green-glow-small + :id 1310 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4407 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4407 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurd-bulb-green-glow-long + :id 1311 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4408 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4409 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precurd-bulb-ceiling-glow + :id 1312 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4410 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4410 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 22) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 4.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/precurd-scenes_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurd-scenes_REF.gc new file mode 100644 index 0000000000..2c02f1a512 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/precurd-scenes_REF.gc @@ -0,0 +1,2611 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *beam-appearance-1*, type prim-beam-settings +(define *beam-appearance-1* (new 'static 'prim-beam-settings + :width 16384.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00500 + :num-tiles 4.0 + ) + ) + +;; definition for symbol *beam-appearance-2*, type prim-beam-settings +(define *beam-appearance-2* (new 'static 'prim-beam-settings + :width 16384.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00600 + :num-tiles 4.0 + ) + ) + +;; definition for symbol *beam-appearance-3*, type prim-beam-settings +(define *beam-appearance-3* (new 'static 'prim-beam-settings + :width 32768.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +;; definition for symbol *beam-appearance-4*, type prim-beam-settings +(define *beam-appearance-4* (new 'static 'prim-beam-settings + :width 32768.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +;; definition for symbol *beam-appearance-5*, type prim-beam-settings +(define *beam-appearance-5* (new 'static 'prim-beam-settings + :width 4096.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +;; definition for symbol *beam-appearance-6*, type prim-beam-settings +(define *beam-appearance-6* (new 'static 'prim-beam-settings + :width 81920.0 + :color (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + :alpha 1.0 + :tex-id #xd3b00400 + :num-tiles 4.0 + ) + ) + +;; definition of type precurd-states +(deftype precurd-states (structure) + ((pulse pulse-state :inline) + ) + ) + +;; definition for method 3 of type precurd-states +(defmethod inspect ((this precurd-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'precurd-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (label cfg-4) + this + ) + +;; definition for function init-mood-precurd +(defun init-mood-precurd ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +;; definition for function update-mood-precurd +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-precurd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let ((v1-0 (-> arg0 current-fog))) + (set! (-> v1-0 fog-color x) 41.0) + (set! (-> v1-0 fog-color y) 54.7998) + (set! (-> v1-0 fog-color z) 61.5998) + (set! (-> v1-0 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 131072.0 819200.0 255.0 158.0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-pulse arg0 1 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 2 w) 1.0) + (set! (-> arg0 times 3 w) 1.0) + (set! (-> arg0 times 4 w) 1.0) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-wall-window-big-fma precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja + ((precur-wall-window-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 4 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-planet-fma precur-planet precur-planet-lod0-jg precur-planet-idle-ja + ((precur-planet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-ship-break-precurd dm-ship-break dm-ship-break-lod0-jg dm-ship-break-idle-ja + ((dm-ship-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-ship-tent-brk-precurd dm-ship-tent-brk dm-ship-tent-brk-lod0-jg dm-ship-tent-brk-idle-ja + ((dm-ship-tent-brk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-head-precurd terraformer-head terraformer-head-lod0-jg terraformer-head-idle-ja + ((terraformer-head-lod0-mg (meters 20)) + (terraformer-head-lod0-mg (meters 40)) + (terraformer-head-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 150) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rail-gun-dark-precurd rail-gun-dark rail-gun-dark-lod0-jg rail-gun-dark-idle-ja + ((rail-gun-dark-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rail-gun-light-precurd rail-gun-light 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-precurd terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 20)) (terraformer-lod0-mg (meters 40)) (terraformer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-precurd-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja + ((terraformer-leg-a-lod0-mg (meters 20)) + (terraformer-leg-a-lod0-mg (meters 40)) + (terraformer-leg-a-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 38 0 50) + :shadow terraformer-leg-a-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-precurd-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja + ((terraformer-leg-b-lod0-mg (meters 20)) + (terraformer-leg-b-lod0-mg (meters 40)) + (terraformer-leg-b-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 61 0 68) + :shadow terraformer-leg-b-shadow-mg + :origin-joint-index 4 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-precurd-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja + ((terraformer-leg-c-lod0-mg (meters 20)) + (terraformer-leg-c-lod0-mg (meters 40)) + (terraformer-leg-c-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 25 0 75) + :shadow terraformer-leg-c-shadow-mg + :origin-joint-index 5 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-precurd-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja + ((terraformer-spike-lod0-mg (meters 20)) + (terraformer-spike-lod0-mg (meters 40)) + (terraformer-spike-lod0-mg (meters 999999)) + ) + :bounds (static-spherem 0 40 20 35) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-jakc-wings-precur jakc-wings jakc-wings-lod0-jg jakc-wings-idle-ja + ((jakc-wings-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; definition for function precurd-lightjak-do-effect +;; INFO: Used lq/sq +(defbehavior precurd-lightjak-do-effect process-drawable () + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (fmin 1.0 (-> self clock clock-ratio))) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 623) (sp-field-id spt-a)) initial-valuef) 16.0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 3)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 4)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 5)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 6)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 8)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 13)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 17)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 14)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 18)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 15)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 19)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 25)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 26)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 32)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 27)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 33)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 28)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 34)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 31)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 37)) :rate f30-0) + ) + (none) + ) + +;; definition for function precurd-lightjak-stop-effect +;; WARN: Return type mismatch draw-control-global-effect vs none. +(defbehavior precurd-lightjak-stop-effect process-drawable () + (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights no-textures)) + (none) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "precursor-destroy-ship-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-201" + :art-group "scenecamera" + :anim "precursor-destroy-ship-res" + :parts 37 + :command-list '((0 + (kill "wall-window-big-1") + (send-event *time-of-day* 'change 'ratio (float (new 'static 'bfloat))) + (send-event *time-of-day* 'change 'hour (int 23) (int 37)) + (send-event + "precur-planet-fma" + 'trans-hook + ,(lambda :behavior scene-player + () + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (none) + ) + ) + (apply + ,(lambda :behavior scene-player + () + (set-railx-light-brightness! 0 1.0 100000.0) + (set-railx-light-brightness! 1 1.0 100000.0) + (set-railx-light-brightness! 2 1.0 100000.0) + (set-railx-light-brightness! 3 0.0 100000.0) + (none) + ) + ) + ) + (816 + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 816 858) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 816 858) + ) + ) + (891) + (892 + (part-tracker + "group-dark-eco-gun-charge" + entity + "particleman" + joint + "particleZ" + track + #t + duration + (frame-range 892 1057) + ) + ) + (895 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (* 0.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (921 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (want-display 'precurd 'special) + (want-display 'railx 'display) + (send-event self 'change-entity "scene-stage-194") + (kill "rail-gun-dark-2") + (kill "rail-gun-light-2") + (kill "rail-warp-gate-2") + ) + (967 + (part-tracker + "group-light-eco-gun-charge" + entity + "particleman" + joint + "particleY" + track + #t + duration + (frame-range 967 1057) + ) + ) + (997 + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleG" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-3* + ) + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleY" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-2* + ) + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleF" + joint2 + "particleZ" + duration + (frame-range 997 1057) + beam-type + '*beam-appearance-1* + ) + (part-tracker + "group-beam-combine-flash" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 997 1057) + ) + ) + (998 (kill "rail-gun-dark-2") (kill "rail-gun-dark-3")) + (1058 + (want-display 'railx 'special) + (setting-reset borrow mode '((railx 0 lcitysml display))) + (setting-reset borrow mode '((railx 0 lcitysml display))) + (send-event self 'change-entity "scene-stage-202") + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1084 + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleH" + joint2 + "particleL" + duration + (frame-range 1084 1132) + beam-type + '*beam-appearance-4* + ) + (part-tracker + "group-final-beam-rise-mist" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-range 1083 1105) + ) + ) + (1133 + (want-display 'precurd 'display) + (setting-reset borrow mode '((railx 0 lcitysml special))) + (setting-unset sky-type) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1163 (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleB" + joint2 + "particleC" + duration + (frame-range 1163 1200) + beam-type + '*beam-appearance-5* + ) + ) + (1165 (part-tracker + "group-precursor-ship-beam-hit" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 1165 1185) + ) + ) + (1201 + (want-display 'precurd 'display) + (send-event self 'change-entity "scene-stage-201") + (beam-tracker + entity1 + "particleman" + entity2 + "particleman" + joint1 + "particleI" + joint2 + "particleM" + duration + (frame-range 1201 1261) + beam-type + '*beam-appearance-6* + ) + (part-tracker + "group-final-beam-cut-sparks" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 1201 1261) + ) + ) + (1262 + (part-tracker + "group-airlock-sucking" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-range 1262 1598) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1262 1402) + ) + (part-tracker + "group-errol-jetpack" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1262 1402) + ) + ) + (1361) + (1501 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect)) + (1502 (send-event "jakc-highres" 'trans-hook precurd-lightjak-do-effect)) + (1577 + (part-tracker + "group-fma-lightjak-get-off" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 1577 1582) + ) + (send-event "jakc-highres" 'trans-hook precurd-lightjak-stop-effect) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (send-event *time-of-day* 'change 'ratio (float 1)) + (want-display 'precurd 'display) + (want-display 'railx #f) + (setting-reset borrow mode '((railx 0 lcitysml #f))) + (task-close! "precursor-destroy-ship-escape-continue") + ) + ) + :cut-list '(402 506 687 732 761 782 829 891 967 1058 1133 1201 1262 1361 1501 1562) + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'precurd + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'precurd + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((230 506) (620 829) (1501 1640)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(512 605 761 777 778 891 (1550 max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'precurd + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((230 506) (506 687) (732 782) (829 921) (1262 1501) (620 761) (829 921) (1262 1361) (1501 1640)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "errol" + :level 'precurd + :art-group "skel-errol" + :prefix "" + :draw-frames '((506 687) (732 921) (1262 1501)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "precur-wall-window-big-fma" + :level 'precurd + :art-group "skel-precur-wall-window-big-fma" + :prefix "" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '((782 max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "precur-planet-fma" + :level 'precurd + :art-group "skel-precur-planet-fma" + :prefix "" + :draw-frames '((1133 1201) (1361 1501)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-wings-precur" + :level 'precurd + :art-group "skel-jakc-wings-precur" + :prefix "" + :draw-frames '((min 1577)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd" + :level 'precurd + :art-group "skel-terraformer-precurd" + :prefix "" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-a" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-a" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-b" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-b" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lm-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "lr-" + :draw-frames '((1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rm-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-leg-c" + :level 'precurd + :art-group "skel-terraformer-precurd-leg-c" + :prefix "rr-" + :draw-frames '((0 305) (1201 1262) (1361 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lf-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lm-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "lr-" + :draw-frames '((1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rf-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rm-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-precurd-spike" + :level 'precurd + :art-group "skel-terraformer-precurd-spike" + :prefix "rr-" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "terraformer-head-precurd" + :level 'precurd + :art-group "skel-terraformer-head-precurd" + :prefix "" + :draw-frames '((0 305) (1201 1501)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'precurd + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((1133 1201)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'precurd + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((1133 1201)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-precurd" + :level 'railx + :art-group "skel-rail-gun-dark-precurd" + :prefix "" + :draw-frames '((921 1058)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-precurd" + :level 'railx + :art-group "skel-rail-gun-dark-precurd" + :prefix "b-" + :draw-frames '((921 1058)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-start" + :end-point "precurd-escape" + :borrow '((railx 0 lcitysml special)) + :sfx-volume -1.0 + :ambient-volume 0.5 + :music-delay 1500.0 + :scene-task #x108 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-final-boss-intro-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-221" + :art-group "scenecamera" + :anim "desert-final-boss-intro-a" + :parts 1 + :command-list '((10000 (apply ,(lambda :behavior scene-player + () + (if (-> self aborted?) + (task-close! "desert-final-boss-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'precurd + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'precurd + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-escape" + :end-point "desertb-final-boss-start" + :borrow '() + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "storm-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "precursor-destroy-ship-exp-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-201" + :art-group "scenecamera" + :anim "precursor-destroy-ship-exp-res" + :parts 1 + :command-list '((0 (want-display 'precurd 'special) (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (80) + (85 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 85 200) + ) + ) + (99 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 99 200) + ) + ) + (138 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 138 200) + ) + ) + (152 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 152 200) + ) + ) + (155 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 1.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (10000 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (* 10000.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (if (-> self aborted?) + (task-close! "desert-final-boss-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'precurd + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'precurd + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'precurd + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precurd-escape" + :end-point "desertb-final-boss-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "precursor-destroy-ship-lose" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "precura-door-a-1" + :art-group "scenecamera" + :anim "precursor-destroy-ship-lose" + :parts 2 + :command-list '((0 + (want-display 'precura 'special) + (setting-reset borrow mode '((precura 0 lprenme display))) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (85 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 85 200) + ) + ) + (99 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 99 200) + ) + ) + (138 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 138 200) + ) + ) + (152 (part-tracker + "group-precursor-ship-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 152 200) + ) + ) + (155 (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (* 1.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0) + (* 10000.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + ) + :cut-list '() + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "scenecamera" + :level #f + :art-group "skel-scenecamera" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :camera 4 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'lprenme + :art-group "skel-particleman" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-break-precurd" + :level 'lprenme + :art-group "skel-dm-ship-break-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dm-ship-tent-brk-precurd" + :level 'lprenme + :art-group "skel-dm-ship-tent-brk-precurd" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "precura-start" + :end-point #f + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precursor-ship-explosion + :id 1299 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4365 :flags (sp3)) + (sp-item 4366 :flags (sp3)) + (sp-item 4367 :flags (sp3)) + (sp-item 4368 :flags (sp3)) + (sp-item 4369 :period (seconds 20) :length (seconds 0.335)) + (sp-item 4370 :period (seconds 20) :length (seconds 0.5)) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4371 :flags (sp3) :binding 4364) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + (sp-item 4364 :flags (sp2) :period (seconds 20) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4365 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4366 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 100.0 100.0) + (:scale-x (meters 0.3) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 1 128.0) + (:g :copy r) + (:b :copy r) + (:a 255.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.16666667) (meters 0.6666667)) + (:fade-g -0.26666668) + (:fade-b -1.7) + (:fade-a -0.56666666 -0.56666666) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4367 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.2)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85 -0.85) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4369 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 1.3333334) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4370 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:x (meters -10) (meters 20)) + (:y (meters 0) (meters 10)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.1)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-14)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 20) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-precursor-explo-color* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 255.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-precursor-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 128.0 :y 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-precursor-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-precursor-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-precursor-explo-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.05 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -0.3076923 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-precursor-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-precursor-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 2.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-precursor-ship-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-precursor-ship-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.5) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4370 init-specs 16 initial-valuef) + (the-as float *part-precursor-ship-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* color-start) *range-precursor-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* alpha-start) *range-precursor-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-start) + *range-precursor-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-start) + *range-precursor-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* a-scalar) *curve-precursor-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-x-scalar) + *curve-precursor-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-precursor-ship-explosion-texture-curve-settings* scale-y-scalar) + *curve-precursor-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpart 4368 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -1.6666666)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4371 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 10)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.16666667)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4364 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00012207031) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 50.0 30.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-beam-combine-flash + :id 1300 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4372 :flags (sp7)) (sp-item 4373)) + ) + +;; failed to figure out what this is: +(defpart 4372 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.26666668) (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4373 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-final-beam-rise-mist + :id 1301 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4374 :period (seconds 10) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 4374 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 50)) + (:y (meters 80)) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 100.0) + (:b 255.0) + (:a 32.0) + (:vel-y (meters 2.6666667)) + (:scalevel-x (meters 0.33333334) (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7 0.25) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-final-beam-cut-sparks + :id 1302 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4375)) + ) + +;; failed to figure out what this is: +(defpart 4375 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 3.0) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 150.0 50.0) + (:b 100.0) + (:a 255.0) + (:vel-y (meters 1.6666666) (meters 1.6666666)) + (:scalevel-x (meters -0.033333335) (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precursor-ship-beam-hit + :id 1303 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4376 :flags (sp3)) + (sp-item 4377 :flags (sp3)) + (sp-item 4378 :flags (sp3)) + (sp-item 4379 :flags (sp3)) + (sp-item 4380 :period (seconds 20) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 4376 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4377 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 1 128.0) + (:g :copy r) + (:b :copy r) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:fade-g -0.26666668) + (:fade-b -1.7) + (:fade-a -0.56666666 -0.56666666) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4378 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85 -0.85) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4380 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4379 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -1.6666666)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-light-eco-gun-charge + :id 1304 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4381 :flags (sp7)) + (sp-item 4382 :flags (sp7)) + (sp-item 4383 :flags (sp6)) + (sp-item 4384 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 4381 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 10)) + (:scale-x (meters 25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.4) + (:fade-a 0.07111111) + (:accel-x (meters -0.0013333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +;; failed to figure out what this is: +(defpart 4382 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 25) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 80.0 80.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 4385) + ) + ) + +;; failed to figure out what this is: +(defpart 4385 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 4383 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4384 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 80.0) + (:b 255.0) + (:a 5.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dark-eco-gun-charge + :id 1305 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4386 :flags (sp6)) (sp-item 4387 :flags (sp6)) (sp-item 4388) (sp-item 4389)) + ) + +;; failed to figure out what this is: +(defpart 4386 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 40.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4387 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0 20.0) + (:g 64.0) + (:b 255.0) + (:a 60.0 10.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4388 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 20.0) + (:scale-x (meters 1) (meters 3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 5) (meters 2.5)) + (:r 50.0 100.0) + (:g 60.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 4390) + ) + ) + +;; failed to figure out what this is: +(defpart 4389 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 5.0) + (:scale-x (meters 5) (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 5) (meters 2.5)) + (:r 50.0 100.0) + (:g 60.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:next-time (seconds 0.035)) + (:next-launcher 4390) + ) + ) + +;; failed to figure out what this is: +(defpart 4390 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -2.0) (:fade-g -0.8) (:fade-a -4.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lightjak-get-off + :id 1306 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4391 :period (seconds 5) :length (seconds 0.017)) + (sp-item 4392 :period (seconds 5) :length (seconds 0.017)) + (sp-item 4393 :period (seconds 5) :length (seconds 0.085)) + ) + ) + +;; failed to figure out what this is: +(defpart 4391 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 12)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:fade-b -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4392 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-b -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4393 + :init-specs ((:texture (middot level-default-sprite)) + (:num 60.0) + (:y (meters -1.5) (meters 3)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g :copy r) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters 0.00016666666) (meters 0.00066666666)) + (:friction 0.95 0.05) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.5)) + (:next-launcher 4394) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4394 + :init-specs ((:scalevel-x (meters -0.00016666666) (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.425 -0.425) + (:friction 0.99) + (:next-time (seconds 0.017)) + (:next-launcher 4395) + ) + ) + +;; failed to figure out what this is: +(defpart 4395 + :init-specs ((:accel-x (meters -0.0013333333) (meters 0.0026666666)) + (:accel-z (meters -0.0013333333) (meters 0.0026666666)) + (:next-time (seconds 0.085) (seconds 0.08)) + (:next-launcher 4395) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-errol-jetpack + :id 1307 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4396 :flags (is-3d sp7)) (sp-item 4397 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4396 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 10.0) + (:y (meters 0.3)) + (:z (meters 0.3)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 40)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 16.0 16.0) + (:fade-a -0.6) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4397 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:z (meters 0.2)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 20.0 2.0) + (:fade-a -0.12) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-airlock-sucking + :id 1308 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 4398 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4398 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:x (meters 130) (meters 10)) + (:scale-x (meters 5) (meters 15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0.225) (degrees 0.225)) + (:vel-x (meters -0.033333335)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:friction 1.34) + (:timer (seconds 2) (seconds 0.665)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 4399) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4399 + :init-specs ((:fade-a -0.013333334 -0.013333334) + (:accel-y (meters -0.006666667)) + (:friction 0.98) + (:next-time (seconds 0.5)) + (:next-launcher 4400) + ) + ) + +;; failed to figure out what this is: +(defpart 4400 + :init-specs ((:fade-a -0.026666667 -0.026666667) (:friction 0.99)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/precursor/prim-beam_REF.gc b/test/decompiler/reference/jak3/levels/precursor/prim-beam_REF.gc new file mode 100644 index 0000000000..858bcda1ca --- /dev/null +++ b/test/decompiler/reference/jak3/levels/precursor/prim-beam_REF.gc @@ -0,0 +1,263 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *default-prim-beam-appearance*, type prim-beam-settings +(define *default-prim-beam-appearance* (new 'static 'prim-beam-settings + :width 4096.0 + :color (new 'static 'rgba :r #xff :g #xff :a #x80) + :alpha 0.5 + :tex-id #x100300 + :num-tiles 1.0 + ) + ) + +;; definition of type prim-beam +(deftype prim-beam (process-drawable) + ((strip prim-strip) + (pos0 vector :inline) + (pos1 vector :inline) + (appearance prim-beam-settings :inline) + (duration time-frame :offset 272) + ) + (:state-methods + active + hidden + ) + (:methods + (prim-beam-method-22 (_type_) none) + (prim-beam-method-23 (_type_) none) + (prim-beam-method-24 (_type_) none) + (init-strip! (_type_) none) + ) + ) + +;; definition for method 3 of type prim-beam +(defmethod inspect ((this prim-beam)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstrip: ~A~%" (-> this strip)) + (format #t "~2Tpos0: #~%" (-> this pos0)) + (format #t "~2Tpos1: #~%" (-> this pos1)) + (format #t "~2Tappearance: #~%" (-> this appearance)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tduration: ~D~%" (-> this duration)) + (label cfg-4) + this + ) + +;; definition for method 22 of type prim-beam +;; WARN: Return type mismatch object vs none. +(defmethod prim-beam-method-22 ((this prim-beam)) + (set! (-> this strip) + (new 'process 'prim-strip 4 (the-as texture-id (-> this appearance tex-id)) (the-as string #f)) + ) + (set! (-> this strip bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip sink) (the-as uint 65)) + (set! (-> this root) (new 'process 'trsqv)) + (go (method-of-object this active)) + (none) + ) + +;; failed to figure out what this is: +(defstate active (prim-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hide) + (go-virtual hidden) + ) + (('die) + (go empty-state) + ) + ) + ) + :enter (behavior () + (init-strip! self) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (prim-beam-method-24 self) + (if (and (> (-> self duration) 0) (time-elapsed? (-> self state-time) (-> self duration))) + (go empty-state) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate hidden (prim-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (go-virtual active) + ) + (('die) + (go empty-state) + ) + ) + ) + :enter (behavior () + (set! (-> self strip num-verts) (the-as uint 0)) + 0 + ) + :code sleep-code + ) + +;; definition for method 24 of type prim-beam +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod prim-beam-method-24 ((this prim-beam)) + (let ((s3-0 (-> this strip data)) + (s5-0 (new 'stack-no-clear 'vector)) + (v1-1 (camera-pos)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 (-> this appearance width)) + ) + (set! (-> s5-0 quad) (-> this pos0 quad)) + (vector-! s1-0 (-> this pos1) (-> this pos0)) + (vector-! s2-0 v1-1 s5-0) + (set! (-> s2-0 quad) (-> (math-camera-matrix) fvec quad)) + (vector-cross! s4-0 s2-0 s1-0) + (vector-normalize! s4-0 1.0) + (vector+float*! s5-0 (-> this pos0) s4-0 f30-0) + (set! (-> s3-0 0 pos quad) (-> s5-0 quad)) + (set! (-> s3-0 0 stq z) 0.0) + (set! (-> s3-0 0 stq x) 0.0) + (set! (-> s3-0 0 stq y) 0.0) + (let ((v1-9 (-> s3-0 1))) + (vector+float*! s5-0 (-> this pos0) s4-0 (- f30-0)) + (set! (-> v1-9 pos quad) (-> s5-0 quad)) + (set! (-> v1-9 stq z) 0.0) + (set! (-> v1-9 stq x) 1.0) + (set! (-> v1-9 stq y) 0.0) + (let ((v1-10 (&+ v1-9 32))) + (vector+float*! s5-0 (-> this pos1) s4-0 f30-0) + (set! (-> v1-10 pos quad) (-> s5-0 quad)) + (set! (-> v1-10 stq z) 0.0) + (set! (-> v1-10 stq x) 0.0) + (set! (-> v1-10 stq y) (-> this appearance num-tiles)) + (let ((v1-11 (&+ v1-10 32))) + (vector+float*! s5-0 (-> this pos1) s4-0 (- f30-0)) + (set! (-> v1-11 pos quad) (-> s5-0 quad)) + (set! (-> v1-11 stq z) 0.0) + (set! (-> v1-11 stq x) 1.0) + (set! (-> v1-11 stq y) (-> this appearance num-tiles)) + (&+ v1-11 32) + ) + ) + ) + ) + (let ((v1-14 (the-as object (-> this strip data)))) + (dotimes (a0-19 4) + (set! (-> (the-as prim-vertex v1-14) col) (-> this appearance color)) + (set! (-> (the-as prim-vertex v1-14) col a) (the int (* 128.0 (-> this appearance alpha)))) + (set! v1-14 (&+ (the-as prim-vertex v1-14) 32)) + ) + ) + (none) + ) + +;; definition for method 25 of type prim-beam +;; WARN: Return type mismatch uint vs none. +(defmethod init-strip! ((this prim-beam)) + (set! (-> this strip clamp) (new 'static 'gs-clamp)) + (set! (-> this strip num-verts) (the-as uint 4)) + (set! (-> this strip alpha) *simple-prim-additive*) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (none) + ) + +;; definition for method 7 of type prim-beam +(defmethod relocate ((this prim-beam) (offset int)) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (call-parent-method this offset) + ) + +;; definition of type prim-beam-tracker +(deftype prim-beam-tracker (prim-beam) + ((track-obj1 handle) + (track-obj2 handle) + (track-joint1 int32) + (track-joint2 int32) + ) + ) + +;; definition for method 3 of type prim-beam-tracker +(defmethod inspect ((this prim-beam-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prim-beam inspect))) + (t9-0 this) + ) + (format #t "~2Ttrack-obj1: ~D~%" (-> this track-obj1)) + (format #t "~2Ttrack-obj2: ~D~%" (-> this track-obj2)) + (format #t "~2Ttrack-joint1: ~D~%" (-> this track-joint1)) + (format #t "~2Ttrack-joint2: ~D~%" (-> this track-joint2)) + (label cfg-4) + this + ) + +;; definition for method 24 of type prim-beam-tracker +(defmethod prim-beam-method-24 ((this prim-beam-tracker)) + (let ((v1-1 (the-as process-drawable (handle->process (-> this track-obj1))))) + (if v1-1 + (vector<-cspace! (-> this pos0) (-> v1-1 node-list data (-> this track-joint1))) + ) + ) + (let ((v1-5 (the-as process-drawable (handle->process (-> this track-obj2))))) + (if v1-5 + (vector<-cspace! (-> this pos1) (-> v1-5 node-list data (-> this track-joint2))) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for function prim-beam-tracker-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior prim-beam-tracker-init-by-other prim-beam-tracker ((arg0 prim-beam-tracker-params)) + (set! (-> self track-obj1) (-> arg0 track-obj1)) + (set! (-> self track-obj2) (-> arg0 track-obj2)) + (set! (-> self track-joint1) (-> arg0 track-joint1)) + (set! (-> self track-joint2) (-> arg0 track-joint2)) + (if (-> arg0 pos0) + (set! (-> self pos0 quad) (-> arg0 pos0 quad)) + ) + (if (-> arg0 pos1) + (set! (-> self pos1 quad) (-> arg0 pos1 quad)) + ) + (set! (-> self duration) (-> arg0 duration)) + (mem-copy! (the-as pointer (-> self appearance)) (the-as pointer (-> arg0 appearance)) 20) + (prim-beam-method-22 self) + ) + +;; definition for function spawn-prim-beam-tracker +;; WARN: Return type mismatch int vs handle. +(defun spawn-prim-beam-tracker ((arg0 prim-beam-tracker-params) (arg1 symbol) (arg2 process)) + (if (not arg1) + (set! arg1 '*default-prim-beam-appearance*) + ) + (set! (-> arg0 appearance) (the-as prim-beam-settings (-> arg1 value))) + (the-as handle (ppointer->handle (process-spawn prim-beam-tracker arg0 :name "prim-beam-tracker" :to arg2))) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wastrail-graph_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wastrail-graph_REF.gc new file mode 100644 index 0000000000..edf29d06a3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wastrail-graph_REF.gc @@ -0,0 +1,4146 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *trail-graph*, type trail-graph +(define *trail-graph* + (new 'static 'trail-graph + :over-under-above-too-low -32768.0 + :over-under-below-too-high 32768.0 + :pov-node-count #x27 + :node-count #xed + :conn-count #x1ac + :blocker-count #x4a + :node (new 'static 'inline-array trail-node 237 + (new 'static 'trail-node :x #x8d8 :y 32 :z #xfc :flags (trail-node-flag tnf2) :conn-count #x7) + (new 'static 'trail-node + :x #x8a3 + :y 19 + :z #x704 + :first-conn #x7 + :flags (trail-node-flag tnf2) + :conn-count #x7 + ) + (new 'static 'trail-node + :x #x8c9 + :y 19 + :z #x8c8 + :first-conn #xe + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x795 + :y 19 + :z #x91f + :first-conn #x18 + :flags (trail-node-flag tnf2) + :conn-count #x6 + ) + (new 'static 'trail-node + :x #x63e + :y 22 + :z #x7a1 + :first-conn #x1e + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xbd8 + :y 27 + :z #xf26 + :first-conn #x28 + :flags (trail-node-flag tnf2) + :conn-count #x4 + ) + (new 'static 'trail-node + :x #x83b + :y 56 + :z #x24c + :first-conn #x2c + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x793 + :y 43 + :z #x248 + :first-conn #x34 + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x93a + :y 34 + :z #x2d0 + :first-conn #x3c + :flags (trail-node-flag tnf2) + :conn-count #x6 + ) + (new 'static 'trail-node + :x #xd34 + :y 74 + :z #x838 + :first-conn #x42 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x9f5 + :y 57 + :z #x37d + :first-conn #x4e + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #x5bd + :y 56 + :z #x2d5 + :first-conn #x5c + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x4f0 + :y 78 + :z #x35c + :first-conn #x64 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x927 + :y 44 + :z #x457 + :first-conn #x6f + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x5bd + :y 57 + :z #x424 + :first-conn #x78 + :flags (trail-node-flag tnf2) + :conn-count #x8 + ) + (new 'static 'trail-node + :x #x8ef + :y 58 + :z #x59c + :first-conn #x80 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xa34 + :y 55 + :z #x7d0 + :first-conn #x89 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xaa5 + :y 66 + :z #x8a4 + :first-conn #x93 + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #x95b + :y 28 + :z #x9dd + :first-conn #xa1 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x8a8 + :y 47 + :z #xab9 + :first-conn #xac + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x7e3 + :y 41 + :z #xa44 + :first-conn #xb6 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x5dd + :y 62 + :z #x898 + :first-conn #xc0 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x5e3 + :y 52 + :z #x557 + :first-conn #xcc + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x7f7 + :y 19 + :z #xb7f + :first-conn #xd5 + :flags (trail-node-flag tnf2) + :conn-count #xb + ) + (new 'static 'trail-node + :x #x80b + :y 88 + :z #xe9f + :first-conn #xe0 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xb1d + :y 46 + :z #xc3c + :first-conn #xe9 + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #xb83 + :y 18 + :z #xd5c + :first-conn #xf7 + :flags (trail-node-flag tnf2) + :conn-count #x5 + ) + (new 'static 'trail-node + :x #xcb0 + :y 32 + :z #xc14 + :first-conn #xfc + :flags (trail-node-flag tnf2) + :conn-count #xe + ) + (new 'static 'trail-node + :x #xe2b + :y 52 + :z #x8f8 + :first-conn #x10a + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #xbdd + :y 54 + :z #x8bb + :first-conn #x113 + :flags (trail-node-flag tnf2) + :conn-count #xd + ) + (new 'static 'trail-node + :x #xd03 + :y 66 + :z #x9cf + :first-conn #x120 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x97 + :y 66 + :z #x32c + :first-conn #x129 + :flags (trail-node-flag tnf2) + :conn-count #x3 + ) + (new 'static 'trail-node + :x #x12e + :y 96 + :z #x253 + :first-conn #x12c + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #x2e3 + :y 75 + :z #x391 + :first-conn #x136 + :flags (trail-node-flag tnf2) + :conn-count #xd + ) + (new 'static 'trail-node + :x #x1e3 + :y 38 + :z #x4de + :first-conn #x143 + :flags (trail-node-flag tnf2) + :conn-count #xc + ) + (new 'static 'trail-node + :x #x90 + :y 27 + :z #x45a + :first-conn #x14f + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x3ed + :y 81 + :z #xc5a + :first-conn #x158 + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node + :x #x22c + :y #x6b + :z #x8fc + :first-conn #x161 + :flags (trail-node-flag tnf2) + :conn-count #xa + ) + (new 'static 'trail-node + :x #xeaf + :y 23 + :z #xaee + :first-conn #x16b + :flags (trail-node-flag tnf2) + :conn-count #x9 + ) + (new 'static 'trail-node :x #x8d9 :y 32 :z #xdd :first-conn #x174 :conn-count #x2) + (new 'static 'trail-node :x #x89d :y 36 :z #xd1 :first-conn #x176 :conn-count #x1) + (new 'static 'trail-node :x #x8da :y 22 :z 72 :first-conn #x177 :conn-count #x2) + (new 'static 'trail-node :x #x66f :y 41 :z -241 :first-conn #x179 :conn-count #x4) + (new 'static 'trail-node :x #x8c5 :y 10 :z -30 :first-conn #x17d :conn-count #x4) + (new 'static 'trail-node :x #x8df :y 5 :z -120 :first-conn #x181 :conn-count #x4) + (new 'static 'trail-node :x #x8ce :y 5 :z -146 :first-conn #x185 :conn-count #x4) + (new 'static 'trail-node :x #x8df :y 5 :z -185 :first-conn #x189 :conn-count #x3) + (new 'static 'trail-node :x #x8d4 :y 6 :z -204 :first-conn #x18c :conn-count #x4) + (new 'static 'trail-node :x #x8e5 :y 9 :z -238 :first-conn #x190 :conn-count #x6) + (new 'static 'trail-node :x #x917 :y 11 :z -276 :first-conn #x196 :conn-count #x4) + (new 'static 'trail-node :x #x916 :y 51 :z -336 :first-conn #x19a :conn-count #x1) + (new 'static 'trail-node :x #x90d :y 9 :z -220 :first-conn #x19b :conn-count #x4) + (new 'static 'trail-node :x #x906 :y 7 :z -188 :first-conn #x19f :conn-count #x3) + (new 'static 'trail-node :x #x913 :y 6 :z -169 :first-conn #x1a2 :conn-count #x4) + (new 'static 'trail-node :x #x935 :y 9 :z -234 :first-conn #x1a6 :conn-count #x5) + (new 'static 'trail-node :x #x94f :y 11 :z -202 :first-conn #x1ab :conn-count #x3) + (new 'static 'trail-node :x #x990 :y 21 :z -196 :first-conn #x1ae :conn-count #x4) + (new 'static 'trail-node :x #x9b8 :y 25 :z -153 :first-conn #x1b2 :conn-count #x2) + (new 'static 'trail-node :x #x99a :y 20 :z -80 :first-conn #x1b4 :conn-count #x2) + (new 'static 'trail-node :x #x975 :y 18 :z -81 :first-conn #x1b6 :conn-count #x5) + (new 'static 'trail-node :x #x5de :y 21 :z -410 :first-conn #x1bb :conn-count #x2) + (new 'static 'trail-node :x #x5c5 :y 34 :z -374 :first-conn #x1bd :conn-count #x2) + (new 'static 'trail-node :x #x5a6 :y 23 :z -491 :first-conn #x1bf :conn-count #x2) + (new 'static 'trail-node :x #x63f :y 21 :z -416 :first-conn #x1c1 :conn-count #x4) + (new 'static 'trail-node :x #x94b :y 13 :z -171 :first-conn #x1c5 :conn-count #x5) + (new 'static 'trail-node :x #x872 :y 20 :z -231 :first-conn #x1ca :conn-count #x4) + (new 'static 'trail-node :x #x886 :y 17 :z -194 :first-conn #x1ce :conn-count #x3) + (new 'static 'trail-node :x #x8aa :y 9 :z -144 :first-conn #x1d1 :conn-count #x4) + (new 'static 'trail-node :x #x85d :y 24 :z -253 :first-conn #x1d5 :conn-count #x2) + (new 'static 'trail-node :x #x80a :y 30 :z -337 :first-conn #x1d7 :conn-count #x2) + (new 'static 'trail-node :x #x7f1 :y 35 :z -351 :first-conn #x1d9 :conn-count #x3) + (new 'static 'trail-node :x #x7cb :y 38 :z -382 :first-conn #x1dc :conn-count #x3) + (new 'static 'trail-node :x #x7c5 :y 37 :z -329 :first-conn #x1df :conn-count #x3) + (new 'static 'trail-node :x #x7c0 :y 36 :z -290 :first-conn #x1e2 :conn-count #x2) + (new 'static 'trail-node :x #x79e :y 33 :z -263 :first-conn #x1e4 :conn-count #x2) + (new 'static 'trail-node :x #x787 :y 32 :z -263 :first-conn #x1e6 :conn-count #x2) + (new 'static 'trail-node :x #x76b :y 31 :z -274 :first-conn #x1e8 :conn-count #x2) + (new 'static 'trail-node :x #x734 :y 29 :z -313 :first-conn #x1ea :conn-count #x5) + (new 'static 'trail-node :x #x698 :y 43 :z -269 :first-conn #x1ef :conn-count #x4) + (new 'static 'trail-node :x #x712 :y 28 :z -422 :first-conn #x1f3 :conn-count #x5) + (new 'static 'trail-node :x #x736 :y 20 :z -522 :first-conn #x1f8 :conn-count #x1) + (new 'static 'trail-node :x #x720 :y 28 :z -483 :first-conn #x1f9 :conn-count #x2) + (new 'static 'trail-node :x #x68e :y 30 :z -315 :first-conn #x1fb :conn-count #x3) + (new 'static 'trail-node :x #x681 :y 28 :z -364 :first-conn #x1fe :conn-count #x6) + (new 'static 'trail-node :x #x640 :y 28 :z -385 :first-conn #x204 :conn-count #x2) + (new 'static 'trail-node :x #x60a :y 25 :z -388 :first-conn #x206 :conn-count #x3) + (new 'static 'trail-node :x #x5ea :y 28 :z -358 :first-conn #x209 :conn-count #x2) + (new 'static 'trail-node :x #x646 :y 35 :z -458 :first-conn #x20b :conn-count #x1) + (new 'static 'trail-node :x #x5ea :y 33 :z -308 :first-conn #x20c :conn-count #x4) + (new 'static 'trail-node :x #x62e :y 40 :z -259 :first-conn #x210 :conn-count #x3) + (new 'static 'trail-node :x #x611 :y 48 :z -213 :first-conn #x213 :conn-count #x3) + (new 'static 'trail-node :x #x627 :y 61 :z -159 :first-conn #x216 :conn-count #x2) + (new 'static 'trail-node :x #x64c :y 66 :z -144 :first-conn #x218 :conn-count #x2) + (new 'static 'trail-node :x #x66d :y 54 :z -174 :first-conn #x21a :conn-count #x2) + (new 'static 'trail-node :x #x656 :y 39 :z -262 :first-conn #x21c :conn-count #x4) + (new 'static 'trail-node :x #x685 :y 34 :z -288 :first-conn #x220 :conn-count #x4) + (new 'static 'trail-node :x #x6e0 :y 44 :z -230 :first-conn #x224 :conn-count #x5) + (new 'static 'trail-node :x #x6e5 :y 84 :z -113 :first-conn #x229 :conn-count #x1) + (new 'static 'trail-node :x #x7c7 :y 36 :z -451 :first-conn #x22a :conn-count #x2) + (new 'static 'trail-node :x #x7cc :y #xf3 :z -454 :first-conn #x22c :conn-count #x2) + (new 'static 'trail-node :x #x7d1 :y #xf5 :z -431 :first-conn #x22e :conn-count #x1) + (new 'static 'trail-node :x #x8b8 :y 19 :z #x8bc :first-conn #x22f :conn-count #x2) + (new 'static 'trail-node :x #x834 :y -2 :z #x876 :first-conn #x231 :conn-count #x2) + (new 'static 'trail-node :x #x823 :y -10 :z #x854 :first-conn #x233 :conn-count #x2) + (new 'static 'trail-node :x #x821 :y -23 :z #x7d3 :first-conn #x235 :conn-count #x2) + (new 'static 'trail-node :x #x805 :y -27 :z #x792 :first-conn #x237 :conn-count #x2) + (new 'static 'trail-node :x #x755 :y -34 :z #x761 :first-conn #x239 :conn-count #x2) + (new 'static 'trail-node :x #x729 :y -37 :z #x733 :first-conn #x23b :conn-count #x2) + (new 'static 'trail-node :x #x71d :y -41 :z #x6f2 :first-conn #x23d :conn-count #x2) + (new 'static 'trail-node :x #x74b :y -55 :z #x643 :first-conn #x23f :conn-count #x2) + (new 'static 'trail-node :x #x739 :y -57 :z #x626 :first-conn #x241 :conn-count #x2) + (new 'static 'trail-node :x #x70c :y -59 :z #x5fc :first-conn #x243 :conn-count #x2) + (new 'static 'trail-node :x #x6fe :y -89 :z #x4f7 :first-conn #x245 :conn-count #x2) + (new 'static 'trail-node :x #x70d :y -86 :z #x4c4 :first-conn #x247 :conn-count #x2) + (new 'static 'trail-node :x #x701 :y -86 :z #x464 :first-conn #x249 :conn-count #x2) + (new 'static 'trail-node :x #x6d0 :y -86 :z #x42a :first-conn #x24b :conn-count #x2) + (new 'static 'trail-node :x #x69b :y -91 :z #x40e :first-conn #x24d :conn-count #x2) + (new 'static 'trail-node :x #x639 :y -112 :z #x435 :first-conn #x24f :conn-count #x2) + (new 'static 'trail-node :x #x5fb :y -108 :z #x41f :first-conn #x251 :conn-count #x2) + (new 'static 'trail-node :x #x5d3 :y -98 :z #x3a9 :first-conn #x253 :conn-count #x2) + (new 'static 'trail-node :x #x5fc :y -89 :z #x342 :first-conn #x255 :conn-count #x2) + (new 'static 'trail-node :x #x67a :y -86 :z #x2f3 :first-conn #x257 :conn-count #x2) + (new 'static 'trail-node :x #x6a6 :y -84 :z #x2c5 :first-conn #x259 :conn-count #x2) + (new 'static 'trail-node :x #x69f :y -86 :z #x2a6 :first-conn #x25b :conn-count #x2) + (new 'static 'trail-node :x #x655 :y -93 :z #x258 :first-conn #x25d :conn-count #x4) + (new 'static 'trail-node :x #x512 :y -76 :z #x19d :first-conn #x261 :conn-count #x1) + (new 'static 'trail-node :x #x532 :y -99 :z #x23c :first-conn #x262 :conn-count #x4) + (new 'static 'trail-node :x #x537 :y -100 :z #x1b0 :first-conn #x266 :conn-count #x2) + (new 'static 'trail-node :x #x532 :y -103 :z #x269 :first-conn #x268 :conn-count #x3) + (new 'static 'trail-node :x #x52b :y -112 :z #x28d :first-conn #x26b :conn-count #x1) + (new 'static 'trail-node :x #x571 :y -111 :z #x2b0 :first-conn #x26c :conn-count #x2) + (new 'static 'trail-node :x #x5dc :y -109 :z #x285 :first-conn #x26e :conn-count #x1) + (new 'static 'trail-node :x #x666 :y -99 :z #x23c :first-conn #x26f :conn-count #x1) + (new 'static 'trail-node :x #x6d4 :y -89 :z #x1ca :first-conn #x270 :conn-count #x2) + (new 'static 'trail-node :x #x6d6 :y -87 :z #x176 :first-conn #x272 :conn-count #x2) + (new 'static 'trail-node :x #x68c :y -91 :z #x13a :first-conn #x274 :conn-count #x2) + (new 'static 'trail-node :x #x618 :y -94 :z #x12a :first-conn #x276 :conn-count #x2) + (new 'static 'trail-node :x #x567 :y -69 :z #x112 :first-conn #x278 :conn-count #x2) + (new 'static 'trail-node :x #x4ef :y -92 :z #x26f :first-conn #x27a :conn-count #x2) + (new 'static 'trail-node :x #x4ab :y -92 :z #x26e :first-conn #x27c :conn-count #x2) + (new 'static 'trail-node :x #x497 :y -108 :z #x2e0 :first-conn #x27e :conn-count #x2) + (new 'static 'trail-node :x #x482 :y -110 :z #x2fc :first-conn #x280 :conn-count #x2) + (new 'static 'trail-node :x #x45e :y -107 :z #x2f4 :first-conn #x282 :conn-count #x2) + (new 'static 'trail-node :x #x432 :y -109 :z #x2d9 :first-conn #x284 :conn-count #x3) + (new 'static 'trail-node :x #x493 :y -94 :z #x283 :first-conn #x287 :conn-count #x2) + (new 'static 'trail-node :x #x429 :y -108 :z #x204 :first-conn #x289 :conn-count #x1) + (new 'static 'trail-node :x #x425 :y -107 :z #x1c5 :first-conn #x28a :conn-count #x1) + (new 'static 'trail-node :x #x435 :y -108 :z #x187 :first-conn #x28b :conn-count #x1) + (new 'static 'trail-node :x #x436 :y -101 :z #x159 :first-conn #x28c :conn-count #x1) + (new 'static 'trail-node :x #x29a :y -69 :z #x1e3 :first-conn #x28d :conn-count #x2) + (new 'static 'trail-node :x #x30b :y -107 :z #x205 :first-conn #x28f :conn-count #x2) + (new 'static 'trail-node :x #x425 :y -105 :z #x1ab :first-conn #x291 :conn-count #x4) + (new 'static 'trail-node :x #x467 :y -77 :z #x191 :first-conn #x295 :conn-count #x2) + (new 'static 'trail-node :x #x4a4 :y -79 :z #x162 :first-conn #x297 :conn-count #x2) + (new 'static 'trail-node :x #x4a9 :y -75 :z #x13a :first-conn #x299 :conn-count #x2) + (new 'static 'trail-node :x #x4c2 :y -77 :z #x127 :first-conn #x29b :conn-count #x2) + (new 'static 'trail-node :x #x4d9 :y -80 :z #x12d :first-conn #x29d :conn-count #x2) + (new 'static 'trail-node :x #x4ee :y -90 :z #x16a :first-conn #x29f :conn-count #x3) + (new 'static 'trail-node :x #x50f :y -86 :z #x17e :first-conn #x2a2 :conn-count #x4) + (new 'static 'trail-node :x #x33f :y -107 :z #x248 :first-conn #x2a6 :conn-count #x3) + (new 'static 'trail-node :x #x8d9 :y 32 :z #x8f :first-conn #x2a9 :conn-count #x2) + (new 'static 'trail-node :x #x917 :y 36 :z #xc2 :first-conn #x2ab :conn-count #x1) + (new 'static 'trail-node :x #x67e :y 22 :z #x7a3 :first-conn #x2ac :conn-count #x2) + (new 'static 'trail-node :x #x6b8 :y 24 :z #x7b9 :first-conn #x2ae :conn-count #x2) + (new 'static 'trail-node :x #x707 :y 26 :z #x7da :first-conn #x2b0 :conn-count #x2) + (new 'static 'trail-node :x #x7a5 :y 23 :z #x8aa :first-conn #x2b2 :conn-count #x2) + (new 'static 'trail-node :x #x7c7 :y 25 :z #x83b :first-conn #x2b4 :conn-count #x2) + (new 'static 'trail-node :x #x7c0 :y 23 :z #x7fc :first-conn #x2b6 :conn-count #x2) + (new 'static 'trail-node :x #x742 :y 25 :z #x7b6 :first-conn #x2b8 :conn-count #x3) + (new 'static 'trail-node :x #x793 :y 22 :z #x7b6 :first-conn #x2bb :conn-count #x3) + (new 'static 'trail-node :x #x77a :y 23 :z #x773 :first-conn #x2be :conn-count #x3) + (new 'static 'trail-node :x #x7a3 :y 28 :z #x712 :first-conn #x2c1 :conn-count #x2) + (new 'static 'trail-node :x #x7f7 :y 24 :z #x6ef :first-conn #x2c3 :conn-count #x2) + (new 'static 'trail-node :x #x879 :y 19 :z #x702 :first-conn #x2c5 :conn-count #x2) + (new 'static 'trail-node :x #x652 :y 22 :z #x7a1 :first-conn #x2c7 :conn-count #x2) + (new 'static 'trail-node :x #x79a :y 19 :z #x90b :first-conn #x2c9 :conn-count #x2) + (new 'static 'trail-node :x #x528 :y -83 :z #x168 :first-conn #x2cb :conn-count #x1) + (new 'static 'trail-node :x #x51e :y -78 :z #x1b8 :first-conn #x2cc :conn-count #x2) + (new 'static 'trail-node :x #x51d :y -89 :z #x220 :first-conn #x2ce :conn-count #x1) + (new 'static 'trail-node :x #x542 :y -85 :z #x17b :first-conn #x2cf :conn-count #x2) + (new 'static 'trail-node :x #x4f8 :y -106 :z #x241 :first-conn #x2d1 :conn-count #x2) + (new 'static 'trail-node :x #x4e3 :y -100 :z #x213 :first-conn #x2d3 :conn-count #x2) + (new 'static 'trail-node :x #x4e6 :y -90 :z #x1e7 :first-conn #x2d5 :conn-count #x2) + (new 'static 'trail-node :x #x4e9 :y -89 :z #x1a5 :first-conn #x2d7 :conn-count #x3) + (new 'static 'trail-node :x #x5d8 :y -103 :z #x3e7 :first-conn #x2da :conn-count #x2) + (new 'static 'trail-node :x #x671 :y -113 :z #x427 :first-conn #x2dc :conn-count #x2) + (new 'static 'trail-node :x #x374 :y -94 :z #x236 :first-conn #x2de :conn-count #x3) + (new 'static 'trail-node :x #x3c6 :y -98 :z #x2d8 :first-conn #x2e1 :conn-count #x3) + (new 'static 'trail-node :x #x3c5 :y -102 :z #x28e :first-conn #x2e4 :conn-count #x3) + (new 'static 'trail-node :x #x395 :y -96 :z #x265 :first-conn #x2e7 :conn-count #x3) + (new 'static 'trail-node :x #x309 :y -93 :z #x187 :first-conn #x2ea :conn-count #x3) + (new 'static 'trail-node :x #x38c :y -92 :z #x1a4 :first-conn #x2ed :conn-count #x5) + (new 'static 'trail-node :x #x3fb :y -104 :z #x143 :first-conn #x2f2 :conn-count #x2) + (new 'static 'trail-node :x #x306 :y -68 :z #x280 :first-conn #x2f4 :conn-count #x2) + (new 'static 'trail-node :x #x2b5 :y -77 :z #x192 :first-conn #x2f6 :conn-count #x2) + (new 'static 'trail-node :x #x3c0 :y -101 :z #x15a :first-conn #x2f8 :conn-count #x4) + (new 'static 'trail-node :x #x375 :y -81 :z #x2d1 :first-conn #x2fc :conn-count #x2) + (new 'static 'trail-node :x #x5e7 :y -93 :z #x366 :first-conn #x2fe :conn-count #x2) + (new 'static 'trail-node :x #x8a1 :y 18 :z #x8a4 :first-conn #x300 :conn-count #x2) + (new 'static 'trail-node :x #x29f :y -75 :z #x222 :first-conn #x302 :conn-count #x2) + (new 'static 'trail-node :x #x315 :y -86 :z #x13b :first-conn #x304 :conn-count #x2) + (new 'static 'trail-node :x #x371 :y -95 :z #x12e :first-conn #x306 :conn-count #x4) + (new 'static 'trail-node :x #xc09 :y 27 :z #xf35 :first-conn #x30a :conn-count #x2) + (new 'static 'trail-node :x #xc4b :y 27 :z #xf3a :first-conn #x30c :conn-count #x2) + (new 'static 'trail-node :x #xd47 :y 40 :z #xfa8 :first-conn #x30e :conn-count #x2) + (new 'static 'trail-node :x #xe5a :y 33 :z #xefc :first-conn #x310 :conn-count #x2) + (new 'static 'trail-node :x #xed7 :y 26 :z #xef0 :first-conn #x312 :conn-count #x2) + (new 'static 'trail-node :x #xfb9 :y 19 :z #xf12 :first-conn #x314 :conn-count #x2) + (new 'static 'trail-node :x #x1032 :y 18 :z #xef8 :first-conn #x316 :conn-count #x2) + (new 'static 'trail-node :x #x1097 :y 18 :z #xf02 :first-conn #x318 :conn-count #x2) + (new 'static 'trail-node :x #x10dc :y 22 :z #xf3b :first-conn #x31a :conn-count #x2) + (new 'static 'trail-node :x #x89b :y 11 :z -165 :first-conn #x31c :conn-count #x3) + (new 'static 'trail-node :x #x89d :y 10 :z -195 :first-conn #x31f :conn-count #x4) + (new 'static 'trail-node :x #x6b2 :y 38 :z -271 :first-conn #x323 :conn-count #x4) + (new 'static 'trail-node :x #x6ae :y 33 :z -304 :first-conn #x327 :conn-count #x4) + (new 'static 'trail-node :x #x6bf :y 36 :z -276 :first-conn #x32b :conn-count #x5) + (new 'static 'trail-node :x #x672 :y 86 :z -110 :first-conn #x330 :conn-count #x1) + (new 'static 'trail-node :x #x68d :y 74 :z -150 :first-conn #x331 :conn-count #x1) + (new 'static 'trail-node :x #x8e0 :y 8 :z -73 :first-conn #x332 :conn-count #x4) + (new 'static 'trail-node :x #x8fb :y 4 :z -115 :first-conn #x336 :conn-count #x5) + (new 'static 'trail-node :x #x102c :y #x7a :z #x1047 :first-conn #x33b :conn-count #x2) + (new 'static 'trail-node :x #x106f :y #x78 :z #x1005 :first-conn #x33d :conn-count #x1) + (new 'static 'trail-node :x #x1008 :y #x78 :z #x106b :first-conn #x33e :conn-count #x2) + (new 'static 'trail-node :x #x1003 :y #x78 :z #x10af :first-conn #x340 :conn-count #x2) + (new 'static 'trail-node :x #x1034 :y #x75 :z #x10c7 :first-conn #x342 :conn-count #x2) + (new 'static 'trail-node :x #x108b :y #x65 :z #x10b0 :first-conn #x344 :conn-count #x2) + (new 'static 'trail-node :x #x10db :y 68 :z #x1061 :first-conn #x346 :conn-count #x2) + (new 'static 'trail-node :x #x10e7 :y 46 :z #xffe :first-conn #x348 :conn-count #x2) + (new 'static 'trail-node :x #x10d2 :y 32 :z #xf9b :first-conn #x34a :conn-count #x2) + (new 'static 'trail-node :x #x8d8 :y 33 :z #xee :first-conn #x34c :conn-count #x2) + (new 'static 'trail-node :x #x4e0 :y -81 :z #x138 :first-conn #x34e :conn-count #x2) + (new 'static 'trail-node :x #x4e6 :y -86 :z #x151 :first-conn #x350 :conn-count #x2) + (new 'static 'trail-node :x #x799 :y 50 :z #x206 :first-conn #x352 :conn-count #x1) + (new 'static 'trail-node :x #x72e :y 54 :z #x82 :first-conn #x353 :conn-count #x2) + (new 'static 'trail-node :x #x4da :y 42 :z #xcc :first-conn #x355 :conn-count #x1) + (new 'static 'trail-node :x #x8f4 :y 33 :z #x100 :first-conn #x356 :conn-count #x1) + (new 'static 'trail-node :x #xa31 :y 29 :z 96 :first-conn #x357 :conn-count #x1) + ) + :conn (new 'static 'inline-array trail-conn 428 + (new 'static 'trail-conn :head-id #x3 :tail-id #xaf :cost #xa5) + (new 'static 'trail-conn :head-id #x27 :tail-id #xa0 :cost #x271) + (new 'static 'trail-conn :head-id #x28 :tail-id #xa1 :visgroup-id #x1 :cost #x3d8) + (new 'static 'trail-conn :head-id #x29 :tail-id #x2b :cost #x342) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5d :cost #x219) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5f :visgroup-id #x2 :cost #x1a0) + (new 'static 'trail-conn :head-id #x2b :tail-id #x43 :visgroup-id #x3 :cost #x3aa) + (new 'static 'trail-conn :head-id #x2b :tail-id #x2d :visgroup-id #x3 :cost #x3a3) + (new 'static 'trail-conn :head-id #x2b :tail-id #xda :visgroup-id #x3 :cost #x197) + (new 'static 'trail-conn :head-id #x2c :tail-id #x2d :visgroup-id #x3 :cost #xf9) + (new 'static 'trail-conn :head-id #x2c :tail-id #x43 :visgroup-id #x3 :cost #x1d2) + (new 'static 'trail-conn :head-id #x2d :tail-id #x2e :cost #x155) + (new 'static 'trail-conn :head-id #x2d :tail-id #x43 :visgroup-id #x3 :cost #x121) + (new 'static 'trail-conn :head-id #x2e :tail-id #x2f :cost #xb0) + (new 'static 'trail-conn :head-id #x2f :tail-id #x30 :visgroup-id #x4 :cost #x131) + (new 'static 'trail-conn :head-id #x2f :tail-id #x41 :visgroup-id #x4 :cost #x32e) + (new 'static 'trail-conn :head-id #x30 :tail-id #x31 :visgroup-id #x5 :cost #x1f7) + (new 'static 'trail-conn :head-id #x30 :tail-id #x41 :visgroup-id #x4 :cost #x39a) + (new 'static 'trail-conn :head-id #x30 :tail-id #x36 :visgroup-id #x5 :cost #x281) + (new 'static 'trail-conn :head-id #x31 :tail-id #x32 :cost #x1e1) + (new 'static 'trail-conn :head-id #x31 :tail-id #x36 :visgroup-id #x5 :cost #x19d) + (new 'static 'trail-conn :head-id #x31 :tail-id #x33 :visgroup-id #x5 :cost #x1c8) + (new 'static 'trail-conn :head-id #x33 :tail-id #x34 :cost #x107) + (new 'static 'trail-conn :head-id #x30 :tail-id #x33 :visgroup-id #x5 :cost #x15f) + (new 'static 'trail-conn :head-id #x2e :tail-id #x34 :cost #x139) + (new 'static 'trail-conn :head-id #x34 :tail-id #x35 :cost #xb9) + (new 'static 'trail-conn :head-id #x35 :tail-id #x40 :visgroup-id #x6 :cost #x1c1) + (new 'static 'trail-conn :head-id #x35 :tail-id #x3b :visgroup-id #x7 :cost #x41e) + (new 'static 'trail-conn :head-id #x35 :tail-id #xdb :visgroup-id #x6 :cost #x1d9) + (new 'static 'trail-conn :head-id #x36 :tail-id #x37 :visgroup-id #x8 :cost #x14a) + (new 'static 'trail-conn :head-id #x33 :tail-id #x36 :visgroup-id #x5 :cost #x154) + (new 'static 'trail-conn :head-id #x37 :tail-id #x38 :visgroup-id #x8 :cost #x20b) + (new 'static 'trail-conn :head-id #x38 :tail-id #x39 :cost #x1d6) + (new 'static 'trail-conn :head-id #x36 :tail-id #x38 :visgroup-id #x8 :cost #x315) + (new 'static 'trail-conn :head-id #x38 :tail-id #x40 :visgroup-id #x8 :cost #x24c) + (new 'static 'trail-conn :head-id #x39 :tail-id #x3a :cost #x278) + (new 'static 'trail-conn :head-id #x3a :tail-id #x3b :cost #x129) + (new 'static 'trail-conn :head-id #x3b :tail-id #xda :visgroup-id #x9 :cost #x4aa) + (new 'static 'trail-conn :head-id #x3b :tail-id #xdb :visgroup-id #x7 :cost #x3f6) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3f :visgroup-id #xa :cost #x30a) + (new 'static 'trail-conn :head-id #x3c :tail-id #x3e :visgroup-id #xb :cost #x314) + (new 'static 'trail-conn :head-id #x3d :tail-id #x3e :visgroup-id #xc :cost #x3c9) + (new 'static 'trail-conn :head-id #x3f :tail-id #x55 :visgroup-id #xd :cost #x1e0) + (new 'static 'trail-conn :head-id #x3f :tail-id #x53 :visgroup-id #xe :cost #x2a1) + (new 'static 'trail-conn :head-id #x37 :tail-id #x40 :visgroup-id #x8 :cost #xfb) + (new 'static 'trail-conn :head-id #x3b :tail-id #x40 :visgroup-id #x7 :cost #x31b) + (new 'static 'trail-conn :head-id #x40 :tail-id #xdb :visgroup-id #x7 :cost #x30e) + (new 'static 'trail-conn :head-id #x41 :tail-id #x42 :visgroup-id #x4 :cost #x151) + (new 'static 'trail-conn :head-id #x44 :tail-id #x45 :cost #x3b1) + (new 'static 'trail-conn :head-id #x41 :tail-id #x44 :visgroup-id #xf :cost #xf4) + (new 'static 'trail-conn :head-id #x45 :tail-id #x46 :cost #xe6) + (new 'static 'trail-conn :head-id #x46 :tail-id #x47 :visgroup-id #x10 :cost #x189) + (new 'static 'trail-conn :head-id #x46 :tail-id #x48 :visgroup-id #x10 :cost #x18a) + (new 'static 'trail-conn :head-id #x47 :tail-id #x62 :cost #x229) + (new 'static 'trail-conn :head-id #x48 :tail-id #x49 :cost #x13b) + (new 'static 'trail-conn :head-id #x47 :tail-id #x48 :visgroup-id #x10 :cost #x1ab) + (new 'static 'trail-conn :head-id #x49 :tail-id #x4a :cost #x15c) + (new 'static 'trail-conn :head-id #x4a :tail-id #x4b :cost #xb9) + (new 'static 'trail-conn :head-id #x4b :tail-id #x4c :cost #xf1) + (new 'static 'trail-conn :head-id #x4c :tail-id #x4d :cost #x21c) + (new 'static 'trail-conn :head-id #x4d :tail-id #xd7 :visgroup-id #x11 :cost #x3d6) + (new 'static 'trail-conn :head-id #x2a :tail-id #x4e :visgroup-id #x2 :cost #x18e) + (new 'static 'trail-conn :head-id #x4f :tail-id #x60 :visgroup-id #x11 :cost #x634) + (new 'static 'trail-conn :head-id #x4d :tail-id #x4f :visgroup-id #x11 :cost #x392) + (new 'static 'trail-conn :head-id #x4f :tail-id #x51 :cost #x1f5) + (new 'static 'trail-conn :head-id #x50 :tail-id #x51 :cost #x167) + (new 'static 'trail-conn :head-id #x52 :tail-id #x53 :visgroup-id #x11 :cost #x196) + (new 'static 'trail-conn :head-id #x52 :tail-id #xd6 :visgroup-id #x11 :cost #x10f) + (new 'static 'trail-conn :head-id #x4f :tail-id #x53 :visgroup-id #x11 :cost #x4e2) + (new 'static 'trail-conn :head-id #x53 :tail-id #x54 :visgroup-id #xe :cost #x223) + (new 'static 'trail-conn :head-id #x4d :tail-id #x53 :visgroup-id #x11 :cost #x5d1) + (new 'static 'trail-conn :head-id #x54 :tail-id #x55 :visgroup-id #xe :cost #x1b1) + (new 'static 'trail-conn :head-id #x55 :tail-id #x56 :visgroup-id #x12 :cost #x15f) + (new 'static 'trail-conn :head-id #x56 :tail-id #x58 :visgroup-id #xb :cost #x191) + (new 'static 'trail-conn :head-id #x3f :tail-id #x57 :cost #x155) + (new 'static 'trail-conn :head-id #x58 :tail-id #x5a :visgroup-id #x13 :cost #x336) + (new 'static 'trail-conn :head-id #x3d :tail-id #x58 :visgroup-id #xb :cost #x25e) + (new 'static 'trail-conn :head-id #x58 :tail-id #x59 :visgroup-id #x13 :cost #x29f) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5a :visgroup-id #x13 :cost #x1b4) + (new 'static 'trail-conn :head-id #x59 :tail-id #x5e :cost #x141) + (new 'static 'trail-conn :head-id #x5a :tail-id #x5b :cost #x1d3) + (new 'static 'trail-conn :head-id #x5b :tail-id #x5c :cost #x140) + (new 'static 'trail-conn :head-id #x5c :tail-id #x5d :cost #x165) + (new 'static 'trail-conn :head-id #x2a :tail-id #x5e :visgroup-id #x2 :cost #x106) + (new 'static 'trail-conn :head-id #x5e :tail-id #x5f :visgroup-id #x2 :cost #x1ae) + (new 'static 'trail-conn :head-id #x4e :tail-id #x5e :visgroup-id #x2 :cost #x213) + (new 'static 'trail-conn :head-id #x4e :tail-id #x5f :visgroup-id #x2 :cost #xd7) + (new 'static 'trail-conn :head-id #x52 :tail-id #x5f :cost #xe4) + (new 'static 'trail-conn :head-id #x4d :tail-id #x60 :visgroup-id #x11 :cost #x3b1) + (new 'static 'trail-conn :head-id #x60 :tail-id #xd5 :visgroup-id #x11 :cost #x1ed) + (new 'static 'trail-conn :head-id #x60 :tail-id #x61 :cost #x3a9) + (new 'static 'trail-conn :head-id #x60 :tail-id #xd7 :visgroup-id #x11 :cost #x1c5) + (new 'static 'trail-conn :head-id #x62 :tail-id #x63 :cost #x2f) + (new 'static 'trail-conn :head-id #x63 :tail-id #x64 :cost #xbd) + (new 'static 'trail-conn :head-id #x65 :tail-id #xc6 :cost #x10a) + (new 'static 'trail-conn :head-id #x2 :tail-id #x65 :cost #xa7) + (new 'static 'trail-conn :head-id #x66 :tail-id #x67 :cost #x131) + (new 'static 'trail-conn :head-id #x67 :tail-id #x68 :cost #x409) + (new 'static 'trail-conn :head-id #x68 :tail-id #x69 :cost #x237) + (new 'static 'trail-conn :head-id #x69 :tail-id #x6a :cost #x5b6) + (new 'static 'trail-conn :head-id #x6a :tail-id #x6b :cost #x1fe) + (new 'static 'trail-conn :head-id #x6b :tail-id #x6c :cost #x211) + (new 'static 'trail-conn :head-id #x6c :tail-id #x6d :cost #x5a8) + (new 'static 'trail-conn :head-id #x6d :tail-id #x6e :cost #x112) + (new 'static 'trail-conn :head-id #x6e :tail-id #x6f :cost #x1ed) + (new 'static 'trail-conn :head-id #x6f :tail-id #x70 :cost #x82c) + (new 'static 'trail-conn :head-id #x70 :tail-id #x71 :cost #x1aa) + (new 'static 'trail-conn :head-id #x71 :tail-id #x72 :cost #x306) + (new 'static 'trail-conn :head-id #x72 :tail-id #x73 :cost #x260) + (new 'static 'trail-conn :head-id #x73 :tail-id #x74 :cost #x1e0) + (new 'static 'trail-conn :head-id #x75 :tail-id #x76 :cost #x20f) + (new 'static 'trail-conn :head-id #x76 :tail-id #xb8 :cost #x211) + (new 'static 'trail-conn :head-id #x77 :tail-id #xc5 :cost #x230) + (new 'static 'trail-conn :head-id #x78 :tail-id #x79 :cost #x4a6) + (new 'static 'trail-conn :head-id #x79 :tail-id #x7a :cost #x1fe) + (new 'static 'trail-conn :head-id #x7a :tail-id #x7b :cost #xff) + (new 'static 'trail-conn :head-id #x7b :tail-id #x7c :cost #x35d) + (new 'static 'trail-conn :head-id #x7c :tail-id #x7e :visgroup-id #x14 :cost #x923) + (new 'static 'trail-conn :head-id #x7e :tail-id #x7f :visgroup-id #x14 :cost #x461) + (new 'static 'trail-conn :head-id #x7e :tail-id #xb4 :cost #x1d2) + (new 'static 'trail-conn :head-id #x7f :tail-id #x9e :visgroup-id #x14 :cost #x201) + (new 'static 'trail-conn :head-id #x7e :tail-id #x80 :visgroup-id #x14 :cost #x169) + (new 'static 'trail-conn :head-id #x7c :tail-id #x80 :visgroup-id #x14 :cost #x91c) + (new 'static 'trail-conn :head-id #x80 :tail-id #x8a :cost #x21b) + (new 'static 'trail-conn :head-id #x81 :tail-id #x82 :visgroup-id #x14 :cost #x273) + (new 'static 'trail-conn :head-id #x82 :tail-id #x83 :visgroup-id #x14 :cost #x39b) + (new 'static 'trail-conn :head-id #x84 :tail-id #x85 :visgroup-id #x14 :cost #x4f4) + (new 'static 'trail-conn :head-id #x85 :tail-id #x86 :visgroup-id #x14 :cost #x2a1) + (new 'static 'trail-conn :head-id #x86 :tail-id #x87 :visgroup-id #x14 :cost #x2fb) + (new 'static 'trail-conn :head-id #x87 :tail-id #x88 :visgroup-id #x14 :cost #x3a9) + (new 'static 'trail-conn :head-id #x88 :tail-id #x89 :visgroup-id #x14 :cost #x595) + (new 'static 'trail-conn :head-id #x8a :tail-id #x8b :cost #x221) + (new 'static 'trail-conn :head-id #x8b :tail-id #x90 :cost #x100) + (new 'static 'trail-conn :head-id #x8c :tail-id #x8d :cost #x119) + (new 'static 'trail-conn :head-id #x8d :tail-id #x8e :cost #x128) + (new 'static 'trail-conn :head-id #x8e :tail-id #x8f :cost #x19d) + (new 'static 'trail-conn :head-id #x8c :tail-id #x90 :cost #x2e9) + (new 'static 'trail-conn :head-id #x91 :tail-id #x92 :visgroup-id #x15 :cost #x1fa) + (new 'static 'trail-conn :head-id #x93 :tail-id #x94 :visgroup-id #x15 :cost #x171) + (new 'static 'trail-conn :head-id #x95 :tail-id #xc7 :cost #x1fa) + (new 'static 'trail-conn :head-id #x95 :tail-id #xc2 :cost #x2ac) + (new 'static 'trail-conn :head-id #x96 :tail-id #xbe :cost #x3f1) + (new 'static 'trail-conn :head-id #x97 :tail-id #x98 :cost #x238) + (new 'static 'trail-conn :head-id #x97 :tail-id #xbf :visgroup-id #x15 :cost #x4ca) + (new 'static 'trail-conn :head-id #x97 :tail-id #xc0 :visgroup-id #x15 :cost #x382) + (new 'static 'trail-conn :head-id #x98 :tail-id #x99 :cost #x269) + (new 'static 'trail-conn :head-id #x99 :tail-id #x9a :cost #x143) + (new 'static 'trail-conn :head-id #x9a :tail-id #x9b :cost #xfc) + (new 'static 'trail-conn :head-id #x9b :tail-id #x9c :cost #xbf) + (new 'static 'trail-conn :head-id #x9c :tail-id #xe6 :flags (conn-flag cf0) :cost #x69) + (new 'static 'trail-conn :head-id #x9d :tail-id #x9e :flags (conn-flag cf0) :cost #x135) + (new 'static 'trail-conn :head-id #x9d :tail-id #xb7 :flags (conn-flag cf0) :cost #x1da) + (new 'static 'trail-conn :head-id #x9e :tail-id #xb7 :cost #x1b4) + (new 'static 'trail-conn :head-id #x96 :tail-id #x9f :cost #x2a7) + (new 'static 'trail-conn :head-id #x9f :tail-id #xbd :visgroup-id #x16 :cost #x2d7) + (new 'static 'trail-conn :head-id #x29 :tail-id #xa0 :cost #x239) + (new 'static 'trail-conn :head-id #xa2 :tail-id #xae :cost #x161) + (new 'static 'trail-conn :head-id #xa3 :tail-id #xa4 :cost #x2ad) + (new 'static 'trail-conn :head-id #xa2 :tail-id #xa3 :cost #x1f1) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xaf :cost #x30d) + (new 'static 'trail-conn :head-id #xa5 :tail-id #xa6 :cost #x3a1) + (new 'static 'trail-conn :head-id #xa6 :tail-id #xa7 :cost #x1fc) + (new 'static 'trail-conn :head-id #xa4 :tail-id #xa8 :cost #x229) + (new 'static 'trail-conn :head-id #xa8 :tail-id #xaa :visgroup-id #x17 :cost #x2bb) + (new 'static 'trail-conn :head-id #xa7 :tail-id #xa9 :cost #x29a) + (new 'static 'trail-conn :head-id #xa8 :tail-id #xa9 :visgroup-id #x17 :cost #x289) + (new 'static 'trail-conn :head-id #xa9 :tail-id #xaa :visgroup-id #x17 :cost #x23d) + (new 'static 'trail-conn :head-id #xaa :tail-id #xab :cost #x34b) + (new 'static 'trail-conn :head-id #xab :tail-id #xac :cost #x2d9) + (new 'static 'trail-conn :head-id #xac :tail-id #xad :cost #x41c) + (new 'static 'trail-conn :head-id #x1 :tail-id #xad :cost #x151) + (new 'static 'trail-conn :head-id #x4 :tail-id #xae :cost #xa1) + (new 'static 'trail-conn :head-id #x89 :tail-id #xb0 :visgroup-id #x14 :cost #x355) + (new 'static 'trail-conn :head-id #x7d :tail-id #xb1 :visgroup-id #x14 :cost #xed) + (new 'static 'trail-conn :head-id #xb1 :tail-id #xb2 :visgroup-id #x14 :cost #x341) + (new 'static 'trail-conn :head-id #x7c :tail-id #xb3 :visgroup-id #x14 :cost #xb07) + (new 'static 'trail-conn :head-id #x9e :tail-id #xb3 :visgroup-id #x14 :cost #x199) + (new 'static 'trail-conn :head-id #xb5 :tail-id #xb4 :flags (conn-flag cf0) :cost #x195) + (new 'static 'trail-conn :head-id #xb6 :tail-id #xb5 :flags (conn-flag cf0) :cost #x161) + (new 'static 'trail-conn :head-id #xb7 :tail-id #xb6 :flags (conn-flag cf0) :cost #x211) + (new 'static 'trail-conn :head-id #x77 :tail-id #xb8 :cost #x1f2) + (new 'static 'trail-conn :head-id #x75 :tail-id #xb9 :cost #x1ce) + (new 'static 'trail-conn :head-id #x74 :tail-id #xb9 :cost #x188) + (new 'static 'trail-conn :head-id #x9f :tail-id #xba :visgroup-id #x16 :cost #x1c0) + (new 'static 'trail-conn :head-id #xba :tail-id #xbf :cost #x4a0) + (new 'static 'trail-conn :head-id #x8f :tail-id #xbb :visgroup-id #x18 :cost #x361) + (new 'static 'trail-conn :head-id #xbb :tail-id #xc4 :cost #x28b) + (new 'static 'trail-conn :head-id #xbb :tail-id #xbc :visgroup-id #x18 :cost #x251) + (new 'static 'trail-conn :head-id #x8f :tail-id #xbc :visgroup-id #x18 :cost #x423) + (new 'static 'trail-conn :head-id #xbc :tail-id #xbd :cost #x1fa) + (new 'static 'trail-conn :head-id #xba :tail-id #xbd :visgroup-id #x16 :cost #x1cc) + (new 'static 'trail-conn :head-id #xbe :tail-id #xbf :visgroup-id #x19 :cost #x432) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc9 :visgroup-id #x1a :cost #x3c9) + (new 'static 'trail-conn :head-id #xbf :tail-id #xc3 :visgroup-id #x1b :cost #x2d4) + (new 'static 'trail-conn :head-id #xc0 :tail-id #xc3 :visgroup-id #x15 :cost #x1fb) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc4 :cost #x44c) + (new 'static 'trail-conn :head-id #xc2 :tail-id #xc8 :cost #x40d) + (new 'static 'trail-conn :head-id #x97 :tail-id #xc3 :visgroup-id #x15 :cost #x40c) + (new 'static 'trail-conn :head-id #xc3 :tail-id #xc9 :visgroup-id #x1c :cost #x2d4) + (new 'static 'trail-conn :head-id #x78 :tail-id #xc5 :cost #x14e) + (new 'static 'trail-conn :head-id #x66 :tail-id #xc6 :cost #x3b3) + (new 'static 'trail-conn :head-id #xc1 :tail-id #xc7 :cost #x45c) + (new 'static 'trail-conn :head-id #xbe :tail-id #xc9 :visgroup-id #x19 :cost #x448) + (new 'static 'trail-conn :head-id #xc8 :tail-id #xc9 :cost #x2e8) + (new 'static 'trail-conn :head-id #x5 :tail-id #xca :cost #x19a) + (new 'static 'trail-conn :head-id #xca :tail-id #xcb :cost #x212) + (new 'static 'trail-conn :head-id #xcb :tail-id #xcc :cost #x898) + (new 'static 'trail-conn :head-id #xcc :tail-id #xcd :cost #xa23) + (new 'static 'trail-conn :head-id #xcd :tail-id #xce :cost #x3ed) + (new 'static 'trail-conn :head-id #xce :tail-id #xcf :cost #x725) + (new 'static 'trail-conn :head-id #xcf :tail-id #xd0 :cost #x3df) + (new 'static 'trail-conn :head-id #xd0 :tail-id #xd1 :cost #x32c) + (new 'static 'trail-conn :head-id #xd1 :tail-id #xd2 :cost #x2cc) + (new 'static 'trail-conn :head-id #x42 :tail-id #xd3 :visgroup-id #x1d :cost #x11f) + (new 'static 'trail-conn :head-id #x43 :tail-id #xd3 :cost #xcf) + (new 'static 'trail-conn :head-id #xd3 :tail-id #xd4 :visgroup-id #x1d :cost #xf1) + (new 'static 'trail-conn :head-id #x2f :tail-id #xd4 :visgroup-id #x4 :cost #x1be) + (new 'static 'trail-conn :head-id #x30 :tail-id #xd4 :visgroup-id #x4 :cost #x29f) + (new 'static 'trail-conn :head-id #x42 :tail-id #xd4 :visgroup-id #x1e :cost #xb9) + (new 'static 'trail-conn :head-id #x4e :tail-id #xd5 :cost #xd1) + (new 'static 'trail-conn :head-id #xd5 :tail-id #xd6 :visgroup-id #x11 :cost #x10a) + (new 'static 'trail-conn :head-id #x53 :tail-id #xd6 :visgroup-id #x11 :cost #x259) + (new 'static 'trail-conn :head-id #xd5 :tail-id #xd7 :visgroup-id #x11 :cost #x70) + (new 'static 'trail-conn :head-id #xd6 :tail-id #xd7 :visgroup-id #x11 :cost #x107) + (new 'static 'trail-conn :head-id #x4f :tail-id #xd7 :visgroup-id #x11 :cost #x540) + (new 'static 'trail-conn :head-id #xd8 :tail-id #xd9 :visgroup-id #x1f :cost #x183) + (new 'static 'trail-conn :head-id #x2c :tail-id #xda :visgroup-id #x20 :cost #x179) + (new 'static 'trail-conn :head-id #x2c :tail-id #xdb :visgroup-id #x21 :cost #xe4) + (new 'static 'trail-conn :head-id #xda :tail-id #xdb :visgroup-id #x9 :cost #x190) + (new 'static 'trail-conn :head-id #xdc :tail-id #xdd :cost #x2f1) + (new 'static 'trail-conn :head-id #xdc :tail-id #xde :cost #x198) + (new 'static 'trail-conn :head-id #xde :tail-id #xdf :cost #x222) + (new 'static 'trail-conn :head-id #xdf :tail-id #xe0 :cost #x1b5) + (new 'static 'trail-conn :head-id #xe0 :tail-id #xe1 :cost #x2d0) + (new 'static 'trail-conn :head-id #xe1 :tail-id #xe2 :cost #x384) + (new 'static 'trail-conn :head-id #xe2 :tail-id #xe3 :cost #x31e) + (new 'static 'trail-conn :head-id #xe3 :tail-id #xe4 :cost #x32a) + (new 'static 'trail-conn :head-id #xd2 :tail-id #xe4 :cost #x305) + (new 'static 'trail-conn :head-id #x27 :tail-id #xe5 :cost #x89) + (new 'static 'trail-conn :tail-id #xe5 :cost #x71) + (new 'static 'trail-conn :head-id #xe6 :tail-id #xe7 :flags (conn-flag cf0) :cost #xce) + (new 'static 'trail-conn :head-id #x9d :tail-id #xe7 :cost #xd2) + (new 'static 'trail-conn :head-id #xe8 :tail-id #xe9 :visgroup-id #x22 :cost #xc94) + (new 'static 'trail-conn :head-id #xe9 :tail-id #xea :visgroup-id #x22 :cost #x12c5) + (new 'static 'trail-conn :head-id #xeb :tail-id #xec :visgroup-id #x23 :cost #xb19) + (new 'static 'trail-conn :tail-id #x6 :cost #xb97) + (new 'static 'trail-conn :tail-id #x8 :cost #xef2) + (new 'static 'trail-conn :tail-id #x9 :cost #x4393) + (new 'static 'trail-conn :tail-id #xa :cost #x15ed) + (new 'static 'trail-conn :tail-id #x1c :cost #x4cc7) + (new 'static 'trail-conn :tail-id #x1d :cost #x4283) + (new 'static 'trail-conn :head-id #x1 :tail-id #x9 :cost #x25c8) + (new 'static 'trail-conn :head-id #x1 :tail-id #xa :cost #x1e22) + (new 'static 'trail-conn :head-id #x1 :tail-id #xd :cost #x15cd) + (new 'static 'trail-conn :head-id #x1 :tail-id #xf :cost #xb80) + (new 'static 'trail-conn :head-id #x1 :tail-id #x10 :cost #xe10) + (new 'static 'trail-conn :head-id #x1 :tail-id #x1d :cost #x1d3c) + (new 'static 'trail-conn :head-id #x2 :tail-id #x9 :cost #x23a2) + (new 'static 'trail-conn :head-id #x2 :tail-id #x11 :cost #xeeb) + (new 'static 'trail-conn :head-id #x2 :tail-id #x12 :cost #x9c9) + (new 'static 'trail-conn :head-id #x2 :tail-id #x19 :cost #x2152) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1a :cost #x2aa1) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1b :cost #x28df) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1d :cost #x18a1) + (new 'static 'trail-conn :head-id #x2 :tail-id #x1e :cost #x22cd) + (new 'static 'trail-conn :head-id #x2 :tail-id #x26 :cost #x3239) + (new 'static 'trail-conn :head-id #x3 :tail-id #x14 :cost #x97a) + (new 'static 'trail-conn :head-id #x3 :tail-id #x15 :cost #xe62) + (new 'static 'trail-conn :head-id #x3 :tail-id #x17 :cost #x133f) + (new 'static 'trail-conn :head-id #x3 :tail-id #x18 :cost #x2c28) + (new 'static 'trail-conn :head-id #x3 :tail-id #x24 :cost #x2709) + (new 'static 'trail-conn :head-id #x4 :tail-id #xc :cost #x23b8) + (new 'static 'trail-conn :head-id #x4 :tail-id #xe :cost #x1c33) + (new 'static 'trail-conn :head-id #x4 :tail-id #x15 :cost #x84b) + (new 'static 'trail-conn :head-id #x4 :tail-id #x16 :cost #x1289) + (new 'static 'trail-conn :head-id #x4 :tail-id #x21 :cost #x2a28) + (new 'static 'trail-conn :head-id #x4 :tail-id #x22 :cost #x2943) + (new 'static 'trail-conn :head-id #x4 :tail-id #x23 :cost #x3476) + (new 'static 'trail-conn :head-id #x4 :tail-id #x24 :cost #x2a15) + (new 'static 'trail-conn :head-id #x4 :tail-id #x25 :cost #x2253) + (new 'static 'trail-conn :head-id #x5 :tail-id #x18 :cost #x1eb3) + (new 'static 'trail-conn :head-id #x5 :tail-id #x19 :cost #x1809) + (new 'static 'trail-conn :head-id #x5 :tail-id #x1a :cost #xe8f) + (new 'static 'trail-conn :head-id #x6 :tail-id #x7 :cost #x541) + (new 'static 'trail-conn :head-id #x6 :tail-id #x8 :cost #x8fa) + (new 'static 'trail-conn :head-id #x6 :tail-id #xa :cost #x10c9) + (new 'static 'trail-conn :head-id #x6 :tail-id #xb :cost #x1465) + (new 'static 'trail-conn :head-id #x6 :tail-id #xc :cost #x1baf) + (new 'static 'trail-conn :head-id #x6 :tail-id #x20 :cost #x3869) + (new 'static 'trail-conn :head-id #x6 :tail-id #x21 :cost #x2bf1) + (new 'static 'trail-conn :head-id #x7 :tail-id #x8 :cost #xde3) + (new 'static 'trail-conn :head-id #x7 :tail-id #xa :cost #x155f) + (new 'static 'trail-conn :head-id #x7 :tail-id #xb :cost #xf56) + (new 'static 'trail-conn :head-id #x7 :tail-id #xc :cost #x16ca) + (new 'static 'trail-conn :head-id #x7 :tail-id #x20 :cost #x3329) + (new 'static 'trail-conn :head-id #x7 :tail-id #x21 :cost #x26e3) + (new 'static 'trail-conn :head-id #x7 :tail-id #x22 :cost #x31fc) + (new 'static 'trail-conn :head-id #x8 :tail-id #xa :cost #x7f7) + (new 'static 'trail-conn :head-id #x8 :tail-id #xb :cost #x1be9) + (new 'static 'trail-conn :head-id #x8 :tail-id #x20 :cost #x407f) + (new 'static 'trail-conn :head-id #x9 :tail-id #xa :cost #x2de6) + (new 'static 'trail-conn :head-id #x9 :tail-id #xd :cost #x2cdf) + (new 'static 'trail-conn :head-id #x9 :tail-id #xf :cost #x2808) + (new 'static 'trail-conn :head-id #x9 :tail-id #x10 :cost #x1839) + (new 'static 'trail-conn :head-id #x9 :tail-id #x11 :cost #x14bf) + (new 'static 'trail-conn :head-id #x9 :tail-id #x12 :cost #x217a) + (new 'static 'trail-conn :head-id #x9 :tail-id #x1c :cost #x9c7) + (new 'static 'trail-conn :head-id #x9 :tail-id #x1d :cost #xb7a) + (new 'static 'trail-conn :head-id #x9 :tail-id #x24 :cost #x5140) + (new 'static 'trail-conn :head-id #xa :tail-id #xd :cost #x960) + (new 'static 'trail-conn :head-id #xa :tail-id #xf :cost #x12d8) + (new 'static 'trail-conn :head-id #xa :tail-id #x10 :cost #x22a7) + (new 'static 'trail-conn :head-id #xa :tail-id #x11 :cost #x2996) + (new 'static 'trail-conn :head-id #xa :tail-id #x19 :cost #x4694) + (new 'static 'trail-conn :head-id #xa :tail-id #x1b :cost #x481c) + (new 'static 'trail-conn :head-id #xa :tail-id #x1c :cost #x374b) + (new 'static 'trail-conn :head-id #xa :tail-id #x1d :cost #x2ca0) + (new 'static 'trail-conn :head-id #xb :tail-id #xc :cost #x7ac) + (new 'static 'trail-conn :head-id #xb :tail-id #x20 :cost #x24b2) + (new 'static 'trail-conn :head-id #xb :tail-id #x21 :cost #x178f) + (new 'static 'trail-conn :head-id #xb :tail-id #x22 :cost #x22da) + (new 'static 'trail-conn :head-id #xb :tail-id #x25 :cost #x38e4) + (new 'static 'trail-conn :head-id #xc :tail-id #xe :cost #x8f4) + (new 'static 'trail-conn :head-id #xc :tail-id #x15 :cost #x2a87) + (new 'static 'trail-conn :head-id #xc :tail-id #x16 :cost #x1192) + (new 'static 'trail-conn :head-id #xc :tail-id #x20 :cost #x1f2f) + (new 'static 'trail-conn :head-id #xc :tail-id #x21 :cost #x107e) + (new 'static 'trail-conn :head-id #xc :tail-id #x22 :cost #x1b3a) + (new 'static 'trail-conn :head-id #xc :tail-id #x25 :cost #x3226) + (new 'static 'trail-conn :head-id #xd :tail-id #xf :cost #xa4f) + (new 'static 'trail-conn :head-id #xd :tail-id #x10 :cost #x1d07) + (new 'static 'trail-conn :head-id #xd :tail-id #x11 :cost #x246c) + (new 'static 'trail-conn :head-id #xd :tail-id #x1b :cost #x4410) + (new 'static 'trail-conn :head-id #xd :tail-id #x1c :cost #x369a) + (new 'static 'trail-conn :head-id #xd :tail-id #x1d :cost #x2948) + (new 'static 'trail-conn :head-id #xe :tail-id #x15 :cost #x23a4) + (new 'static 'trail-conn :head-id #xe :tail-id #x16 :cost #x9ab) + (new 'static 'trail-conn :head-id #xe :tail-id #x20 :cost #x2742) + (new 'static 'trail-conn :head-id #xe :tail-id #x21 :cost #x1746) + (new 'static 'trail-conn :head-id #xe :tail-id #x22 :cost #x1f5c) + (new 'static 'trail-conn :head-id #xe :tail-id #x25 :cost #x301f) + (new 'static 'trail-conn :head-id #xf :tail-id #x10 :cost #x1458) + (new 'static 'trail-conn :head-id #xf :tail-id #x11 :cost #x1bd9) + (new 'static 'trail-conn :head-id #xf :tail-id #x1b :cost #x3bd6) + (new 'static 'trail-conn :head-id #xf :tail-id #x1c :cost #x31c2) + (new 'static 'trail-conn :head-id #xf :tail-id #x1d :cost #x223f) + (new 'static 'trail-conn :head-id #x10 :tail-id #x11 :cost #x782) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1b :cost #x277e) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1d :cost #xf2e) + (new 'static 'trail-conn :head-id #x10 :tail-id #x1e :cost #x1b91) + (new 'static 'trail-conn :head-id #x10 :tail-id #x26 :cost #x2bab) + (new 'static 'trail-conn :head-id #x11 :tail-id #x12 :cost #xe37) + (new 'static 'trail-conn :head-id #x11 :tail-id #x13 :cost #x1709) + (new 'static 'trail-conn :head-id #x11 :tail-id #x17 :cost #x1f54) + (new 'static 'trail-conn :head-id #x11 :tail-id #x19 :cost #x1cff) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1b :cost #x1ffe) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1d :cost #x9c7) + (new 'static 'trail-conn :head-id #x11 :tail-id #x1e :cost #x151e) + (new 'static 'trail-conn :head-id #x11 :tail-id #x26 :cost #x2525) + (new 'static 'trail-conn :head-id #x12 :tail-id #x13 :cost #x8dd) + (new 'static 'trail-conn :head-id #x12 :tail-id #x17 :cost #x1129) + (new 'static 'trail-conn :head-id #x12 :tail-id #x19 :cost #x179d) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1a :cost #x20dd) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1b :cost #x2003) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1d :cost #x1604) + (new 'static 'trail-conn :head-id #x12 :tail-id #x1e :cost #x1d41) + (new 'static 'trail-conn :head-id #x12 :tail-id #x26 :cost #x2b79) + (new 'static 'trail-conn :head-id #x13 :tail-id #x14 :cost #x729) + (new 'static 'trail-conn :head-id #x13 :tail-id #x17 :cost #x84d) + (new 'static 'trail-conn :head-id #x13 :tail-id #x19 :cost #x1715) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1b :cost #x2207) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1d :cost #x1e35) + (new 'static 'trail-conn :head-id #x13 :tail-id #x1e :cost #x239b) + (new 'static 'trail-conn :head-id #x13 :tail-id #x24 :cost #x2807) + (new 'static 'trail-conn :head-id #x13 :tail-id #x26 :cost #x3040) + (new 'static 'trail-conn :head-id #x14 :tail-id #x15 :cost #x1500) + (new 'static 'trail-conn :head-id #x14 :tail-id #x17 :cost #x9de) + (new 'static 'trail-conn :head-id #x14 :tail-id #x18 :cost #x22de) + (new 'static 'trail-conn :head-id #x14 :tail-id #x19 :cost #x1e3d) + (new 'static 'trail-conn :head-id #x14 :tail-id #x1b :cost #x290e) + (new 'static 'trail-conn :head-id #x14 :tail-id #x22 :cost #x4092) + (new 'static 'trail-conn :head-id #x14 :tail-id #x23 :cost #x4b50) + (new 'static 'trail-conn :head-id #x14 :tail-id #x24 :cost #x23d1) + (new 'static 'trail-conn :head-id #x15 :tail-id #x16 :cost #x1a09) + (new 'static 'trail-conn :head-id #x15 :tail-id #x17 :cost #x1cab) + (new 'static 'trail-conn :head-id #x15 :tail-id #x18 :cost #x3347) + (new 'static 'trail-conn :head-id #x15 :tail-id #x21 :cost #x2ebe) + (new 'static 'trail-conn :head-id #x15 :tail-id #x22 :cost #x2b9a) + (new 'static 'trail-conn :head-id #x15 :tail-id #x23 :cost #x3651) + (new 'static 'trail-conn :head-id #x15 :tail-id #x24 :cost #x21d3) + (new 'static 'trail-conn :head-id #x16 :tail-id #x20 :cost #x2cb9) + (new 'static 'trail-conn :head-id #x16 :tail-id #x21 :cost #x1be2) + (new 'static 'trail-conn :head-id #x16 :tail-id #x22 :cost #x2039) + (new 'static 'trail-conn :head-id #x16 :tail-id #x23 :cost #x2b53) + (new 'static 'trail-conn :head-id #x16 :tail-id #x25 :cost #x29a2) + (new 'static 'trail-conn :head-id #x17 :tail-id #x18 :cost #x1902) + (new 'static 'trail-conn :head-id #x17 :tail-id #x21 :cost #x4b55) + (new 'static 'trail-conn :head-id #x17 :tail-id #x22 :cost #x47f4) + (new 'static 'trail-conn :head-id #x17 :tail-id #x23 :cost #x524e) + (new 'static 'trail-conn :head-id #x17 :tail-id #x24 :cost #x2108) + (new 'static 'trail-conn :head-id #x18 :tail-id #x19 :cost #x1f1d) + (new 'static 'trail-conn :head-id #x18 :tail-id #x1a :cost #x1d88) + (new 'static 'trail-conn :head-id #x18 :tail-id #x21 :cost #x6196) + (new 'static 'trail-conn :head-id #x18 :tail-id #x24 :cost #x259d) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1a :cost #x98d) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1b :cost #xca8) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1c :cost #x23c6) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1d :cost #x1cab) + (new 'static 'trail-conn :head-id #x19 :tail-id #x1e :cost #x18a5) + (new 'static 'trail-conn :head-id #x19 :tail-id #x26 :cost #x1e69) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1c :cost #x1b8d) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1d :cost #x1b95) + (new 'static 'trail-conn :head-id #x1b :tail-id #x1e :cost #x1258) + (new 'static 'trail-conn :head-id #x1b :tail-id #x26 :cost #x126d) + (new 'static 'trail-conn :head-id #x1c :tail-id #x1e :cost #xb6f) + (new 'static 'trail-conn :head-id #x1c :tail-id #x26 :cost #x1039) + (new 'static 'trail-conn :head-id #x1e :tail-id #x26 :cost #x101b) + (new 'static 'trail-conn :head-id #x1f :tail-id #x20 :cost #x843) + (new 'static 'trail-conn :head-id #x1f :tail-id #x23 :cost #x971) + (new 'static 'trail-conn :head-id #x1f :tail-id #x25 :cost #x3032) + (new 'static 'trail-conn :head-id #x20 :tail-id #x21 :cost #x10e4) + (new 'static 'trail-conn :head-id #x20 :tail-id #x23 :cost #x10f5) + (new 'static 'trail-conn :head-id #x21 :tail-id #x22 :cost #xd21) + (new 'static 'trail-conn :head-id #x21 :tail-id #x25 :cost #x2bb9) + (new 'static 'trail-conn :head-id #x22 :tail-id #x23 :cost #xb5f) + (new 'static 'trail-conn :head-id #x22 :tail-id #x25 :cost #x2105) + (new 'static 'trail-conn :head-id #x23 :tail-id #x25 :cost #x273d) + (new 'static 'trail-conn :head-id #x24 :tail-id #x25 :cost #x1e60) + ) + :blocker (new 'static 'inline-array trail-blocker 74 + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1125 :z 0.9936 :w -4731696.0) + :center (new 'static 'vector :x 9146428.0 :y 371370.4 :z 3725948.0 :w 682040000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8689 :z 0.4948 :w -9125051.0) + :center (new 'static 'vector :x 8072478.0 :y 308327.62 :z 4264420.0 :w 263339340000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7402 :z 0.6723 :w 2653051.5) + :center (new 'static 'vector :x 7562956.0 :y 295042.25 :z 4380726.5 :w 232228680000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1638 :z 0.9864 :w -2783623.0) + :center (new 'static 'vector :x 6592654.0 :y 377521.78 :z 3916902.0 :w 430130600000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9965 :z 0.0827 :w 5610316.5) + :center (new 'static 'vector :x 5933055.0 :y 435638.7 :z 3652691.2 :w 24886516000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9667 :z 0.2558 :w 5830362.0) + :center (new 'static 'vector :x 9140181.0 :y 233274.16 :z 11750152.0 :w 51376620000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.5915 :z -0.8062 :w 7346245.0) + :center (new 'static 'vector :x 7568014.0 :y 453685.66 :z 3559071.0 :w 153248600000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.089 :z -0.996 :w 2612675.8) + :center (new 'static 'vector :x 8695089.0 :y 299778.47 :z 3400314.5 :w 664896500000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3289 :z -0.9443 :w 152054.5) + :center (new 'static 'vector :x 9736743.0 :y 285960.6 :z 3552960.0 :w 59461657000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6253 :z 0.7803 :w -6935198.0) + :center (new 'static 'vector :x 8501451.0 :y 284317.7 :z 2074840.6 :w 76535380000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9983 :z 0.058 :w 8141383.5) + :center (new 'static 'vector :x 8247192.5 :y 461892.8 :z 1582481.0 :w 444395000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8965 :z -0.4429 :w 9169087.0) + :center (new 'static 'vector :x 7778713.0 :y 327165.94 :z 4955687.5 :w 59618050000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7231 :z -0.6906 :w 9120963.0) + :center (new 'static 'vector :x 7208877.5 :y 433763.94 :z 5657845.0 :w 447749900000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9857 :z -0.1679 :w 7682724.0) + :center (new 'static 'vector :x 6669045.0 :y 446891.62 :z 6599044.0 :w 215842800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9462 :z 0.3235 :w 3953419.5) + :center (new 'static 'vector :x 6761184.5 :y 342837.25 :z 7554108.0 :w 276852900000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9134 :z -0.4069 :w 9608156.0) + :center (new 'static 'vector :x 6766713.5 :y 383021.06 :z 8420965.0 :w 163856100000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.3476 :z 0.9376 :w -5946326.0) + :center (new 'static 'vector :x 7657183.5 :y 433771.3 :z 9181592.0 :w 1267121700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9934 :z -0.1142 :w 9749108.0) + :center (new 'static 'vector :x 8655665.0 :y 361256.16 :z 10064587.0 :w 245418380000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.3237 :z 0.9461 :w -7203847.0) + :center (new 'static 'vector :x 8848382.0 :y 322531.3 :z 10641631.0 :w 69633410000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9256 :z 0.3784 :w -12480410.0) + :center (new 'static 'vector :x 9197853.0 :y 264560.62 :z 10481867.0 :w 70310510000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5643 :z -0.8255 :w 3202868.0) + :center (new 'static 'vector :x 8907303.0 :y 298152.75 :z 9969662.0 :w 224428830000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9791 :z 0.2031 :w -10310371.0) + :center (new 'static 'vector :x 8618617.0 :y 415728.03 :z 9210755.0 :w 252659700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.2572 :z 0.9663 :w -10668968.0) + :center (new 'static 'vector :x 8958155.0 :y 417275.5 :z 8655768.0 :w 60598080000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2142 :z 0.9767 :w -6423298.5) + :center (new 'static 'vector :x 9721977.0 :y 292871.78 :z 8707971.0 :w 290793800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1361 :z 0.9906 :w -7346493.0) + :center (new 'static 'vector :x 10568231.0 :y 279102.66 :z 8867347.0 :w 104543780000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3249 :z -0.9457 :w 4889772.5) + :center (new 'static 'vector :x 10507733.0 :y 330863.0 :z 8780593.0 :w 162129460000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1462 :z -0.9892 :w 7075907.0) + :center (new 'static 'vector :x 9526885.0 :y 379341.22 :z 8561130.0 :w 368895200000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8367 :z -0.5476 :w -2829163.5) + :center (new 'static 'vector :x 8703486.0 :y 463851.12 :z 8131705.5 :w 166099400000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9971 :z -0.0759 :w -7864684.0) + :center (new 'static 'vector :x 8421231.0 :y 572663.4 :z 7012187.5 :w 610769240000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6425 :z -0.7662 :w -596989.0) + :center (new 'static 'vector :x 7901920.5 :y 645105.25 :z 5847551.0 :w 360939700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8939 :z 0.4481 :w -9100370.0) + :center (new 'static 'vector :x 7630314.5 :y 455814.34 :z 5085879.0 :w 177138430000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9746 :z -0.2235 :w 11419790.0) + :center (new 'static 'vector :x 8954981.0 :y 143055.25 :z 12038326.0 :w 58901720000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.6489 :z 0.7607 :w -3561754.0) + :center (new 'static 'vector :x 9146100.0 :y 183096.53 :z 12483725.0 :w 104213960000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9531 :z -0.3023 :w 12789708.0) + :center (new 'static 'vector :x 9155091.0 :y 326885.78 :z 13437888.0 :w 611381000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8439 :z -0.5363 :w 15134314.0) + :center (new 'static 'vector :x 8691936.0 :y 404147.0 :z 14539794.0 :w 179249680000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9858 :z -0.1678 :w -5844506.0) + :center (new 'static 'vector :x 8459426.0 :y 405548.25 :z 14863583.0 :w 1161817500.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.807 :z 0.5905 :w -15579990.0) + :center (new 'static 'vector :x 9119988.0 :y 285951.6 :z 13919906.0 :w 1273738400000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.0444 :z 0.999 :w -13431201.0) + :center (new 'static 'vector :x 10405824.0 :y 206093.11 :z 12981881.0 :w 385196920000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9634 :z -0.2678 :w -7152425.0) + :center (new 'static 'vector :x 10972997.0 :y 346034.6 :z 12765694.0 :w 38497243000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.2778 :z -0.9606 :w 9047115.0) + :center (new 'static 'vector :x 10292570.0 :y 420488.4 :z 12395395.0 :w 427892300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.87 :z -0.493 :w -2386249.0) + :center (new 'static 'vector :x 9521519.0 :y 294565.88 :z 11961280.0 :w 84442750000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.245 :z -0.9695 :w 13650130.0) + :center (new 'static 'vector :x 9193798.0 :y 178708.08 :z 11755497.0 :w 36429517000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9904 :z 0.1381 :w 10164303.0) + :center (new 'static 'vector :x 12121332.0 :y 184091.44 :z 13329591.0 :w 83171150000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.0538 :z 0.9985 :w -12940374.0) + :center (new 'static 'vector :x 13611436.0 :y 76338.38 :z 13693008.0 :w 2110766000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9586 :z -0.2844 :w -10522729.0) + :center (new 'static 'vector :x 14919739.0 :y 8266.957 :z 13292481.0 :w 249754170000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2552 :z -0.9668 :w 15696236.0) + :center (new 'static 'vector :x 12365085.0 :y 261430.89 :z 12969511.0 :w 86229880000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9522 :z -0.3054 :w 15175665.0) + :center (new 'static 'vector :x 12950608.0 :y 318203.5 :z 9311046.0 :w 73021280000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.1237 :z 0.9923 :w -7902563.5) + :center (new 'static 'vector :x 13464861.0 :y 346127.97 :z 9642352.0 :w 362033300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9652 :z 0.2613 :w -16112085.0) + :center (new 'static 'vector :x 14135765.0 :y 369306.4 :z 9442508.0 :w 80945430000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.0965 :z -0.9953 :w 7753678.0) + :center (new 'static 'vector :x 13621513.0 :y 341381.53 :z 9111202.0 :w 350066250000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7864 :z -0.6177 :w 2959799.5) + :center (new 'static 'vector :x 1168740.0 :y 301132.6 :z 3303644.2 :w 162430630000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9527 :z 0.3036 :w -222696.88) + :center (new 'static 'vector :x 1058277.0 :y 483592.2 :z 4054023.2 :w 207628700000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.0397 :z 0.9992 :w -4436617.0) + :center (new 'static 'vector :x 1563199.1 :y 583908.94 :z 4502383.5 :w 134971200000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8191 :z 0.5735 :w -4171633.0) + :center (new 'static 'vector :x 2212196.0 :y 529444.44 :z 4113777.8 :w 242680300000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5576 :z -0.83 :w 1689084.5) + :center (new 'static 'vector :x 1955974.8 :y 442061.62 :z 3348796.5 :w 421429800000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.6226 :z -0.7825 :w 4009395.2) + :center (new 'static 'vector :x 5081066.5 :y 400086.22 :z 9166559.0 :w 90156840000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2752 :z -0.9613 :w 9967075.0) + :center (new 'static 'vector :x 3988847.8 :y 375567.97 :z 9225439.0 :w 796480240000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8919 :z 0.452 :w -1488531.8) + :center (new 'static 'vector :x 3478787.8 :y 372856.44 :z 10156706.0 :w 591571100000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.9996 :z -0.0255 :w 4101710.2) + :center (new 'static 'vector :x 3808919.2 :y 388330.7 :z 11523623.0 :w 464929360000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.5725 :z 0.8198 :w -7835852.0) + :center (new 'static 'vector :x 3970758.2 :y 445811.1 :z 12330002.0 :w 47964635000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.8873 :z 0.461 :w -9425125.0) + :center (new 'static 'vector :x 4267376.0 :y 490456.7 :z 12229220.0 :w 65036440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9995 :z 0.0296 :w -4738159.0) + :center (new 'static 'vector :x 4414503.5 :y 482651.75 :z 10999151.0 :w 1009992000000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.5929 :z 0.8052 :w -10683513.0) + :center (new 'static 'vector :x 4879973.0 :y 447050.12 :z 9674136.0 :w 293270650000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7624 :z -0.647 :w 13522696.0) + :center (new 'static 'vector :x 8616344.0 :y 271181.4 :z 10745772.0 :w 14854555000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.1436 :z -0.9896 :w 2709579.5) + :center (new 'static 'vector :x 6739987.5 :y 500817.5 :z 3715988.8 :w 268838500000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9041 :z -0.4271 :w -4074751.5) + :center (new 'static 'vector :x 6153563.5 :y 479135.34 :z 3485588.8 :w 29910442000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.7209 :z -0.6929 :w 6690756.5) + :center (new 'static 'vector :x 5999943.0 :y 470525.53 :z 3412737.2 :w 13394435000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.3076 :z 0.9515 :w -6551099.5) + :center (new 'static 'vector :x 10048142.0 :y 320423.94 :z 3636592.2 :w 22177810000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.4929 :z 0.87 :w -12538429.0) + :center (new 'static 'vector :x 10428455.0 :y 282332.78 :z 8502271.0 :w 69275480000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.2338 :z 0.9722 :w -9959851.0) + :center (new 'static 'vector :x 12002097.0 :y 243238.1 :z 13129951.0 :w 13565368000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9997 :z -0.0219 :w -8673147.0) + :center (new 'static 'vector :x 8707029.0 :y 266254.34 :z 1447136.9 :w 207467990000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.9282 :z 0.3719 :w -18483212.0) + :center (new 'static 'vector :x 14931639.0 :y 20171.98 :z 12429556.0 :w 171646440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x -0.8493 :z -0.5278 :w 19170898.0) + :center (new 'static 'vector :x 14617537.0 :y 28237.004 :z 12798421.0 :w 786893440000.0) + ) + (new 'static 'trail-blocker + :plane (new 'static 'plane :x 0.4009 :z -0.9161 :w 6741929.5) + :center (new 'static 'vector :x 13399058.0 :y 165914.22 :z 13223074.0 :w 671702840000.0) + ) + ) + :conn-ids (new 'static 'array uint16 856 + #xef + #xf5 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #xaa + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #x5f + #x101 + #x102 + #x103 + #x104 + #x105 + #x106 + #x107 + #x108 + #x109 + #x0 + #x10a + #x10b + #x10c + #x10d + #x10e + #xab + #x10f + #x110 + #x111 + #x112 + #x113 + #x114 + #x115 + #x116 + #x117 + #xcc + #x118 + #x119 + #x11a + #xf5 + #x11b + #x11c + #x11d + #x11e + #x11f + #x120 + #x121 + #x11b + #x122 + #x123 + #x124 + #x125 + #x126 + #x127 + #x128 + #xf6 + #x11c + #x122 + #x129 + #x12a + #x12b + #xf7 + #xfb + #x101 + #x12c + #x12d + #x12e + #x12f + #x130 + #x131 + #x132 + #x133 + #x134 + #xf8 + #xfc + #x11d + #x123 + #x129 + #x12c + #x135 + #x136 + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #x11e + #x124 + #x12a + #x13d + #x13e + #x13f + #x140 + #x141 + #x10f + #x11f + #x125 + #x13d + #x142 + #x143 + #x144 + #x145 + #x146 + #x147 + #x148 + #xfd + #x12d + #x135 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #x110 + #x142 + #x14f + #x150 + #x151 + #x152 + #x153 + #x154 + #xfe + #x12e + #x136 + #x149 + #x155 + #x156 + #x157 + #x158 + #x159 + #xff + #x12f + #x137 + #x14a + #x155 + #x15a + #x15b + #x15c + #x15d + #x15e + #x102 + #x130 + #x138 + #x14b + #x156 + #x15a + #x15f + #x160 + #x161 + #x162 + #x163 + #x164 + #x165 + #x166 + #x103 + #x131 + #x15f + #x167 + #x168 + #x169 + #x16a + #x16b + #x16c + #x16d + #x16e + #x160 + #x167 + #x16f + #x170 + #x171 + #x172 + #x173 + #x174 + #x175 + #x176 + #x10a + #x16f + #x177 + #x178 + #x179 + #x17a + #x17b + #x17c + #x17d + #x17e + #x10b + #x111 + #x143 + #x14f + #x177 + #x17f + #x180 + #x181 + #x182 + #x183 + #x184 + #x185 + #x112 + #x144 + #x150 + #x17f + #x186 + #x187 + #x188 + #x189 + #x18a + #x10c + #x161 + #x168 + #x170 + #x178 + #x180 + #x18b + #x18c + #x18d + #x18e + #x18f + #x10d + #x118 + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x104 + #x119 + #x139 + #x162 + #x169 + #x171 + #x17a + #x190 + #x194 + #x195 + #x196 + #x197 + #x198 + #x199 + #x105 + #x11a + #x16a + #x191 + #x194 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x195 + #x19a + #x19b + #x19c + #x19d + #xf9 + #x132 + #x13b + #x14d + #x158 + #x196 + #x19a + #x19e + #x19f + #xfa + #x100 + #x107 + #x133 + #x13c + #x14e + #x159 + #x15c + #x164 + #x16c + #x173 + #x197 + #x19b + #x108 + #x15d + #x165 + #x16d + #x174 + #x198 + #x19c + #x19e + #x1a0 + #x1a1 + #x1a2 + #x1a3 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x1a1 + #x1a4 + #x1a5 + #x113 + #x121 + #x127 + #x13f + #x146 + #x152 + #x182 + #x187 + #x18c + #x192 + #x1a4 + #x1a6 + #x1a7 + #x114 + #x128 + #x140 + #x147 + #x153 + #x17c + #x183 + #x188 + #x18d + #x1a6 + #x1a8 + #x1a9 + #x115 + #x17d + #x184 + #x189 + #x18e + #x1a2 + #x1a5 + #x1a8 + #x1aa + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x1ab + #x117 + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x1ab + #x109 + #x15e + #x166 + #x16e + #x176 + #x199 + #x19d + #x19f + #x1a0 + #x1 + #xee + #x2 + #x3 + #x9b + #x4 + #x5 + #x3d + #x53 + #x3 + #x6 + #x7 + #x8 + #x9 + #xa + #xe2 + #xe3 + #x7 + #x9 + #xb + #xc + #xb + #xd + #x18 + #xd + #xe + #xf + #xd8 + #xe + #x10 + #x11 + #x12 + #x17 + #xd9 + #x10 + #x13 + #x14 + #x15 + #x13 + #x15 + #x16 + #x17 + #x1e + #x16 + #x18 + #x19 + #x19 + #x1a + #x1b + #x1c + #x12 + #x14 + #x1d + #x1e + #x21 + #x1d + #x1f + #x2c + #x1f + #x20 + #x21 + #x22 + #x20 + #x23 + #x23 + #x24 + #x1b + #x24 + #x25 + #x26 + #x2d + #x27 + #x28 + #x29 + #x4c + #x28 + #x29 + #x27 + #x2a + #x2b + #x4a + #x1a + #x22 + #x2c + #x2d + #x2e + #xf + #x11 + #x2f + #x31 + #x2f + #xd5 + #xda + #x6 + #xa + #xc + #xd6 + #x30 + #x31 + #x30 + #x32 + #x32 + #x33 + #x34 + #x33 + #x35 + #x37 + #x34 + #x36 + #x37 + #x36 + #x38 + #x38 + #x39 + #x39 + #x3a + #x3a + #x3b + #x3b + #x3c + #x3f + #x46 + #x58 + #x3d + #x55 + #x56 + #xdb + #x3e + #x3f + #x40 + #x44 + #xe0 + #x41 + #x40 + #x41 + #x42 + #x43 + #x57 + #x2b + #x42 + #x44 + #x45 + #x46 + #xdd + #x45 + #x47 + #x2a + #x47 + #x48 + #x48 + #x49 + #x4a + #x49 + #x4b + #x4c + #x4d + #x4d + #x4e + #x4f + #x4b + #x4e + #x50 + #x50 + #x51 + #x51 + #x52 + #x4 + #x52 + #x4f + #x53 + #x54 + #x55 + #x5 + #x54 + #x56 + #x57 + #x3e + #x58 + #x59 + #x5a + #x5b + #x5a + #x35 + #x5c + #x5c + #x5d + #x5d + #x5e + #x5f + #x60 + #xc8 + #x60 + #x61 + #x61 + #x62 + #x62 + #x63 + #x63 + #x64 + #x64 + #x65 + #x65 + #x66 + #x66 + #x67 + #x67 + #x68 + #x68 + #x69 + #x69 + #x6a + #x6a + #x6b + #x6b + #x6c + #x6c + #x6d + #x6d + #xb6 + #x6e + #xb5 + #x6e + #x6f + #x70 + #xb4 + #x71 + #xc7 + #x71 + #x72 + #x72 + #x73 + #x73 + #x74 + #x74 + #x75 + #x7a + #xaf + #xad + #x75 + #x76 + #x77 + #x79 + #x76 + #x78 + #x79 + #x7a + #x7b + #x7c + #x7c + #x7d + #x7d + #x7e + #x7e + #x7f + #x7f + #x80 + #x80 + #x81 + #x81 + #x82 + #x82 + #xac + #x7b + #x83 + #x83 + #x84 + #x85 + #x88 + #x85 + #x86 + #x86 + #x87 + #x87 + #xb9 + #xbc + #x84 + #x88 + #x89 + #x89 + #x8a + #x8a + #x8b + #x8c + #x8d + #x99 + #x8e + #x8f + #x90 + #xc5 + #x8e + #x91 + #x91 + #x92 + #x92 + #x93 + #x93 + #x94 + #x94 + #x95 + #x96 + #x97 + #xf1 + #x78 + #x96 + #x98 + #xb0 + #x99 + #x9a + #xb7 + #x1 + #x9b + #x2 + #x9c + #x9e + #x9d + #x9e + #x9d + #xa2 + #x9f + #xa0 + #xa0 + #xa1 + #xa1 + #xa4 + #xa2 + #xa3 + #xa5 + #xa4 + #xa5 + #xa6 + #xa3 + #xa6 + #xa7 + #xa7 + #xa8 + #xa8 + #xa9 + #xa9 + #xaa + #x9c + #xab + #x0 + #x9f + #xac + #xad + #xae + #xae + #xaf + #xb0 + #x77 + #xb1 + #xb1 + #xb2 + #xb2 + #xb3 + #x97 + #x98 + #xb3 + #x6f + #xb4 + #xb5 + #xb6 + #xb7 + #xb8 + #xbe + #xb9 + #xba + #xbb + #xbb + #xbc + #xbd + #x9a + #xbd + #xbe + #x8d + #xbf + #xca + #x8f + #xb8 + #xbf + #xc0 + #xc1 + #x90 + #xc2 + #xc3 + #xc9 + #x8c + #xc4 + #xc1 + #xc2 + #xc5 + #xc6 + #xba + #xc3 + #x70 + #xc7 + #x5e + #xc8 + #x8b + #xc9 + #xc4 + #xcb + #xc0 + #xc6 + #xca + #xcb + #xcc + #xcd + #xcd + #xce + #xce + #xcf + #xcf + #xd0 + #xd0 + #xd1 + #xd1 + #xd2 + #xd2 + #xd3 + #xd3 + #xd4 + #xd4 + #xed + #xd5 + #xd6 + #xd7 + #xd7 + #xd8 + #xd9 + #xda + #x59 + #xdb + #xdc + #xde + #x43 + #xdc + #xdd + #xdf + #x3c + #x5b + #xde + #xdf + #xe0 + #xe1 + #xe1 + #x8 + #x25 + #xe2 + #xe4 + #x1c + #x26 + #x2e + #xe3 + #xe4 + #xe5 + #xe6 + #xe5 + #xe6 + #xe7 + #xe7 + #xe8 + #xe8 + #xe9 + #xe9 + #xea + #xea + #xeb + #xeb + #xec + #xec + #xed + #xee + #xef + #x95 + #xf0 + #xf0 + #xf1 + #xf2 + #xf2 + #xf3 + #xf3 + #xf4 + #xf4 + ) + :visgroup (new 'static 'inline-array trail-conn-hash-cell 24 + (new 'static 'trail-conn-hash-cell :conn-count #x2 :first-pov #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x6 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #xb :conn-count #x5 :first-pov #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x14 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x18 :conn-count #x5 :first-pov #x1d) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x21 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x27 :conn-count #x7 :first-pov #x2e) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x33 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x39 :conn-count #x6 :first-pov #x3f) + (new 'static 'trail-conn-hash-cell :first-conn #x4 :conn-count #x43 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x48 :conn-count #x3 :first-pov #x4b) + (new 'static 'trail-conn-hash-cell :first-conn #x8 :conn-count #x53 :first-pov #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x58 :conn-count #x3 :first-pov #x5b) + (new 'static 'trail-conn-hash-cell :first-conn #x6 :conn-count #x61 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x65 :conn-count #x3 :first-pov #x68) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x6b :first-pov #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x6e :conn-count #x3 :first-pov #x71) + (new 'static 'trail-conn-hash-cell :first-conn #x5 :conn-count #x76 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x7c :conn-count #x3 :first-pov #x7f) + (new 'static 'trail-conn-hash-cell :first-conn #x3 :conn-count #x82 :first-pov #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x88 :conn-count #x2 :first-pov #x8a) + (new 'static 'trail-conn-hash-cell :first-conn #x7 :conn-count #x91 :first-pov #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x95 :conn-count #x2 :first-pov #x97) + (new 'static 'trail-conn-hash-cell :first-conn #x1) + ) + :visnode-ids (new 'static 'array uint16 152 + #x27 + #xa0 + #x2a + #x4e + #x5e + #x5f + #x2b + #x2c + #x2d + #x43 + #xda + #x2f + #x30 + #x41 + #x42 + #xd4 + #x30 + #x31 + #x33 + #x36 + #x35 + #x3b + #x40 + #xdb + #x35 + #x3b + #x40 + #xda + #xdb + #x36 + #x37 + #x38 + #x40 + #x2c + #x35 + #x3b + #x40 + #xda + #xdb + #x3c + #x3d + #x3f + #x53 + #x54 + #x55 + #x56 + #x3c + #x3d + #x3e + #x56 + #x58 + #x3c + #x3d + #x3e + #x55 + #x56 + #x58 + #x3c + #x3d + #x3f + #x53 + #x54 + #x55 + #x3f + #x53 + #x54 + #x55 + #x2f + #x41 + #x42 + #x44 + #xd4 + #x46 + #x47 + #x48 + #x4d + #x4f + #x52 + #x53 + #x60 + #xd5 + #xd6 + #xd7 + #x3c + #x3d + #x3e + #x55 + #x56 + #x58 + #x59 + #x5a + #x7c + #x7e + #x7f + #x80 + #x9e + #xb3 + #x97 + #xbf + #xc0 + #xc3 + #x9f + #xba + #xbd + #xa8 + #xa9 + #xaa + #x8f + #xbb + #xbc + #xbe + #xbf + #xc9 + #x97 + #xbe + #xbf + #xc3 + #xc9 + #x97 + #xbe + #xbf + #xc0 + #xc3 + #xc9 + #xbf + #xc3 + #xc9 + #x42 + #xd3 + #xd4 + #x2f + #x30 + #x41 + #x42 + #xd3 + #xd4 + #x5c + #x5d + #x2b + #x2c + #x2d + #x3b + #x43 + #xda + #xdb + #x2c + #x3b + #xda + #xdb + #x7 + #x20 + #x0 + ) + :conn-hash (new 'static 'trail-conn-hash + :cell-width (meters 301.0936) + :origin (new 'static 'vector :x -709628.75 :z -2139132.0 :w 1.0) + :cell (new 'static 'inline-array trail-conn-hash-cell 256 + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell) + (new 'static 'trail-conn-hash-cell :conn-count #x12) + (new 'static 'trail-conn-hash-cell :first-conn #x12 :conn-count #x20) + (new 'static 'trail-conn-hash-cell :first-conn #x32 :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x41 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d) + (new 'static 'trail-conn-hash-cell :first-conn #x4d :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x52 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x56 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x61 :conn-count #x26) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87) + (new 'static 'trail-conn-hash-cell :first-conn #x87 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x88 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x91 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x9f :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #xa5 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #xaa :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #xac :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #xb8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9) + (new 'static 'trail-conn-hash-cell :first-conn #xb9 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #xc3 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #xce :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #xe3 :conn-count #x1f) + (new 'static 'trail-conn-hash-cell :first-conn #x102 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x10f :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x11e :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x12e :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x136 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137) + (new 'static 'trail-conn-hash-cell :first-conn #x137 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x13c :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x142 :conn-count #x17) + (new 'static 'trail-conn-hash-cell :first-conn #x159 :conn-count #x1a) + (new 'static 'trail-conn-hash-cell :first-conn #x173 :conn-count #x14) + (new 'static 'trail-conn-hash-cell :first-conn #x187 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x191 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x194 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x1a2 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3) + (new 'static 'trail-conn-hash-cell :first-conn #x1b3 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x1bd :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x1cc :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x1d8 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x1e6 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x1f7 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x1fe) + (new 'static 'trail-conn-hash-cell :first-conn #x1fe :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x209 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x213 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216) + (new 'static 'trail-conn-hash-cell :first-conn #x216 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x21b :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x225 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x231 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x23b :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x248 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x24b) + (new 'static 'trail-conn-hash-cell :first-conn #x24b :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x25c :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x267 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x26d :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e) + (new 'static 'trail-conn-hash-cell :first-conn #x26e :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x270 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x275 :conn-count #xc) + (new 'static 'trail-conn-hash-cell :first-conn #x281 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x28e :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x298 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x29d :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x2a7 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x2b5 :conn-count #x11) + (new 'static 'trail-conn-hash-cell :first-conn #x2c6 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x2d0 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6) + (new 'static 'trail-conn-hash-cell :first-conn #x2d6 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x2d7 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x2df :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x2e5 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x2ee :conn-count #x16) + (new 'static 'trail-conn-hash-cell :first-conn #x304 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x30e :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x318 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x31a :conn-count #x15) + (new 'static 'trail-conn-hash-cell :first-conn #x32f :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x33e :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x34e :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353) + (new 'static 'trail-conn-hash-cell :first-conn #x353 :conn-count #xa) + (new 'static 'trail-conn-hash-cell :first-conn #x35d :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x35e :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x35f :conn-count #x13) + (new 'static 'trail-conn-hash-cell :first-conn #x372 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x379 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x384 :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x394 :conn-count #x1a) + (new 'static 'trail-conn-hash-cell :first-conn #x3ae :conn-count #x1b) + (new 'static 'trail-conn-hash-cell :first-conn #x3c9 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x3d2 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db) + (new 'static 'trail-conn-hash-cell :first-conn #x3db :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x3dc :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x3dd :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x3df :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x3e6 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x3f1 :conn-count #x19) + (new 'static 'trail-conn-hash-cell :first-conn #x40a :conn-count #x18) + (new 'static 'trail-conn-hash-cell :first-conn #x422 :conn-count #xd) + (new 'static 'trail-conn-hash-cell :first-conn #x42f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x43d :conn-count #x12) + (new 'static 'trail-conn-hash-cell :first-conn #x44f :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x458 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c) + (new 'static 'trail-conn-hash-cell :first-conn #x45c :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x45d :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x463 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x469 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x472 :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x480 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x484 :conn-count #xb) + (new 'static 'trail-conn-hash-cell :first-conn #x48f :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x49d :conn-count #xf) + (new 'static 'trail-conn-hash-cell :first-conn #x4ac :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x4b1 :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba) + (new 'static 'trail-conn-hash-cell :first-conn #x4ba :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x4c3 :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x4cb :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4cd :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x4cf :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x4d2 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x4d3 :conn-count #x7) + (new 'static 'trail-conn-hash-cell :first-conn #x4da :conn-count #x10) + (new 'static 'trail-conn-hash-cell :first-conn #x4ea :conn-count #xe) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8) + (new 'static 'trail-conn-hash-cell :first-conn #x4f8 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x4f9 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x4fc :conn-count #x8) + (new 'static 'trail-conn-hash-cell :first-conn #x504 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x506 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x507 :conn-count #x6) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d) + (new 'static 'trail-conn-hash-cell :first-conn #x50d :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x516 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x517 :conn-count #x1) + (new 'static 'trail-conn-hash-cell :first-conn #x518 :conn-count #x5) + (new 'static 'trail-conn-hash-cell :first-conn #x51d :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x520 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x522 :conn-count #x3) + (new 'static 'trail-conn-hash-cell :first-conn #x525 :conn-count #x4) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529) + (new 'static 'trail-conn-hash-cell :first-conn #x529 :conn-count #x2) + (new 'static 'trail-conn-hash-cell :first-conn #x52b) + (new 'static 'trail-conn-hash-cell :first-conn #x52b) + (new 'static 'trail-conn-hash-cell :first-conn #x52b :conn-count #x9) + (new 'static 'trail-conn-hash-cell :first-conn #x534) + ) + :conn-ids (new 'static 'array uint16 1336 + #x27 + #x28 + #x29 + #x2a + #x2b + #x45 + #x47 + #x48 + #x49 + #x4a + #x4b + #x4c + #x4d + #x4e + #x4f + #x53 + #x54 + #x55 + #x4 + #x5 + #x2b + #x39 + #x3a + #x3b + #x3c + #x3d + #x3e + #x3f + #x40 + #x41 + #x42 + #x43 + #x44 + #x45 + #x46 + #x53 + #x54 + #x55 + #x56 + #x57 + #x58 + #x59 + #x5a + #x5b + #xdb + #xdc + #xdd + #xde + #xdf + #xe0 + #xf + #x11 + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x39 + #x5c + #x5d + #xe + #x10 + #x11 + #x12 + #x13 + #x14 + #x15 + #x17 + #x1d + #x1e + #x21 + #xd9 + #x4b + #x4e + #x50 + #x51 + #x52 + #x4 + #x52 + #x5a + #xe1 + #x6 + #xa + #xc + #xf + #x2f + #xd5 + #xd6 + #xd7 + #xd8 + #xd9 + #xda + #x3 + #x6 + #x7 + #x8 + #x9 + #xa + #xb + #xc + #xd + #xe + #xf + #x15 + #x16 + #x17 + #x18 + #x19 + #x1a + #x1b + #x1c + #x1d + #x1e + #x1f + #x20 + #x21 + #x22 + #x23 + #x24 + #x25 + #x26 + #x2c + #x2d + #x2e + #x9b + #xd8 + #xd9 + #xe2 + #xe3 + #xe4 + #xc4 + #x90 + #xc0 + #xc1 + #xc2 + #xc4 + #xc5 + #xc6 + #xca + #xcb + #x8a + #x90 + #x91 + #x92 + #x93 + #x94 + #x95 + #x96 + #x97 + #xac + #xb0 + #xf0 + #xf1 + #xf3 + #x81 + #x82 + #xac + #xaf + #xb0 + #xf3 + #x7f + #x80 + #x81 + #xf2 + #xf3 + #x2 + #xf5 + #x1 + #x2 + #x9b + #xee + #xef + #xf4 + #xf5 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #xf4 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x1a1 + #x1a4 + #x1a5 + #x8b + #x8c + #xc4 + #xc9 + #x120 + #x126 + #x12b + #x13e + #x145 + #x151 + #x186 + #x8d + #x8f + #x99 + #x9a + #xb7 + #xb8 + #xbb + #xbc + #xbd + #xbe + #xbf + #xc0 + #xc1 + #xc3 + #xc5 + #xc9 + #xca + #x120 + #x126 + #x12b + #x13e + #x75 + #x76 + #x77 + #x78 + #x79 + #x7a + #x7b + #x7c + #x83 + #x84 + #x88 + #x89 + #x8a + #x8e + #x8f + #x90 + #x91 + #x96 + #x97 + #x98 + #xad + #xae + #xb0 + #xb1 + #xb2 + #xb3 + #xc5 + #x120 + #x126 + #x12b + #x13e + #x74 + #x75 + #x76 + #x78 + #x7a + #x7c + #x7d + #xaf + #x120 + #x124 + #x126 + #x127 + #x12b + #x73 + #x74 + #x7e + #x7f + #xf2 + #x11e + #x11f + #x120 + #x121 + #x124 + #x125 + #x126 + #x127 + #x128 + #x12b + #xf2 + #xf5 + #x11b + #x11c + #x11d + #x11e + #x11f + #x120 + #x121 + #x122 + #x123 + #x124 + #x125 + #x126 + #x127 + #x128 + #xf6 + #xf7 + #xf8 + #xf9 + #xfa + #x11c + #x11d + #x122 + #xf9 + #x1a1 + #x1a2 + #x1a3 + #x1a4 + #x1a5 + #x145 + #x151 + #x186 + #x1a4 + #x1a6 + #x1a7 + #xb9 + #xba + #xbb + #xbc + #xc3 + #x113 + #x121 + #x127 + #x13f + #x140 + #x145 + #x146 + #x147 + #x151 + #x152 + #x182 + #x186 + #x187 + #x18c + #x192 + #x1a4 + #x1a6 + #x1a7 + #x85 + #x86 + #x87 + #x88 + #xb9 + #xbc + #x10f + #x11f + #x121 + #x125 + #x127 + #x128 + #x13d + #x13e + #x13f + #x140 + #x141 + #x142 + #x143 + #x144 + #x145 + #x146 + #x147 + #x148 + #x151 + #x152 + #x70 + #x71 + #x7c + #x7d + #xb4 + #xc7 + #x11e + #x11f + #x121 + #x124 + #x125 + #x127 + #x128 + #x12a + #x13d + #x13e + #x13f + #x140 + #x141 + #x142 + #x71 + #x72 + #x73 + #x11e + #x11f + #x121 + #x125 + #x128 + #x12a + #x12b + #x123 + #x12a + #x12b + #xf6 + #xf7 + #xf8 + #xfa + #xfc + #x11c + #x11d + #x122 + #x123 + #x129 + #x12a + #x12b + #x135 + #x136 + #xf7 + #xf8 + #xf9 + #xfa + #xfc + #x11d + #x123 + #x129 + #x12c + #x135 + #x136 + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #x115 + #x17d + #x184 + #x189 + #x18e + #x1a2 + #x1a3 + #x1a5 + #x1a8 + #x1aa + #x114 + #x115 + #x128 + #x140 + #x147 + #x153 + #x17c + #x183 + #x188 + #x189 + #x18d + #x1a6 + #x1a7 + #x1a8 + #x1a9 + #x113 + #x128 + #x140 + #x147 + #x153 + #x182 + #x186 + #x187 + #x188 + #x189 + #x18c + #x192 + #x10f + #x113 + #x128 + #x141 + #x143 + #x144 + #x148 + #x151 + #x152 + #x153 + #x154 + #x186 + #x187 + #x189 + #x6e + #x6f + #xb4 + #xb5 + #x10f + #x110 + #x142 + #x143 + #x144 + #x14f + #x150 + #x151 + #x152 + #x153 + #x154 + #x186 + #x187 + #x69 + #x6a + #x6b + #x6c + #x6d + #xb5 + #xb6 + #xfc + #xfd + #x12d + #x135 + #x136 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #xf7 + #xf9 + #xfa + #x12c + #x137 + #x138 + #x139 + #x13a + #x13b + #x13c + #xf7 + #xf9 + #x13b + #x17d + #x184 + #x18e + #x1a3 + #x1aa + #x114 + #x115 + #x17c + #x17d + #x183 + #x184 + #x18d + #x18e + #x1a7 + #x1a9 + #x114 + #x115 + #x141 + #x148 + #x17c + #x182 + #x183 + #x184 + #x188 + #x18c + #x18d + #x192 + #x113 + #x141 + #x148 + #x154 + #x182 + #x188 + #x189 + #x18a + #x18c + #x192 + #x10f + #x110 + #x112 + #x143 + #x144 + #x14f + #x150 + #x17f + #x186 + #x187 + #x188 + #x189 + #x18a + #x67 + #x68 + #x69 + #xfc + #xfd + #xfe + #x12d + #x12e + #x136 + #x149 + #x14a + #x14b + #x14c + #x14d + #x14e + #x155 + #x156 + #x157 + #x158 + #x159 + #xfa + #x12c + #x12d + #x137 + #x138 + #x139 + #x13a + #x13c + #x14c + #x14d + #x14e + #xf7 + #xf9 + #x12c + #x12d + #x13b + #x14d + #xf9 + #x1a3 + #x1aa + #x17d + #x18e + #x1a3 + #x1a7 + #x1a9 + #x114 + #x115 + #x141 + #x148 + #x154 + #x17c + #x17d + #x183 + #x184 + #x18a + #x18d + #x18e + #x113 + #x114 + #x115 + #x154 + #x17c + #x17d + #x182 + #x183 + #x184 + #x18a + #x18c + #x18d + #x192 + #x10f + #x110 + #x112 + #x113 + #x114 + #x115 + #x143 + #x14f + #x17f + #x18c + #x64 + #x65 + #x66 + #x67 + #xa7 + #xa7 + #xa8 + #xa9 + #xaa + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #xfb + #xfc + #xfd + #xfe + #xff + #x100 + #x12e + #x14a + #x14b + #x155 + #x156 + #x157 + #x158 + #x159 + #xfa + #xfb + #x12e + #x137 + #x138 + #x139 + #x13a + #x13c + #x14a + #x14b + #x14c + #x14e + #x155 + #x156 + #x157 + #x158 + #x159 + #xf7 + #xfa + #x12c + #x12d + #x12e + #x13a + #x13b + #x13c + #x14d + #x158 + #xf7 + #xf9 + #x12c + #x12d + #x13b + #x14d + #x1aa + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x117 + #x141 + #x148 + #x154 + #x18a + #x18e + #x117 + #x17c + #x17d + #x182 + #x183 + #x184 + #x18d + #x18e + #x192 + #x9c + #xab + #x10f + #x110 + #x111 + #x112 + #x113 + #x114 + #x115 + #x116 + #x117 + #x143 + #x14f + #x17c + #x17d + #x17f + #x182 + #x183 + #x184 + #x18c + #x18d + #x192 + #x63 + #x64 + #x9c + #x9d + #x9e + #xa2 + #xa3 + #xa5 + #xa6 + #xa7 + #x60 + #x61 + #x62 + #x63 + #xa0 + #xa1 + #xa4 + #xa5 + #xa6 + #xc8 + #xff + #x100 + #xfb + #xff + #x100 + #x101 + #x12f + #x137 + #x138 + #x139 + #x14a + #x14b + #x14c + #x14e + #x155 + #x156 + #x157 + #x159 + #x15a + #x15b + #x15c + #x15d + #x15e + #xfa + #xfb + #x100 + #x101 + #x12e + #x12f + #x130 + #x13a + #x13c + #x14e + #x158 + #x159 + #x15c + #x15d + #x15e + #xf7 + #xf9 + #xfb + #x101 + #x12c + #x12d + #x12e + #x12f + #x130 + #x131 + #x132 + #x133 + #x134 + #x13b + #x14d + #x158 + #xf9 + #x132 + #x13b + #x14d + #x158 + #x117 + #x141 + #x148 + #x154 + #x18a + #x1a3 + #x1a7 + #x1a9 + #x1aa + #x1ab + #x117 + #x18e + #x10b + #x111 + #x116 + #x143 + #x14f + #x177 + #x17c + #x17d + #x17f + #x180 + #x181 + #x182 + #x183 + #x184 + #x185 + #x18c + #x18d + #x18e + #x192 + #x10b + #x10e + #x177 + #x17c + #x17d + #x180 + #x18c + #x0 + #x5e + #x5f + #x9f + #xa0 + #xc8 + #x10a + #x10b + #x10c + #x10d + #x10e + #x5f + #x101 + #x102 + #x103 + #x104 + #x105 + #x106 + #x107 + #x108 + #x109 + #x131 + #x134 + #x15f + #x160 + #x161 + #x16c + #x101 + #x102 + #x107 + #x108 + #x109 + #x130 + #x131 + #x134 + #x138 + #x139 + #x14b + #x14c + #x156 + #x157 + #x15a + #x15b + #x15f + #x160 + #x161 + #x162 + #x163 + #x164 + #x165 + #x166 + #x16c + #x173 + #xfa + #x100 + #x107 + #x108 + #x109 + #x130 + #x131 + #x133 + #x134 + #x13a + #x13c + #x14c + #x14e + #x157 + #x159 + #x15b + #x15c + #x15d + #x15e + #x163 + #x164 + #x165 + #x166 + #x16c + #x173 + #x197 + #x19b + #x108 + #x131 + #x133 + #x134 + #x15d + #x15e + #x165 + #x166 + #x19e + #xf9 + #x132 + #x13b + #x14d + #x158 + #x196 + #x19a + #x19e + #x19f + #x1ab + #x1ab + #x116 + #x185 + #x10e + #x116 + #x181 + #x185 + #x18d + #x18e + #x192 + #x10e + #x134 + #x177 + #x17c + #x17d + #x17e + #x180 + #x181 + #x18c + #x18d + #x18e + #x10a + #x10c + #x10d + #x134 + #x160 + #x161 + #x167 + #x168 + #x16f + #x170 + #x171 + #x172 + #x173 + #x174 + #x175 + #x176 + #x177 + #x178 + #x179 + #x17a + #x17b + #x17c + #x17d + #x17e + #x18c + #x103 + #x104 + #x105 + #x106 + #x131 + #x134 + #x15f + #x160 + #x161 + #x167 + #x168 + #x169 + #x16a + #x16b + #x16c + #x16d + #x16e + #x171 + #x172 + #x173 + #x174 + #x176 + #x17a + #x17b + #x104 + #x105 + #x106 + #x139 + #x162 + #x169 + #x16a + #x16b + #x16d + #x16e + #x173 + #x174 + #x176 + #x106 + #x109 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16d + #x16e + #x174 + #x176 + #x197 + #x198 + #x19b + #x108 + #x109 + #x13a + #x15d + #x15e + #x165 + #x166 + #x16d + #x16e + #x174 + #x176 + #x196 + #x198 + #x19a + #x19b + #x19c + #x19e + #x1a0 + #x109 + #x15e + #x166 + #x16e + #x176 + #x196 + #x19a + #x19f + #x1a0 + #x15e + #x166 + #x19f + #x1a0 + #x1ab + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x10e + #x134 + #x175 + #x17e + #x18f + #x192 + #x134 + #x175 + #x17e + #x180 + #x181 + #x18d + #x18e + #x18f + #x192 + #x10c + #x10d + #x161 + #x168 + #x170 + #x175 + #x178 + #x179 + #x180 + #x18b + #x18c + #x18d + #x18e + #x18f + #x171 + #x172 + #x17a + #x17b + #x104 + #x105 + #x139 + #x162 + #x169 + #x16a + #x16b + #x171 + #x172 + #x17a + #x17b + #x106 + #x139 + #x14c + #x157 + #x15b + #x162 + #x163 + #x16b + #x172 + #x17b + #x196 + #x197 + #x198 + #x199 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x196 + #x199 + #x19a + #x19b + #x19c + #x19d + #x109 + #x16e + #x176 + #x199 + #x19d + #x109 + #x15e + #x166 + #x16e + #x176 + #x199 + #x19d + #x19f + #x1a0 + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x1ab + #x10e + #x116 + #x134 + #x175 + #x17e + #x185 + #x18f + #x193 + #x18f + #x193 + #x181 + #x192 + #x10d + #x179 + #x18b + #x190 + #x104 + #x105 + #x169 + #x16a + #x171 + #x17a + #x190 + #x104 + #x105 + #x119 + #x139 + #x162 + #x169 + #x16a + #x171 + #x17a + #x190 + #x194 + #x195 + #x196 + #x197 + #x198 + #x199 + #x106 + #x13a + #x14c + #x157 + #x15b + #x163 + #x16b + #x172 + #x17b + #x195 + #x19a + #x19b + #x19c + #x19d + #x193 + #x181 + #x192 + #x193 + #x10d + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x190 + #x191 + #x191 + #x105 + #x119 + #x11a + #x16a + #x191 + #x194 + #x10d + #x118 + #x179 + #x181 + #x18b + #x190 + #x191 + #x192 + #x193 + #x118 + #x118 + #xcc + #xcd + #x118 + #x119 + #x11a + #xcd + #xce + #xcf + #xcf + #xd0 + #xd0 + #xd1 + #xd2 + #xd2 + #xd3 + #xd4 + #xed + #xce + #xcf + #xe5 + #xe6 + #xe7 + #xe8 + #xe9 + #xea + #xeb + #xec + #xed + #x0 + #x0 + #x0 + #x0 + ) + ) + :cell-pov-bit-arrays (new 'static 'array uint64 255 + #x2b81e05dd1 + #xb81e05dd1 + #x2b81605d91 + #x2781605c91 + #x2780605891 + #x2790201e81 + #x27b0001f81 + #x67b8001f81 + #x67ba031f41 + #x47ba031f43 + #x47b2039743 + #x43b203a743 + #x453203a743 + #x453203b7c3 + #x413a03b7c3 + #x41388fbfc3 + #x2b81e05dd1 + #xb81e05dd1 + #x2b81e05dd1 + #x2781605dd1 + #x2781605d91 + #x2780605881 + #x2790001f81 + #x67b8001fc1 + #x47ba031f41 + #x47ba038743 + #x453203a743 + #x453203b7c3 + #x473203bfc3 + #x473a03bfc3 + #x433a0fbfc3 + #x42388fbfc3 + #x2b80e05dd0 + #xb81e05dd0 + #x2b81e05dd1 + #x2781605dd1 + #x2781605dd1 + #x2780605dd1 + #x2780001dc1 + #x738001fc1 + #x433a0317c1 + #x433a03bfc3 + #x463a03bfc3 + #x463203bfc3 + #x423203bfc3 + #x423a07bfc3 + #x42388fbfc3 + #x42388fbfc3 + #x3b80e059d0 + #x2b81e059d0 + #x2781e05dd0 + #x2781e05dd0 + #x2781605dd0 + #x2700605dd0 + #x2700001dc0 + #x710001fc1 + #x433a031fc1 + #x433a03bfc3 + #x433a03bfc3 + #x433203bfc3 + #x433203bfc3 + #x433a8fafc3 + #x43388fafc3 + #x43388fafc3 + #x3d80b819d0 + #x2f80f059d0 + #x2781e059d0 + #x2701e059d0 + #x27016059d0 + #x27006059d0 + #x2700605dd0 + #x33803bfc3 + #x33a03afc3 + #x413a03afc3 + #x413a03afc3 + #x413203afc3 + #x41328fafc3 + #x41388fafc3 + #x41388fafc3 + #x417a8fafc3 + #x3d82f858d8 + #x3f80f858d0 + #x2f01f058d0 + #x2f01f058d0 + #x2f01e05890 + #x3f01605810 + #x3f7061f612 + #x7803a602 + #x3a03a623 + #x403a03a7e3 + #x403a03a7c3 + #x41328fafc3 + #x413a8fafc3 + #x41388fafc3 + #x417a8fafc3 + #x417a8fafc3 + #x3f8a7858d8 + #x3e82f858d8 + #x2e80f85898 + #x2f01f05810 + #x2f01f05810 + #x3f01605810 + #x3f7061f602 + #x7803a602 + #x7e03a622 + #x3e03a723 + #x403a8fa743 + #x40328fa7c3 + #x403a8fa7c3 + #x40788fa7c3 + #x407a8fa7c3 + #x407b8fa7c3 + #x3f8a785898 + #x3e82785818 + #x3e82f85818 + #x2e03f85818 + #x2f01f85818 + #x3f01f05010 + #x3f00605010 + #x7001a602 + #x407c03a622 + #x407e03a623 + #x403a8fa703 + #x40328fa743 + #x40388fa743 + #x407a8fa7c3 + #x407b0fa7c7 + #x407b07a7c7 + #x3f80605818 + #x3e80605818 + #x3e82785818 + #x2e82f85818 + #x3e03f85818 + #x3f03f85018 + #x3f01f05018 + #x406e07a606 + #x407e8fa626 + #x407e8fa626 + #x407a8fa607 + #x40328fa707 + #x407a8fa707 + #x507b0fa747 + #x507b0ba747 + #x507b0ba7c7 + #x3f81405810 + #x3e81405810 + #x3e80405810 + #x2e80605810 + #x3e0bf85818 + #x1e0bf85018 + #x1e0bf85018 + #x5c6fb6000c + #x506e8e0224 + #x506e8fa626 + #x507a8fa607 + #x507b0fa607 + #x405b0fa707 + #x505b0fa707 + #x505b0fa747 + #x505b0fa747 + #x3e81405810 + #x3e81405810 + #x3e81405800 + #x3e80000000 + #x5049f85018 + #x5e4bf85018 + #x5e6bfc5218 + #x5e6bbe0208 + #x5c7ebe0224 + #x507e9fa624 + #x507b0fa405 + #x507b0fa405 + #x407b0fa605 + #x405b0fa705 + #x405a0ea707 + #x405a0fa767 + #x3e81405820 + #x3e81405800 + #x3e81805800 + #x3ec1b80018 + #x5061f85218 + #x5261fc5218 + #x5e61fe5218 + #x5e6bbe0208 + #x5e7ebe0004 + #x407f1f0424 + #x407f1fa424 + #x407b1fa405 + #x407b1fa405 + #x405a0f2725 + #x405a0fa727 + #x40520ea727 + #x3ec1c85820 + #x3e81d85820 + #x3ea1981228 + #x3ee1bc0238 + #x38e1fe5238 + #x1221fe5218 + #x1621fe5018 + #x5e0fbe1028 + #x5e5fa00020 + #x407f1e0424 + #x407f1f2424 + #x407f1fa425 + #x407f1fa425 + #x4055030225 + #x4055072727 + #x4055072727 + #x3ee1d85a20 + #x3ea19c5a28 + #x3ea1bc0238 + #x3ea1fe0238 + #x3ca1fe5038 + #x1021fe5038 + #x1205fe5038 + #x525fb81028 + #x407f000020 + #x77060424 + #x27060424 + #x7040024 + #x4015000020 + #x4015000020 + #x4055030621 + #x4055032725 + #x3ea19c5a28 + #x3ea19c1a28 + #x3ea5be0038 + #x3ea5fe0038 + #x3c85fe5038 + #x3807fe5038 + #x1257fc5038 + #x1257b81028 + #x1277000020 + #x1067020420 + #x1007060424 + #x7040024 + #x4005040020 + #x4015000020 + #x4055000020 + #x4055010621 + #x3ea59c1a28 + #x3ea5be1038 + #x3ea5be0038 + #x3e85fe4038 + #x3c87fe4038 + #x38d7fc5038 + #x3057f85038 + #x1257b81028 + #x1277200020 + #x1027020420 + #x1007060424 + #x1007040024 + #x5007040024 + #x4015000020 + #x4015000020 + ) + ) + ) + + + + diff --git a/test/offline/config/jak3/config.jsonc b/test/offline/config/jak3/config.jsonc index 792d6894d4..a8509a7516 100644 --- a/test/offline/config/jak3/config.jsonc +++ b/test/offline/config/jak3/config.jsonc @@ -113,7 +113,12 @@ "DGO/RBCT.DGO", "DGO/GGA.DGO", "DGO/VIN.DGO", - "DGO/LCTYBLOW.DGO" + "DGO/LCTYBLOW.DGO", + "DGO/LCTYPROT.DGO", + "DGO/LCTYPALT.DGO", + "DGO/PRECA.DGO", + "DGO/PRECD.DGO", + "DGO/LFACCITY.DGO" ], "skip_compile_files": [ @@ -375,7 +380,9 @@ "(method 47 bt-hellcat)", "(method 19 bt-gun-manager)", // asm - "close-sky-buffer" + "close-sky-buffer", + // protect-gunship + "find-reposition-pt" ], "skip_compile_states": {